Load custom u-boot on Apalis iMX6 board

Before Easy Installer we followed this procedure to “install” our RAW image on Apalis iMX6 boards:

  • connect Apalis board to Ixora Carrier board

  • enter SD u-boot running bmode sd from Apalis u-boot

  • from custom u-boot, load the custom u-boot itself on mmc with a custom command

    run update_uboot
    where

    update_uboot=zero_mm2 loadub_mmc update_sub
    zero_mm2=mw.l ${loadaddr} 0 0x800000
    loadaddr=0x12000000
    loadub_mmc=ext2load mmc ${mmcdev}:1 ${loadaddr} boot/${ubfile}
    mmcdev=2
    ubfile=u-boot.imx.emmc
    update_sub=if mmc dev 0 ; then mmc write ${loadaddr} 0x2 0x380 ; fi
    Now the custom u-boot is on board and we can connect it our carrier and write the RAW image with dd.

The problem is that with the new Apalis boards (with Easy Installer preloaded) I’m not able to load my custom u-boot.

How can I change my uboot environment variables to be able to load it on mmc?

One thing I’ve noticed is that it looks like there is no mmc2 device, but mmc0 is used instead. Not sure if this could be the culprit.

NOTE: I’m asking a “how to” for my old procedure because I’m having quite a hard time generating a custom image for Easy Installer…

Pretty clever…

Did it work?

Well, actually I didn’t test it. In parallel I was preparing the full custom image (u-boot + rootfs) and got it working. I suppose that just flashing the u-boot will work the same way.

You can create U-Boot only Easy Installer image to flash your custom U-Boot.
Just take existing Easy Installer image. remove bootfs and rootfs tars from it. Replace u-boot.img (and possibly SPL) with your custom U-Boot. And then modify image.json to remove sections related to bootfs and rootfs. If you set “autoinstall” to TRUE and put that image to USB stick or SD card - your U-Boot will be flashed automatically when Easy Installer starts.