Created
August 19, 2014 05:55
-
-
Save filviu/056a882f808cf21c2e84 to your computer and use it in GitHub Desktop.
n800 sdcard boot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In short, this is what I did to get my N800 to boot OS2008 from MMC. My steps were: | |
1) upgraded my N800 to OS2008, http://europe.nokia.com/A4305010 | |
2) enabled the Maemo Extras repository in Application Manager and added http://repository.maemo.org, Distribution: (blank) Components: free non-free | |
3) installed openssh using Application Manager | |
4) defined a root password (openssh's installer prompted for this) | |
5) opened xterm and: | |
# ssh root@localhost | |
# visudo | |
Added to following lines to the end of sudoers: | |
user ALL = (ALL) NOPASSWD: ALL | |
root ALL = (ALL) NOPASSWD: ALL | |
6) created two (512 MB and 7 GB) partitions on my 8 GB SD card: | |
# apt-get install e2fsprogs | |
# umount /media/mmc1 | |
# umount /media/mmc2 | |
# sfdisk /dev/mmcblk0 | |
/dev/mmcblk0p1:1,16384,6 | |
/dev/mmcblk0p2:16385,,83 | |
/dev/mmcblk0p3: | |
/dev/mmcblk0p4: | |
# reboot | |
7) created file systems on the card: | |
# umount /media/mmc1 | |
# umount /media/mmc2 | |
# mkdosfs /dev/mmcblk0p1 | |
# mke2fs /dev/mmcblk0p2 | |
# reboot | |
8) downloaded http://fanoush.wz.cz/maemo/initfs_flasher.tgz using the N800 browser and saved it to: /home/user/MyDocs/.documents/ (default location) | |
9) unpacked it and ran the script: | |
# cd /home/user/MyDocs/.documents/ | |
# tar zxvf initfs_flasher.tgz | |
# cd initfs_flasher | |
# ./initfs_flash | |
10) installed the kernel modules: | |
# insmod /mnt/initfs/lib/modules/2.6.21-omap1/mbcache.ko | |
# insmod /mnt/initfs/lib/modules/2.6.21-omap1/ext2.ko | |
11) mounted the file systems to be cloned: | |
# mount /dev/mmcblk0p2 /opt | |
# mount -t jffs2 -o ro /dev/mtdblock4 /floppy | |
12) cloned the files from /floppy to /opt: | |
# ./tar cf - -C /floppy . | ./tar xvf - -C /opt | |
13) set up the MMC as a boot option and rebooted the device: | |
# umount /opt | |
# umount /floppy | |
# chroot /mnt/initfs cal-tool --set-root-device ask:mmc2 | |
# reboot | |
The solution was summarized in this post by fanoush, which involves modifying (as root) /usr/sbin/osso-mmc-umount.sh | |
However, on my n800 running OS2008, the file actually contained different code. It might be related to the OS2008 version (not sure how to figure this out - if someone could let me know I would appreciate it). | |
I made similar modifications to the file as follows, changing the second line below. It seems to work fine now. | |
from: | |
Code: | |
if [ $? = 0 ]; then | |
umount $MP 2> /dev/null | |
fi | |
RC=$? | |
else | |
# it is not mounted | |
RC=0 | |
fi | |
to: | |
Code: | |
if [ $? = 0 ]; then | |
if [ "$MP" != "/" ] ; then umount $MP 2> /dev/null ; fi | |
RC=$? | |
else | |
# it is not mounted | |
RC=0 | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment