Active Topics

 


Reply
Thread Tools
sebastian.linux's Avatar
Posts: 91 | Thanked: 2 times | Joined on Jan 2007 @ Spain
#21
Originally Posted by penguinbait View Post
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)
 
Posts: 152 | Thanked: 6 times | Joined on Dec 2006
#22
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.

Last edited by freeman; 2007-02-05 at 00:17.
 
Posts: 152 | Thanked: 6 times | Joined on Dec 2006
#23
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's Avatar
Posts: 91 | Thanked: 2 times | Joined on Jan 2007 @ Spain
#24
Originally Posted by freeman View Post
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.
 
Posts: 152 | Thanked: 6 times | Joined on Dec 2006
#25
Originally Posted by penguinbait View Post
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.
 
Posts: 152 | Thanked: 6 times | Joined on Dec 2006
#26
Originally Posted by sebastian.linux View Post
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.
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.
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#27
Originally Posted by freeman View Post
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 :-)
Originally Posted by freeman View Post
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's Avatar
Posts: 87 | Thanked: 1 time | Joined on Mar 2006
#28
Another somewhat generic question in this "N800" thread ;-)
- Would reflashing the device wipe out the initfs along with the root system?
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#29
Originally Posted by tolou View Post
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's Avatar
Posts: 87 | Thanked: 1 time | Joined on Mar 2006
#30
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.
 
Reply


 
Forum Jump


All times are GMT. The time now is 12:11.