Deploying the U-Boot binary to an Image For IMX7

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).

  1. 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 ).

Can anyone help me?

apologies for asking the same question again.

Thanhs .

Hi @TRINU

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

For this I need to install the toradex easy installer ?

For this I need to install the toradex easy installer ?

Hi @TRINU

.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)

Get the Linux image offline and untar the same.

After untar the Colibri-iMX7-eMMC_Reference-Multimedia-Image-Tezi_5.4.0-devel-20210831+build.409.tar.

  1. 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.
  2. 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

Next what should I do?
Thanks

After untar the Colibri-iMX7-eMMC_Reference-Multimedia-Image-Tezi_5.4.0-devel-20210831+build.409.tar.

  1. 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.
  2. 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

Next what should I do?
Thanks

Hi @TRINU

Hereby providing the complete steps again

  1. 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 .

After connecting the Pendrive

Error images


afetr this step I am deleting the original Reference-Minimal-Image-apalis-imx8.bootfs folder

Hi @TRINU

Sorry for the miss guidance.could you check with this

$ tar cJf …/Reference-Multimedia-Image-colibri-imx7-emmc.bootfs.tar.xz *

I was used the same file.
Not this

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.

$ git clone -b <branch> git://git.toradex.com/u-boot-toradex.git
$ make <config>
$ git clone -b <branch> git://git.toradex.com/linux-toradex.git
$ make <defconfig>
$ make <device-tree>.dtb

Mistakes may happen while downloading from git.
You have already explained this concept to me.
Thanks for your help.

Hi @TRINU

Are you still facing the issue?

Hi,
Yes,ashok.
steps followed by me.
building the u boot.

1.
git clone -b 	toradex_2020.07 git://git.toradex.com/u-boot-toradex.git

$ make colibri_imx7_emmc_defconfig.

$ make -j$(nproc) 2>&1 | tee build.log

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.

.

Note : Here I am downloading the downstream kernel.
thanks for your help.