[U-Boot] Question: booting Linux from ext4 mmc partition

nidalpres nidalpres at gmail.com
Tue Jan 7 20:26:50 CET 2014


Hi Robert!

I have 4-5 microsd cards (Kingston, SanDisk, Samsung),
4 and 8GB in size, tried two, same thing.

I also tried vfat partition and disabled support for ext2 AND ext4
completely in u-boot, and basically same thing happened.

Then I tried to list/load files manually from vfat/ext4 partitions
using u-boot command prompt. I can list vfat and ext4 partitions
and load files from them into memory.

However, once I load uImage file everything regarding mmc access
and loading files breaks. I seems to me that loading one big file
somehow corrupts something (hahah, very precise explanation).
uImage is little over 4MB.

I will send detailed messages from u-boot command prompt session
regarding this when I get back to my workstation,
since it looks like it might be some sort of a bug,
or maybe just u-boot misconfiguration that didn't take
into account loading large files?


Thanks!
Nidal.

On Tue, Jan 7, 2014 at 7:58 AM, Robert Nelson <robertcnelson at gmail.com> wrote:
> On Mon, Jan 6, 2014 at 8:56 AM, nidalpres <nidalpres at gmail.com> wrote:
>> Hi all!
>>
>> I was following instructions from
>> http://eewiki.net/display/linuxonarm/iMX233-OLinuXino in order to get
>> mainline kernel to boot off of my olinuxino micro board.
>>
>> I have created two partitions on my SD card:
>>    Device Boot      Start         End      Blocks   Id  System
>> /dev/sde1            2048       67583       32768   53  OnTrack DM6 Aux3
>> /dev/sde2           67584     7829503     3880960   83  Linux
>>
>> and installed everything as per instructions. However on boot this is
>> what I get on console:
>> HTLLCLC
>>
>> U-Boot 2013.10-dirty (Jan 05 2014 - 19:38:28)
>>
>> CPU:   Freescale i.MX23 rev1.4 at 454 MHz
>> BOOT:  SSP SD/MMC #0
>> DRAM:  64 MiB
>> MMC:   MXS MMC: 0
>> *** Warning - bad CRC, using default environment
>>
>> In:    serial
>> Out:   serial
>> Err:   serial
>> Net:   Net Initialization Skipped
>> No ethernet found.
>> Hit any key to stop autoboot:  0
>> mmc0 is current device
>> SD/MMC found on device 0
>> 221 bytes read in 149 ms (1000 Bytes/s)
>> Importing environment from mmc (uEnv.txt)...
>> Checking if uenvcmd is set ...
>> Running default loadzimage ...
>> MMC0: Data error with command 18 (status 0xf0302020)!
>>  ** ext4fs_devread read error - block
>> =>
>>
>>
>> I couldn't find anywhere what "ext4fs_devread read error - block"
>> means. Found message origin in ext4fs_devread() function in u-boot
>> source after some time but I really can't get my head around on what
>> it means just by reading code. I suspect it doesn't like block sizes
>> or something, not sure.
>>
>> So I changed second partition to ext2 (instead of ext4) an changed env
>> parameters to instruct uboot that it is ext2 partition, nothing
>> changed.
>>
>> Then I changed source header file include/configs/mx23_olinuxino.h and
>> removed #define CONFIG_CMD_EXT4 from it hoping it will remove ext4
>> support. I also changed hardcoded env parameters in same file from
>> mmcrootfstype=ext4 to mmcrootfstype=ext2.
>> Recompiled u-boot, dd it to sd card, rinse and repeat, got exactly the
>> same response on console you see above.
>>
>> I give up for today after 3 hours of battling with it.
>>
>> I plan to make 3 partitions: amtrak, vfat (for kernel) and ext4 (for
>> rootfs). But if ext4fs_devread persists to complain (and I apparently
>> haven't removed it from code) I don't think it would work either.
>>
>> What is going on?
>> Can anyone give me some pointers what to do next?
>
> Just for sanity sake, have you tried try a different (brand) microSD card?
>
> Regards,
>
> --
> Robert Nelson
> http://www.rcn-ee.com/


More information about the U-Boot mailing list