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
5721120 zimage-ccimx6sbc.bin
49226 zimage-imx6dl-ccimx6sbc.dtb
49405 zimage-imx6dl-ccimx6sbc-w.dtb
49492 zimage-imx6dl-ccimx6sbc-wb.dtb
51877 zimage-imx6q-ccimx6sbc.dtb
52052 zimage-imx6q-ccimx6sbc-w.dtb
52139 zimage-imx6q-ccimx6sbc-wb.dtb
52335 zimage-imx6q-ccimx6sbc-wb-ldo-bypass.dtb
52073 zimage-imx6q-ccimx6sbc-id129.dtb
52147 zimage-imx6q-ccimx6sbc-id130.dtb
49474 zimage-imx6dl-ccimx6sbc-id131.dtb
2336 boot.scr
12 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 2336 Feb 9 12:47 boot.scr -rwxr-xr-x 1 root root 5722520 Feb 9 12:47 zImage-ccimx6sbc.bin -rwxr-xr-x 1 root root 49474 Feb 9 12:47 zImage-imx6dl-ccimx6sbc-id131.dtb -rwxr-xr-x 1 root root 49405 Feb 9 12:47 zImage-imx6dl-ccimx6sbc-w.dtb -rwxr-xr-x 1 root root 49492 Feb 9 12:47 zImage-imx6dl-ccimx6sbc-wb.dtb -rwxr-xr-x 1 root root 49226 Feb 9 12:47 zImage-imx6dl-ccimx6sbc.dtb -rwxr-xr-x 1 root root 52139 Feb 9 12:47 zImage-imx6q-ccimx6sbc-id129.dtb -rwxr-xr-x 1 root root 52147 Feb 9 12:47 zImage-imx6q-ccimx6sbc-id130.dtb -rwxr-xr-x 1 root root 52052 Feb 9 12:47 zImage-imx6q-ccimx6sbc-w.dtb -rwxr-xr-x 1 root root 52335 Feb 9 12:47 zImage-imx6q-ccimx6sbc-wb-ldo-bypass.dtb -rwxr-xr-x 1 root root 52139 Feb 9 12:47 zImage-imx6q-ccimx6sbc-wb.dtb -rwxr-xr-x 1 root root 51877 Feb 9 12:47 zImage-imx6q-ccimx6sbc.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 zImage root@<cc6-ip>:/mnt/linux/zImage-ccimx6sbc.bin
When building from Yocto, all the elements are packaged together in a single file:
-
dey-image-qt-x11-ccimx6sbc.boot.vfat or similar on the ConnectCore 6 SBC.
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>