Before I showed how to run Android 2.3 on KZM-A9-Dual board.
(Quick hack to run Android 2.3(Gingerbread) on KZM-A9-Dual board) At that time I put the root file system on NFS server. This time let’s put it on SD card.
The easiest way is replace root file system from Android 2.2 bootable SD card.
(Japanese version of this page)

Make bootable SD card for KZM-A9-Dual board

At first, make bootable SD card of Andorid 2.2. Follow the instruction of this page.(How to make bootable SD card for KZM-A9-Dual) and test it.

You don’t have to change the uboot and the kernal.

Build Android 2.3 and create its root file system

Follow the instruction of this page. (Japanese version of this page)

Execute ./make_nfsroot.sh so that root file system is created at /export/android/root.
It is better to check this root file system by booting by NFS mount. Or you may skip and continue.

Copy root file system to SD card

Copy root file system located /export/android/root to the 3rd partition of SD card. Remove /data because it need to regenerate.

At first, insert SD card to SD card reader at PC Ubuntu and check the device file. (in my case, /dev/sdb)
Then mount the 3rd partition of it to /mnt.

$ ls /dev/sd*
/dev/sda   /dev/sda2  /dev/sdb   /dev/sdb2  /dev/sdc
/dev/sda1  /dev/sda5  /dev/sdb1  /dev/sdb3
$ sudo mount /dev/sdb3 /mnt
$ ls /mnt
acct    data          init              init.rc      mnt     sys
cache   default.prop  init.goldfish.rc  init.rc.org  proc    system
config  dev           init.kzm9d.rc     lib          sbin
d       etc           initlogo.rle      lost+found   sdcard

Remove all files in /mnt and copy from /export/android/root.

