2011年04月28日
KZM-A9-Dualのブート可能なSDを作る方法
KZM-A9-Dualのブート可能なSDを作る方法は添付のDVDの中の How_to_boot_from_SD.txt に書いてありますが、ネットで見られると便利なので、ここにも貼り付けます。
How to boot from SD card
0.Files to need
Check out directory. The Files to need are:
uboot-sd.bin sdboot.bin uImage android-root.tar.bz2
To build these files, read "How_to_build.txt".
0. Prepare a SD card
At least 1GB size required.
Old MMC card is not good.
1. Examine your SD card in /dev
Try ls /dev/sd* before you put your SD in SD card reader.
$ ls /dev/sd* /dev/sda /dev/sda1 /dev/sda2 /dev/sda5
So, /dev/ada* is your hard disk drives. Remember.
Then ls /dev/sd* after you put your SD in SD card reader.
$ ls /dev/sd* /dev/sda /dev/sda1 /dev/sda2 /dev/sda5 /dev/sdb /dev/sdc
SD card is /dev/sdb or /dev/sdc.
2. Unmount the device
Type "mount" to check SD device is not mounted.
If mounted automatically, Do unmount manually.
3. Writing to SD card
The follewing script is VERY DANGER. The specified drive are wiped out.
Please double check!!
これは危険なコマンドです。くれぐれもドライブの指定を間違わないように!!
$ sudo ./write_sd.sh /dev/sdb
(it takes a few minutes to finish ... )
4. Boot from SD card
set Dip switch on the KZM-A9-Dual board.
DSW1-3 OFF DSW1-4 ON
set SD card into the SD card slot. (Head side on the board.
There is SDIO card slot on the tail side on the board.)
Power ON and appears these message on serial console.
U-Boot 2009.03-rc1 (Jan 24 2011 - 13:42:35) Booted Device: SD <---- Check this! Board: EM/EV ES2 (Rev.ffffff20) Core: 1.15v DRAM: 512 MB Flash: 64 MB
Check the line "Booted Device: SD" to confirm booting
from SD card.
5. Kernal boot args
Kernal boot args should be:
root=/dev/mmcblk1p3 noinitrd init=/init console=ttyS1,115200n8n mem=129M@0x40000000 mem=256M@0x50000000 rw video=qfb: ip=none rootfstype=ext3 rootwait
NOTE:
At the previous release memory config was "mem=135M@0x40000000 mem=256M@0x50000000". It is changed.
6. Known Issues
It fails to read root file system on SD after resume in power management.
To avoid suspend/resume, please set in "Settings" in Android
Applications > Development > Stay awake
write_sd.sh
if [ "$1" = "/dev/sda" ]; then echo "/dev/sda is your root"; exit; fi if [ ! -b "$1" ]; then echo $1 "is not block device"; exit; fi set -x -e OUT_DIR=./out UBOOT=$OUT_DIR/uboot-sd.bin SDBOOT=$OUT_DIR/sdboot.bin UIMAGE=$OUT_DIR/uImage ROOT_TAR=$OUT_DIR/android-root.tar.bz2 DRIVE=$1 TMP_MNT=/tmp/mnt ls -l $UBOOT ls -l $UIMAGE ls -l $ROOT_TAR ls -l $DRIVE # Delete partition table dd if=/dev/zero of=${DRIVE} bs=1024 count=1024 fdisk ${DRIVE} << __END__ n p 1 +40M n p 2 +256K n p 3 t 1 6 p w __END__ #sleep 2 sync;sync;sync mkfs.msdos ${DRIVE}1 mkfs.ext3 ${DRIVE}3 mkdir -p $TMP_MNT || true mount ${DRIVE}1 $TMP_MNT cp $SDBOOT $TMP_MNT cp $UBOOT $TMP_MNT cp $UIMAGE $TMP_MNT umount $TMP_MNT mount ${DRIVE}3 $TMP_MNT tar xvpf $ROOT_TAR -C $TMP_MNT umount $TMP_MNT sync;sync;sync echo "*** OK ***"
Do not delete empty lines.