Hi,
I am trying to build a U-Boot and Linux Kernel from Source Code.
I have successfully completed Building U-Boot, Building Linux Kernel and Building the Device Tree Overlays.
How to deploy these images into the target board ?
Here I am following the Build U-Boot and Linux Kernel from Source Code article.
I have a little bit of confusion with this article. Please someone help me to overcome this issue.
Note: I was already asked this question, I got some solutions still I am not able to Deploy my images to target board.
Process followed Or solutions.
1.Untar the Toradex easy installer image of colibri-imx7d-emmc(e.g Colibri-iMX7-eMMC_Reference-Multimedia-Image-Tezi_5.4.0-devel-20210831+build.409.tar).
2.Copy the compiled u-boot image(u-boot.imx) to Colibri-iMX7-eMMC_Reference-Multimedia-Image-Tezi_xx directory.
3.Now you will find the Reference-Multimedia-Image-colibri-imx7-emmc.bootfs.tar.xz file inside the extracted image.untar the Reference-Multimedia-Image-colibri-imx7-emmc.bootfs.tar.xz and copy the compiled kernel(zImage) and device trees(e.g imx7d-colibri-emmc-eval-v3.dtb ).
4.Tar the above bootfs directory and now you’re ready to flash the new image of Colibri imx7.
5.Flash the new image using Toradex easy installer
Note: Here 1.I am not able to find the images zImage(I think it is nothing but vmlinux which is generated after compiling the linux-toradex).
Device trees(e.g imx7d-colibri-emmc-eval-v3.dtb ). where I can find this .dtb file (device-tree-overlays folder only .dtbo files are there that .dtbo file also which is compatible with my imx7D SOM ).
1.I am not able to find the images zImage(I think it is nothing but vmlinux which is generated after compiling the linux-toradex).
You will find the kernel binary i.e zImage inside the directory linux-toradex/arch/arm/boot/.
Device trees(e.g imx7d-colibri-emmc-eval-v3.dtb ). where I can find this .dtb file (device-tree-overlays folder only .dtbo files are there that .dtbo file also which is compatible with my imx7D SOM ).
There are two ways to update the device_tree files. One way is to use the <device_tree>.dtb( make DTC_FLAGS=“-@” <device_tree>.dtb) files present inside the directory linux-toradex/arch/arm/boot/dts/ or another one is device tree overlays. since kernel v5.xx supports overlays, provides a way to modify the existing device_tree without recompiling the full device_tree.
For more information please refer to device-tree-overlays(linux)
Steps to compile device-tree-overlays
.Untar the Toradex easy installer image of colibri-imx7d-emmc(e.g Colibri-iMX7-eMMC_Reference-Multimedia-Image-Tezi_5.4.0-devel-20210831+build.409.tar)
After untar the Colibri-iMX7-eMMC_Reference-Multimedia-Image-Tezi_5.4.0-devel-20210831+build.409.tar.
I am replaced the image u-boot.imx(deleted) with new image u-boot-dtb.imx
2.untar the Reference-Multimedia-Image-colibri-imx7-emmc.bootfs.tar.xz and replaced the zimage with new zimage which is available in the location linux-toradex/arch/arm/boot/. as per your guidelines.
I am compiled the device-tree-overlays using the device-tree-overlays.
Note: Here I was just run the two commands for compilation
$ export STAGING_KERNEL_DIR=/home/user/workdir/linux-toradex
$ make
After untar the Colibri-iMX7-eMMC_Reference-Multimedia-Image-Tezi_5.4.0-devel-20210831+build.409.tar.
I am replaced the image u-boot.imx (deleted) with new image u-boot-dtb.imx
2.untar the Reference-Multimedia-Image-colibri-imx7-emmc.bootfs.tar.xz and replaced the zimage with new zimage which is available in the location linux-toradex/arch/arm/boot/. as per your guidelines.
I am compiled the device-tree-overlays using the device-tree-overlays.
Note: Here I was just run the two commands for compilation
$ export STAGING_KERNEL_DIR=/home/user/workdir/linux-toradex
$ make
Untar the embedded Linux image of Colibri imx7d-emmc $ tar xf ~/Downloads/Colibri-iMX7-eMMC_Reference-Multimedia-Image-Tezi_5.4.0-devel-20210831+build.409.tar 2.$ cd Colibri-iMX7-eMMC_Reference-Multimedia-Image-Tezi_5.4.0-devel-20210831+build.409 3.$ mkdir Reference-Multimedia-Image-colibri-imx7-emmc.bootfs 4.$ cd Reference-Multimedia-Image-colibri-imx7-emmc.bootfs 5.$ tar xJf …/Reference-Multimedia-Image-colibri-imx7-emmc.bootfs.tar.xz
6.Now copy the compiled kernel binary and devicetree files to bootfs directory. $ cp ~/linux-toradex/arch/arm/boot/zImage . $cp ~/linux-toradex/arch/arm/boot/dts/(devicetree).dtb .
7.Now compress the bootfs directory $ tar cJf …/Reference-Multimedia-Image-colibri-imx7-emmc.bootfs.tar.xz *
8.Copy the full Linux image i.e Colibri-iMX7-eMMC_Reference-Multimedia-Image-Tezi_5.4.0-devel-20210831+build.409 to a fat32 Pendrive/sd card and flash the image using Toradex easy installer
while loading time I am getting an error message.
can not open Reference-Multimedia-Image-colibri-imx7-emmc.bootfs.tar.xz : No such file or directory
xz:(stdin):file format not recognized .
Here may be I was missing in order to download the proper version files.
All most I was followed that guidance same.
but I don’t know the file versions which are suitable for my IMX7D 1gb.
kernel compiltion.
1.git clone -b toradex_5.4-2.3.x-imx git://git.toradex.com/linux-toradex.git.
2.make colibri_imx7_defconfig.
3.make nconfig.
4.make -j$(nproc) zImage 2>&1 | tee build.log
5. make DTC_FLAGS=“-@” imx7d-colibri-emmc-eval-v3.dtb
6. make -j$(nproc) zImage 2>&1 | tee build.log
7.make imx7d-colibri-emmc-eval-v3.dtb
After successfully completing these steps.
For deploying my images I followed your guidance.
still I am getting the error like this.