Reply
Thread Tools
penguinbait's Avatar
Posts: 3,096 | Thanked: 1,525 times | Joined on Jan 2006 @ Michigan, USA
#31
No error, but no mount, exit 0


BusyBox v1.1.3 (Debian 3:1.1.3-3.osso17) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

Nokia-N800-51:~# grep '/mnt/initfs jffs2' /proc/mounts
/dev/root /mnt/initfs jffs2 rw 0 0
Nokia-N800-51:~# chroot /mnt/initfs mount -t jffs2 -o remount,ro /dev/mtdblock3
/
Nokia-N800-51:~# df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/mtdblock4 2048 1796 252 88% /mnt/initfs
none 512 68 444 13% /mnt/initfs/tmp
/dev/mtdblock4 257536 87908 169628 34% /
none 512 68 444 13% /tmp
none 1024 76 948 7% /dev
/dev/mmcblk1p1 40034 6796 33238 17% /media/mmc1
/dev/mmcblk0p1 402968 327888 75080 81% /media/mmc2
Nokia-N800-51:~# ls -l /bin/mount
lrwxrwxrwx 1 root root 7 Dec 20 11:23 /bin/mount -> busybox
Nokia-N800-51:~# chroot /mnt/initfs mount -t jffs2 -o remount,ro /dev/mtdblock3 /
Nokia-N800-51:~# echo $?
0
Nokia-N800-51:~# df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/mtdblock4 2048 1796 252 88% /mnt/initfs
none 512 68 444 13% /mnt/initfs/tmp
/dev/mtdblock4 257536 87908 169628 34% /
none 512 68 444 13% /tmp
none 1024 76 948 7% /dev
/dev/mmcblk1p1 40034 6796 33238 17% /media/mmc1
/dev/mmcblk0p1 402968 327888 75080 81% /media/mmc2
Nokia-N800-51:~#
 
Posts: 64 | Thanked: 1 time | Joined on Jan 2007 @ Seattleish, WA
#32
fwiw, I just followed Fanoush's directions in the first post and bootmenu is running.

AWESOME.


THANK YOU MAN! (and you too PB for the legwork!)
__________________
~ Mark
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#33
Originally Posted by penguinbait View Post
No error, but no mount, exit 0
That's OK. The whole point of the 'mount -o ro,remount ...' is to remount initfs read only while initially it is mounted read/write. The only thing that should change is 'rw' flags to 'ro'. df output doesn't help me, I was interested in 4th column of one line of /proc/mounts before and after the mount command. Does it change to 'ro'?

Thanks midiwall for confirmation that it works (on n800? including keys?).
 
Posts: 64 | Thanked: 1 time | Joined on Jan 2007 @ Seattleish, WA
#34
Originally Posted by fanoush View Post
Thanks midiwall for confirmation that it works (on n800? including keys?).
Yeup, on N800.

Now, I think I may be seeing things. I DO get the menu, but I can't move the cursor nor hit [] to bypass the timer. The timeout expires and it boots from flash. I could have sworn that the first time the box rebooted (right after the flashing) I was able to walk that menu, but I may have been wrong.

Is it possible that the menu is "smart" and it'll only allow the cursor to move to partitions that have a boot image?

fwiw, this is my session:
Code:
Nokia-N800-51:~# cp /media/mmc2/initfs_flasher.tgz .

Nokia-N800-51:~# tar zxvf initfs_flasher.tgz
initfs_flasher
initfs_flasher/nanddump
initfs_flasher/nandwrite
initfs_flasher/to_remove.lst
initfs_flasher/initfs_flash
initfs_flasher/mkfs.jffs2
initfs_flasher/flash_eraseall
initfs_flasher/initfs.osso-n770.2006-25.tgz
initfs_flasher/initfs.osso-RX-34.2006-51.tgz
initfs_flasher/README.txt
initfs_flasher/bootmenu.sh
initfs_flasher/bootmenu.conf.n770.example
initfs_flasher/bootmenu.conf.n800.example
initfs_flasher/initfs.osso-n770.2006-38.tgz

Nokia-N800-51:~# cd initfs_flasher/

Nokia-N800-51:~/initfs_flasher# ls
README.txt                     initfs.osso-RX-34.2006-51.tgz  nanddump
bootmenu.conf.n770.example     initfs.osso-n770.2006-25.tgz   nandwrite
bootmenu.conf.n800.example     initfs.osso-n770.2006-38.tgz   to_remove.lst
bootmenu.sh                    initfs_flash
flash_eraseall                 mkfs.jffs2

