summaryrefslogtreecommitdiff
path: root/recipes/altboot
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/altboot')
-rw-r--r--recipes/altboot/README.txt4
-rw-r--r--recipes/altboot/altboot.inc19
-rw-r--r--recipes/altboot/altboot_1.0.8+1.0.9_pre1.bb76
-rw-r--r--recipes/altboot/altboot_1.0.8.bb49
-rw-r--r--recipes/altboot/altboot_1.1.1+wip-SVNR83.bb76
-rw-r--r--recipes/altboot/altboot_svn.bb75
-rw-r--r--recipes/altboot/files/sd-dynamic-fix.patch44
7 files changed, 343 insertions, 0 deletions
diff --git a/recipes/altboot/README.txt b/recipes/altboot/README.txt
new file mode 100644
index 0000000000..bba16027ff
--- /dev/null
+++ b/recipes/altboot/README.txt
@@ -0,0 +1,4 @@
+altboot_1.0.8.bb - Last known-working version for all Zauruses
+altboot_1.1.1+wip-20061123.bb - Last known-working version for neo1973
+altboot_svn.bb - Altboot developer snapshot - avoid ;)
+altboot_1.0.8+1.0.9_pre1 - Development version with new menu
diff --git a/recipes/altboot/altboot.inc b/recipes/altboot/altboot.inc
new file mode 100644
index 0000000000..772a6b8eb4
--- /dev/null
+++ b/recipes/altboot/altboot.inc
@@ -0,0 +1,19 @@
+DESCRIPTION = "The altboot bootmanager"
+HOMEPAGE = "http://www.hentges.net/misc/openzaurus/index.shtml"
+LICENSE = "GPL"
+RDEPENDS_${PN} = "${PN}-conf"
+RDEPENDS_${PN}-conf = "${PN}"
+RRECOMMENDS_${PN} = "e2fsprogs-e2fsck e2fsprogs-mke2fs dosfstools kexec-tools kernel-module-loop"
+RRECOMMENDS_${PN}_spitz += " kernel-module-jffs2"
+
+S = "${WORKDIR}/trunk/"
+
+PACKAGE_ARCH_${PN} = "${MACHINE}"
+PACKAGE_ARCH_${PN}-doc = "all"
+PACKAGE_ARCH_${PN}-conf = "${MACHINE}"
+PACKAGES = "${PN}-dbg ${PN}-conf ${PN}-doc ${PN}"
+
+FILES_${PN}-conf = "/etc/altboot*cfg"
+
+MACHINE_DIR = "${MACHINE}"
+MACHINE_DIR_nslu2be = "nslu2le"
diff --git a/recipes/altboot/altboot_1.0.8+1.0.9_pre1.bb b/recipes/altboot/altboot_1.0.8+1.0.9_pre1.bb
new file mode 100644
index 0000000000..3890e68893
--- /dev/null
+++ b/recipes/altboot/altboot_1.0.8+1.0.9_pre1.bb
@@ -0,0 +1,76 @@
+require altboot.inc
+
+DEFAULT_PREFERENCE = "-1"
+
+## Laibsch: The following DEPENDS lines seem broken in light of the fact that
+## they have circular dependencies and depend on stuff that is recommended
+## elsewhere. Let's activate them only after further discussion
+#RDEPENDS_${PN} = "${PN}-conf kexec-tools ncurses"
+#RDEPENDS_${PN}_append_poodle = " kexec-tools"
+#RDEPENDS_${PN}-conf = "${PN}"
+
+PR = "r2"
+
+SVN_REV="65"
+#TAG = "${@'v' + bb.data.getVar('PV',d,1).replace('.', '-')}"
+TAG = '1.0.x'
+SRC_URI = "svn://hentges.net/public/altboot/branches/;module=${TAG};rev=${SVN_REV};proto=svn"
+
+LDFLAGS += "-lncurses -lmenu"
+
+S = "${WORKDIR}/${TAG}/"
+
+do_configure() {
+ cat ${S}/init.altboot | sed "s/^VERSION=.*/VERSION=\"${PV}\"/" > ${S}/init.altboot_
+ mv ${S}/init.altboot_ ${S}/init.altboot
+}
+
+do_compile() {
+ ${CC} ${CFLAGS} ${LDFLAGS} ${S}curses_menu/altboot_menu.c -o altboot_menu
+}
+
+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
+ install -d ${D}/usr/share/sounds
+
+ if test -d ${S}/${MACHINE}
+ then
+ install -m 0644 ${S}/${MACHINE}/altboot*.cfg ${D}/etc
+ else
+ install -m 0644 ${S}/altboot*.cfg ${D}/etc
+ fi
+
+ install -m 0644 ${S}/beep.raw ${D}/usr/share/sounds
+ install -m 0644 ${S}/altboot.func ${D}/etc
+ install -m 0755 ${S}/init.altboot ${D}/sbin
+ install -m 0755 ${S}/altboot_menu ${D}/sbin
+
+ install -m 0755 ${S}/altboot-menu/*-* ${D}/etc/altboot-menu
+
+ install -m 0755 ${S}/altboot-menu/Advanced/*-* ${D}/etc/altboot-menu/Advanced
+
+ install -m 0755 ${S}/altboot.rc/*.sh ${D}/etc/altboot.rc
+ install -m 0644 ${S}/altboot.rc/*.txt ${D}/etc/altboot.rc
+}
+
+pkg_postinst_${PN}() {
+ update-alternatives --install /sbin/init init /sbin/init.altboot 55
+}
+
+pkg_postrm_${PN}() {
+ update-alternatives --remove init /sbin/init.altboot
+}
+
+do_rm_work() {
+}
+
+PACKAGE_ARCH_${PN} = "all"
+PACKAGE_ARCH_${PN}-doc = "all"
+PACKAGE_ARCH_${PN}-conf = "${MACHINE}"
+PACKAGES = "${PN}-dbg ${PN}-conf ${PN}-doc ${PN}"
+
+FILES_${PN}-conf = "/etc/altboot*.cfg"
diff --git a/recipes/altboot/altboot_1.0.8.bb b/recipes/altboot/altboot_1.0.8.bb
new file mode 100644
index 0000000000..3e18111a5b
--- /dev/null
+++ b/recipes/altboot/altboot_1.0.8.bb
@@ -0,0 +1,49 @@
+require altboot.inc
+
+PR = "r4"
+
+TAG = "${@'v' + bb.data.getVar('PV',d,1).replace('.', '-')}"
+SRC_URI = "svn://hentges.net/public/altboot/tags/;module=${TAG};proto=svn"
+S = "${WORKDIR}/${TAG}/"
+
+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
+ install -d ${D}/usr/share/sounds
+
+ if test -d ${S}/${MACHINE}
+ then
+ install -m 0644 ${S}/${MACHINE}/altboot*.cfg ${D}/etc
+ else
+ install -m 0644 ${S}/altboot*.cfg ${D}/etc
+ fi
+
+ install -m 0644 ${S}/beep.raw ${D}/usr/share/sounds
+ install -m 0644 ${S}/altboot.func ${D}/etc
+ install -m 0755 ${S}/init.altboot ${D}/sbin
+
+ install -m 0755 ${S}/altboot-menu/*-* ${D}/etc/altboot-menu
+
+ install -m 0755 ${S}/altboot-menu/Advanced/*-* ${D}/etc/altboot-menu/Advanced
+
+ install -m 0755 ${S}/altboot.rc/*.sh ${D}/etc/altboot.rc
+ install -m 0644 ${S}/altboot.rc/*.txt ${D}/etc/altboot.rc
+}
+
+do_configure() {
+ cat ${S}/init.altboot | sed "s/^VERSION=.*/VERSION=\"${PV}\"/" > ${S}/init.altboot_
+ mv ${S}/init.altboot_ ${S}/init.altboot
+}
+
+pkg_postinst_${PN}() {
+ update-alternatives --install /sbin/init init /sbin/init.altboot 55
+}
+
+pkg_postrm_${PN}() {
+ update-alternatives --remove init /sbin/init.altboot
+}
+
+PACKAGE_ARCH_${PN} = "all"
diff --git a/recipes/altboot/altboot_1.1.1+wip-SVNR83.bb b/recipes/altboot/altboot_1.1.1+wip-SVNR83.bb
new file mode 100644
index 0000000000..b9056e655a
--- /dev/null
+++ b/recipes/altboot/altboot_1.1.1+wip-SVNR83.bb
@@ -0,0 +1,76 @@
+require altboot.inc
+
+PR = "r0"
+
+SVN_REV = "83"
+SRC_URI = "svn://hentges.net/public/altboot;module=trunk;rev=${SVN_REV} \
+ "
+
+do_install() {
+ install -d ${D}/sbin
+ install -d ${D}/etc/altboot-menu
+ install -d ${D}/etc/altboot.rc
+ install -d ${D}/usr/share/doc/altboot
+ install -d ${D}/usr/share/sounds
+
+ if test -d ${S}/${MACHINE_DIR}
+ then
+ install -m 0644 ${S}/${MACHINE_DIR}/altboot*.cfg ${D}/etc/
+ else
+ install -m 0644 ${S}/altboot*.cfg ${D}/etc/
+ fi
+
+ install -m 0644 ${S}/beep.raw ${D}/usr/share/sounds
+ install -m 0644 ${S}/altboot.func ${D}/etc
+ install -m 0644 ${S}/altboot.sbin ${D}/etc
+ install -m 0644 ${S}/altbootctl.conf ${D}/etc
+ install -m 0755 ${S}/init.altboot ${D}/sbin
+ install -m 0755 ${S}/altbootctl ${D}/sbin
+
+ ln -s /sbin/init.altboot ${D}/sbin/altboot
+
+ if test -d ${S}/${MACHINE_DIR}/altboot-menu
+ then
+ install -m 0755 ${S}/${MACHINE_DIR}/altboot-menu/*-* ${D}/etc/altboot-menu
+
+ if test -d ${S}/${MACHINE_DIR}/altboot-menu/Advanced
+ then
+ install -d ${D}/etc/altboot-menu/Advanced
+ install -m 0755 ${S}/${MACHINE_DIR}/altboot-menu/Advanced/*-* ${D}/etc/altboot-menu/Advanced
+ fi
+ else
+ install -m 0755 ${S}/altboot-menu/*-* ${D}/etc/altboot-menu
+
+ if test -d ${S}/altboot-menu/Advanced
+ then
+ install -d ${D}/etc/altboot-menu/Advanced
+ install -m 0755 ${S}/altboot-menu/Advanced/*-* ${D}/etc/altboot-menu/Advanced
+ fi
+ fi
+
+ if test -d ${S}/${MACHINE_DIR}/altboot.rc
+ then
+ install -m 0755 ${S}/${MACHINE_DIR}/altboot.rc/*.sh ${D}/etc/altboot.rc
+ install -m 0644 ${S}/${MACHINE_DIR}/altboot.rc/*.txt ${D}/etc/altboot.rc
+ else
+ install -m 0755 ${S}/altboot.rc/*.sh ${D}/etc/altboot.rc
+ install -m 0644 ${S}/altboot.rc/*.txt ${D}/etc/altboot.rc
+ fi
+}
+
+do_configure() {
+ cat ${S}/init.altboot | sed "s/^VERSION=.*/VERSION=\"${PV}-${PR}\"/" > ${S}/init.altboot_
+ mv ${S}/init.altboot_ ${S}/init.altboot
+}
+
+pkg_postinst_${PN}() {
+ test -L /linuxrc && update-alternatives --install /linuxrc linuxrc /sbin/init.altboot 55
+
+ update-alternatives --install /sbin/init init /sbin/init.altboot 55
+}
+
+pkg_postrm_${PN}() {
+ test -L /linuxrc && update_alternatives --remove linuxrc /sbin/init.altboot
+
+ update-alternatives --remove init /sbin/init.altboot
+}
diff --git a/recipes/altboot/altboot_svn.bb b/recipes/altboot/altboot_svn.bb
new file mode 100644
index 0000000000..85a7fe612f
--- /dev/null
+++ b/recipes/altboot/altboot_svn.bb
@@ -0,0 +1,75 @@
+require altboot.inc
+
+PV = "1.1.1+wip-${SRCDATE}"
+PR = "r4"
+
+SRC_URI = "svn://hentges.net/public/altboot;module=trunk;proto=svn"
+
+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
+ install -d ${D}/usr/share/sounds
+
+ if test -d ${S}/${MACHINE_DIR}
+ then
+ install -m 0644 ${S}/${MACHINE_DIR}/altboot*.cfg ${D}/etc/
+ else
+ install -m 0644 ${S}/altboot*.cfg ${D}/etc/
+ fi
+
+ install -m 0644 ${S}/beep.raw ${D}/usr/share/sounds
+ install -m 0644 ${S}/altboot.func ${D}/etc
+ install -m 0644 ${S}/altboot.sbin ${D}/etc
+ install -m 0644 ${S}/altbootctl.conf ${D}/etc
+ install -m 0755 ${S}/init.altboot ${D}/sbin
+ install -m 0755 ${S}/altbootctl ${D}/sbin
+
+ ln -s /sbin/init.altboot ${D}/sbin/altboot
+
+ if test -d ${S}/${MACHINE_DIR}/altboot-menu
+ then
+ install -m 0755 ${S}/${MACHINE_DIR}/altboot-menu/*-* ${D}/etc/altboot-menu
+
+ if test -d ${S}/${MACHINE_DIR}/altboot-menu/Advanced
+ then
+ install -m 0755 ${S}/${MACHINE_DIR}/altboot-menu/Advanced/*-* ${D}/etc/altboot-menu/Advanced
+ fi
+ else
+ install -m 0755 ${S}/altboot-menu/*-* ${D}/etc/altboot-menu
+
+ if test -d ${S}/altboot-menu/Advanced
+ then
+ install -m 0755 ${S}/altboot-menu/Advanced/*-* ${D}/etc/altboot-menu/Advanced
+ fi
+ fi
+
+ if test -d ${S}/${MACHINE_DIR}/altboot.rc
+ then
+ install -m 0755 ${S}/${MACHINE_DIR}/altboot.rc/*.sh ${D}/etc/altboot.rc
+ install -m 0644 ${S}/${MACHINE_DIR}/altboot.rc/*.txt ${D}/etc/altboot.rc
+ else
+ install -m 0755 ${S}/altboot.rc/*.sh ${D}/etc/altboot.rc
+ install -m 0644 ${S}/altboot.rc/*.txt ${D}/etc/altboot.rc
+ fi
+}
+
+do_configure() {
+ cat ${S}/init.altboot | sed "s/^VERSION=.*/VERSION=\"${PV}-${PR}\"/" > ${S}/init.altboot_
+ mv ${S}/init.altboot_ ${S}/init.altboot
+}
+
+pkg_postinst_${PN}() {
+ test -L /linuxrc && update-alternatives --install /linuxrc linuxrc /sbin/init.altboot 55
+
+ update-alternatives --install /sbin/init init /sbin/init.altboot 55
+}
+
+pkg_postrm_${PN}() {
+ test -L /linuxrc && update_alternatives --remove linuxrc /sbin/init.altboot
+
+ update-alternatives --remove init /sbin/init.altboot
+}
+
diff --git a/recipes/altboot/files/sd-dynamic-fix.patch b/recipes/altboot/files/sd-dynamic-fix.patch
new file mode 100644
index 0000000000..f31c6b8dc7
--- /dev/null
+++ b/recipes/altboot/files/sd-dynamic-fix.patch
@@ -0,0 +1,44 @@
+Index: trunk/altboot.func
+===================================================================
+--- trunk.orig/altboot.func 2007-10-30 15:48:16.000000000 +0000
++++ trunk/altboot.func 2007-10-30 15:48:21.000000000 +0000
+@@ -499,17 +499,6 @@
+ then
+ echo "Note: $SD_MOUNTPOINT is already mounted"
+ else
+- # We can't trust that the SD device file is there when running kernel 2.6 w/ udev
+- # and starting udev at this point may not be the best idea...
+- if `uname -r | grep -q "2.6"`
+- then
+- #Let's just assume the device file name never changes...
+- dev_no="`echo "$SD_DEVICE" | sed -n "s/\/dev\/mmcblk\(.*\)p\(.*\)/\1/p"`"
+- part_no="`echo "$SD_DEVICE" | 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
+- fi
+-
+ # Kernel 2.6 has the SD driver compiled into the kernel
+ if test -n "$SD_KERNEL_MODULE"
+ then
+@@ -544,6 +533,21 @@
+ fi
+ fi
+
++ # We can't trust that the SD device file is there when running kernel 2.6 w/ udev
++ # and starting udev at this point may not be the best idea...
++ if `uname -r | grep -q "2.6"`
++ then
++ #Let's just assume the device file name never changes...
++ dev_no="`echo "$SD_DEVICE" | sed -n "s/\/dev\/mmcblk\(.*\)p\(.*\)/\1/p"`"
++ part_no="`echo "$SD_DEVICE" | sed -n "s/\/dev\/mmcblk\(.*\)p\(.*\)/\2/p"`"
++ if [ -f /sys/block/mmcblk${dev_no}/mmcblk${dev_no}p${part_no}/dev ]
++ then
++ rm -f /dev/mmcblk${dev_no}p${part_no} || true
++ mknod /dev/mmcblk${dev_no}p${part_no} b `cat /sys/block/mmcblk${dev_no}/mmcblk${dev_no}p${part_no}/dev|sed 's/:/ /' `
++ fi
++
++ fi
++
+ sleep 3
+
+ check_fs "$SD_DEVICE"