Tom Erikson

Android on imx51 issues

Discussion created by Tom Erikson on Oct 3, 2011
Latest reply on Oct 3, 2011 by Tom Erikson

from these directions http://reviews.androids.name/2011/03/i-mx-android-firmware-developers-manual-very-good/ I followed steps

3.2.1

3.2.3

3.2.5

for the imx51 bbg.  The board I am using is the imx51 evk, which might be the issue but I am unsure.  Just to be clear on exactly what I did:

 

I used fdisk to partition an sd card like this:

Partition Type/Index

Name

Start Offset

Size

File System

Content

N/A

BOOT

0

10 MB

N/A

bootloader/kernel/uramdisk images

Primary 1

MEDIA

11 MB

User Defined

VFAT. Mount as /sdcards

Media file storage

Primary 2

SYSTEM

follow MEDIA

>= 200 MB

EXT4. Mount as /system (with read only)

Android system bin/libs (system.img)

Logic 5 (Extended 3)

DATA

follow SYSTEM

> 200 MB

EXT4. Mount as /data

Android data (e.g. installed app)

Logic 6 (Extended 3)

CACHE

follow DATA

> 10 MB

EXT4. Mount as /cache

Android cache

Primary 4

RECOVERY

follow CACHE

> 20 MB

EXT4. Mount as / in recovery mode

Root file system for recovery mode (recovery.img)

Then I ran these commands

# mkfs.vfat /dev/sdx1
# mkfs.ext4 /dev/sdx2 -O ^extent -L system
# mkfs.ext4 /dev/sdx4 -O ^extent -L recovery
# mkfs.ext4 /dev/sdx5 -O ^extent -L data
# mkfs.ext4 /dev/sdx6 -O ^extent -L cache

# sudo dd if=u-boot-no-padding.bin of=/dev/sdx bs=1K seek=1; sync

# sudo dd if=uImage of=/dev/sdx bs=1M seek=1; sync

# sudo dd if=uramdisk.img of=/dev/sdx bs=1M seek=6; sync

 

Then I put the sd card into the imx51 and powered up the board (dip switch set all off except 7 and 8).  UBoot loaded and I changed the environment variables to

bootdelay=1
baudrate=115200
netdev=eth0
ethprime=FEC0
uboot_addr=0xa0000000
kernel=uImage
nfsroot=/opt/eldk/arm
bootargs_base=setenv bootargs console=ttymxc0,115200 gpu_memory=16M
bootargs_nfs=setenv bootargs ${bootargs} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
bootcmd_net=run bootargs_base bootargs_nfs; tftpboot ${loadaddr} ${kernel}; bootm
prg_uboot=tftpboot ${loadaddr} ${uboot}; protect off ${uboot_addr} 0xa003ffff; erase ${uboot_addr} 0xa003ffff; cp.b ${loadaddr} ${uboot_addr} ${filesize}; setenv filesize; saveenv
bootcmd_SD=run bootargs_base bootargs_android;mmc read 0 ${loadaddr} 0x800 1800;mmc read 0 ${rd_loadaddr} 0x2000 0x258;bootm ${loadaddr} ${rd_loadaddr}
bootargs_android=setenv bootargs ${bootargs}  androidboot.console=ttymxc0 init=/init di1_primary calibration
bootcmd_android_recovery=run bootargs_base bootargs_android_recovery;mmc read 0 ${loadaddr} 0x800 0x1800;bootm
bootargs_android_recovery=setenv bootargs ${bootargs} init=/init root=/dev/mmcblk0p4 rootfs=ext4 di1_primary
ethact=FEC0
ethaddr=00:04:9f:00:ea:d3
fec_addr=00:04:9f:00:ea:d3
bootcmd=run bootcmd_SD; bootm ${loadaddr} 0x800 0x2000; mmc read 0 ${rd_loadaddr} 0x3000 0x300;
uboot=u-boot-no-padding.bin
bootargs=console=ttymxc0,115200 gpu_memory=16M androidboot.console=ttymxc0 init=/init di1_primary calibration
stdin=serial
stdout=serial
stderr=serial
loadaddr=0x90800000
rd_loadaddr=0x90B00000


And I get this error when I try to boot

BBG U-Boot > bootd

MMC read: dev # 0, block # 2048,count 6144 ...
6144 blocks read: OK

MMC read: dev # 0, block # 8192,count 600 ...
600 blocks read: OK
## Booting kernel from Legacy Image at 90800000 ...
   Image Name:   Linux-2.6.35.3-00026-g37d9315
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3150972 Bytes =  3 MB
   Load Address: 90008000
   Entry Point:  90008000
   Verifying Checksum ... OK
Wrong Ramdisk Image Format
Ramdisk image is corrupt or invalid
## Booting kernel from Legacy Image at 90800000 ...
Bad Header Checksum
ERROR: can't get kernel image!

MMC read: dev # 0, block # 12288,count 768 ...
768 blocks read: OK

 

I am unfamiliar with UBoot / Android / Linux so I am expecting it to be a simple mistake.  Let me know if you need anything else to diagnose why it won't boot the image.

 

Thanks

Outcomes