Nokia-N800-51:~/initfs_flasher# ./initfs_flash

 === Flasher for initfs with onscreen bootmenu ===

For safe flashing please do the following:

- close all aplications (to free available RAM and prevent system crash)
- disconnect from network (to prevent system crash)
- make sure you have at least 5MB free disk space in flasher directory
- make sure you know how to reflash device in usual way if this fails

Are you sure to continue? (yes/no) : yes

Create backup of current initfs (yes/no) : yes
 *** creating initfs.orig.jffs2 ...
-rw-r--r--    1 root     root      1686436 Jan 19 11:11 initfs.orig.jffs2
Press enter to continue

Part 1 - Preparing initfs.bootmenu.jffs2 image
 *** copying current initfs ... done.
If you remove extra stuff you may write to initfs and customize bootmenu.
Remove unneeded extra (and factory testing) stuff? (yes/no) : yes
 *** removing extra stuff ...
 *** extracting boot menu files for initfs version osso-RX-34.2006-51 ...
.
./linuxrc
./dev
./dev/mmcblk0p3
./usr
./usr/bin
./usr/bin/evkey
 *** copying bootmenu.sh
 *** searching for optional bootmenu.conf in current directory ...
 *** not found, no problem
 *** creating initfs.bootmenu.jffs2 ...
-rw-r--r--    1 root     root      1412932 Jan 19 11:11 initfs.bootmenu.jffs2

Part 2 - Ready for flashing this image? (yes/no) : yes
 *** remounting initfs read only ... OK
 *** caching old initfs to memory (for crash prevention)
 *** erasing initfs partition (/dev/mtd3) ...
Erasing 128 Kibyte @ 1e0000 -- 93 % complete. Cleanmarker written at 1e0000.
 *** flashing initfs.bootmenu.jffs2 image ...
Writing data to block 0
Writing data to block 20000
Writing data to block 40000
Writing data to block 60000
Writing data to block 80000
Writing data to block a0000
Writing data to block c0000
Writing data to block e0000
Writing data to block 100000
Writing data to block 120000
Writing data to block 140000
 *** done
Press enter to reboot device (or ctrl+c to quit, not recommended)


Broadcast message from root (pts/1) (Fri Jan 19 11:11:59 2007):

The system is going down for reboot NOW!
Nokia-N800-51:~/initfs_flasher#
I don't want to confuse the time you're spending with PB. Please continue working with him. I'm booting, I'm fine. We can work on me later.
__________________
~ Mark
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#35
midiwall, can you do the steps I asked here
http://www.internettablettalk.com/fo...4&postcount=15
Seems like key detection is still not right on N800, I'm interested if GETKEY variable is set correctly and when executing it whether it print key code when you press something or not.
 
penguinbait's Avatar
Posts: 3,096 | Thanked: 1,525 times | Joined on Jan 2006 @ Michigan, USA
#36
Here you go

Nokia-N800-51:~# grep '/mnt/initfs jffs2' /proc/mounts
/dev/root /mnt/initfs jffs2 rw 0 0
Nokia-N800-51:~# chroot /mnt/initfs mount -t jffs2 -o remount,ro /dev/mtdblock3 /
Nokia-N800-51:~# grep '/mnt/initfs jffs2' /proc/mounts
/dev/root /mnt/initfs jffs2 ro 0 0
Nokia-N800-51:~#



Ok here is my question. I don't mean to sound ignorant but, and I dont want you to have to spend a bunch of time explaining things to me, but. Why do I want to make it "read only" before I write to it. I am not claiming to be a genious, but I am a unix admin, and this is just totally counter intuitive. Is this for the backup? I am bewildered,


I have not looked at the new package yet, I will download that and see what the deal is with the evkeys
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#37
Originally Posted by penguinbait View Post
Here you go

