Best practices for customizing Yocto BSP

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Best practices for customizing Yocto BSP

Jump to solution
2,507 Views
stian
Contributor I

I'm new to Yocto, and would appreciate some pointers to best practices, as well as corrections of possible misconceptions.

I have a custom carrier board, which uses the Variscite VAR-SOM-MX6 module which contains an iMX6, DDR, NAND, eMMC, WiFi, BT, touch screen interfaces and so on. Variscite provides a BSP which supports these units together with a carrier board.

However, we need to change at least the following aspects:
- Base the distribution on a minimal image, with added packages as necessary (e.g. shell and standard Linux utilities, but no graphical software, web server etc)
- No screen/keyboard
- Custom device tree (GPIO mux setup etc)
- Custom kernel configuration (enable drivers for devices on the carrier board)
- Custom script configuration (e.g. network setup)

The goal is to be able to efficiently maintain and update these changes, as well as get updates from Variscite when necessary, and finally being able to create images for distribution.

I imagine there are several ways to achieve this, and would like opinions on which ones are more feasible (or even possible), and of course other ways if I have missed some.

1. Use Variscite's BSP, make all changes in local build directory (local.conf)
2. Copy Varisiscite's BSP and modify to our needs. This one seems to be the most straight-forward, but seems less elegant, and makes it hard to track updates from Variscite
3. Create a new BSP which refers to Variscite's. I am not sure if a BSP layer can be "on top of" another BSP layer?
4. Use Variscite's BSP and perform manual modifications (e.g. build kernel out of tree, or modify config settings on deployed image). During my few days of experiments, I have done this, which has been fine for prototyping. However, this is no good solution with regards to efficiency, version control and distribution.

Labels (2)
Tags (2)
1 Solution
1,361 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello,

The first option may work for testing, although as you mention it’s not as elegant not as appropriate if you wish to be able to distribute your modified BSP. The fourth option is fine for development but again, not meant for distribution.

Yocto is indeed not focused on development (in that regard it may be better to work on a local BSP and perform the changes and compile manually until it’s been debugged) but rather on distribution.

Yocto is meant to be used exactly as you mentioned on the third option, through layers that allow to customize and reuse a lot of code, packages and configurations. You should be able to create a new layer to add patches and packages unique to your customized BSP. There is some information on how to create a new layer on the following community document:

https://community.nxp.com/docs/DOC-331917

You should also go through the following training which is simple but very informative and well structured. I’m sure it will help:

https://community.nxp.com/docs/DOC-94849

Regards,

View solution in original post

2 Replies
1,362 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello,

The first option may work for testing, although as you mention it’s not as elegant not as appropriate if you wish to be able to distribute your modified BSP. The fourth option is fine for development but again, not meant for distribution.

Yocto is indeed not focused on development (in that regard it may be better to work on a local BSP and perform the changes and compile manually until it’s been debugged) but rather on distribution.

Yocto is meant to be used exactly as you mentioned on the third option, through layers that allow to customize and reuse a lot of code, packages and configurations. You should be able to create a new layer to add patches and packages unique to your customized BSP. There is some information on how to create a new layer on the following community document:

https://community.nxp.com/docs/DOC-331917

You should also go through the following training which is simple but very informative and well structured. I’m sure it will help:

https://community.nxp.com/docs/DOC-94849

Regards,

1,253 Views
lex
Contributor I

The training doesn't seem to be available anymore, is this correct?

0 Kudos