Thanks for the answer.
Short version of what I still have troubles with:
Modifying the source file in tmp/work/.../git worked, but I want to make the change stay. I have attempted patches but I can't seem to make it work.
I *think* that working with patches is the correct workflow, is that correct? How would you do it?
--- detailed version ---
I modified
"build/tmp/work/imx6qsabresd-poky-linux-gnueabi/u-boot-fslc/v2014.01-r0/git/inlude/configs/mx6sabre_common.h", to add a string to CONFIG_EXTRA_ENV_SETTINGS, netboot:
- "netboot=echo Booting from net...; " \
+ "netboot=echo Booting from net DO I SEE THIS?...; " \
After this I recompiled u-boot:
build $ bitbake u-boot -c compile -f
Which resulted in:
NOTE: Preparing runqueue
NOTE: Tainting hash to force rebuild of task /home/gauthier/numpy-fsl-community-bsp/sources/meta-fsl-arm/recipes-bsp/u-boot/u-boot-fslc_2014.01.bb, do_compile
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 214 tasks of which 213 didn't need to be rerun and all succeeded.
Then I uploaded the .sdcard file to my SD card, stopped the boot at the u-boot prompt, and "print" gave:
netboot=echo Booting from net ...; run netargs; if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; ${get_cmd} ${uimage}; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if ${get_cmd} ${fdt_addr} ${fdt_file}; then bootm ${loadaddr} -
...
The change did not make it. What was wrong is that I only rebuilt u-boot, and didn't regenerate the image. After a:
build $ bitbake core-image-minimal
and a new upload, the command was updated!
This is great, but the manual changes will disappear the next time I sync the repo, or at the next clean.
I understand from the doc (Yocto Project Development Manual) that I have to make a patch, but I do not find the information there precise enough for me. What is the best practice to create a patch for this file, and make sure the patch is applied at the next build?
Is the following workflow acceptable, or should it be different:
- make changes in build/tmp/work/imx6qsabresd-poky-linux-gnueabi/u-boot-fslc/v2014.01-r0/git/
- test with recompiling the module (-c compile -f) and regenerating the image
- when it works, commit with "git commit -a --sign-off" and a meaningful message
- create a patch with the new work, with "git format-patch -1" (or whichever number of commits)
- copy the new .patch file(s) to sources/meta-fsl-arm/recipes-bsp/u-boot/u-boot-imx/.
- regenerate the whole image (I tested that the patch was applied by modifying the copied .patch file by hand before generating)
-> the old string ("DO I SEE THIS?") was still there. The patch was not applied.
I tried to force rebaking u-boot with:
build $ bitbake u-boot -f
but the file git/include/configs/mx6sabre_common.h was untouched by the patch.
I tried copying the .patch file to mx6sabre_common.patch, it did not help.
(I have no idea why this topic was made "Assumed Answered")