Nokia-N800-51:~# grep '/mnt/initfs jffs2' /proc/mounts
/dev/root /mnt/initfs jffs2 rw 0 0
Nokia-N800-51:~# chroot /mnt/initfs mount -t jffs2 -o remount,ro /dev/mtdblock3 /
Nokia-N800-51:~# grep '/mnt/initfs jffs2' /proc/mounts
/dev/root /mnt/initfs jffs2 ro 0 0
Nokia-N800-51:~#
Thanks a lot, so it works as expected
Originally Posted by penguinbait View Post
Why do I want to make it "read only" before I write to it.
because the flashing script does the erasing and flashing via accessing underlying /dev/mtd3 device (i.e. raw NAND flash memory). I really do not want the jffs2 garbage collecting thread (do 'ps -ef | grep mtd3' while mounted rw) to touch the device at the same time as the erasing/flashing is done or after it is done before reboot. That could corrupt something.
 
penguinbait's Avatar
Posts: 3,096 | Thanked: 1,525 times | Joined on Jan 2006 @ Michigan, USA
#38
That makes sense, two things accessing the same filesystem would cause issues.

I told you I had copied the files and deleted them previously, so this is not a fresh flash test. But everything is working including the keys.


midiwall, can you reboot again, did it happen over and over again? It will occaisionally happen where the keys will not work, sometimes on reboots, I had not yet mentioned that to Fanoush, never had a problem with shutdowns and starts, only occaisionally when rebooting. Please try again and see if your keys are working.

I looked at mine and all the files timestamps were updated so I think everything is looking good. If midiwalls keys are working you shoudl be all set, if his are really not working I can reflash and see if I can recreate the problem from scratch. Unless someone else shows up to test?


Nokia-N800-51:/home/user/MyDocs/.documents# cd initfs_flasher/
Nokia-N800-51:/home/user/MyDocs/.documents/initfs_flasher# ls
README.txt initfs.osso-n770.2006-38.tgz
bootmenu.conf.n770.example initfs_flash
bootmenu.conf.n800.example mkfs.jffs2
bootmenu.sh nanddump
flash_eraseall nandwrite
initfs.osso-RX-34.2006-51.tgz to_remove.lst
initfs.osso-n770.2006-25.tgz
Nokia-N800-51:/home/user/MyDocs/.documents/initfs_flasher# df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/mtdblock4 2048 1804 244 88% /mnt/initfs
none 512 64 448 13% /mnt/initfs/tmp
/dev/mtdblock4 257536 77584 179952 30% /
none 512 64 448 13% /tmp
none 1024 76 948 7% /dev
/dev/mmcblk1p1 40034 6796 33238 17% /media/mmc1
/dev/mmcblk0p1 402968 327888 75080 81% /media/mmc2
Nokia-N800-51:/home/user/MyDocs/.documents/initfs_flasher# grep '/mnt/initfs jffs2' /proc/mounts
/dev/root /mnt/initfs jffs2 rw 0 0
Nokia-N800-51:/home/user/MyDocs/.documents/initfs_flasher# cp /mnt/initfs/bootmenu.conf .
Nokia-N800-51:/home/user/MyDocs/.documents/initfs_flasher# ls -ltr
-rwxr-xr-x 1 user users 12400 Jul 8 2006 nandwrite
-rwxr-xr-x 1 user users 7464 Jul 8 2006 nanddump
-rwxr-xr-x 1 user users 18084 Aug 5 16:41 flash_eraseall
-rwxr-xr-x 1 user users 35260 Aug 14 20:29 mkfs.jffs2
-rw-r--r-- 1 user users 9444 Aug 24 19:32 to_remove.lst
-rw-r--r-- 1 user users 5698 Jan 1 19:55 initfs.osso-n770.2006-25.tgz
-rw-r--r-- 1 user users 5944 Jan 1 19:56 initfs.osso-n770.2006-38.tgz
-rw-r--r-- 1 user users 4415 Jan 14 20:02 bootmenu.sh
-rw-r--r-- 1 root root 17931 Jan 15 08:10 initfs.osso-RX-34.2006-51.tgz
-rw-r--r-- 1 user users 1127 Jan 17 12:38 bootmenu.conf.n800.example
-rw-r--r-- 1 user users 1031 Jan 17 12:41 bootmenu.conf.n770.example
-rw-r--r-- 1 user users 3007 Jan 17 13:36 README.txt
-rwxr-xr-x 1 user users 5275 Jan 19 13:19 initfs_flash
-rwxr-xr-x 1 root root 902 Jan 20 15:49 bootmenu.conf
Nokia-N800-51:/home/user/MyDocs/.documents/initfs_flasher# ./initfs_flash

