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 7843191 Image.gz-ccimx8x-sbc-pro.bin 86501 ccimx8dx-sbc-pro-wb.dtb 85023 ccimx8dx-sbc-pro.dtb 86865 ccimx8qxp-sbc-pro-id135.dtb 86865 ccimx8qxp-sbc-pro-wb.dtb 85387 ccimx8qxp-sbc-pro.dtb 1857 boot.scr 7 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 7843191 Sep 27 11:22 Image.gz-ccimx8x-sbc-pro.bin -rwxr-xr-x 1 root root 1857 Sep 27 11:22 boot.scr -rwxr-xr-x 1 root root 86501 Sep 27 11:22 ccimx8dx-sbc-pro-wb.dtb -rwxr-xr-x 1 root root 85023 Sep 27 11:22 ccimx8dx-sbc-pro.dtb -rwxr-xr-x 1 root root 86865 Sep 27 11:22 ccimx8qxp-sbc-pro-id135.dtb -rwxr-xr-x 1 root root 86865 Sep 27 11:22 ccimx8qxp-sbc-pro-wb.dtb -rwxr-xr-x 1 root root 85387 Sep 27 11:22 ccimx8qxp-sbc-pro.dtb
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-pro.bin
When building from Yocto, all the elements are packaged together in a single file:
-
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>