The linux partition contains the following elements:
-
The kernel binary.
-
Several device tree blobs for each SOM and carrier board variant.
-
A U-Boot bootscript to boot the system.
The main purpose of the bootscript is to select the appropriate device tree blob depending on the detected SOM variant and carrier board. This element is provided by the bootloader Yocto recipe, not the kernel.
The linux partition is formatted depending on the storage media:
Media | File system |
---|---|
microSD |
FAT |
eMMC |
FAT |
To list the contents of the linux partition on MMC media, run ls mmc x:y in the U-Boot console where x is the device index (starting at 0) and y is the partition index (starting at 1). For example:
=> ls mmc 0:1 7345591 image.gz-ccimx8x-sbc-express.bin 69170 image.gz-ccimx8x-sbc-express-id129.dtb 69170 image.gz-ccimx8x-sbc-express-wb.dtb 68318 image.gz-ccimx8x-sbc-express.dtb 1431 boot.scr 5 file(s), 0 dir(s)
To update the files from U-Boot console, run updatefile command. See Update files within partition.
To update the files from user space, mount the linux partition. For that, you need to mount the /dev/mmcblk0p1 device as a vfat file system.
~# mkdir /mnt/linux ~# mount -t vfat /dev/mmcblk0p1 /mnt/linux ~# ls -l /mnt/linux -rwxr-xr-x 1 root root 69170 Sep 18 22:01 Image.gz-ccimx8x-sbc-express-id129.dtb -rwxr-xr-x 1 root root 69170 Sep 18 22:01 Image.gz-ccimx8x-sbc-express-wb.dtb -rwxr-xr-x 1 root root 7345591 Sep 18 22:01 Image.gz-ccimx8x-sbc-express.bin -rwxr-xr-x 1 root root 68318 Sep 18 22:01 Image.gz-ccimx8x-sbc-express.dtb -rwxr-xr-x 1 root root 1431 Sep 18 22:01 boot.scr
The linux partition is automatically mounted to /mnt/linux, but as a read-only filesystem. To be able to write on the partition, remount it read/write with mount -o remount,rw /dev/mmcblk0p1 /mnt/linux.
From your development machine, you can now copy the files to the target via ssh. For example:
scp Image.gz root@<cc8x-ip>:/mnt/linux/Image.gz-ccimx8x-sbc-express.bin
When building from Yocto, all the elements are packaged together in a single file:
-
dey-image-qt-xwayland-ccimx8x-sbc-express.boot.vfat or similar on the ConnectCore 8X SBC Express.
-
dey-image-qt-xwayland-ccimx8x-sbc-pro.boot.vfat or similar on the ConnectCore 8X SBC Pro.
To update the entire linux partition from U-Boot console, save the image file to your TFTP server and use the update command in U-Boot:
=> update linux tftp <filename>