View source for Booting from SD/zh cn
From Openmoko
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page:
Templates used on this page:
Return to Booting from SD/zh cn.
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page:
Templates used on this page:
Return to Booting from SD/zh cn.
Languages: |
English • العربية • Български • Česky • Dansk • Deutsch • Esperanto • Eesti • Español • فارسی • Suomi • Français • עברית • Magyar • Italiano • 한국어 • Nederlands • Norsk (bokmål) • Polski • Português • Română • Русский • Svenska • Slovenčina • Українська • 中文(中国大陆) • 中文(台灣) • Euskara • Català |
Editing: (30, Dec, 2008) This page is being edited by coolcat: 本网页目前正在加强内容编辑中 If this note persists without edits in the history, feel free to remove the Editing template from the page. |
Openmoko GTA02 支持双系统开机。除了将映像档刻录到您的NAND外,你也可以利用将其它套件放在SD卡的方法,使用SD卡开机,加载另一个套件系统。
在Neo中,我们使用 u-boot 做为bootloader。U-boot 负责硬件装置的功能运作,直到 Openmoko被启动加载装置为止。首先,它会将kernel image加载内存中,接着再传送一串参数到kernel。这些参数的工作是用来指定root filesystem的位置。
在加载kernel 后,它会启动硬件,并且挂载root filesystem。之后 kernel 会执行 "/sbin/init",它会处理其它的开机程序( 如显示屏幕)。
不论是是使用内建的Flash开机,或者是使用SD Card开机,你所执行的开机顺序将会相同。唯一不同的地方是加载 kernel 的方法,及哪个装置被视为root filesystem,挂载到系统上。
而Neo FreeRunner在硬件设计上,提供了自NAND开机及自SD卡开机,不论您要使用哪种方式开机,开机程序都必须使用U-boot进行管理。
而在Neo FreeRunner上,若您希望由SD卡中开机,您可以透过以下的步骤,达到这个目地。
取得压缩的rootfs image 有二种方法,你可以使用OpenEmbedded 建立它,或者自Openmoko downloads下载它。
你可以自最近的图像文件选择及找到一组 rootfs/kernel 组合
另一个取得 tar 压缩文件的方法就是,你可以从OpenEmbedded 环境下建立此档案。
如要制作OM-2007.2 ,你必须在 local.conf下加入"tar" 字样:
IMAGE_FSTYPES = "jffs2 tar"
之后,使用下列指令建立新的image:
bitbake openmoko-devel-image
或者,你可以使用MokoMakefile:
make openmoko-devel-image
在完成了以上程序后,在配置的目录下会有一个名为 Openmoko-....tar 的档案,即为你所完成的rootfs
你可以参考Userspace root image 取如何存取 jffs2 image的详细信息。
以下为自SD中启动系统的操作步骤指引。它使用ubuntu 及一张干净的512 MB Sandisk microSD 卡:
sudo umount /media/disk-1
NOTE: 你可以使用fdisk -l 取得相关磁盘信息 |
接着将磁盘分为二个分割区,第一个分割区使用vfat,预留 8MB空间给 uImage.bin,第二个扇区 (其余的磁盘空间) 使用ext2 格式,提供给rootfs 档案及目录使用。二个分割区都使用primary partition 类型。
sudo fdisk /dev/mmcblk0
Command (m for help): d Selected partition 1 Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-983, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 2 First cylinder (18-983, default 18): Using default value 18 Last cylinder or +size or +sizeM or +sizeK (18-983, default 983): Using default value 983 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks.
NOTE: 由于个人使用的作业环境之不同, 所使用的代号将有所不同,建议您使用df指令查看您的磁盘代号 |
请将二个分割区分别格式化为 vfat (放置uImage.bin)及 ext2 (放置 rootfs files)
mkfs -t vfat /dev/mmcblk0p1
mkfs -t ext2 /dev/mmcblk0p2
你必须使用以下指令解压缩
mount /dev/mmcblk0p2 /mnt/moko tar -C /mnt/moko/ -xzvf openmoko-devel-image-fic-gta01-20070313022035.rootfs.tar.gz
sudo cp -r /home/tony/Desktop/kernel/uImage.bin /media/disk-1
sudo cp -r /home/tony/Desktop/root_files/. /media/disk-2
sync
如果你想要自NOR下开机,并且从SD卡中使用NOR,请使用下列的操作步骤。
接着,你可以进入预设的NOR开机选单,你可以: