Hi,
I have a connectcore 6ul sbc pro with yocto project. Everytime I turn on the board it boots via tftp and takes the files from my computer. I have changed several files to adapt the firmware as I wanted (i have included scripts to be run when boot and other things). Now I want to keep all this files and keep the same firmware but boot from the board (with a SD card for example).
How can I do this?
Thank you in advanced.
I think I havent explain myself well. How do I save all the files (which now that I use tftd boot I have in my computer exports file) into the board to do the dboot linux nand?
I want to keep EVERYTHING so I dont know if saving in the sd card the ubifs files is going to keep all the files inside the exports file.
well if you know what files you’ve changed, you can just copy them to rootfs of your board. create a tar file that fill include them all and then transfer it to the rootfs and untar there. If this works for one board and you now need to deplu to many, use this tar to generate a Yocto patch so it will be included in your roots as it gets built.
https://www.digi.com/resources/documentation/digidocs/embedded/dey/2.6/cc6ul/yocto_t_customize-root-filesystem
I have tried to create a tar file with the files i have changed, untar it in a sd card and booting from there but it didnt work. If i boot from NAND the board doesnt find the image files.
I think the problem might be that I dont know how to copy files to the board rootfs. How can I do that?
Thanks
do not untar on SD card. copy tar file to SD card, then copy it from SD card to root folder fo your roots (/)
Alternatively transfer via ftp or scp to target directly
once tar file is in / of your roots untar there.
I have tried that. I transfer via scp the images and the files i want to keep:
scp zImage–4.14-r0.5-ccimx6ulsbc-20200326113948.bin root@192.168.xxx.xxx:/home/root/
:
then I reset the board and I do the following:
dboot linux nand
then the next error appears:
** File not found zImage–4.14-r0.5-ccimx6ulsbc-20200326113948.bin **
Error loading firmware file to RAM
Why doesnt find the image? may be when I reset the board losses its files?
Zimage is a kernel image, it does not reside in roots. It lives in the boot partition. you can mount boot partition and then copy it there but the most appropriate way to do it is to generate a new set of images including boot.ubifs and reflash it. Are you able to boot the board with stock images from flash?
Follow this if not:
https://www.digi.com/resources/documentation/digidocs/embedded/dey/2.6/cc6ul/yocto-gs_t_program-fw.html
If this works then compile your own images without making any changes following this:
https://www.digi.com/resources/documentation/digidocs/embedded/dey/2.6/cc6ul/yocto_r_system-development
Program your new images to flash and see if they still boot following this:
https://www.digi.com/resources/documentation/digidocs/embedded/dey/2.6/cc6ul/yocto_t_program-firmware-from-uboot
once that works start customizing your system. Assuming you making changes to kernel follow this at first:
https://www.digi.com/resources/documentation/digidocs/embedded/dey/2.6/cc6ul/yocto_t_make-changes-devshell
Generate a new set of images and program as above…
Ok I think I could make it easier if I could reach to the following files:
I made a .sh script and I kept it in the /exports/nfsroot-ccimx6ulsbc/etc/init.d file. This script executes a python script when the device boots.
I can reach the init.d file because I do tftp boot so the files are saved in my computer. If I do sd boot I dont know how to save this .sh script in the init.d file so the only thing i need is to know how to save this script in that file and execute it when the device boots.