![]() |
Booting from MMC on N800 Now Available!!
- Packages will follow soon by Fanoush
I booted in 35 seconds from flash, 27 seconds from mmc) I was lucky enough to be able to beta test for Fanoush. Which I might add he got it right the first time without an issue. I never had to reflash. Thanks Fanoush, he said he is updating Bootmenu.deb to support n800, in the mean time, if you just can not wait. Download and install this http://maemo.org/pipermail/maemo-dev...ry/007111.html run initfs_flash Reboot, it will boot from flash. vi /mnt/initfs/bootmenu.sh Change the line GETKEY="evkey -u -t 1000 /dev/input/event1" to GETKEY="evkey -u -t 1000 /dev/input/event2" RUN chroot /mnt/initfs cal-tool --set-root-device ask:mmc2 Note The internal mmc is /dev/mmcblk0 /dev/mmcblk0p1 (This is fat) /dev/mmcblk0p2 (This is ext2 n800 boot) /dev/mmcblk0p3 (This is my 64mb swap) The external mmc is /dev/mmcblk1 Make sure you are pointing at the right one for your partition. I did not cover any partition information, you will need to partition your mmc in order to do this. The following is cut and paste from: http://maemo.org/maemowiki/HowTo_BootRootFSFromMMC ( I used tar, I could not find a way to install it on n800, so I copied tar from my 770. I posted a copy on my website) http://penguinbait.com/tar Cloning existing rootfs First you need to backup your FAT partition on MMC card and repartition it to have at least two partitions. First partition as FAT, second one as ext2. You can use fdisk on linux PC and USB card reader to do this (is there fdisk compiled for N770?). As the jffs2 flash filesystem uses compression you need bigger partition on MMC to hold same data. 128MB is too small, at least 256MB is recommended to have similar space as with original flash rootfs. If you have second partition on MMC card prepared, you can clone you existing IT2006 installation with rsync. 1. Format and mount partition on n770: You need e2fsprogs (available in maemo2.0 repository) Nokia770-26:~# apt-get install e2fsprogs Nokia770-26:~# mkfs.ext2 /dev/mmcblk0p2 Nokia770-26:~# insmod /mnt/initfs/lib/modules/current/ext2.ko Nokia770-26:~# mount /dev/mmcblk0p2 /opt/ 2. Remount flash rootfs to different directory to reveal hidden /dev/ entries: Nokia770-26:~# mount -t jffs2 /dev/mtdblock4 /floppy -o rw,rpsize=1024,rpuid=0,rpuid=30000 3. Make sure both mount commands succeeded and you really have /opt and /floppy mounted to correct places ('Filesystem' and 'Mounted on' columns below). Nokia770-26:~# df Filesystem 1k-blocks Used Available Use% Mounted on .... .... /dev/mtdblock4 ....... /floppy /dev/mmcblk0p2 ....... /opt 4. Clone it to card by rsync or tar. Do not swap /floppy and /opt by mistake. Nokia770-26:~# rsync -avH --delete /floppy/ /opt/ There is some issue with opera fonts caused by such copy made by rsync - details here or here. If you want to make extra sure your copy on mmc card does not have this issue, use GNU tar (not the busybox one) not rsync. Get the binary either from scratchbox arm target (/bin/tar) or by apt-get on the device in download only mode (apt-get -d install tar) After ignoring warnings tar deb should be in /var/cache/apt/archives and you can extract it by dpkg -x. Then you can make the clone by /path/to/gnu/tar cf - -C /floppy . | /path/to/gnu/tar xvf - -C /opt 5. Cleanup Nokia770-26:~# umount /opt Nokia770-26:~# umount /floppy REBOOT THANKS AGAIN FANOUSH, I REALLY APPRECIATE IT!!!:D :D |
Re: Booting from MMC on N800 Now Available!!
He is quicker than I could even post :-) Here is the new package!!
http://www.internettablettalk.com/fo...2&goto=newpost |
Re: Booting from MMC on N800 Now Available!!
excuse my ignorance but why would you want to boot from flash?
|
Re: Booting from MMC on N800 Now Available!!
Quote:
http://www.internettablettalk.com/fo...1&goto=newpost |
Re: Booting from MMC on N800 Now Available!!
I'm having trouble mounting my ext2 partition. In particular, I can't insert the module.
Code:
/mnt/initfs/lib/modules # ls -l Code:
/mnt/initfs/lib/modules/2.6.18-omap1 # insmod /mnt/initfs/lib/modules/2.6.18-omap1/ext2.ko Code:
# mount -t ext2 /dev/mmcblk1p2 /opt |
Re: Booting from MMC on N800 Now Available!!
Have you tried:
# insmod /mnt/initfs/lib/modules/current/ext2.ko |
Re: Booting from MMC on N800 Now Available!!
Code:
# insmod /mnt/initfs/lib/modules/current/ext2.ko |
Re: Booting from MMC on N800 Now Available!!
bobpaul.
You need to insmod mbcache.ko first on th N800 |
Re: Booting from MMC on N800 Now Available!!
Does anyone know why modprobe isn't used for loading modules?
modprobe (the normal Linux way) would handle such kernel module dependencies so that you wouldn't have to worry about loading mbcache.ko before ext2.ko etc. modprobe currently just says 'could not parse modules.dep', could it be that the kernel builders haven't done 'depmod -a' or similar? Maybe some of you who have actually (re-)built the kernel are up to date on this? |
Re: Booting from MMC on N800 Now Available!!
Thanks rcull. Worked.
|
Re: Booting from MMC on N800 Now Available!!
well, I got it all kinda work out. I got it successfully clone out the data, reboot, and in the UI from the mmcblk0p2(ext2), but it keep rebooting, while if I choose to boot from flash it is working fine. I even add one step into the instruction, which is to run sync after tar to ensure I don't try to reboot too early and kill whatever didn't finish writing to SD. I tried it twice, same problem. second time started w/ mkfs.ext2 step. Any pointer?
|
Re: Booting from MMC on N800 Now Available!!
Hi Guys
The noob here again, please can someone tell me where I can get e2fsprogs as I have searched all day and cannot find where it is. Thx in advance for all of your support. Arch |
Re: Booting from MMC on N800 Now Available!!
|
Re: Booting from MMC on N800 Now Available!!
Quote:
Quote:
|
Re: Booting from MMC on N800 Now Available!!
Quote:
Regards Arch |
Re: Booting from MMC on N800 Now Available!!
You do need to download it, apt-get will download the package then install it for you. I can't remember which repository it's in, but if apt-get can't find it add the following:
Name: Maemo Main Web Address: http://repository.maemo.org Distribution: bora Components: free non-free Then run "apt-get update" followed by "apt-get install e2fsprogs" |
Re: Booting from MMC on N800 Now Available!!
Quote:
|
Re: Booting from MMC on N800 Now Available!!
am I supposed to get more free memory available by booting from mmc? If yes, where can I verify that?
I have an 490mb ext2 and booting from mmc |
Re: Booting from MMC on N800 Now Available!!
Quote:
|
Re: Booting from MMC on N800 Now Available!!
I do not believe booting from mmc will provide you more useable memory. You can create swap partitions or swap files that will give you additional memory resources.
|
Re: Booting from MMC on N800 Now Available!!
Quote:
$ free total used free shared buffer Mem: 62224 53316 8908 0 248 Swap: 0 0 0 Total: 62224 53316 8908 But YES, you've get extra "installable" memory. That is: the system thinks your mmc available free space is internal memory free space. So that you may install lots of applications there. So you type df (in my 770), and get: $ df Filesystem 1k-blocks Used Available Use% Mounted on /dev/mmcblk0p2 729672 231216 461392 33% / /dev/mmcblk0p1 261868 12 261856 0% /media/mmc1 As you may see, I've got two partitions. My first vfat partition (mmcblk0p1) is mounted as /media/mmc1. It's almost empty. I haven't enabled the Swap file over vfat, since I find it rather slow (just my feeling, maybe wrong). My second partition is ext2 (mmcblk0p2), and it's mounted as / As you may see, I've yet installed 225MB of applications but got space for 450MB more (more or less 140MB was the original system and basic applications; it doubles the 70 MB you usually find at your original native partition because ext2 isn't compressed as jffs2 is) |
Re: Booting from MMC on N800 Now Available!!
Yea, that funny, the SWAP partition is not on by default. I even added
/dev/mmcblk0p3 swap swap defaults 0 0 to /etc/fstab still swap not on by when reboot Still you could run 'swapon /dev/mmcblk0p3' to manually activate the swap partition(assuming your swap partition is on partition3) or write a small script to activate it in the /etc/rc2.d or init.d and link to it. Another important thing is after doing this mod, the usb-to-mmc no longer work. As a workaround, I just setup the samba so my windows can have access to /media/mmc1 and /media/mmc2 as well. |
Re: Booting from MMC on N800 Now Available!!
I wrote a tiny script /etc/init.d/swappart to have it activate swap partition at startup, all you have to do is change the string 'SWAPX=' to your swap partition.
and run the command 'ln -s ../init.d/swappart S19swappart' in your /etc/rc2.d directory. hope that help, BTW, the legal jumble is here. I assume no liability or responsibility in anyway by posting this POS, and use it at your own risk. Code:
#!/bin/sh |
Re: Booting from MMC on N800 Now Available!!
Quote:
TOOLS > CONTROL PANEL > MEMORY > VIRTUAL > and tick Add Virtual Memory The maximum size of it is 64MB, no matter how much free space you've got on your VFAT partition. (Because virtual memory added this way CAN ONLY BE SET at the VFAT partition as a SWAP FILE). The advantages of doing so is that you'll be able to access via Windows and USB your VFAT partition. There you'll find the Swap file of 64MB. :cool: |
Re: Booting from MMC on N800 Now Available!!
Quote:
|
Re: Booting from MMC on N800 Now Available!!
Quote:
|
Re: Booting from MMC on N800 Now Available!!
Quote:
Quote:
Also when you add high speed mmc modes to n770 linux kernel it is even better. I still don't have n800 so I'm not sure about n800 SD slot speed but in 50MHz SD mode (probably not in stock n800 kernel) it should do ~20MB/s (read speed) in theory. |
Re: Booting from MMC on N800 Now Available!!
Another somewhat generic question in this "N800" thread ;-)
- Would reflashing the device wipe out the initfs along with the root system? |
Re: Booting from MMC on N800 Now Available!!
Quote:
Linux flasher can unpack FIASCO image 'flasher -u -F ....bin' and then flash just the rootfs 'flasher -f -r rootfs.jffs2'. Sadly windows flashing wizard cannot do this. |
Re: Booting from MMC on N800 Now Available!!
Thanks,
and will I be able to reflash the internal rootfs from a mmc booted OS, using this 'flasher -f -r rootfs.jffs2' ? Dontīt have a Linux PC or LiveCD and it would be great to have the opportunity to be able do this from "inside" the tablet. |
Re: Booting from MMC on N800 Now Available!!
Quote:
When I like current stable system in flash (after clean reflashing and tweaking it a bit) I boot from mmc and do a backup Code:
mount -t jffs2 /dev/mtdblock4 /opt Code:
sumtool -i rootfs.jffs2 -o rootfs.faster.jffs2 -e 128KiB -l -n Code:
./flash_eraseall -j /dev/mtd4 |
Re: Booting from MMC on N800 Now Available!!
Quote:
|
Re: Booting from MMC on N800 Now Available!!
Quote:
Reflashing config or bootloader partition may be unrecoverable. I should probably comment out -j option in nandwrite source and rebuild the binary sometimes since it is quite useless but very dangerous on nokia tablets. As for normal writing to the internal flash I wouldn't be so afraid. It would take some time to wear out internal flash. See end of https://maemo.org/bugzilla/show_bug.cgi?id=598 |
Re: Booting from MMC on N800 Now Available!!
Quote:
|
Re: Booting from MMC on N800 Now Available!!
Quote:
- speed (both of creating the filesystem and later also accessing it) - flash wear While I don't know it for sure I think that when created incrementally by tar (i.e extracting file by file) the result won't be as nice and compact as creating it via mkfs.jffs2 (and sumtool) in one go and then flashing. I also guess it will take ages but never actually tried. |
Re: Booting from MMC on N800 Now Available!!
Fanoush - do you know if it's possible to create a bootable filesystem on MMC/SD direct from a FIASCO image, ie. rather than install the FIASCO image into the device and tar over to the MMC/SD card is it possible to dump the FIASCO image on to the MMC/SD card and then boot it? This would be great to test new firmware without having to blow away a working device.
|
Re: Booting from MMC on N800 Now Available!!
without compression would it even fit on the flash device?
I see no reason to even bother, if I was worried about needing more space, I would not have moved in off flash in the first place. I moved onto flash for backup/recovery/portability/speed. booting to flash will allow you to remove packages from mmc OS easily. install a package thats bad (system wont boot), boot to flash and remove it. edit a file and mess up the boot process, boot to flash and fix it, these are GREAT advantages over default OS distribution. I personally think they should put a minimal OS in flash (with install/recovery/remote backup/) and use itself to download, upgrade and push OS onto a MMC/SD card. But I guess I am just dreaming... Seriously though, HOW MANY REPAIRS WOULD THIS SAVE NOKIA!!!!! Does it work in flash, well then run diagnostics or restore remote backup. |
Re: Booting from MMC on N800 Now Available!!
Quote:
What may be possible is to replace kernel and initfs in flash with some generic stubs and keep real kernel and initfs on mmc so we can have more of them. This is quite tricky but maybe possible. Maybe it would be even needed to dualboot between os2007 hacker edition and IT2006 so I will be forced to try to make it working :-) |
Re: Booting from MMC on N800 Now Available!!
Is it as simple as changing the root_dev info? (init and linuxrc)
If I created a partition on mmc for kernel, it seems like it would work, is there something I am not thinking of? root_dev=mtdblock4 root_dev_name="Flash" root_fstype="jffs2" root_fsoptions="rpsize=1024,rpuid=0,rpuid=30000" You got anything you want to try, you just let me know ;) EDIT Now that I think about that, mtdblock4 is rootfs right, so would you need to put something on the kernel device to redirect it, or you need to hack the xloader? |
Re: Booting from MMC on N800 Now Available!!
Quote:
The way I see it right now is that the flash have 5 sections, aka 5 partition. blk0=128KB blk1=385KB blk2=2MB blk3=2MB blk4=the rest=rootfs For obvious reason, It's safe to assume that blk0 is a loader and blk4 is the rootfs blk3 seem to be initfs in the jffs2 format. so, blk2 is the only one left large enought to fit the kernel. (I don't think nokia want to store kernel on a compressed partition) and therefore mean, if you make your own kernel, it has to be less than 2MB(there may be some overhead there as well.) blk1 then probably a special kernel used for usb flasher. and that mean leave those 2 alone(block0 and 1) if you don't want your $400 toy to be an expensive paperweight. |
All times are GMT. The time now is 08:37. |
vBulletin® Version 3.8.8