Reply
Thread Tools
Posts: 1,847 | Thanked: 7,049 times | Joined on May 2010
#1
Update: New version 0.2 is in Extras, it has fixed Fn keys

In new version of kernel-power is framebuffer support as external kernel modules. A lot of posts was in kernel-power thread how to use it. So this can be used for Recovery Console Mode. It is entry for bootmenu which start classic console mode on Nokia N900 with working HW keyboard.

It starts linux console before Maemo is booted, so it can be used for fixing broken Maemo.

It depends on bootmenu 0.10.0 (or higher) and kernel-power v47 (or higher) from:
http://talk.maemo.org/showthread.php?t=71879
or other kernel which has compiled framebuffer modules

Installation:
Install package recovery-boot from Maemo Extras or from Maemo Download page

Source code:
https://code.launchpad.net/~pali/+ju..._recovery-boot

Support:
If you want to support my work on Bootmenu and this Recovery Console Mode, you can donate:

Last edited by pali; 04-17-2013 at 09:27 AM.
 

The Following 27 Users Say Thank You to pali For This Useful Post:
Captwheeto's Avatar
Posts: 302 | Thanked: 192 times | Joined on Oct 2008 @ England
#2
It sounds beautiful :') I can't remember the number of times I've been dieing for a recovery console.

Relating to the framebuffer... would it be possible to get the scrolling booting text instead of the nokia logos and dots splash?
 

The Following 2 Users Say Thank You to Captwheeto For This Useful Post:
Posts: 1,847 | Thanked: 7,049 times | Joined on May 2010
#3
I can look at this in future. It sounds nice... but now I do not have time... (and this is thread for console mode)
 
Posts: 2,125 | Thanked: 3,397 times | Joined on Jun 2010 @ Florida
#4
Originally Posted by Captwheeto View Post
It sounds beautiful :') I can't remember the number of times I've been dieing for a recovery console.

