Active Topics

 



Notices


Reply
Thread Tools
Posts: 842 | Thanked: 1,197 times | Joined on May 2010
#161
BackupMenu(nor any other software) can remove or break the flasher.
Just turn off the N900, open the keyboard, hold the U key then plug in the USB. It should work fine.

Also, Shadow, if you are talking about the Terminal mode of BackupMenu, yes, its glitched. amongst other things, the third row of keys is shifted one key to the left, and I haven't been able to fix it yet.
 
Posts: 842 | Thanked: 1,197 times | Joined on May 2010
#162
I'm experimenting with running from a bare-essentials chroot, which is a prereq if I want to more safely mess with the rootfs.

I made my ramdisk:
Code:
mknod -m 660 /dev/ram b 1 1
chown root.disk /dev/ram
dd if=/dev/zero of=/dev/ram bs=1k count=4k
/sbin/mkfs.ext2 -m 0 /dev/ram 4096
mkdir /tmp/disk
mount -t ext2 /dev/ram /tmp/disk
Worked fine.
I copied /bin/busybox, and created a simlink in the new directory:
Code:
mkdir /tmp/disk/bin
cp /bin/busybox /tmp/disk/bin/
cd /tmp/disk/bin/
ln -s ./busybox sh
Worked fine. Running "./sh" brought up a new shell; the program works.

But when I try to chroot into it:
"chroot /tmp/disk/"
I get:
"chroot: cannot execute /bin/sh: No such file or directory."

What did I do wrong?
 

The Following User Says Thank You to RobbieThe1st For This Useful Post:
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#163
Originally Posted by RobbieThe1st View Post
But when I try to chroot into it:
"chroot /tmp/disk/"
I get:
"chroot: cannot execute /bin/sh: No such file or directory."

What did I do wrong?
Busybox isn't statically linked on the N900, so you'll need to copy the necessary libraries over as well.
 
Posts: 842 | Thanked: 1,197 times | Joined on May 2010
#164
Originally Posted by Rob1n View Post
Busybox isn't statically linked on the N900, so you'll need to copy the necessary libraries over as well.
Thanks.

But, erm, two questions:
Which are those/where can I find them, and why is it saying "can't find file X"? Shouldn't it say something like "missing X library.so"?
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#165
Originally Posted by RobbieThe1st View Post
Thanks.

But, erm, two questions:
Which are those/where can I find them, and why is it saying "can't find file X"? Shouldn't it say something like "missing X library.so"?
Use ldd to find the required libraries for an application. For busybox, they're:
  • /lib/libcrypt.so.1 (symlink to /lib/libcrypt-2.5.so)
  • /lib/libc.so.6 (symlink to /lib/libc-2.5.so)
  • /lib/ld-linux.so.3 (symlink to /lib/ld-2.5.so)

You'll probably also need to bind mount /dev, /proc and /sys under your chroot:
Code:
mkdir /tmp/disk/dev /tmp/disk/sys /tmp/disk/proc
mount -o bind /dev /tmp/disk/dev
mount -o bind /sys /tmp/disk/sys
mount -o bind /proc /tmp/disk/proc
As for why you get the error message you get - it's a bit confusing, but actually correct. It cannot execute /bin/sh because the linked libraries don't exist.
 

The Following User Says Thank You to Rob1n For This Useful Post:
Posts: 842 | Thanked: 1,197 times | Joined on May 2010
#166
Perfect! It worked. Tomorrow I'll see about actually sticking it in my script, and hopefully in a day or two I'll have an alpha version for testing!

Stay tuned!

-Rob
 
Posts: 842 | Thanked: 1,197 times | Joined on May 2010
#167
I've been working on this solidly since my last post.
Curently, I have two files:
BackupMenuLauncher.item, which is in /etc/bootloader.d/ and runs when you start up your N900 with the keyboard open.
This file makes a ramdisk(and now, a tmpfs), loads all required files into it, and copies the second file, the actual program, from /opt/BackupMenu.item, then chroots into the ramdisk launching that file.
Code for each of these is pastebinned in the above links.

