Thursday, January 14, 2010

A small but important update in PR1.1

This is slightly technical, but PR1.1 included a small but interesting patch to /sbin/preinit (part of getbootstate). /sbin/preinit is the first thing that gets run on Maemo5 for N900. Some history first: In the past we've always had to patch initfs or /sbin/preinit in order to get any sort of bootmenu on 770/N8x0(W)/N900. This has changed with PR1.1 - the patches are now part of Maemo5.0!

Besides some patches to aid MMC booting, what is added is few very important lines:

SLIDE_STATE=`cat /sys/devices/platform/gpio-switch/state`
if [ x"$SLIDE_STATE = "xopen" ]; then
echo_g "slide open, attempting to use bootmenu"
[ -f /bootmenu.sh ] && . /bootmenu.sh
fi

What does this mean? This means, that when you have the keyboard slid out at power on, it will look for /bootmenu.sh and try to include it in the boot process. If it doesn't exist, it goes on with business as usual.

This means, you can add have fanoush's bootmenu or your own rescue menu, or whatever could be interesting to have this early in the process.

Thanks to fanoush for his bootmenu and to Peter De Schrijver from Nokia for applying my patches.

No comments:

Post a Comment