maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Upgrading (https://talk.maemo.org/forumdisplay.php?f=8)
-   -   Booting from MMC on N800 Now Available!! (https://talk.maemo.org/showthread.php?t=4053)

penguinbait 2007-01-14 20:46

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

penguinbait 2007-01-14 20:49

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

flareup 2007-01-15 00:28

Re: Booting from MMC on N800 Now Available!!
 
excuse my ignorance but why would you want to boot from flash?

penguinbait 2007-01-15 01:00

Re: Booting from MMC on N800 Now Available!!
 
Quote:

Originally Posted by flareup (Post 29638)
excuse my ignorance but why would you want to boot from flash?

The reason I like to boot from flash for a couple of reasons. I can completely backup my entire OS and restore it or any peice of it. I run from mmc which runs faster than from flash. I can use flash as a failsafe in case I screw up my OS. Its already saved me from reflashing my n800 today. I can boot from mulitple mmc or SD cards.


http://www.internettablettalk.com/fo...1&goto=newpost

bobpaul 2007-02-01 05:07

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
drwxr-xr-x    2 root    root            0 Dec 19 10:56 2.6.18-omap1
lrwxrwxrwx    1 root    root          25 Dec 19 10:56 current -> /lib/modules/2.6.18-omap1

so current won't work as a path, so I use the 2.6.18 one instead

Code:

/mnt/initfs/lib/modules/2.6.18-omap1 # insmod /mnt/initfs/lib/modules/2.6.18-omap1/ext2.ko
insmod: cannot insert `/mnt/initfs/lib/modules/2.6.18-omap1/ext2.ko': Unknown symbol in module (-1): No such file or directory

Obviously, the mount command fails without the module:
Code:

# mount -t ext2 /dev/mmcblk1p2 /opt
mount: Mounting /dev/mmcblk1p2 on /opt failed: No such device
# mount /dev/mmcblk1p2 /mnt     
mount: Mounting /dev/mmcblk1p2 on /mnt failed: Invalid argument

Suggestions?

sebastian.linux 2007-02-01 05:16

Re: Booting from MMC on N800 Now Available!!
 
Have you tried:

# insmod /mnt/initfs/lib/modules/current/ext2.ko

bobpaul 2007-02-01 05:36

Re: Booting from MMC on N800 Now Available!!
 
Code:

# insmod /mnt/initfs/lib/modules/current/ext2.ko
insmod: cannot open module `/mnt/initfs/lib/modules/current/ext2.ko': No such file or directory

yes. current is a symlink to someplace that doesn't exist.

rcull 2007-02-01 06:54

Re: Booting from MMC on N800 Now Available!!
 
bobpaul.
You need to insmod mbcache.ko first on th N800

TA-t3 2007-02-01 09:58

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?

bobpaul 2007-02-01 15:22

Re: Booting from MMC on N800 Now Available!!
 
Thanks rcull. Worked.

freeman 2007-02-02 19:17

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?

Arch 2007-02-02 19:20

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

Milhouse 2007-02-02 19:45

Re: Booting from MMC on N800 Now Available!!
 
Tip: Search is good.

http://www.internettablettalk.com/fo...3844#post23844

:)

fanoush 2007-02-02 20:23

Re: Booting from MMC on N800 Now Available!!
 
Quote:

Originally Posted by freeman (Post 33057)
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.

If you used tar for cloning, make sure GNU tar was really executed, not busybox tar. busybox tar has path limited to 100 chars so not everything is copied. Then it reboots like this. Just run tar with same path without arguments to see which tar it is or run it without -v and check for error messages about 100 character path limit.
Quote:

Originally Posted by freeman (Post 33057)
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.

critical is to unmount before rebooting, then sync is not needed. sync without unmounting helps a bit but is not ideal at all.

Arch 2007-02-03 01:34

Re: Booting from MMC on N800 Now Available!!
 
Quote:

Originally Posted by Milhouse (Post 33064)

My apologise I thought it was something that needed to be downloaded and installed, instead it is on the system just needed to be installed. Thx for your help and I will search harder next time, probably impatience on my part.

Regards

Arch

Milhouse 2007-02-03 02:19

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"

freeman 2007-02-03 05:50

Re: Booting from MMC on N800 Now Available!!
 
Quote:

Originally Posted by fanoush (Post 33077)
If you used tar for cloning, make sure GNU tar was really executed, not busybox tar. busybox tar has path limited to 100 chars so not everything is copied. Then it reboots like this. Just run tar with same path without arguments to see which tar it is or run it without -v and check for error messages about 100 character path limit.
critical is to unmount before rebooting, then sync is not needed. sync without unmounting helps a bit but is not ideal at all.

No wonder, I think that deserve to be in the instruction as well.

mrp 2007-02-04 15:42

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

sebastian.linux 2007-02-04 21:46

Re: Booting from MMC on N800 Now Available!!
 
Quote:

Originally Posted by mrp (Post 33245)
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

Just type free at the xterm.

penguinbait 2007-02-04 22:25

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.

sebastian.linux 2007-02-04 23:31

Re: Booting from MMC on N800 Now Available!!
 
Quote:

Originally Posted by penguinbait (Post 33293)
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.

Sorry, it was my fault. It doesn't provide you with extra "RAM". I mean, if you type free, you get:

$ 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)

