| MeeGo 1.1有幾個(gè)映像文件,只是要按照官方提供的方法測(cè)試起來比較令人郁悶。弄個(gè)U盤來做測(cè)試,還得rawrite之類的,很不方便。想了想,于是對(duì)initrd0.img做了一些小改動(dòng),然后把映像內(nèi)容直接解壓到文件系統(tǒng)上,再對(duì)啟動(dòng)參數(shù)做點(diǎn)小改動(dòng),就順利啟動(dòng)了。做這個(gè)改動(dòng),主要是為了避免擦除優(yōu)盤的內(nèi)容:動(dòng)不動(dòng)就消除磁盤內(nèi)容這個(gè)習(xí)慣不是很好,畢竟資源共享是一種經(jīng)濟(jì)方法。 操作的方法大致是這個(gè)樣子的: 一、init的修改(直接給補(bǔ)丁好了,后續(xù)還得再完善) --- init.orig	2011-01-30 20:51:49.000000000 +0800
+++ init	2011-01-30 20:51:36.000000000 +0800
@@ -38,6 +38,7 @@
root_rw=0
root=""
rootflags=""
+rootfspath=""
rootfstype=""
quiet=0
shell=0
@@ -140,6 +141,9 @@
rootflags=*)
rootflags=${o#rootflags=}
;;
+ rootfspath=*)
+ rootfspath=${o#rootfspath=}
+ ;;
rootfstype=*)
rootfstype=${o#rootfstype=}
;;
@@ -152,6 +156,7 @@
echo "init=$init"
echo "root=$root"
echo "rootflags=$rootflags"
+ echo "rootfspath=$rootfspath"
echo "rootfstype=$rootfstype"
echo "root_ro=$root_ro"
echo "root_rw=$root_rw"
@@ -406,11 +411,11 @@
# pathspec specified, extract
pathspec=$( echo $overlay | sed -e 's/^.*://' )
elif [ "x${overlay}" != "xoff" ]; then
- pathspec="/LiveOS/overlay-$l-$u"
+ pathspec="/${rootfspath}/overlay-$l-$u"
fi
if [ -z "$pathspec" -o "$pathspec" == "auto" ]; then
- pathspec="/LiveOS/overlay-$l-$u"
+ pathspec="/${rootfspath}/overlay-$l-$u"
fi
devspec=$( echo $overlay | sed -e 's/:.*$//' )
@@ -504,8 +509,8 @@
}
# we might have a genMinInstDelta delta file for anaconda to take advantage of
-if [ -e /sysroot/LiveOS/osmin.img ]; then
- OSMINSQFS=/sysroot/LiveOS/osmin.img
+if [ -e /sysroot/${rootfspath}/osmin.img ]; then
+ OSMINSQFS=/sysroot/${rootfspath}/osmin.img
fi
if [ -n "$OSMINSQFS" ]; then
@@ -522,8 +527,8 @@
# we might have an uncompressed embedded ext3 to use as rootfs (uncompressed live)
#
-if [ -e /sysroot/LiveOS/ext3fs.img ]; then
- EXT3FS="/sysroot/LiveOS/ext3fs.img"
+if [ -e /sysroot/${rootfspath}/ext3fs.img ]; then
+ EXT3FS="/sysroot/${rootfspath}/ext3fs.img"
fi
if [ -n "$EXT3FS" ] ; then
@@ -544,8 +549,8 @@
# we might have an embedded ext3 on squashfs to use as rootfs (compressed live)
#
-if [ -e /sysroot/LiveOS/squashfs.img ]; then
- SQUASHED="/sysroot/LiveOS/squashfs.img"
+if [ -e /sysroot/${rootfspath}/squashfs.img ]; then
+ SQUASHED="/sysroot/${rootfspath}/squashfs.img"
fi
if [ -e "$SQUASHED" ] ; then
二、映像文件內(nèi)容的復(fù)制 把映像用7zip解壓或者mount loop后把LiveOS拷貝到優(yōu)盤中。不同的MeeGo版本重命名,比如車載系統(tǒng)命名為IVI,上網(wǎng)本系統(tǒng)命名為NB,手持設(shè)備系統(tǒng)命名為HS等等。拷貝完成后優(yōu)盤目錄樹大致是這個(gè)樣子的: WINDOWS │ syslinux.cfg ├─IVI │ osmin.img │ squashfs.img │ ├─NBK │ osmin.img │ squashfs.img │ ├─boot │ initrd.ivi │ initrd.nbk │ splash.jpg │ vesamenu.c32 │ vmlinuz.ivi │ vmlinuz.nbk │ └─CDlinux │ bzImage │ initrd │ ├─boot │ memdisk.gz │ memtest.bin.gz │ menu.lst │ splash.xpm.gz │ stage2_eltorito │ ├─doc │ AUTHORS │ CHANGELOG │ COPYING │ README │ RELNOTES │ ├─extra │ README │ base-cdl.md │ basex-cdl.md │ ├─lang │ │ README │ │ │ └─zh │ zh-cdl.md │ ├─local │ README │ example-cdl.tgz │ └─settings │ README │ hardware-e6d624dff569ffc69ee08d093ded3f89-cdl.tgz │ hardware-6d0178deed517a7ffaec1ded607bc234-cdl.tgz │ ├─0 ├─1 │ user-cdl.md │ └─2 user-cdl.md三、syslinux.cfg的修改 用了fat32,主要是方便跨平臺(tái)操作,畢竟Windows還是好找到的。 default /boot/vesamenu.c32 timeout 50 menu background /boot/splash.jpg menu title Welcome to MeeGo! menu color border 0 #ffffffff #00000000 menu color sel 7 #ffffffff #ff000000 menu color title 0 #ffffffff #00000000 menu color tabmsg 0 #ffffffff #00000000 menu color unsel 0 #ffffffff #00000000 menu color hotsel 0 #ff000000 #ffffffff menu color hotkey 7 #ffffffff #ff000000 menu color timeout_msg 0 #ffffffff #00000000 menu color timeout 0 #ffffffff #00000000 menu color cmdline 0 #ffffffff #00000000 label ivi menu label MeeGo IVI in VFAT kernel /boot/vmlinuz.ivi append ro initrd=/boot/initrd.ivi root=CDLABEL=WINDOWS rootfstype=vfat rootfspath=IVI liveimg vga=current quiet menu default label netbook menu label MeeGo Netbook in VFAT kernel /boot/vmlinuz.nbk append ro initrd=/boot/initrd.nbk root=CDLABEL=WINDOWS rootfstype=vfat rootfspath=NBK liveimg vga=current quiet label cdl menu label CDLinux (Chinese) kernel /CDlinux/bzImage append ro initrd=/CDlinux/initrd CDL_LANG=zh_CN.UTF-8 CDL_DEV=LABEL="WINDOWS" CDL_DIR="CDlinux" CDL_GUI=yes quiet label local menu label Boot from local drive localboot 0xffff目前還有一個(gè)問題,就是進(jìn)入MeeGo系統(tǒng)后無法再mount映像所在盤,這個(gè)回頭有空再hack一把。所為了方便做修復(fù),還扔進(jìn)去一個(gè)CDlinux。其實(shí)對(duì)MeeGo的這些參考了CDlinux。:D 后續(xù)還得搞搞handset版本,以及各個(gè)版本中用上splash和mplayer。目前gstreamer不好控制。用mplayer的slave模式相對(duì)好處理一些。 嗯,得先把SDK搞好。官方的鏡像內(nèi)容還挺多的。另外就是把MeeGo很多限制給去掉。 | 
|  |