Hello list,
I (first time poster and newly FR enjoy-er) try to boot from SD-card. I
want to make a second environment in which I can experiment _without_
changing the software that the phone ships with. That is, without making
all to big changes to the original software on the phone.
I followed the instructions 'Boot_from_sd_card' on the wiki [1]. I used:
-
Openmoko-scaredycat-openmoko-devel-image-glibc-ipk-P1-Snapshot-20080507-om-gta02.rootfs.tar.gz
- uImage-2.6.24+git20080507-r0-om-gta02.bin
==> Result: kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(179,2)
Than I downloaded "Openmoko-Freerunner-20080424-om-gta02.rootfs.jffs2"
and "uImage-2.6.24+git20080424-om-gta02.bin" (exactly the same files
installed on the phone I believe) in order to write/copy these to
SD-card. However, I don't know how to write/copy the jffs2 file to
SD-card. (I cannot find the same file in 'tar.gz' format.)
As I understand the filetype jffs2 is an image comparable with a
iso-image of a cd [2]. I learned that it is possible to mount it as a
'loopback' device in order to read from the .jffs2 [3]. I also learned
that the 'dd'-command (see[4]) can be used to create a .jffs2.
==>While learning all this, a totally different approach crossed my mind:
Would it be possible to duplicate (with the use of dd) the standard
environment (the FR ships with) to SD-card (in order to create a second
environment)?
Would it be possible to duplicate (with the use of dd) any environment
(on the FR) for back-up purposes (and put it back when necessary)?
Would it be helpful when such a method is described on the wiki?
How would the command look like? I was guessing:
- dd if=/dev/mtdblock2 of=/dev/mmcblk0p1 (assuming see[5] _/proc/mtd
mtd2_(kernel) maps to /dev/mtdblock2)
- dd if=/dev/mtdblock4 of=/dev/mmcblk0p2 (assuming see[5] _/proc/mtd
mtd4_(rootfs) maps to /dev/mtdblock4)
Because the source(blocksize??) and destination(partition sixe??) will
differ in size, the commands above probably need extra parameters. (If
this method works at all: Probably I'm totally wrong.)
At the moment I'm most interested in answers to the questions above.
However, tips / help with the 'kernel panic' is also much appreciated.
(To be clear: The FR still boots, but not from SD-card!)
Issues I checked are:
- Kernel and filesystem 'fit' together.
- File system:
[EMAIL PROTECTED]:~# cat /etc/mtab | grep mmcblk0
/dev/mmcblk0p1 /mnt/mokokernel vfat
rw,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1 0 0
/dev/mmcblk0p2 /mnt/moko ext2 rw 0 0
- u-boot environment:
[EMAIL PROTECTED]: # command below 'stolen' from
http://wiki.openmoko.org/wiki/Uboot.
[EMAIL PROTECTED]: sudo ./dfu-util -a u-boot_env -R -U env.in
[EMAIL PROTECTED]: cat env.in
[...]
menu_1=Boot from microSD (FAT+ext2): setenv bootargs ${bootargs_base} root
fstype=ext2 root=/dev/mmcblk0p2 rootdelay=5 ${mtdparts} ro; mmcinit;
fatload m
mc 1 0x3200 ${sd_image_name}; bootm 0x3200
[...]
Thanks,
A.dre
[1] http://wiki.openmoko.org/wiki/Boot_from_sd_card
[2] http://lists.openmoko.org/nabble.html#nabble-td472598%7Ca472694
[3]
http://wiki.openmoko.org/wiki/Userspace_root_image#Mount_on_loopback_device
[4] dd if=/dev/mtdblock0 of= (for explanation see[3])
[5] http://wiki.openmoko.org/wiki/Bricked#Useful_information
___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community