Hi Guillermo,

On Tuesday 06 May 2014 18:57:45 Guillermo Rodriguez Garcia wrote:
> [...]
> > If the BSP has more requirements to make a specific application work on a
> > specific platform it must be able to overrule all other rules files. In
> > this
> > case you place them in the rules/ directory of the BSP. For example the
>
> [...]
>
> But this is where it starts to get confusing. I don't quite understand the
> difference between the "BSP" and the "platform".

The board support package (BSP) defines an application. And an application 
should (but not must) be platform independent. Think about an application 
which runs today on your Mini2440. Then you decide this platform is to slow 
and you want to change to the Mini6410 platform instead. If everything was 
well done, you just need to change the platform in your BSP and run "ptxdist 
go" again. Changing the platform in PTXdist BSP projects means you run a 
different "ptxdist platform <another platform>" command.

> Take the following example from the mini2440 BSP. It applies to the
> projectroot dir but I assume here the same logic as for the rules/ dir
> applies.
>
> The BSP's projectroot contains:
>
> /etc/rc.once.d/tscalibrate

The application (for example the little QT examples coming with the project) 
needs a *working* touchscreen. So, the BSP forces a touchscreen calibration 
once the system starts the first time.

> On the other hand, in configs/platform-mini2440/projectroot, we have
> among other files:
>
> /etc/ts.conf
> /etc/profile.environment

The Mini2440 platform provides a touchscreen. But to make it useable, a special 
configuration and environment setup is required.

> So what's the reason why some of these files end up in the BSP level
> and others in the platform level? None of them seems to be more or less
> generic than the others.

If you would change to the Mini6410 platform it also provides these files in 
its "configs/platform-mini6410/projectroot/etc" but with different content. 
So, the unchanged application in the BSP project will work on both platforms 
even if they differ in hardware details.

> (Sorry for all the questions, I am just trying to figure out where should I
> put my modified rule files)

Did you read the PTXdist Guru manual[1]?

Regards,
Juergen

[1] 
http://www.pengutronix.de/software/ptxdist/appnotes/OSELAS.BSP-Pengutronix-Generic-arm-Quickstart.pdf

-- 
Pengutronix e.K.                              | Juergen Borleis             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

Reply via email to