Relating to the framebuffer... would it be possible to get the scrolling booting text instead of the nokia logos and dots splash?
Unsure about the Nokia splash. You can however edit/comment out the parts of the script (it's /etc/init.d/fb-progress ) that shows the dots... pretty sure just deleting the script would be bad... though now that there's a recovery console, you can just mv it somewhere, and if you can't boot, put it back from the recovery console.
 

The Following 4 Users Say Thank You to Mentalist Traceur For This Useful Post:
hawaii's Avatar
Posts: 1,018 | Thanked: 770 times | Joined on Jun 2009 @ Toronto
#5
I built and installed it.

@pali;

I'm using a patched version of multiboot that you help with from the BackupMenu issue and it seems to simply load the system as usual failing to load the framebuffer module as well.

Steps to debug?
__________________
Blog: Know Nokia
 
Posts: 2,125 | Thanked: 3,397 times | Joined on Jun 2010 @ Florida
#6
Originally Posted by Captwheeto View Post
Relating to the framebuffer... would it be possible to get the scrolling booting text instead of the nokia logos and dots splash?
Oh also: you can have scrolling booting text right now, just modprobe the fbcon module early in the boot of the kernel in question. See the other pali thread, "kernel-power patches/updates", for explanations on how. (The edit bootmenu.sh way will work when you boot with keyboard out, the edit preinit way works regardless of keyboard state, so just a matter of what you want.)

Also, I must say, while the bootmenu.sh way is still not fully within my aesthetic (I like the console running on all boots, keyboard in too; though I'll be honest, I can see why most people would want it optionally activated only on keyboard open, and I myself am unsure if I'm ultimately going to settle on the bootmenu.sh or preinit approach), knowing that I can safely experiment with code in bootmenu.sh is wonderful - makes it so much easier to figure out how to give myself a command-line at early boot while knowing that my N900 won't need to be reflashed if I mess up, as I can just boot normally with keyboard out. Definitely safer than editing /sbin/preinit.
 

The Following 3 Users Say Thank You to Mentalist Traceur For This Useful Post:
Posts: 1,847 | Thanked: 7,049 times | Joined on May 2010
#7
Originally Posted by hawaii View Post
I built and installed it.

@pali;

I'm using a patched version of multiboot that you help with from the BackupMenu issue and it seems to simply load the system as usual failing to load the framebuffer module as well.

Steps to debug?
Recovery Console Mode is not working with multiboot. Only with bootmenu.
 

The Following 3 Users Say Thank You to pali For This Useful Post:
Posts: 2,125 | Thanked: 3,397 times | Joined on Jun 2010 @ Florida
#8
I've spent the last few days slowly testing how to get recovery console as an independent bootmenu.sh, for those who use neither bootmenu nor multiboot. However, mainly, I think that whenever that's done there's going to be useful info on the matter in whatever I figure out (or fail to figure out), for running it with multiboot.

For one, bootmenu package includes a binary for evkey that is slightly different (I can only tell that it's a tiny bit smaller file-size-wise), and it comes with a "watchdogs" binary (which can at least in part explain why the code by pali won't work with multiboot). In the bootmenu.sh script of bootmenu, there seems to be a small chunk that loads the watchdog modules, does something with some files in the ... know what, here's the chunk of code I'm trying to explain, you're knowledgeable enough that my half-understanding explanation will just be less clear:

Code:
	# Watchdogs
	insmod $MODULE_PATH/omap_wdt.ko
	insmod $MODULE_PATH/twl4030_wdt.ko
	sleep 2
	for p in /sys/bus/platform/devices/*_wdt/misc:*; do
		n=`basename $p | sed "s/.*://"`
		rm -f /dev/$n
		mknod /dev/$n c `cat $p/dev | sed "s/:/ /g"`
	done
	/usr/sbin/watchdogs
There's a chunk right above that deals with RTC, whatever that is.

I haven't had time to look at the multiboot script, or that packages contents, to see what else that has for the same task, but my uneducated guess is that this somehow keeps the watchdogs nice and happy, instead of thinking something is wrong and a shutdown is needed.

I conclude this because just putting pali's script as my /bootmenu.sh (modified to load the right modules at the beginning of said script), and placing all the called for binaries into place, gets me a shell just fine, however, the device shuts down after a certain amount of time no matter what you do, presumably because somewhere a watchdog/something-similar decided that something was going wrong.

I get effectively the same result (working shell, device shuts itself down after a few minutes) with just
Code:
modprobe fbcon
bin/sh
. Though it complains about lack of job control and access to tty that way, and still lacks the keymapping offered by but the main thing - the shell - seems to work okay anyway, just up until N900 shuts itself off. ( I should get around to disabling watchdogs through enabling R&D mode to test if that fixes it sometime soon, but as time permits, ultimately.)

I'm guessing multiboot and bootmenu somehow get past that problem. Anyway, I suspect that whatever knowledge is needed to ultimately figure out how to get to working, non-shutting-down shell itself without the support of bootmenu, could be then used to understand how to adapt it to multiboot.

Last edited by Mentalist Traceur; 05-06-2011 at 05:07 AM. Reason: typo: "backup menu" supposed to be "multiboot"
 

The Following 2 Users Say Thank You to Mentalist Traceur For This Useful Post:
Posts: 1,847 | Thanked: 7,049 times | Joined on May 2010
#9
Originally Posted by Mentalist Traceur View Post
Code:
	# Watchdogs
	insmod $MODULE_PATH/omap_wdt.ko
	insmod $MODULE_PATH/twl4030_wdt.ko
	sleep 2
	for p in /sys/bus/platform/devices/*_wdt/misc:*; do
		n=`basename $p | sed "s/.*://"`
		rm -f /dev/$n
		mknod /dev/$n c `cat $p/dev | sed "s/:/ /g"`
	done
	/usr/sbin/watchdogs
This code load kernel modules for communication with HW watchdogs and then create watchdogs devices in /dev/ (for communication from user-space programs). If you do not want to reboot device after 32s you need to kick all watchdogs every 32s. And this is done by binary /usr/sbin/watchdogs (source code is in bootmenu package)
 

The Following 4 Users Say Thank You to pali For This Useful Post:
Posts: 2,125 | Thanked: 3,397 times | Joined on Jun 2010 @ Florida
#10
Cool, so my suspicion was on the right track: the shutdown is caused by the watchdogs and the chunk of code in question keeps them alive.

Thank you. Will continue to fiddle.

Success; thank you pali.

Attached is bootmenu.txt, which when copied to /bootmenu.sh allows you to get a command line as normal, no reboot, etc. I think I left out the "clear" line from pali's version - mainly because I like seeing the output of the console beforehand. (I suspect that some of the code is just uneccessary, and will probably edit the script down to strip off extra stuff. Eventually I'll figure out a way to edit preinit for those who are certain they want the console and shell regardless of whether they boot with keyboard in or out. But for now, this does the job of being a shell right at beginning of boot.
bootmenu.txt

Last edited by Mentalist Traceur; 05-06-2011 at 06:23 PM. Reason: It's alive!
 
Reply

Tags
console, console-mode, framebuffer, recovery, recovery-mode

Thread Tools

 
Forum Jump


All times are GMT -4. The time now is 07:15 AM.