Boot Linux from SD Card : Colibri imx6

I want to boot Linux from a SD Card on Colibri imx6 module.

Based on this Article: Linux - Booting | Toradex Developer Center.
(Instructions available for Tegra2 and Apalis T30 but not for Colibri imx6).

My procedure is:

  1. Create the Linux image V2.6 with yocto : bitbake -k angstrom-lxde-image
  2. Format SD Card with only one ext3 partition
  3. Extract the Linux image to SD Card. Image file is: Colibri_iMX6_LinuxImage.rootfs.tar.bz2
  4. Insert SD Card on evaluation board X15
  5. Go to u-boot console
  6. u-boot console commands to change u-boot env variables sdargs and sdboot:

# setenv sdargs ‘ip=off root=/dev/mmcblk1p1 rw,noatime rootfstype=ext3 rootwait’

# setenv sdboot ‘run setup; setenv bootargs ${defargs} ${sdargs} ${setupargs} ${vidargs};
echo Loading kernel and rootfs from MMC/SD Card…; mmc dev 1 && ext2load mmc 1:1 ${loadaddr} /boot/uImage; bootm ${loadaddr}’

# saveenv

# run sdboot


No response. Doesn’t work.

I cannot see the device tree being loaded.

The following is an explicit split of the commands which need to be executed from uboot

run setup
setenv bootargs ${defargs} ${sdargs} ${setupargs} ${vidargs}
setenv dtbparam; load mmc 0:1 ${fdt_addr_r} ${fdt_file} && setenv dtbparam   "  -  ${fdt_addr_r}"
load mmc 0:1 ${kernel_addr_r} ${boot_file} && bootm ${kernel_addr_r} ${dtbparam}

See the original sdboot declaration here. Note that the above commands are loading the uImage and dtb from on-board eMMC. The MMC device parameter can be changed to load kernel uImage and dtb from SD card.

Updated information:

I deleted the "" character (before “echo Loading kernel…”) on sdboot variable.

Now, after saveenv and run sdboot, Linux kernel starts loading but stops.

Messages on u-boot:

Colibri iMX6 # run sdboot
Loading kernel and rootfs from MMC/SD Card…
mmc1 is current device
4713592 bytes read in 349 ms (12.9 MiB/s)

Booting kernel from Legacy Image at 12000000 …

Image Name: Linux-3.14.52-v2.6b2+g9ace52b
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4713528 Bytes = 4.5 MiB
Load Address: 10008000
Entry Point: 10008000
Verifying Checksum … OK
Loading Kernel Image … OK

Starting kernel …

------ No more messages from U-boot —

any idea about what is wrong?

As Sanchayan mentions, our U-Boot already has a sdboot deceleration. I would recommend to make use of it. Prepare a SD-card with two partition, the first being a FAT partition and containing the kernel (uImage) and the device tree (imx6dl-colibri-eval-v3.dtb). The second is the root file system, use a ext3 file system and copy the content of your rootfs (using something like this: sudo cp -pPr rootfs/* /run/media/ags/RFS).

Make sure to use the default environment using env default -a. With that SD card, and the default environment, it should work just by using run sdboot.

It would be nice if you could update the knowledge base entry “Linux - Booting | Toradex Developer Center” and insert the information about how the partitions have to be formatted by now for i.MX6 because it differs from the one-Partition-solution described there that peio first tried (and today the same happened to me).

Our latest V2.7 beta 1 BSP actually supports regular distro boot documented elsewhere.