Flashing Buildroot image files on Apalis iMX6


Per Stuart @ Toradex, I am posting here to get some documentation on flashing buildroot images to the Apalis i.MX6. I understand that Toradex prefers Yocto, but for many embedded systems, Buildroot is a better choice.

Their documentation is quite good for the Apalis i.MX6 actually, but falls short on flashing to the Apalis. The do reference a Toradex document, but it is not a direct map and I’m not finding my way.

Apalis configuration is already in the long-term support release of Buildroot.

See README: buildroot/board/toradex/apalis-imx6 at master · buildroot/buildroot · GitHub

All you have to run is:

$ make toradex_apalis_imx6_defconfig
$ make

The results are slightly different format from the Yocto images.

$ ls output/images/
imx6q-apalis-eval.dtb        rootfs.ext2  SPL         zImage
imx6q-apalis-ixora.dtb       rootfs.ext4  u-boot.bin
imx6q-apalis_v1_0-eval.dtb   rootfs.tar   u-boot.img
imx6q-apalis_v1_0-ixora.dtb  sdcard.img   uEnv.txt

They provide some suggested u-boot settings in uEnv.txt:

sdargs=ip=off root=/dev/mmcblk1p1 rw,noatime rootfstype=ext4 rootwait
sddtbload=ext2load mmc 2:1 ${fdt_addr_r} boot/${fdt_file}
sdkernelload=ext2load mmc 2:1 ${kernel_addr_r} boot/${boot_file}
bootcmd=run setup; setenv bootargs ${defargs} ${sdargs} ${setupargs} ${vidargs}; echo Booting from SD card...; run sddtbload; run sdkernelload; bootz ${kernel_addr_r} - ${fdt_addr_r}

Yet I still can’t seem to combine their tips and the referenced Toradex document into something that actually works as far as flashing the device.

Please invest a few minutes to provide this information. It’s quite simple and will help many people beside myself. We’re not asking you to support buildroot–it’s fine to leave that up to the user. Just asking for the very basic recipe of device-specific flashing commands to get from their “output/images” directory onto the SD card and onto the Toradex module. I think this is quite minimal on your end and quite useful for many people. I’m sure it’s just a few commands.

I will even promise to add your instructions to their README file via a pull request.

PLEASE & Thank You,


hi @mk1rallyrabbit

For flashing the parts of the Image created by Buildroot to the Toradex module, you can integrate these parts to Legacy Image or Toradex Easy Installer Image. Afterwards, you install the new customised image using the Legacy Procedure or using Toradex Easy Installer. Feel free to ask if you have any other questions.

Best regards, Jaski

OK, not what I was hoping for, to depend on one image in order to deploy another image, but it works. Thank you.

For others, I did this…

$ cd ~/buildroot
$ make toradex_apalis_imx6_defconfig
$ make
$ cd ~
$ tar -jxf Apalis-iMX6_LXDE-Image_2.8b5.156-20181228.tar.bz2
$ cd Apalis-iMX6_LXDE-Image_2.8.5/rootfs/
$ sudo rm -rf ./*
$ sudo cp -a ~/buildroot/output/images/rootfs/* .
$ sudo cp ~/buildroot/output/images/zImage apalis-imx6_bin/
$ sudo cp ~/buildroot/output/images/*.dtb apalis-imx6_bin/
$ sudo cp ~/buildroot/output/images/SPL apalis-imx6_bin/
$ sudo cp ~/buildroot/output/images/u-boot.* apalis-imx6_bin/
$ sudo rm -rf /media/my_sdcard/*
$ sudo ./update.sh -o /media/my_sdcard/ -m 1

Then insert into Apalis/Ixora and reboot, press CTRL-C, then:

# run setupdate
# run update

And it boots right into my image.

Welcome to Buildroot
buildroot login:

Perfect that it works. Thanks for the feedback and your Input.

What exact hardware (module and carrier board) and software (e.g. installed on the module) versions of things are you talking about?

BTW: hijacking old questions is discouraged.

What exact hardware, what pin numbers?

Hi @mk1rallyrabbit,

Could you tell me what is the format of the sdcard before doing step #13 and #14, please ?

Thanks and regards,

As explained e.g. here:

Use any FAT formatted SD/uSD card or USB flash drive with enough free space (1GB or more recommended).

Note: U-Boot expects a partition table (MBR) on the SD card or USB flash drive and the FAT partition to be the first partition!

Thanks Max,

I could do it successfully. I also noticed that it works well with Apalis-iMX6_LXDE-Image_2.7-20180104.tar.bz2 but not with Apalis-iMX6_LXDE-Image_2.8b5.156-20181228.tar.bz2.

One more thing is that if I copy the zImage to apalis-imx6_bin/ folder, the system will use the same kernel provided in the tarball. If I enable the uImage in Buildroot then use it instead of the zImage, the expected kernel (in Buildroot) will be loaded correctly.