I've been using a variant of the make-live script that doesn't depend
on building intaller_img. Just a regular make will do.
# Run this script from the out/target/product/eee_701 directory
DD=/dev/sdh
IMAGE_PATH=`pwd`
JUNKsrc=/tmp/junk1234-src
JUNKtgt=/tmp/junk1234-tgt
localdisks=1
parts="1 2 3 4 5 6 7 8"
echo -n "Change Thumbdrive location [$DD] "
read y
if [ "$y" != "" ] ; then
DD=$y;
fi
if [ ! -r $DD ] ; then
echo "Error seeing desired thumbdrive at $DD"
exit;
fi
for p in $parts ; do
umount ${DD}${p}
done
echo -n "Using Thumbdrive location $DD. Are you sure you want/need to
repartition the device? [y/N] "
read y
if [ "$y" = "y" ] ; then
echo Partitioning disk
# Defaults for 8GB part
SZ_SD=4096
SZ_ROOT=128
SZ_CACHE=512
SZ_SYSTEM=512
SZ_DATA=2560
echo -n "Okay... How big is the thumbdrive in GB? 1/2/4/[8] "
read y
case $y in
1)
SZ_SD=128
SZ_ROOT=128
SZ_CACHE=64
SZ_SYSTEM=512
SZ_DATA=128
;;
2)
SZ_SD=256
SZ_ROOT=128
SZ_CACHE=128
SZ_SYSTEM=512
SZ_DATA=900
;;
4)
SZ_SD=1024
SZ_ROOT=128
SZ_CACHE=512
SZ_SYSTEM=512
SZ_DATA=1536
;;
*)
if [ -n "$y" ] ; then
echo "Illegal size specified: $y (expected 1/2/4/8)"
exit
fi
esac
sfdisk -uM $DD << _EOF
,$SZ_SD,6
,$SZ_ROOT,L,*
,,E
,,,
,$SZ_CACHE,L
,$SZ_SYSTEM,L
,1,L
,$SZ_DATA,L
_EOF
echo "Repartition complete. Remove and reinsert thumbdrive and
restart process"
exit
fi
for i in boot.img system.img userdata.img ; do
if [ ! -r $IMAGE_PATH/$i ] ; then
echo "Error seeing the images on installer"
exit 1
fi
done
for part in 1 2 5 6 7 8 ; do
if [ ! -r ${DD}${part} ] ; then
echo "Error seeing the partitions on the thumbdrive that should be
there"
exit 1
fi
done
echo -n "Are you sure you are ready to wipe out the contents of the
partitions? [y/N] "
read y
case $y in
y*|Y*)
;;
*)
echo aborting
exit 1
esac
echo -n "How many disks are built into the system you will run on 0,
[1],2,3? "
read y
disk=""
case $y in
0)
disk=sda
;;
""|1)
disk=sdb
;;
2)
disk=sdc
;;
3)
disk=sdd
;;
*)
echo "Uh-oh, I do not understand the number of disks"
exit
esac
echo "formatting filesystems and copying content"
mkfs.vfat ${DD}1 -n FAT
mkfs.ext2 ${DD}2
tune2fs -C 1 -L root -j ${DD}2
echo "Copying/making Root and Boot"
mount -o ro -o loop $IMAGE_PATH/boot.img $JUNKsrc
mount ${DD}2 $JUNKtgt
grub-install --root-directory=$JUNKtgt --recheck $DD
cd $JUNKtgt
zcat $JUNKsrc/ramdisk | cpio -i
cp init.rc init.rc.orig
sed -e "s/mount rootfs/#mount rootfs/" -e "s/dev\/block\/sda/dev\/block
\/$disk/" init.rc.orig >init.rc
cp $JUNKsrc/kernel boot
cmdline=`cat $JUNKsrc/cmdline`
cat >boot/grub/menu.lst <<_EOF
default 0
timeout 0
#timeout 3
hiddenmenu
title Android
root (hd0,1)
kernel /boot/kernel root=/dev/${disk}2 rootdelay=6 rw init=/init
$cmdline
quiet
_EOF
cd /tmp
umount $JUNKsrc
umount $JUNKtgt
mkfs.ext2 ${DD}5
tune2fs -C 1 -L cache -j ${DD}5
echo "Copying System"
dd if=$IMAGE_PATH/system.img of=${DD}6 bs=1024k
e2fsck -C 0 -fy ${DD}6
resize2fs -F ${DD}6
tune2fs -C 1 -L system -j ${DD}6
#mkfs.ext2 ${DD}7 -L junk
echo "Copying UserData"
dd if=$IMAGE_PATH/userdata.img of=${DD}8 bs=1024k
e2fsck -C 0 -fy ${DD}8
resize2fs -F ${DD}8
tune2fs -C 1 -L data -j ${DD}8
On Apr 16, 10:39 pm, gowtham gowda <[email protected]> wrote:
> i updated the code on Wednesday. I tried once more and all it does is
> boot into a grub console.
>
> On Apr 16, 4:40 pm, Yi Sun <[email protected]> wrote:
>
> > How new is your source code? I have one try checked out last monday or
> > tuesday. It works fine
>
> > On Wed, 2009-04-15 at 19:52 -0700, gowtham gowda wrote:
> > > Looks like Chris's make-live script is not working after updating the
> > > android source to the latest code. The bootable usb created by using
> > > the script boots into a GRUB console. Any ideas on how to make a live
> > > bootable usb?
>
> > > I will try to edit the Chris's script and see if i make any progress.
>
> > > Thanks,
> > > Gowtham
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---