Deploy the kernel on your target
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 with a different file system depending on the storage media:
Media |
File system |
---|---|
microSD |
FAT |
eMMC |
FAT |
NAND flash |
UBIFS |
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, on the ConnectCore 6:
=> 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
For FAT partitions, you can use the updatefile command to update the kernel or the device tree blobs.
To update the files from userspace, mount the linux partition:
- For systems using eMMC, mount the /dev/mmcblk0p1 device as a vfat file system:
root@ccimx6sbc:~# mkdir /mnt/linux root@ccimx6sbc:~# mount -t vfat /dev/mmcblk0p1 /mnt/linux root@ccimx6sbc:~# 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
On the ConnectCore 6, 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.
- For systems using a NAND flash, mount the /dev/ubi0_0 device as a ubifs file system:
root@ccimx6ulstarter:~# mkdir /mnt/linux root@ccimx6ulstarter:~# mount -t ubifs /dev/ubi0_0 /mnt/linux/ root@ccimx6ulstarter:~# ls /mnt/linux/ -l -rw-rw-r-- 1 1000 1000 648 Sep 8 2016 boot.scr -rw-rw-r-- 1 1000 1000 5939232 Sep 8 2016 zImage-ccimx6ulstarter.bin -rw-r--r-- 1 1000 1000 29496 Sep 8 2016 zImage-imx6ul-ccimx6ulstarter-id129.dtb -rw-r--r-- 1 1000 1000 29496 Sep 8 2016 zImage-imx6ul-ccimx6ulstarter-wb.dtb -rw-r--r-- 1 1000 1000 28852 Sep 8 2016 zImage-imx6ul-ccimx6ulstarter.dtb
From your development machine, you can now copy the files to the target via ssh. For example, for the ConnectCore 6UL SBC Express/Pro:
scp zImage root@<cc6ul-ip>:/mnt/linux/zImage-ccimx6ulstarter.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.
- dey-image-qt-x11-ccimx6qpsbc.boot.vfat or similar on the ConnectCore 6 Plus.
- dey-image-qt-x11-ccimx6ulsbc.boot.ubifs or similar on the ConnectCore 6UL SBC Pro.
- core-image-base-ccimx6ulstarter.boot.ubifs or similar on the ConnectCore 6UL SBC Express.
To update the entire linux partition, save the image file to your TFTP server and use the update command in U-Boot:
=> update linux tftp <filename>