I have my build working, but it requires some different edits. I now need to check into CM. I am guessing I need to make a oe layer, but am not sure. Can someone give me guidance on how to CM into git the following types of changes.
- Had to edit kernel config
- Had to edit kernel device tree
- Had to edit conf/local.conf to add
opkg packages
- Had to edit angstrom
config files such as /etc/hosts,
/etc/hostapd.conf , etc.
You guessed correctly - you should create your own layer such that you can maintain your customizations independently from the other upstream layers. You can simply copy an existing layer (such as meta-toradex-demo) and remove everything in the copied layer except the ‘conf’ dir. Edit the conf/layer.conf file in the new layer replacing all instances of the old layer name with the new layer name. At this point you can git init
the layer so you can start tracking changes. Then you can begin adding recipe directories & recipe bbappend files to the layer for each of the customizations you want to make.
For example, to add your custom kernel config & device tree, you might create the directories ‘recipes-kernel/linux’ and inside you would create a bbappend file that appends to the kernel recipe called linux-toradex_4.%.bbappend
. This is an example of such a recipe which adds configs to the kernel’s defconfig. You may also include your custom device tree in the same bbappend by way of a patch file. Likewise for your other customizations, you can append to other existing recipes. In some cases you may want to create your own recipes - for example you may want to create your own image recipe rather than appending to one of ours.
I recommend viewing our 2-part Yocto project webinar. Part 2 includes examples of all the things you’d like to do. At the time of the webinar we had a single layer (meta-toradex) for our BSP; however, it has now been split into several different layers. Beyond the webinar, you can learn quite a bit by digging through various layers/recipes for examples.