diff options
Diffstat (limited to 'packages/altboot')
-rw-r--r-- | packages/altboot/altboot_0.0.0.bb | 7 | ||||
-rw-r--r-- | packages/altboot/altboot_1.0.6-rc2.bb | 82 | ||||
-rw-r--r-- | packages/altboot/altboot_1.0.6-rc3.bb (renamed from packages/altboot/altboot_1.0.6-rc1.bb) | 4 | ||||
-rw-r--r-- | packages/altboot/files/altboot-menu/Advanced/40-bootNFS | 4 | ||||
-rw-r--r-- | packages/altboot/files/altboot-menu/Advanced/70-install-tgz | 2 | ||||
-rw-r--r-- | packages/altboot/files/altboot.func | 54 | ||||
-rw-r--r-- | packages/altboot/files/altboot.rc/playbeep.sh | 32 | ||||
-rw-r--r-- | packages/altboot/files/beep.raw | 1 | ||||
-rw-r--r-- | packages/altboot/files/init.altboot | 23 |
9 files changed, 94 insertions, 115 deletions
diff --git a/packages/altboot/altboot_0.0.0.bb b/packages/altboot/altboot_0.0.0.bb index d146b2ab45..73d0cfe87f 100644 --- a/packages/altboot/altboot_0.0.0.bb +++ b/packages/altboot/altboot_0.0.0.bb @@ -6,14 +6,15 @@ MAINTAINER = "Matthias 'CoreDump' Hentges <oe@hentges.net>" LICENSE = "GPL" IGNORE_STRIP_ERRORS = "1" -PR = "r35" +PR = "r37" SRC_URI = "file://altboot-menu \ file://altboot.rc \ file://altboot.func \ file://init.altboot \ - file://altboot*.cfg" + file://altboot*.cfg \ + file://beep.raw" # S = "${WORKDIR}/files" @@ -23,7 +24,9 @@ do_install() { install -d ${D}/etc/altboot-menu/Advanced install -d ${D}/etc/altboot.rc install -d ${D}/usr/share/doc/altboot + install -d ${D}/usr/share/sounds + install -m 0644 ${WORKDIR}/beep.raw ${D}/usr/share/sounds install -m 0644 ${WORKDIR}/altboot*.cfg ${D}/etc install -m 0644 ${WORKDIR}/altboot.func ${D}/etc # install -m 0644 ${WORKDIR}/docs/altboot/*.txt ${D}/usr/share/doc/altboot diff --git a/packages/altboot/altboot_1.0.6-rc2.bb b/packages/altboot/altboot_1.0.6-rc2.bb deleted file mode 100644 index bb99fe31e5..0000000000 --- a/packages/altboot/altboot_1.0.6-rc2.bb +++ /dev/null @@ -1,82 +0,0 @@ -#! /bin/sh -# -# Copyright Matthias Hentges <devel@hentges.net> (c) 2006 -# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license) -# -# Filename: altboot_1.0.5-rc2.bb -# Date: 21-Feb-06 - -DESCRIPTION = "The altboot bootmanager" -MAINTAINER = "Matthias 'CoreDump' Hentges <oe@hentges.net>" -HOMEPAGE = "http://www.hentges.net/misc/openzaurus/index.shtml" - -###################################################################################### - -PR = "r0" - -###################################################################################### - -PACKAGE_ARCH = "${MACHINE}" - -TAG = "${@'v' + bb.data.getVar('PV',d,1).replace('.', '-')}" - -SRC_URI = "cvs://anonymous@hentges.net/hentgescvs;method=pserver;tag=${TAG};module=altboot" - -S = "${WORKDIR}/altboot/" - -###################################################################################### - -do_install() { - install -d ${D}/sbin - install -d ${D}/etc/altboot-menu - install -d ${D}/etc/altboot-menu/Advanced - install -d ${D}/etc/altboot.rc - install -d ${D}/usr/share/doc/altboot - - if test -d ${WORKDIR}/altboot/${MACHINE} - then - install -m 0644 ${WORKDIR}/altboot/${MACHINE}/altboot*.cfg ${D}/etc - else - install -m 0644 ${WORKDIR}/altboot/altboot*.cfg ${D}/etc - fi - - install -m 0644 ${WORKDIR}/altboot/altboot.func ${D}/etc - install -m 0755 ${WORKDIR}/altboot/init.altboot ${D}/sbin - - if test -d ${WORKDIR}/altboot/${MACHINE}/altboot-menu/ - then - install -m 0755 ${WORKDIR}/altboot/${MACHINE}/altboot-menu/*-* ${D}/etc/altboot-menu - else - install -m 0755 ${WORKDIR}/altboot/altboot-menu/*-* ${D}/etc/altboot-menu - fi - - if test -d ${WORKDIR}/altboot/${MACHINE}/altboot-menu/Advanced/ - then - install -m 0755 ${WORKDIR}/altboot/${MACHINE}/altboot-menu/Advanced/*-* ${D}/etc/altboot-menu/Advanced - else - install -m 0755 ${WORKDIR}/altboot/altboot-menu/Advanced/*-* ${D}/etc/altboot-menu/Advanced - fi - - install -m 0755 ${WORKDIR}/altboot/altboot.rc/*.sh ${D}/etc/altboot.rc - install -m 0644 ${WORKDIR}/altboot/altboot.rc/*.txt ${D}/etc/altboot.rc -} - -###################################################################################### - -do_configure() { - cat ${WORKDIR}/altboot/init.altboot | sed "s/^VERSION=.*/VERSION=\"${PV}\"/" > ${WORKDIR}/altboot/init.altboot_ - mv ${WORKDIR}/altboot/init.altboot_ ${WORKDIR}/altboot/init.altboot -} - -###################################################################################### - -pkg_postinst() { - update-alternatives --install /sbin/init init /sbin/init.altboot 55 -} - -###################################################################################### - -pkg_postrm() { - update-alternatives --remove init /sbin/init.altboot -} - diff --git a/packages/altboot/altboot_1.0.6-rc1.bb b/packages/altboot/altboot_1.0.6-rc3.bb index bb99fe31e5..c13b346fc3 100644 --- a/packages/altboot/altboot_1.0.6-rc1.bb +++ b/packages/altboot/altboot_1.0.6-rc3.bb @@ -32,6 +32,7 @@ do_install() { install -d ${D}/etc/altboot-menu/Advanced install -d ${D}/etc/altboot.rc install -d ${D}/usr/share/doc/altboot + install -d ${D}/usr/share/sounds if test -d ${WORKDIR}/altboot/${MACHINE} then @@ -39,7 +40,8 @@ do_install() { else install -m 0644 ${WORKDIR}/altboot/altboot*.cfg ${D}/etc fi - + + install -m 0644 ${WORKDIR}/altboot/beep.raw ${D}/usr/share/sounds install -m 0644 ${WORKDIR}/altboot/altboot.func ${D}/etc install -m 0755 ${WORKDIR}/altboot/init.altboot ${D}/sbin diff --git a/packages/altboot/files/altboot-menu/Advanced/40-bootNFS b/packages/altboot/files/altboot-menu/Advanced/40-bootNFS index e81526d251..c3fb7cedc4 100644 --- a/packages/altboot/files/altboot-menu/Advanced/40-bootNFS +++ b/packages/altboot/files/altboot-menu/Advanced/40-bootNFS @@ -7,7 +7,7 @@ M_TITLE="Boot from NFS" die() { - echo "ERROR: $1" >/dev/tty0 + echo -e "ERROR: $1" >/dev/tty0 exec $SH_SHELL </dev/tty0 >/dev/tty0 2>&1 } @@ -37,6 +37,8 @@ run_module() { else # With kernel 2.6.16+ udev is used /etc/init.d/udev start >/dev/null 2>&1 || die "/etc/init.d/udev start failed!" + + /etc/init.d/udev stop fi nfs_host="`cat /etc/fstab | grep -v ^# | grep nfs | awk '{print $1}'|sed -n "s/\(.*\)\:\(.*\)/\1/p" `" diff --git a/packages/altboot/files/altboot-menu/Advanced/70-install-tgz b/packages/altboot/files/altboot-menu/Advanced/70-install-tgz index cdfa052747..2ee92cd27e 100644 --- a/packages/altboot/files/altboot-menu/Advanced/70-install-tgz +++ b/packages/altboot/files/altboot-menu/Advanced/70-install-tgz @@ -14,7 +14,7 @@ run_module(){ init_rootfs # Mount - mount_sd + mount_sd ingore_errors mount_cf mount_home diff --git a/packages/altboot/files/altboot.func b/packages/altboot/files/altboot.func index 0cc59116ce..31704e4029 100644 --- a/packages/altboot/files/altboot.func +++ b/packages/altboot/files/altboot.func @@ -372,14 +372,16 @@ verify_master_pw() { then auth_timeout="3" - echo "Please enter your altboot master password" + echo -e "\nPlease enter your altboot master password" cnt=0 while true do let cnt=$cnt+$auth_timeout echo -n "Password: " + stty -echo read junk < /dev/tty0 + stty echo if test "`echo "$junk" | md5sum | awk '{print $1}'`" = "$MASTER_PASSWORD" then @@ -396,6 +398,8 @@ verify_master_pw() { # fi fi done + + echo "" fi } @@ -439,8 +443,8 @@ check_fs() { # Make the initial rootfs a bit more usable init_rootfs(){ - echo -n "Mounting rootfs rw..." >/dev/tty0 - mount -o remount,rw / >/dev/tty0 2>&1 && echo ok >/dev/tty0|| die "mount -o remount,rw / failed" + echo -n "Mounting rootfs rw..." + mount -o remount,rw / && echo ok || die "mount -o remount,rw / failed" mount | grep -q "/proc " >/dev/null 2>&1 && echo "Note: /proc is already mounted" || mount proc -t proc /proc >/dev/tty0 2>&1 @@ -449,8 +453,8 @@ init_rootfs(){ mount | grep -q "/sys " >/dev/null 2>&1 && echo "Note: /sys is already mounted" || mount sys -t sysfs /sys >/dev/tty0 2>&1 fi - echo -n "Generating device files..." >/dev/tty0 - /etc/init.d/devices start && echo ok >/dev/tty0 || die "FAILED" + echo -n "Generating device files..." + /etc/init.d/devices start && echo ok || die "FAILED" } mount_sd(){ @@ -474,14 +478,18 @@ mount_sd(){ then echo -n "Loading SD kernel module..." /sbin/insmod $SD_KERNEL_MODULE >/dev/null 2>&1 && echo ok || die "insmod failed" - else - echo "No SD kernel module configured, assuming it's build-in" fi check_fs "$SD_DEVICE" 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" + + if test "$1" = ingore_errors + then + /bin/mount -t auto -o defaults,noatime $SD_DEVICE $SD_MOUNTPOINT >/dev/null 2>&1 && echo ok >/dev/tty0 || echo "Could not mount SD card" + else + /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" + fi fi echo "" @@ -494,14 +502,26 @@ mount_cf(){ then echo "Note: /media/cf is already mounted" else - /etc/init.d/pcmcia status | grep -q running || /etc/init.d/pcmcia start && echo "Note: cardmgr is already active" + if ( cat /etc/fstab | grep -v "^#" | grep -q "/media/cf" ) + then + # As of kernel 2.6.16, /e/i/pcmcia is replaced by udev + if test -x /etc/init.d/pcmcia + then + /etc/init.d/pcmcia status | grep -q running || /etc/init.d/pcmcia start && echo "Note: cardmgr is already active" + else + for n in 1 2 3 + do + ! test -e "/dev/hda$n" && mknod /dev/hda$n b 3 $n + done + fi - echo "" + # Give the SD and CF mounting some time. This is a must for SD + sleep 2 - # Give the SD and CF mounting some time. This is a must for SD - sleep 2 - - mount | grep -q "/media/cf " || mount /media/cf + mount /media/cf -o async + else + echo "Note: Your system's fstab does not include an entry for /media/cf" + fi fi } @@ -511,7 +531,7 @@ mount_home(){ echo "Note: /home is already mounted" else - if ( cat /etc/fstab | grep -v "^#" | grep "/home " ) + if ( cat /etc/fstab | grep -v "^#" | grep -q "/home " ) then echo "Mounting /home" home_fstab="`grep "/home " /etc/fstab`" @@ -520,6 +540,8 @@ mount_home(){ home_options="`echo "$home_fstab" | awk '{print $4}'`" mount -t "$home_fs" -o $home_options "$home_dev" /home - fi + else + echo "Note: Your system's fstab does not include an entry for /home" + fi fi } diff --git a/packages/altboot/files/altboot.rc/playbeep.sh b/packages/altboot/files/altboot.rc/playbeep.sh new file mode 100644 index 0000000000..198a87429f --- /dev/null +++ b/packages/altboot/files/altboot.rc/playbeep.sh @@ -0,0 +1,32 @@ +#! /bin/sh +# +# Copyright Matthias Hentges <devel@hentges.net> (c) 2006 +# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license) +# +# Filename: playbeep.sh +# Date: 12-Apr-06 + +if test -x /usr/sbin/alsactl +then + for module in `cat /etc/modules | grep snd | grep -v ^#` + do + #echo "loading $module" + modprobe $module + done + + mount -o remount,rw / + + init_rootfs >/dev/null 2>&1 + + ! test -e /dev/audio && mknod /dev/audio c 14 4 + ! test -e /dev/dsp && mknod /dev/dsp c 14 3 + + mkdir /dev/snd >/dev/null 2>&1 + mknod /dev/snd/controlC0 c 116 0 >/dev/null 2>&1 + mknod /dev/snd/pcmC0D0c c 116 24 >/dev/null 2>&1 + mknod /dev/snd/pcmC0D0p c 116 16 >/dev/null 2>&1 + mknod /dev/snd/timer c 116 33 >/dev/null 2>&1 + /usr/sbin/alsactl restore >/dev/null 2>&1 + + test -e /usr/share/sounds/beep.raw && cat /usr/share/sounds/beep.raw > /dev/dsp +fi diff --git a/packages/altboot/files/beep.raw b/packages/altboot/files/beep.raw new file mode 100644 index 0000000000..f76112185c --- /dev/null +++ b/packages/altboot/files/beep.raw @@ -0,0 +1 @@ +~~~~~~~~~~~~~~~~~v
ok[lฉSpฏMxณLณxMฐnSชlTฎgOฐZQซฉO\ดHjธFxธH
ตuMฐmRซgVจdXฆaZค^[ฃคZ\งขU^ญ ObณJgทFoปCxผCป{EธtIดnMฏiRชfXฅb]_bข\hฅXoจVvช
T~ซ~T
ซvUฉoXฅj\กg`decjboas_xก
]|ข\ค{ZฅuYฅpZคk[ขg^cbaf_jก^oข]tฃ[yค[ค~[คx\ฃr] l`hcdhal ^qข]wฃ\|ฃ\ฃ{\ฃv]กq_lagech`mก]rฃ[wคZ|ฅZฅ{[คv\ขq^maidfhdlbqav`{a}c
xeugriojkkfl`oขZtงW{ชUชzVจuXฆqZฃm] j`gccgam_rก^xข
]|ข]ข|]
กx^กs_oakdhhfkeocraw_| _ z`vcvhyq
|y~~|~}~~~|}{}|}}~}}}~~~|}|}~~~}}~~~||z|
z|||~z}w
tyeก{YงpYฃfa_mก\wคZ~ฆWฉzUชtUฉnWฆg[ขa` ]fคZmฆYsฆYwฆ
X|งWจ|W
จxWงtYฆpZฅj\ขc` \gฅYnงXuฆZyฅZ|ฅZฅ|[
ฃx\ขu^กr^ m_gabe ]kฃ[pฅZuฆY{ฆYฆ|Yฅw[ฃr]กm_ibefak^oข]tฃ[yค[~ค[ฃz\ขu^กq`lbhfeibn`r ^wข]|ฃ\ฃ{\ขv]กr_mahdeham ^rข\wค
Z}ฅYฆzZฅu[ฃp]กk_gcdgal_qก^vข]{ข]ข|^
กw_ s`pbmejhhkfpetcx
b|a|a
xbtcpdlfiifldobtax
`}a|b
xcuerfnhjkfobua{a~b{bwcteqhnkmmlojqhulx
u{
~}
xw~z~}|z
~{||~}}~~}}{
|z|{}|}||{{{
z|
{~}}~|~}}~{
vyexกYzฉT~ซ}T
ชvVงnZขh_cd_iข\nฅYsจVwช
T|ญQฐzNฑqNฏgRซ_WฃฅZ]งWcชUiซTpซTvช
U}ฉVจzXฆtZฃp]กl`hcegckao`s _xก
^}ก_ {_ v`qamcieficm`r ^wข]|ฃ\ฃ{\ฃv]กq_lahddhal_qก]vฃ\{ค[ค|[
ฃw\ขs^ n`jcffcj`o ^sข]xฃ
\}ฃ\ฃ{]ขv^ r`ncjfgidnbr`w_| _ |`
xatbpdlghjfncqbvaz`~`x`sbndjfghdkbn`r ^vก^{ก^ ~`zcverhnkindqau ^yก^}ก^ |_
x`sanbhech`l _qก^uก^yข
]}ฃ[คz[คt\กm`ifjnoxv||
y~y~z}~~~}}~{{~{|||~{{~{}{}||}{|}}}}~~~~~~~~{~vuohf^bฅVdฌQlฏPuฏ
P}ฎ~RฌwTชqVจkXฅe\ก`a ]gฃ\lค[rฅYwงX|จVฉzVจtWฆoZฃj] ea_eฃYkจTsญP|ฐ~O
ฐvPฎrRซpUฉnWจlWจiXฆe[ก`aก\hฅYpฆXwง
X}ฆYฅyZคt\ขp^ kaheehbm`q ^uข]zข]ข~]ขy^กt_palchfdjan_rก^wข]|ข]ข|]กw_rancjggjdnbs`w
_| _ |`warbnejgfkcnar_w ^{ก^ก}^
x_saockehhelcpbuaz`~~`yaucpemgikfndrbwa{`}`
xatbpcldiffidkao_sก]xข]~ข}_
xcugsjqlonmqksjuhwfzh}pz{
z
y{u{u|w~z~
{~{|||~}~}}}|~{~}}}~}~~~|{{~{~|}z}x|w{wzpxcขuZฆqYฅk\กda_fข\lคZqฆXuจWzจW~จVฉyVจrXฆkZฃd_]eฅXmจVsฉUyซT~ซ~TชyVจtXฆp[ฃk^gbcf`k ^oข\tฃ[zค[ค}\ฃx]ขs^ n`jcffcj`n ^rข\wค[|ฅZฅ|Z
ฅx[คs\ขo^kagddhal_pก^uข]zข]ข}]กx^ t`ockfgidmaq_v ^{ก]ข}]
กx^ s_nbjdghclap_tก^yก]~ข^กz_ v`rbnekhgkeobsaw
`| _|`
xatbpdlgikgofsfveye}dzeugrjommnjogqcuaz`~a{b
xbucqemhimfrcwa|a{avbqdmehfci_oก_we{nuxsu~xz~
{||z
|z|y|y{y
z{{}}~}~{~{~{}{|{{{z
yzw{u}u~w}{~~y}vwrim^jฆVnฌRwฏPฏvQฌkVฆb\]cคYiจVoซSsญQwฏ
O}ฐNฑyOฏsQญlTฉgXฅd] ab_hก]nฃZtฆXzงWจ~WจzXฆwZคt]กp_lcggbl ]rคYyงXจ|WงwYฅs[ฃp^ n`kbhdefai ]lคZpฆXuงXzงYฅ|[
ขw^ramdjgfkco`tก\zคYง|XงvXฆq[ขm_kenkrtx}
~|
x~uuwz|}~}}}}}}}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\ No newline at end of file diff --git a/packages/altboot/files/init.altboot b/packages/altboot/files/init.altboot index 22f3e86e83..cf3a1f8262 100644 --- a/packages/altboot/files/init.altboot +++ b/packages/altboot/files/init.altboot @@ -151,16 +151,17 @@ show_sub_menu() { # Shows the timer and sets $launch_altboot to yes if a keypress was detected run_timer() { if test "$TIMEOUT" != 0 - then + then mount -t proc proc /proc >/dev/null 2>&1 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`";; + 2.6*) key_ints="`cat /proc/interrupts | grep Spitzkbd`" + test -z "$key_ints" && key_ints="`cat /proc/interrupts | grep -i corgikbd`";; esac - stty -echo + stty -echo </dev/tty0 >/dev/tty0 2>&1 echo -en "\n\nPlease press any key to launch altboot." > /dev/tty1 test -z "$TIMEOUT" && TIMEOUT="3" @@ -171,13 +172,14 @@ run_timer() { sleep 1 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`";; + 2.6*) key_ints_now="`cat /proc/interrupts | grep Spitzkbd`" + test -z "$key_ints_now" && key_ints_now="`cat /proc/interrupts | grep -i corgikbd`";; esac - if test "$key_ints_now" != "$key_ints" + if test "$key_ints_now" != "$key_ints" -o -z "$key_ints_now" then launch_altboot=yes - stty echo + stty echo </dev/tty0 >/dev/tty0 2>&1 break fi echo -n "." >/dev/tty1 @@ -309,21 +311,18 @@ else do . /etc/altboot.rc/$file >/dev/tty1 2>&1 || echo "/etc/altboot.rc/$file failed!" done - + # Make sure altboots master password is set set_password >/dev/tty0 test "$ASK_PW_ON_BOOT" = "yes" && verify_master_pw >/dev/tty0 - # When started with -force, always print the menu echo "$*" | grep -q -- "-force" && TIMEOUT=0 - # This timeout works by reading /proc/interrupts to see if the keyboard interrupt # increases while the timer is running. A TIMEOUT of 0 will always launch altboot. - run_timer >/dev/tty1 2>&1 - + run_timer >/dev/tty1 echo "" >/dev/tty0 @@ -342,7 +341,7 @@ else launch_selection /etc/altboot-menu >/dev/tty0 fi - # Anything after this point will never be reached if $launch_altboot != yes + # Anything after this point will never be reached if $launch_altboot != yes # Show the altboot menu show_menu /etc/altboot-menu >/dev/tty0 |