freeman 2007-02-05 00:14

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.

freeman 2007-02-05 00:50

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
# workaround an issue with mounting swap partition at startup

SWAPX='/dev/mmcblk0p3'

case "$1" in
 start)
  swapon $SWAPX
 ;;
 stop)
  swapoff $SWAPX
 ;;
 restart
  swapoff $SWAPX
  swapon $SWAPX
 ;;
 reload|force-reload)
  echo "$0: not implemented"
 ;;
 *)
 ;;
esac


sebastian.linux 2007-02-05 00:50

Re: Booting from MMC on N800 Now Available!!
 
Quote:

Originally Posted by freeman (Post 33301)
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.

If you want to use a Swap file, it's better and easier to set it at:
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:

freeman 2007-02-05 01:24

Re: Booting from MMC on N800 Now Available!!
 
Quote:

Originally Posted by penguinbait (Post 33293)
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.

This is quite hard to answer. but let me try this, Well even though it's exact use more memory in when booting from flash, but the rootfs stored in the flash is in jffs2 and in order for the data to be usable, it got to be uncompressed first, right, so where is that uncompressed data stored? While I'm there at the flash issue, let me answer this as well, the main reason why the system is slow when booted from flash because, all the application(not data stored on SD/MMC) are pretty much in compressed format. The CPU is already underpower at 300MHz already, and now it have to do compression/decompression on the fly, it's another step for the CPU to handle.

freeman 2007-02-05 01:32

Re: Booting from MMC on N800 Now Available!!
 
Quote:

Originally Posted by sebastian.linux (Post 33310)
If you want to use a Swap file, it's better and easier to set it at:
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:

The disadvantage is that the swap file on the vfat is/probably limited by the UI, which has the ceiling of 128MB for N800 and 64MB for 770. And I'm not sure how the swap file is handle, but I have no way to check how much was used and how much is left.

fanoush 2007-02-05 08:53

Re: Booting from MMC on N800 Now Available!!
 
Quote:

Originally Posted by freeman (Post 33313)
This is quite hard to answer. but let me try this, Well even though it's exact use more memory in when booting from flash, but the rootfs stored in the flash is in jffs2 and in order for the data to be usable, it got to be uncompressed first, right, so where is that uncompressed data stored?

Well jffs2 is probably optimized for embedded use so I guess it does not take much ram. Maybe it is even optimized for size, not speed :-)
Quote:

Originally Posted by freeman (Post 33313)
the main reason why the system is slow when booted from flash because, all the application(not data stored on SD/MMC) are pretty much in compressed format. The CPU is already underpower at 300MHz already, and now it have to do compression/decompression on the fly, it's another step for the CPU to handle.

Exactly. Even if default n770 kernel has very poor MMC speed the i/o speed is still slightly faster than internal flash due to jffs2 compression overhead and as a bonus the CPU is free to do something else while reading. With internal flash i/o is slower and cpu usage is 100% while reading/writing which slows the device a lot.

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.

tolou 2007-02-05 09:25

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?

fanoush 2007-02-05 09:38

Re: Booting from MMC on N800 Now Available!!
 
Quote:

Originally Posted by tolou (Post 33340)
Another somewhat generic question in this "N800" thread ;-)
- Would reflashing the device wipe out the initfs along with the root system?

Yes if you flash whole FIASCO image. No if you flash just the rootfs. When reflashing same firmware again flashing rootfs should be enough to fix anything that is fixable by reflashing. Only when flashing newer or older firmware whole FIASCO image should be used (and yes, you loose the bootmenu).

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.