=== Flasher for initfs with onscreen bootmenu ===

For safe flashing please do the following:

- close all aplications (to free available RAM and prevent system crash)
- disconnect from network (to prevent system crash)
- make sure you have at least 5MB free disk space in flasher directory
- make sure you know how to reflash device in usual way if this fails

Are you sure to continue? (yes/no) : yes

Create backup of current initfs (yes/no) : yes
*** creating initfs.orig.jffs2 ...
-rw-r--r-- 1 root root 1413572 Jan 20 15:50 initfs.orig.jffs2
Press enter to continue

Part 1 - Preparing initfs.bootmenu.jffs2 image
*** copying current initfs ... done.
If you remove extra stuff you may write to initfs and customize bootmenu.
Remove unneeded extra (and factory testing) stuff? (yes/no) : yes
*** removing extra stuff ...
*** extracting boot menu files for initfs version osso-RX-34.2006-51 ...
.
./linuxrc
./dev
./dev/mmcblk0p3
./usr
./usr/bin
./usr/bin/evkey
*** copying bootmenu.sh
*** searching for optional bootmenu.conf in current directory ...
Found, do you want to add it to initfs? (yes/no) yes
*** OK, bootmenu.conf added
*** creating initfs.bootmenu.jffs2 ...
-rw-r--r-- 1 root root 1413760 Jan 20 15:51 initfs.bootmenu.jffs2

Part 2 - Ready for flashing this image? (yes/no) : yes
*** remounting initfs read only ... OK
*** caching old initfs to memory (for crash prevention)
*** erasing initfs partition (/dev/mtd3) ...
Erasing 128 Kibyte @ 1e0000 -- 93 % complete. Cleanmarker written at 1e0000.
*** flashing initfs.bootmenu.jffs2 image ...
Writing data to block 0
Writing data to block 20000
Writing data to block 40000
Writing data to block 60000
Writing data to block 80000
Writing data to block a0000
Writing data to block c0000
Writing data to block e0000
Writing data to block 100000
Writing data to block 120000
Writing data to block 140000
*** done
Press enter to reboot device (or ctrl+c to quit, not recommended)


Broadcast message from root (pts/0) (Sat Jan 20 15:54:13 2007):

The system is going down for reboot NOW!ts/initfs_flasher#

I did connect to another terminal and it was read-only before reboot

Nokia-N800-51:~# grep '/mnt/initfs jffs2' /proc/mounts
/dev/root /mnt/initfs jffs2 ro 0 0
 
Posts: 64 | Thanked: 1 time | Joined on Jan 2007 @ Seattleish, WA
#39
Originally Posted by fanoush View Post
please check bootmenu.sh if there are lines
Code:
EVNAME=event1 # default, n770
grep -q RX-34 ${initfs_prefix}/etc/initfs_version && EVNAME=event2 #n800
#wait 1 second for keyup event
GETKEY="evkey -u -t 1000 /dev/input/${EVNAME}"
Yeup, got 'em.


If yes then please debug this for me. As root run
Code:
grep -q RX-34 /etc/initfs_version && echo It works
This doesn't work because of the the leading "/". The initfs partition shows as:

Nokia-N800-51:/mnt/initfs#

So, you'd want:
Code:
grep -q RX-34 etc/initfs_version && echo It works
Which _does_ work.

Are you expecting ${initfs_prefix} to be set to something when you're actually running at boot? If so, then the script should be "okay", but executing it as root will fail since ${initfs_prefix} isn't defined. (so it returns NULL which makes it look like "/etc..." is based from the root of the partition).


I'm trying to modify bootmenu.sh to try a couple of things, but my wireless connection here in the office is flaky so I keep dropping the connection.
__________________
~ Mark
 
Posts: 64 | Thanked: 1 time | Joined on Jan 2007 @ Seattleish, WA
#40
Originally Posted by penguinbait View Post
midiwall, can you reboot again, did it happen over and over again? It will occaisionally happen where the keys will not work, sometimes on reboots, I had not yet mentioned that to Fanoush, never had a problem with shutdowns and starts, only occaisionally when rebooting. Please try again and see if your keys are working.
Nope, multiple reboots and no keys. See the above post for what I think the issue is on my machine.
__________________
~ Mark
 
Reply


 
Forum Jump


All times are GMT. The time now is 09:52.