diff options
author | Matthias Hentges <oe@hentges.net> | 2006-01-30 10:53:54 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2006-01-30 10:53:54 +0000 |
commit | 231ac7094917965a06d7189e9b418d1ba0531a63 (patch) | |
tree | a1eca4e601349edcff165859cf30516a8344f7d6 /packages/altboot | |
parent | d2ade47c029ba289a8c576f9649d73b020486b62 (diff) |
altboot:
- First changes to support Kernel 2.6
- As of this push altboot should be considered *unstable* until work on 2.6 has finished!
- Add IGNORE_STRIP_ERRORS = "1" to allow for snapshots
Diffstat (limited to 'packages/altboot')
-rw-r--r-- | packages/altboot/altboot.bb | 4 | ||||
-rw-r--r-- | packages/altboot/files/akita/altboot-2.6.cfg | 26 | ||||
-rw-r--r-- | packages/altboot/files/altboot-menu/15-bootSD | 22 | ||||
-rw-r--r-- | packages/altboot/files/init.altboot | 15 |
4 files changed, 59 insertions, 8 deletions
diff --git a/packages/altboot/altboot.bb b/packages/altboot/altboot.bb index 8912cc1bec..786d45ef5d 100644 --- a/packages/altboot/altboot.bb +++ b/packages/altboot/altboot.bb @@ -4,9 +4,9 @@ SECTION = "base" PRIORITY = "optional" MAINTAINER = "Matthias 'CoreDump' Hentges <oe@hentges.net>" LICENSE = "GPL" - +IGNORE_STRIP_ERRORS = "1" -PR = "r13" +PR = "r14" SRC_URI = "file://altboot-menu \ diff --git a/packages/altboot/files/akita/altboot-2.6.cfg b/packages/altboot/files/akita/altboot-2.6.cfg new file mode 100644 index 0000000000..ad15f7169e --- /dev/null +++ b/packages/altboot/files/akita/altboot-2.6.cfg @@ -0,0 +1,26 @@ +# Handled by /sbin/init.altboot +# Allow booting images from SD or CF instead of booting +# the ROM. +ENABLE_ALTBOOT="yes" +TIMEOUT="4" +REAL_INIT="/sbin/init.sysvinit" +SH_SHELL="/bin/sh" + +IMAGE_PATH="boot-images" +IMAGE_TYPE="ext2" +FSCK_IMAGES="yes" + +SD_DEVICE="/dev/mmcblk0p1" +SD_KERNEL_MODULE="" + +USB_STORAGE_MODULES="usb_ohci_pxa27x usb-storage" +USB_STORAGE_PARTITION="/dev/sda1" +USB_STORAGE_WAIT="4" + +INIT_RUNLEVEL="5" +NO_GUI_RL="2" +MASTER_PASSWORD="" +ASK_PW_ON_BOOT="no" + +SD_MOUNTPOINT="/media/card" +CF_MOUNTPOINT="/media/cf" diff --git a/packages/altboot/files/altboot-menu/15-bootSD b/packages/altboot/files/altboot-menu/15-bootSD index 60d9da4339..6ce0cdc9b3 100644 --- a/packages/altboot/files/altboot-menu/15-bootSD +++ b/packages/altboot/files/altboot-menu/15-bootSD @@ -23,9 +23,25 @@ run_module() { echo -n "Generating device files..." >/dev/tty0 /etc/init.d/devices start && echo ok >/dev/tty0|| die "FAILED" - - echo -n "Loading SD kernel module..." - /sbin/insmod $SD_KERNEL_MODULE >/dev/null 2>&1 && echo ok || die "insmod failed" + # We can't trust that the SD device file is there when running kernel 2.6 w/ udev + # Starting udev at this point may not be the best idea... +# echo "*1*" + if `uname -r | grep -q "2.6"` + then + #echo "***" + dev_no="`echo "$SD_DEVICE" | sed -n "s/\/dev\/mmcblk\(.*\)p\(.*\)/\1/p"`" + part_no="`echo "/dev/mmcblk0p1" | sed -n "s/\/dev\/mmcblk\(.*\)p\(.*\)/\2/p"`" + ! test -e /dev/mmcblk${dev_no} && mknod /dev/mmcblk${dev_no} b 254 0 + ! test -e /dev/mmcblk${dev_no}p${part_no} && mknod /dev/mmcblk${dev_no}p${part_no} b 254 $part_no + + #echo "[mknod /dev/mmcblk${dev_no}p${part_no}]" + fi + + if test -n "$SD_KERNEL_MODULE" + then + echo -n "Loading SD kernel module..." + /sbin/insmod $SD_KERNEL_MODULE >/dev/null 2>&1 && echo ok || die "insmod failed" + fi echo -n "Mounting $SD_MOUNTPOINT..." >/dev/tty0 /bin/mount -t auto -o defaults,noatime $SD_DEVICE $SD_MOUNTPOINT >/dev/null 2>&1 && echo ok >/dev/tty0|| die "/bin/mount -t auto -o defaults,noatime $SD_DEVICE $SD_MOUNTPOINT failed" diff --git a/packages/altboot/files/init.altboot b/packages/altboot/files/init.altboot index 4d795ced42..506f175c69 100644 --- a/packages/altboot/files/init.altboot +++ b/packages/altboot/files/init.altboot @@ -143,7 +143,11 @@ run_timer() { then mount -t proc proc /proc >/dev/null 2>&1 - key_ints="`cat /proc/interrupts | grep keyboard | awk '{print $2}'`" + + case "`uname -r`" in + 2.4*) key_ints="`cat /proc/interrupts | grep keyboard | awk '{print $2}'`";; + 2.6*) key_ints="`cat /proc/interrupts | grep Spitzkbd`";; + esac stty -echo echo -en "\n\nPlease press any key to launch altboot." > /dev/tty1 @@ -152,9 +156,14 @@ run_timer() { cnt=0 while test "$cnt" != "$TIMEOUT" - do + do sleep 1 - if test "`cat /proc/interrupts | grep keyboard | awk '{print $2}'`" != "$key_ints" + case "`uname -r`" in + 2.4*) key_ints_now="`cat /proc/interrupts | grep keyboard | awk '{print $2}'`";; + 2.6*) key_ints_now="`cat /proc/interrupts | grep Spitzkbd`";; + esac + + if test "$key_ints_now" != "$key_ints" then launch_altboot=yes stty echo |