tolou 2007-02-05 10:05

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.

fanoush 2007-02-05 10:26

Re: Booting from MMC on N800 Now Available!!
 
Quote:

Originally Posted by tolou (Post 33343)
Thanks,
and will I be able to reflash the internal rootfs from a mmc booted OS, using this 'flasher -f -r rootfs.jffs2' ?

Yes, but not via flasher. You need to use mtd-utils. I did it few times. There is no simple way but you can use tools from initfs flasher. This is what I do:

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
./mkfs.jffs2 -r /opt -o /media/mmc1/rootfs.jffs2 -e 128 -l -n
umount /opt

There is also optional sumtool command that optimizes the image a bit for faster mounting.

Code:

sumtool -i rootfs.jffs2 -o rootfs.faster.jffs2  -e 128KiB -l -n
then when I want to restore system in flash I boot from mmc and do

Code:

./flash_eraseall -j /dev/mtd4
./nandwrite -a -p /dev/mtd4 /media/mmc1/rootfs.jffs2

Be sure to use correct device name (/dev/mtd4 for rootfs) and never ever use -j option of nandwrite. Also never ever erase or flash /dev/mtd1 or mtd0. By doing this you can seriously screw your device to the point that reflashing will not help you (and won't be posible at all).

freeman 2007-02-05 12:30

Re: Booting from MMC on N800 Now Available!!
 
Quote:

Originally Posted by fanoush (Post 33348)
never ever use -j option of nandwrite.

Isn't that the reason why we dualboot and primary use sd/mmc for rootfs. If it's removable then it's replacable. If my nandflash died, then I'm totally screw. Cuz, by the time the flash died, the unit probably out of warranty.

fanoush 2007-02-05 13:29

Re: Booting from MMC on N800 Now Available!!
 
Quote:

Originally Posted by freeman (Post 33360)
Isn't that the reason why we dualboot and primary use sd/mmc for rootfs. If it's removable then it's replacable. If my nandflash died, then I'm totally screw.

Yes, touching the internal flash when you don't know exactly what you do is dangerous. Using nandwrite -j by mistake is recoverable but not easy (special hacked kernel, special flash_eraseall) http://www.gossamer-threads.com/list...rs/10530#10530
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

tolou 2007-02-05 15:02

Re: Booting from MMC on N800 Now Available!!
 
Quote:

Originally Posted by fanoush (Post 33348)
Yes, but not via flasher. You need to use mtd-utils. I did it few times. There is no simple way but you can use tools from initfs flasher.

Canīt I just do what I did to make the mmc OS installation, but reversed? I.e the GNUtar extraction back into the jffs2 partition? That would be simple enough, I think. After having made the flash_eraseall, that is.

fanoush 2007-02-05 15:50

Re: Booting from MMC on N800 Now Available!!
 
Quote:

Originally Posted by tolou (Post 33371)
Canīt I just do what I did to make the mmc OS installation, but reversed? I.e the GNUtar extraction back into the jffs2 partition? That would be simple enough, I think. After having made the flash_eraseall, that is.

Well, yes, but mkfs.jffs2 is there for some reason. I guess the reasons are
- 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.

Milhouse 2007-02-05 15:55

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.

penguinbait 2007-02-05 16:07

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.

fanoush 2007-02-05 16:24

Re: Booting from MMC on N800 Now Available!!
 
Quote:

Originally Posted by Milhouse (Post 33378)
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?

No, in current system you need to flash at least initfs and kernel to boot newer firmware completely. Newer kernel and initfs may (or may not, depends on specific version) make older rootfs in flash not booting. Not talking about flashing bootloader of course which is sometimes updated too and currently cannot be flashed from device.

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 :-)

penguinbait 2007-02-05 17:02

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?

freeman 2007-02-05 18:38

Re: Booting from MMC on N800 Now Available!!
 
Quote:

Originally Posted by fanoush (Post 33380)
No, in current system you need to flash at least initfs and kernel to boot newer firmware completely. Newer kernel and initfs may (or may not, depends on specific version) make older rootfs in flash not booting. Not talking about flashing bootloader of course which is sometimes updated too and currently cannot be flashed from device.

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 :-)

And when you say in current system, you meant both the 770 and N800 and the way they were design for now right. Cuz, when I upgrade the kernel on my N800, the only way I could upload the kernel is to use 'flasher-3.0 -k'.
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