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 7953787 Image.gz-ccimx8mn-dvk.bin 45928 ccimx8mn-dvk-wb.dtb 44196 ccimx8mn-dvk.dtb 1414 boot.scr 4 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 -la /mnt/linux/ -rwxr-xr-x 1 root root 7953787 Feb 4 08:48 Image.gz-ccimx8mn-dvk.bin -rwxr-xr-x 1 root root 1414 Feb 4 08:48 boot.scr -rwxr-xr-x 1 root root 45928 Feb 4 08:48 ccimx8mn-dvk-wb.dtb -rwxr-xr-x 1 root root 44196 Feb 4 08:48 ccimx8mn-dvk.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@<cc8mnano-ip>:/mnt/linux/Image.gz-ccimx8mn-dvk.bin
When building from Yocto, all the elements are packaged together in a single file:
-
dey-image-qt-xwayland-ccimx8mn-dvk.boot.vfat or similar on the ConnectCore 8M Nano Development Kit.
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>