$ sudo rm -rf /mnt/*
$ sudo cp -a /export/android/root/* /mnt/
$ ls /mnt
acct    data          init.goldfish.rc  proc    system
cache   default.prop  init.rc           sbin    ueventd.goldfish.rc
config  etc           init.rc.org       sdcard  ueventd.rc
d       init          mnt               sys     vendor

remove /data and unmount SD card.

$ sudo rm -rf /mnt/data/
$ ls /mnt
acct    default.prop  init.goldfish.rc  proc    system
cache   dev           init.rc           sbin    ueventd.goldfish.rc
config  etc           init.rc.org       sdcard  ueventd.rc
d       init          mnt               sys     vendor
$ sudo umount /mnt
$ 

OK. Copying is done.

Booting from SD card

Insert the SD card to SD card slot of KZM-A9-Dual board and confirm the dip switch as below.

   DSW1-3 OFF
   DSW1-4 ON

It takes time at first time. Type ‘logcat’ at serial console and wait about 3 minutes.(refer:Comparing boot time of KZM-A9-Dual by various SD cards(in Japanese))

Boot log

Booted Device: SD
Board: EM/EV ES2 (Rev.ffffff20)
Core:  1.15v
DRAM:  512 MB
Flash: 64 MB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0
## Booting kernel from Legacy Image at 40007fc0 ...
   Image Name:   Linux-2.6.29
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3897312 Bytes =  3.7 MB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Linux version 2.6.29 (kmc@ubuntu) (gcc version 4.4.1 (Sourcery G++ Lite 2009q3-67) ) #1 SMP PREEMPT Wed Apr 27 10:38:53 JST 2011
CPU: ARMv7 Processor [411fc092] revision 2 (ARMv7), cr=10c57c7f
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: KZM9D
Memory policy: ECC disabled, Data cache writealloc
Built 2 zonelists in Zone order, mobility grouping on.  Total pages: 97790
Kernel command line: root=/dev/mmcblk1p3 noinitrd init=/init console=ttyS1,115200n8n androidboot.console=ttyS1 SELINUX_INIT=no mem=129M@0x40000000 mem=256M@0x50000000 rw video=qfb: ip=none rootfstype=ext3 rootwait
Unknown boot option `androidboot.console=ttyS1': ignoring
PID hash table entries: 2048 (order: 11, 8192 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 129MB 256MB = 385MB total
Memory: 385820KB available (3520K code, 769K data, 128K init)
Calibrating delay loop... 1061.68 BogoMIPS (lpj=5308416)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
CPU1: Booted secondary processor
Calibrating delay loop... 1061.68 BogoMIPS (lpj=5308416)
Brought up 2 CPUs
SMP: Total of 2 processors activated (2123.36 BogoMIPS).
net_namespace: 312 bytes
NET: Registered protocol family 16
PL310/L2C-310 cache controller enabled
chip revision ffffff20
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 5, 131072 bytes)
TCP bind hash table entries: 16384 (order: 5, 196608 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
NET: Registered protocol family 1
Power Management for EMXX.
spi: registered device spi [spi]
Starting pmu...
ashmem: initialized
yaffs Apr 27 2011 10:38:46 Installing.
msgmni has been set to 754
io scheduler noop registered
io scheduler anticipatory registered (default)
emxx_fb: registered device fb
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xe1020000 (irq = 40) is a TI16750
serial8250.0: ttyS1 at MMIO 0xe1030000 (irq = 41) is a TI16750
console [ttyS1] enabled
loop: module loaded
pmem: 1 init
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
smsc911x: Driver version 2008-10-21.
smsc911x-mdio: probed
eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:01, irq=-1)
net eth0: MAC Address: 00:0a:a3:02:12:ae
Linux video capture interface: v2.00
emxx_v4l2: registered device video0 [v4l2]
i2c /dev entries driver
Driver 'sd' needs updating - please use bus_type methods
Battery probe...
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
emxx-ehci-driver emxx-ehci-driver: EMXX EHCI
emxx-ehci-driver emxx-ehci-driver: new USB bus registered, assigned bus number 1
emxx-ehci-driver emxx-ehci-driver: irq 115, io mem 0xe2701000
emxx-ehci-driver emxx-ehci-driver: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
emxx-ohci-driver emxx-ohci-driver: EMXX OHCI
emxx-ohci-driver emxx-ohci-driver: new USB bus registered, assigned bus number 2
emxx-ohci-driver emxx-ohci-driver: irq 115, io mem 0xe2700000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
udc: version Apr 27 2011
android init
android_bind
mass_storage_function_add
android_usb gadget: Number of LUNs=1
adb_function_add
android_usb gadget: android_usb ready
udc:  ----- VBUS OFF
input: kzm9d_key as /devices/virtual/input/input0
input: kzm9d_touch as /devices/virtual/input/input1
emxx-rtc 0-0051: rtc core: registered rtc8564 as rtc0
Starting wdt.
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
logger: created 64K log 'log_main'
logger: created 256K log 'log_events'
logger: created 64K log 'log_radio'
Advanced Linux Sound Architecture Driver Version 1.0.18a.
Starting sound codec.
ALSA device list:
  #0: sound codec (emxx mixer)
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
Registered led device: led1
Registered led device: led2
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 1
emxx-rtc 0-0051: setting system clock to 2000-01-01 00:00:06 UTC (946684806)
Waiting for root device /dev/mmcblk1p3...
mmc0: new high speed MMC card at address 0001
mmcblk0: mmc0:0001 000000 3.82 GiB
 mmcblk0: p1 p2 p3 p4 < p5 p6 >
mmc1: new high speed SDHC card at address b368
mmcblk1: mmc1:b368 SD    3.84 GiB
 mmcblk1: p1 p2 p3
kjournald starting.  Commit interval 5 seconds
EXT3 FS on mmcblk1p3, internal journal
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem).
Freeing init memory: 128K
Warning: unable to open an initial console.
init: cannot open '/initlogo.rle'
init: cannot find '/system/etc/install-recovery.sh', disabling 'flash_recovery'
enabling adb
adb_open
$ warning: `rild' uses 32-bit capabilities (legacy support in use)
request_suspend_state: wakeup (3->0) at 21775323521 (2000-01-01 00:00:26.918060290 UTC)

Links

(in Japanese)KZMボードで、Android2.3の組み込み / Android-Embedded-Japan, Google Groups

Related pages

Quick hack to run Android 2.3(Gingerbread) on KZM-A9-Dual board
(in Japanese)KZM-A9-DualでAndoridのGingerbreadを動かす最短の手順
How to make bootable SD card for KZM-A9-Dual board
(in Japanese)KZM-A9-DualでSDカードのブート時間の比較

About these ads