When I run this from the Maemo terminal as root, it works(as best I can see of it). I get errors on not being able to use udev(as its already running), but it actually seems to launch the script fine.

When I run it from the bootmenu-console, everything works fine until the launcher chroots, at which point it apparently dies and drops back to the bootmenu official menu.

Any ideas on what I'm doing wrong?

P.S. How do I get /etc/mtab in my chroot? "mount" does this.


edit: Yea, still having the problem.

edit2:
Found it. The second file was in /opt/, which is its own partition... which isn't mounted deliberately. :\
Moved it to the root partition, worked great.

edit3:
Sooo... working away at it. I'm having trouble mounting the SD partition; getting "invalid argument". I'm sure its something simple(or maby not...)

Thanks,

-Rob

Last edited by RobbieThe1st; 2010-09-11 at 10:56.
 

The Following 2 Users Say Thank You to RobbieThe1st For This Useful Post:
Erazor's Avatar
Posts: 160 | Thanked: 33 times | Joined on May 2010
#168
Originally Posted by RobbieThe1st View Post
Yea, I'm gonna have to try that, MohammadAG. Thanks.
Hm i put the lines in several positions in the /etc/bootmenu.d/BackupMenu.item

But no Keyboard lights!

Should follow line
echo 255 > /sys/class/leds/lp5523\:kb$3/brightness
work under xterm?
By me the line doesn't change the backlight off my N900

Greetz
Erazor


edit:

Hope you're not angry with me, when I change your file!
Only want to help you to fix/add this
*hide myself under the shirt*

Last edited by Erazor; 2010-09-13 at 02:10.
 
Posts: 842 | Thanked: 1,197 times | Joined on May 2010
#169
Originally Posted by Erazor View Post
Hope you're not angry with me, when I change your file!
Only want to help you to fix/add this
*hide myself under the shirt*
Its GPL licensed, so it doesn't matter. You can distribute, copy, edit, etc. without asking me, so long as you distribute your edits under the same license. At least, that's my interpretation of it.

Of course, even if I -have- to allow editing, I don't mind it anyway. I want to see some people messing with it; figure out better ways of doing things. I'm -not- an expert, after all...

Anyway, while I haven't tried it, but you will have to A, load the module first with "insmod /lib/modules/current/leds_lp5523.ko"(note: it may also be "modprobe" instead of insmod), then after that run the "for x in 1 2 3 4 5 6; do echo 255 > /sys/class/leds/lp5523\:kb$x/brightness; done" line.

Last edited by RobbieThe1st; 2010-09-13 at 09:22.
 

The Following User Says Thank You to RobbieThe1st For This Useful Post:
Erazor's Avatar
Posts: 160 | Thanked: 33 times | Joined on May 2010
#170
Originally Posted by RobbieThe1st View Post
Its GPL licensed, so it doesn't matter. You can distribute, copy, edit, etc. without asking me, so long as you distribute your edits under the same license. At least, that's my interpretation of it.

Of course, even if I -have- to allow editing, I don't mind it anyway. I want to see some people messing with it; figure out better ways of doing things. I'm -not- an expert, after all...

Anyway, while I haven't tried it, but you will have to A, load the module first with "insmod /lib/modules/current/leds_lp5523.ko"(note: it may also be "modprobe" instead of insmod), then after that run the "for x in 1 2 3 4 5 6; do echo 255 > /sys/class/leds/lp5523\:kb$x/brightness; done" line.
ok
thx



i have already take this in the file with insmod and modprobe in different places.

but i dont get the keyboard lights running.
strange things

only for the archives!!!!
the line called
echo 255 > /sys/class/leds/lp5523\:kb$3/brightness
for example.

or

do echo 255 > /sys/class/leds/lp5523\:kb$3/brightness
done


???

i will test this and let you know, when it works

thx for the reply
 
Reply


 
Forum Jump


All times are GMT. The time now is 17:27.