From c5c5c124b4ebd197faf32ab0c57738f14c6d604e Mon Sep 17 00:00:00 2001 From: Justin Patrin Date: Wed, 28 Mar 2007 17:36:41 +0000 Subject: openzaurus.inc: add PREFERRED_PROVIDER for qemu-native --- conf/distro/include/openzaurus.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conf/distro/include/openzaurus.inc b/conf/distro/include/openzaurus.inc index 4cdb68b4e3..4cf6fe1ead 100644 --- a/conf/distro/include/openzaurus.inc +++ b/conf/distro/include/openzaurus.inc @@ -21,3 +21,5 @@ INHERIT += "sanity" # We want images supporting the following features (for task-base) DISTRO_FEATURES = "nfs smbfs wifi ppp alsa bluetooth ext2 irda pcmcia usbgadget usbhost" + +PREFERRED_PROVIDER_qemu-native ?= "qemu-native" -- cgit v1.2.3 From 7e18fbe25e35f1801955ee150622761a07c8b8f1 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Wed, 28 Mar 2007 20:28:49 +0000 Subject: mediatomb: merge 0.9.0 recipe from mediatom svn --- packages/mediatomb/mediatomb_0.9.0.bb | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 packages/mediatomb/mediatomb_0.9.0.bb diff --git a/packages/mediatomb/mediatomb_0.9.0.bb b/packages/mediatomb/mediatomb_0.9.0.bb new file mode 100644 index 0000000000..f3ea9f54dd --- /dev/null +++ b/packages/mediatomb/mediatomb_0.9.0.bb @@ -0,0 +1,30 @@ +DESCRIPTION = "MediaTomb - UPnP AV MediaServer for Linux" +HOMEPAGE = "http://mediatomb.cc/" +LICENSE = "GPLv2" +DEPENDS = "sqlite3 libexif js zlib file id3lib" +PR = "r0" + +SRC_URI = "${SOURCEFORGE_MIRROR}/mediatomb/mediatomb-${PV}.tar.gz" + +inherit autotools pkgconfig + +EXTRA_OECONF = "--disable-mysql \ + --disable-rpl-malloc \ + --enable-sqlite3 \ + --enable-libjs \ + --enable-libmagic \ + --enable-id3lib \ + --enable-libexif \ + --disable-largefile \ + --with-sqlite3-h=${STAGING_INCDIR} \ + --with-sqlite3-libs=${STAGING_LIBDIR} \ + --with-magic-h=${STAGING_INCDIR} \ + --with-magic-libs=${STAGING_LIBDIR} \ + --with-exif-h=${STAGING_INCDIR} \ + --with-exif-libs=${STAGING_LIBDIR} \ + --with-zlib-h=${STAGING_INCDIR} \ + --with-zlib-libs=${STAGING_LIBDIR} \ + --with-js-h=${STAGING_INCDIR}/js \ + --with-js-libs=${STAGING_LIBDIR} \ + --with-id3lib-h=${STAGING_INCDIR} \ + --with-id3lib-libs=${STAGING_LIBDIR}" -- cgit v1.2.3 From 2992d24c5ad56361a793281566b1ff7c76aa2836 Mon Sep 17 00:00:00 2001 From: Matthias Hentges Date: Wed, 28 Mar 2007 22:13:05 +0000 Subject: altboot: - Drop files/* and altboot_0.0.0.bb - Add altboot_svn.bb - Add README.txt explaining what the different versions do --- packages/altboot/README.txt | 5 + packages/altboot/altboot_0.0.0.bb | 99 --- packages/altboot/altboot_svn.bb | 95 +++ packages/altboot/files/.mtn2git_empty | 0 packages/altboot/files/akita/.mtn2git_empty | 0 packages/altboot/files/akita/altboot-2.4.cfg | 31 - packages/altboot/files/akita/altboot-2.6.cfg | 41 - packages/altboot/files/altboot-menu/.mtn2git_empty | 0 packages/altboot/files/altboot-menu/00-Default | 14 - packages/altboot/files/altboot-menu/10-noGui | 16 - packages/altboot/files/altboot-menu/15-bootSD | 32 - packages/altboot/files/altboot-menu/20-bootCF | 32 - .../files/altboot-menu/99-ownScripts-example | 68 -- .../files/altboot-menu/Advanced/.mtn2git_empty | 0 .../files/altboot-menu/Advanced/30-bootUSB-Stick | 47 -- .../altboot/files/altboot-menu/Advanced/40-bootNFS | 110 --- .../altboot/files/altboot-menu/Advanced/55-bin-sh | 27 - .../files/altboot-menu/Advanced/60-orig-init | 20 - .../files/altboot-menu/Advanced/70-install-tgz | 266 ------- .../files/altboot-menu/Advanced/70-setKernel | 68 -- .../files/altboot-menu/Advanced/80-configure-kexec | 248 ------ .../files/altboot-menu/Advanced/80-copyrootfs | 323 -------- packages/altboot/files/altboot.func | 870 --------------------- packages/altboot/files/altboot.rc/.mtn2git_empty | 0 packages/altboot/files/altboot.rc/Readme.txt | 2 - .../altboot/files/altboot.rc/disable_printk.sh | 6 - packages/altboot/files/altboot.rc/loadkeymap.sh | 8 - packages/altboot/files/altboot.rc/playbeep.sh | 34 - packages/altboot/files/altbootctl | 311 -------- packages/altboot/files/altbootctl.conf | 98 --- packages/altboot/files/beep.raw | 1 - packages/altboot/files/c7x0/.mtn2git_empty | 0 packages/altboot/files/c7x0/altboot-2.4.cfg | 30 - packages/altboot/files/c7x0/altboot-2.6.cfg | 39 - packages/altboot/files/collie/.mtn2git_empty | 0 packages/altboot/files/collie/altboot-2.4.cfg | 26 - packages/altboot/files/fic-gta01/.mtn2git_empty | 0 packages/altboot/files/fic-gta01/altboot-2.6.cfg | 41 - .../files/fic-gta01/altboot-menu/.mtn2git_empty | 0 .../files/fic-gta01/altboot-menu/00-Default | 14 - .../altboot/files/fic-gta01/altboot-menu/15-bootSD | 32 - .../fic-gta01/altboot-menu/Advanced/.mtn2git_empty | 0 .../fic-gta01/altboot-menu/Advanced/40-bootNFS | 110 --- packages/altboot/files/init.altboot | 606 -------------- packages/altboot/files/nslu2le/.mtn2git_empty | 0 packages/altboot/files/nslu2le/altboot-2.6.cfg | 55 -- .../files/nslu2le/altboot-handlers/.mtn2git_empty | 0 .../files/nslu2le/altboot-handlers/05-USB-Storage | 90 --- .../nslu2le/altboot-handlers/10-Onboard-Flash | 18 - .../files/nslu2le/altboot-menu/.mtn2git_empty | 0 .../altboot/files/nslu2le/altboot-menu/00-Default | 17 - .../files/nslu2le/altboot-menu/30-bootUSB-Stick | 174 ----- .../altboot/files/nslu2le/altboot-menu/55-bin-sh | 27 - .../files/nslu2le/altboot.rc/.mtn2git_empty | 0 packages/altboot/files/poodle/.mtn2git_empty | 0 packages/altboot/files/poodle/altboot-2.4.cfg | 26 - packages/altboot/files/poodle/altboot-2.6.cfg | 45 -- packages/altboot/files/set-bootdev | 150 ---- packages/altboot/files/spitz/.mtn2git_empty | 0 packages/altboot/files/spitz/altboot-2.6.cfg | 41 - packages/altboot/files/tosa/.mtn2git_empty | 0 packages/altboot/files/tosa/altboot-2.4.cfg | 32 - packages/altboot/files/tosa/altboot-2.6.cfg | 41 - 63 files changed, 100 insertions(+), 4386 deletions(-) create mode 100644 packages/altboot/README.txt delete mode 100644 packages/altboot/altboot_0.0.0.bb create mode 100644 packages/altboot/altboot_svn.bb delete mode 100644 packages/altboot/files/.mtn2git_empty delete mode 100644 packages/altboot/files/akita/.mtn2git_empty delete mode 100644 packages/altboot/files/akita/altboot-2.4.cfg delete mode 100644 packages/altboot/files/akita/altboot-2.6.cfg delete mode 100644 packages/altboot/files/altboot-menu/.mtn2git_empty delete mode 100644 packages/altboot/files/altboot-menu/00-Default delete mode 100644 packages/altboot/files/altboot-menu/10-noGui delete mode 100644 packages/altboot/files/altboot-menu/15-bootSD delete mode 100644 packages/altboot/files/altboot-menu/20-bootCF delete mode 100644 packages/altboot/files/altboot-menu/99-ownScripts-example delete mode 100644 packages/altboot/files/altboot-menu/Advanced/.mtn2git_empty delete mode 100644 packages/altboot/files/altboot-menu/Advanced/30-bootUSB-Stick delete mode 100644 packages/altboot/files/altboot-menu/Advanced/40-bootNFS delete mode 100644 packages/altboot/files/altboot-menu/Advanced/55-bin-sh delete mode 100644 packages/altboot/files/altboot-menu/Advanced/60-orig-init delete mode 100644 packages/altboot/files/altboot-menu/Advanced/70-install-tgz delete mode 100644 packages/altboot/files/altboot-menu/Advanced/70-setKernel delete mode 100644 packages/altboot/files/altboot-menu/Advanced/80-configure-kexec delete mode 100644 packages/altboot/files/altboot-menu/Advanced/80-copyrootfs delete mode 100644 packages/altboot/files/altboot.func delete mode 100644 packages/altboot/files/altboot.rc/.mtn2git_empty delete mode 100644 packages/altboot/files/altboot.rc/Readme.txt delete mode 100644 packages/altboot/files/altboot.rc/disable_printk.sh delete mode 100644 packages/altboot/files/altboot.rc/loadkeymap.sh delete mode 100644 packages/altboot/files/altboot.rc/playbeep.sh delete mode 100755 packages/altboot/files/altbootctl delete mode 100644 packages/altboot/files/altbootctl.conf delete mode 100644 packages/altboot/files/beep.raw delete mode 100644 packages/altboot/files/c7x0/.mtn2git_empty delete mode 100644 packages/altboot/files/c7x0/altboot-2.4.cfg delete mode 100644 packages/altboot/files/c7x0/altboot-2.6.cfg delete mode 100644 packages/altboot/files/collie/.mtn2git_empty delete mode 100644 packages/altboot/files/collie/altboot-2.4.cfg delete mode 100644 packages/altboot/files/fic-gta01/.mtn2git_empty delete mode 100644 packages/altboot/files/fic-gta01/altboot-2.6.cfg delete mode 100644 packages/altboot/files/fic-gta01/altboot-menu/.mtn2git_empty delete mode 100644 packages/altboot/files/fic-gta01/altboot-menu/00-Default delete mode 100644 packages/altboot/files/fic-gta01/altboot-menu/15-bootSD delete mode 100644 packages/altboot/files/fic-gta01/altboot-menu/Advanced/.mtn2git_empty delete mode 100644 packages/altboot/files/fic-gta01/altboot-menu/Advanced/40-bootNFS delete mode 100644 packages/altboot/files/init.altboot delete mode 100644 packages/altboot/files/nslu2le/.mtn2git_empty delete mode 100644 packages/altboot/files/nslu2le/altboot-2.6.cfg delete mode 100644 packages/altboot/files/nslu2le/altboot-handlers/.mtn2git_empty delete mode 100644 packages/altboot/files/nslu2le/altboot-handlers/05-USB-Storage delete mode 100644 packages/altboot/files/nslu2le/altboot-handlers/10-Onboard-Flash delete mode 100644 packages/altboot/files/nslu2le/altboot-menu/.mtn2git_empty delete mode 100644 packages/altboot/files/nslu2le/altboot-menu/00-Default delete mode 100644 packages/altboot/files/nslu2le/altboot-menu/30-bootUSB-Stick delete mode 100644 packages/altboot/files/nslu2le/altboot-menu/55-bin-sh delete mode 100644 packages/altboot/files/nslu2le/altboot.rc/.mtn2git_empty delete mode 100644 packages/altboot/files/poodle/.mtn2git_empty delete mode 100644 packages/altboot/files/poodle/altboot-2.4.cfg delete mode 100644 packages/altboot/files/poodle/altboot-2.6.cfg delete mode 100755 packages/altboot/files/set-bootdev delete mode 100644 packages/altboot/files/spitz/.mtn2git_empty delete mode 100644 packages/altboot/files/spitz/altboot-2.6.cfg delete mode 100644 packages/altboot/files/tosa/.mtn2git_empty delete mode 100644 packages/altboot/files/tosa/altboot-2.4.cfg delete mode 100644 packages/altboot/files/tosa/altboot-2.6.cfg diff --git a/packages/altboot/README.txt b/packages/altboot/README.txt new file mode 100644 index 0000000000..07a41bef3d --- /dev/null +++ b/packages/altboot/README.txt @@ -0,0 +1,5 @@ +altboot_1.0.5.bb - Last known-working version for clamshell + Zauruses running kernel 2.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_wip.bb diff --git a/packages/altboot/altboot_0.0.0.bb b/packages/altboot/altboot_0.0.0.bb deleted file mode 100644 index 930a30c1ac..0000000000 --- a/packages/altboot/altboot_0.0.0.bb +++ /dev/null @@ -1,99 +0,0 @@ -# -# Copyright Matthias Hentges (c) 2006 -# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license) -# -# Filename: altboot_0.0.0.bb -# Date: 07-May-06 - -DESCRIPTION = "The altboot bootmanager" -HOMEPAGE = "http://www.hentges.net/misc/openzaurus/index.shtml" -LICENSE = "GPL" -INHIBIT_PACKAGE_STRIP = "1" - -###################################################################################### - -RRECOMMENDS_${PN} = "e2fsprogs-e2fsck dosfstools" -RRECOMMENDS_${PN}_append_akita = " kexec-tools" -RRECOMMENDS_${PN}_append_spitz = " kexec-tools" -RRECOMMENDS_${PN}_append_c7x0 = " kexec-tools" - -RDEPENDS_${PN} = "${PN}-conf" - -# Currently the OM image for the Neo is lacking a few basic things... -RDEPENDS_${PN}_fic-gta01 = "${PN}-conf kernel-module-ext2 kernel-module-loop kernel-module-s3cmci " - - -###################################################################################### - -PR = "r52" - -###################################################################################### - -PACKAGES = "${PN}-conf ${PN}-doc ${PN}" - -#PACKAGE_ARCH_${PN} = "all" -PACKAGE_ARCH_${PN}-doc = "all" -PACKAGE_ARCH_${PN}-conf = "${MACHINE}" - -SRC_URI = "file://altboot-menu \ - file://altboot.rc \ - file://altboot.func \ - file://init.altboot \ - file://altboot*.cfg \ - file://altbootctl.conf \ - file://altbootctl \ - file://beep.raw" - -# S = "${WORKDIR}/altboot/" - -###################################################################################### - -FILES_${PN}-conf = "/etc/altboot*.cfg" - -###################################################################################### - -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 - - 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}/altbootctl.conf ${D}/etc - install -m 0755 ${WORKDIR}/init.altboot ${D}/sbin - install -m 0755 ${WORKDIR}/altbootctl ${D}/sbin - - install -m 0755 ${WORKDIR}/altboot-menu/*-* ${D}/etc/altboot-menu - - if test -d ${WORKDIR}/altboot-menu/Advanced - then - install -m 0755 ${WORKDIR}/altboot-menu/Advanced/*-* ${D}/etc/altboot-menu/Advanced - fi - - install -m 0755 ${WORKDIR}/altboot.rc/*.sh ${D}/etc/altboot.rc - install -m 0644 ${WORKDIR}/altboot.rc/*.txt ${D}/etc/altboot.rc -} - -###################################################################################### - -do_configure() { - cat ${WORKDIR}/init.altboot | sed "s/^VERSION=.*/VERSION=\"0.0.0 Developer Snapshot (${DATE})\"/" > ${WORKDIR}/init.altboot_ - mv ${WORKDIR}/init.altboot_ ${WORKDIR}/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 -} - diff --git a/packages/altboot/altboot_svn.bb b/packages/altboot/altboot_svn.bb new file mode 100644 index 0000000000..baf5116d70 --- /dev/null +++ b/packages/altboot/altboot_svn.bb @@ -0,0 +1,95 @@ +#! /bin/sh +# +# Copyright Matthias Hentges (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 " +HOMEPAGE = "http://www.hentges.net/misc/openzaurus/index.shtml" +LICENSE = "GPL" + +###################################################################################### + +RRECOMMENDS_${PN} = "e2fsprogs-e2fsck dosfstools" +RRECOMMENDS_${PN}_append_akita = " kexec-tools" +RRECOMMENDS_${PN}_append_spitz = " kexec-tools" +RRECOMMENDS_${PN}_append_c7x0 = " kexec-tools" + +RDEPENDS_${PN} = "${PN}-conf" +RDEPENDS_${PN}-conf = "${PN}" + +###################################################################################### + +PV = "1.1.1+wip-${SRCDATE}" +PR = "r0" + +###################################################################################### + +PACKAGES = "${PN}-conf ${PN}-doc ${PN}" + +PACKAGE_ARCH_${PN} = "all" +PACKAGE_ARCH_${PN}-doc = "all" +PACKAGE_ARCH_${PN}-conf = "${MACHINE}" + +SRC_URI = "svn://hentges.net/altboot;module=trunk;proto=svn" + +S = "${WORKDIR}/trunk/" + +###################################################################################### + +FILES_${PN}-conf = "/etc/altboot*cfg" + +###################################################################################### + +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 + install -d ${D}/etc/skel/altboot + + 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 0644 ${S}/altbootctl.conf ${D}/etc + install -m 0755 ${S}/init.altboot ${D}/sbin + install -m 0755 ${S}/altbootctl ${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}-${PR}\"/" > ${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 +} + diff --git a/packages/altboot/files/.mtn2git_empty b/packages/altboot/files/.mtn2git_empty deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/altboot/files/akita/.mtn2git_empty b/packages/altboot/files/akita/.mtn2git_empty deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/altboot/files/akita/altboot-2.4.cfg b/packages/altboot/files/akita/altboot-2.4.cfg deleted file mode 100644 index 4ea84ce32d..0000000000 --- a/packages/altboot/files/akita/altboot-2.4.cfg +++ /dev/null @@ -1,31 +0,0 @@ -# -# Altboot machine configuration for: Akita / Kernel 2.4 -# - -# 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/mmcda1" -SD_KERNEL_MODULE="/lib/modules/2.4.20/kernel/drivers/block/sharp_mmcsd_m.o" - -USB_HOST_AVAILABLE="yes" -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/akita/altboot-2.6.cfg b/packages/altboot/files/akita/altboot-2.6.cfg deleted file mode 100644 index 62e8ea2434..0000000000 --- a/packages/altboot/files/akita/altboot-2.6.cfg +++ /dev/null @@ -1,41 +0,0 @@ -# -# Altboot machine configuration for: Akita / Kernel 2.6 -# - -# 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" - -ENABLE_SOUND="yes" - -IMAGE_PATH="boot-images" -IMAGE_TYPE="ext2" -FSCK_IMAGES="yes" -ENABLE_IMAGECONF="yes" - -SD_DEVICE="/dev/mmcblk0p1" -SD_KERNEL_MODULE="" - -USB_HOST_AVAILABLE="yes" -USB_STORAGE_MODULES="ohci_hcd usb_storage sd_mod" -USB_STORAGE_PARTITION="/dev/sda1" -USB_STORAGE_WAIT="4" - -USB_NETWORKING_AVAILABLE="yes" -USB_NW_MODULES="usbcore pxa27x_udc ohci-hcd g_ether" -USB_NW_DEVICE="usb0" - -KEXEC_KERNEL_DIR="/boot" -KEXEC_BIN="/usr/sbin/kexec" - -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/.mtn2git_empty b/packages/altboot/files/altboot-menu/.mtn2git_empty deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/altboot/files/altboot-menu/00-Default b/packages/altboot/files/altboot-menu/00-Default deleted file mode 100644 index 9d29fdae2a..0000000000 --- a/packages/altboot/files/altboot-menu/00-Default +++ /dev/null @@ -1,14 +0,0 @@ -# !/bin/sh -M_TITLE="Normal Boot" - - -run_module() { - exec $REAL_INIT "$INIT_RUNLEVEL" - exit 0 -} - -case "$1" in -title) echo "$M_TITLE";; -run) run_module;; -esac - diff --git a/packages/altboot/files/altboot-menu/10-noGui b/packages/altboot/files/altboot-menu/10-noGui deleted file mode 100644 index cf3c10c381..0000000000 --- a/packages/altboot/files/altboot-menu/10-noGui +++ /dev/null @@ -1,16 +0,0 @@ -# !/bin/sh -M_TITLE="Don't launch GUI" - -test "$DISABLE_NOGUI_BOOT" = yes && exit 0 - - -run_module() { - clear ; exec $REAL_INIT "$NO_GUI_RL" - exit 0 -} - -case "$1" in -title) echo "$M_TITLE";; -run) run_module;; -esac - diff --git a/packages/altboot/files/altboot-menu/15-bootSD b/packages/altboot/files/altboot-menu/15-bootSD deleted file mode 100644 index 3cf49deea5..0000000000 --- a/packages/altboot/files/altboot-menu/15-bootSD +++ /dev/null @@ -1,32 +0,0 @@ -# !/bin/sh -# -# Copyright Matthias Hentges (c) 2005 -# -# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the GPL) - - -M_TITLE="Boot SD card" - -test "$DISABLE_SD_BOOT" = yes && exit 0 - -# This function is activated by init.altboot by calling this script with the "run" option -run_module() { - - test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!" - - # Mount /proc, etc - init_rootfs - - mount_sd - - # Check for a real fs and loop-images. - check_target "$SD_MOUNTPOINT" >/dev/tty0 - -} - - -case "$1" in -title) echo "$M_TITLE";; -run) run_module "$2";; -esac - diff --git a/packages/altboot/files/altboot-menu/20-bootCF b/packages/altboot/files/altboot-menu/20-bootCF deleted file mode 100644 index 4add6e6631..0000000000 --- a/packages/altboot/files/altboot-menu/20-bootCF +++ /dev/null @@ -1,32 +0,0 @@ -# !/bin/sh -# -# Copyright Matthias Hentges (c) 2005 -# -# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the GPL) - - -M_TITLE="Boot CF card" - -test "$DISABLE_CF_BOOT" = yes && exit 0 - -# This function is activated by init.altboot by calling this script with the "run" option -run_module() { - - test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!" - - # Mount /proc, etc - init_rootfs - - mount_cf - - # Check for a real fs and loop-images. - check_target "$CF_MOUNTPOINT" - -} - - -case "$1" in -title) echo "$M_TITLE";; -run) run_module "$2";; -esac - diff --git a/packages/altboot/files/altboot-menu/99-ownScripts-example b/packages/altboot/files/altboot-menu/99-ownScripts-example deleted file mode 100644 index 7566416b87..0000000000 --- a/packages/altboot/files/altboot-menu/99-ownScripts-example +++ /dev/null @@ -1,68 +0,0 @@ -# !/bin/sh -# -# Copyright Matthias Hentges (c) 2005 -# -# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the GPL) - - -# This file will teach you how to implement your own scripts while using existing altboot -# code. - -# /sbin/init.altboot searches /etc/altboot-menu for scripts. It will only list scripts which -# return a title when run with the "title" parameter. -# Script which do not return a title will never be shown in the boot menu! -# -M_TITLE="altboot sample" - -# We can use that to deactivate certain scripts: -exit 0 - -# The "title" parameter is implemented at the end of this script so it will never be reached -# and the script will simply be ignored by altboot. - -# This function is activated by init.altboot by calling this script with the "run" option -run_module() { - - # altboot.func contains re-useable code. If you intend to use check_target (see below) - # you must keep this line. If not, delete it. - test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!" - - - # The only thing you'll have to do is get your medium mounted. - # The following lines mount a SD card on 2.4-series kernels on a Zaurus - - ########################################## - - # Mount /proc, etc - init_rootfs - - echo -n "Loading SD kernel module..." - /sbin/insmod $SD_KERNEL_MODULE >/dev/null 2>&1 && echo ok || die "insmod failed" - - 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" - - echo "" - - # Give the SD and CF mounting some time. This is a must for SD - sleep 2 - ########################################## - - # Once the medium (be it a CF or SD card, or even a NFS drive) is mounted somewhere, - # just call check_target with the mountpoint as parameter. - # check_target searches the medium for a real filesystem and loop-images and - # asks the user what to boot if there are several choices. - - # Check for a real fs and loop-images. - check_target "$SD_MOUNTPOINT" >/dev/tty0 - - # Done :) - -} - - -case "$1" in -title) echo "$M_TITLE";; -run) run_module "$2";; -esac - diff --git a/packages/altboot/files/altboot-menu/Advanced/.mtn2git_empty b/packages/altboot/files/altboot-menu/Advanced/.mtn2git_empty deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/altboot/files/altboot-menu/Advanced/30-bootUSB-Stick b/packages/altboot/files/altboot-menu/Advanced/30-bootUSB-Stick deleted file mode 100644 index b573e7a10c..0000000000 --- a/packages/altboot/files/altboot-menu/Advanced/30-bootUSB-Stick +++ /dev/null @@ -1,47 +0,0 @@ -# !/bin/sh -# -# Copyright Matthias Hentges (c) 2005 -# -# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the GPL) - - -M_TITLE="Boot USB Storage" - -test "$USB_HOST_AVAILABLE" = "yes" || exit 0 - -# This function is activated by init.altboot by calling this script with the "run" option -run_module() { - - test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!" - - # Mount /proc, etc - init_rootfs - - echo "Starting USB..." - - for module in $USB_STORAGE_MODULES - do - echo -en "\t - $module: " - modprobe "$module" >/dev/null 2>&1 && echo ok || die "Failed to modprobe [$module]" - done - - echo -n "Mounting $USB_STORAGE_PARTITION..." >/dev/tty0 - - mkdir -p /media/usb-storage >/dev/null 2>&1 - - sleep "$USB_STORAGE_WAIT" - - /bin/mount -t auto -o defaults,noatime $USB_STORAGE_PARTITION /media/usb-storage >/dev/null 2>&1 && echo ok >/dev/tty0|| die "/bin/mount -t auto -o defaults,noatime $SD_DEVICE $SD_MOUNTPOINT failed" - - echo "" - - # Check for a real fs and loop-images. - check_target "/media/usb-storage" >/dev/tty0 -} - - -case "$1" in -title) echo "$M_TITLE";; -run) run_module "$2";; -esac - diff --git a/packages/altboot/files/altboot-menu/Advanced/40-bootNFS b/packages/altboot/files/altboot-menu/Advanced/40-bootNFS deleted file mode 100644 index 4f5c195be2..0000000000 --- a/packages/altboot/files/altboot-menu/Advanced/40-bootNFS +++ /dev/null @@ -1,110 +0,0 @@ -#! /bin/sh -# -# Copyright Matthias Hentges (c) 2006 -# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license) -# -# Filename: 40-bootNFS -# Date: 14-Apr-06 - - -M_TITLE="Boot from NFS" - -test "$DISABLE_NFS_BOOT" = yes && exit 0 - -# This function is activated by init.altboot by calling this script with the "run" option -run_module() { - - test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!" - - # Mount /proc, etc - init_rootfs - - nfs_host="`cat /etc/fstab | grep -v ^# | grep nfs | awk '{print $1}'|sed -n "s/\(.*\)\:\(.*\)/\1/p" `" - nfs_mounts="`cat /etc/fstab | grep -v ^# | grep nfs | awk '{print $1}'`" - nfs_mountpoints="`cat /etc/fstab | grep -v ^# | grep nfs | awk '{print $2}'`" - - start_networking "$nfs_host" - - if test -z "$nfs_host" - then - mdie "${C_RED}No configured NFS drives found in /etc/fstab$C_RESET" - - fi - - - if test "` echo "$nfs_mountpoints" |wc -l | tr -d " "`" -gt 1 - then - echo -e "Please select your NFS root:\n" - - cnt=1 - for nfs_mount in $nfs_mountpoints - do - echo -e "\t[$cnt] $nfs_mount" - let cnt=$cnt+1 - done - - echo "" - - while test -z "$selection" - do - stty echo - echo -n "Boot NFS root: " - - if test "$AUTOBOOT" != "yes" - then - read junk < /dev/tty1 - else - if test -e /etc/.altboot-bootNFS-source.last - then - junk="`cat /etc/.altboot-bootNFS-source.last`" - test -z "$junk" && read junk < /dev/tty1 || echo "$junk (autoboot)" - else - read junk < /dev/tty1 - fi - fi - - - cnt=1 - for nfs_mount in $nfs_mounts - do - if test "$junk" = "$cnt" - then - selection="$nfs_mount" - echo "$junk" > /etc/.altboot-bootNFS-source.last - fi - let cnt=$cnt+1 - done - - done - else - test -z "$nfs_mounts" && die "No NFS mounts configured in /etc/fstab!" - selection="$nfs_mounts" - fi - - mkdir -p /media/nfsroot || mdie "mkdir -p /media/nfsroot failed!" - - echo -n "Mounting NFS root..." - - if ( mount | grep -q "/media/nfsroot" ) - then - echo "/media/nfsroot already used, tying to umount..." - umount /media/image - losetup -d /dev/loop0 - umount /media/nfsroot || die "umount failed!" - fi - - mount -t nfs "$selection" /media/nfsroot && echo ok || mdie "mount -t nfs "$selection" /media/nfsroot failed!" - - # Use configured resolv.conf in the pivoted rootfs - #echo -n "Copying resolv.conf..." - #cp /etc/resolv.conf /media/nfsroot/etc && echo ok || echo "FAILED" - - check_target "/media/nfsroot" bootNFS - -} - -case "$1" in -title) echo "$M_TITLE";; -run) run_module "$2";; -esac - diff --git a/packages/altboot/files/altboot-menu/Advanced/55-bin-sh b/packages/altboot/files/altboot-menu/Advanced/55-bin-sh deleted file mode 100644 index e4fe99ebae..0000000000 --- a/packages/altboot/files/altboot-menu/Advanced/55-bin-sh +++ /dev/null @@ -1,27 +0,0 @@ -# !/bin/sh -M_TITLE="init=/bin/sh" - -test "$DISABLE_BINSH_BOOT" = yes && exit 0 - -run_module() { - - test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!" - - test "$ASK_PW_ON_BOOT" != "yes" && verify_master_pw >/dev/$OUT_TTY - - # Mount /proc, etc - init_rootfs - - echo -e "\nBoot system with 'exec /sbin/init 5'\n" - while true - do - exec $SH_SHELL /dev/$OUT_TTY 2>&1 - echo "WARNING: Shell was killed!" - done -} - -case "$1" in -title) echo "$M_TITLE";; -run) run_module;; -esac - diff --git a/packages/altboot/files/altboot-menu/Advanced/60-orig-init b/packages/altboot/files/altboot-menu/Advanced/60-orig-init deleted file mode 100644 index ad9f2c78e1..0000000000 --- a/packages/altboot/files/altboot-menu/Advanced/60-orig-init +++ /dev/null @@ -1,20 +0,0 @@ -# !/bin/sh -M_TITLE="Boot original INIT" - -exit 0 - -run_module() { - - test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!" - - echo "altboot: Using real init [$REAL_INIT] [$INIT_RUNLEVEL] *" >/dev/tty1 - exec $REAL_INIT $INIT_RUNLEVEL - exit 0 - -} - -case "$1" in -title) echo "$M_TITLE";; -run) run_module;; -esac - diff --git a/packages/altboot/files/altboot-menu/Advanced/70-install-tgz b/packages/altboot/files/altboot-menu/Advanced/70-install-tgz deleted file mode 100644 index b6e5d94d5d..0000000000 --- a/packages/altboot/files/altboot-menu/Advanced/70-install-tgz +++ /dev/null @@ -1,266 +0,0 @@ -#!/bin/sh -M_TITLE="Install RootFS from tar.gz" -M_FLAGS="noRemember" - -test "$DISABLE_INSTTGZ_BOOT" = yes && exit 0 - -run_module(){ - test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!" - - # Mount /proc, etc - init_rootfs - - # Mount - mount_sd ingore_errors - mount_cf - mount_home - - for source in /home /media/card /media/cf - do - #echo "source: [$source]" - rootfs_files="`ls -1 $source | grep "rootfs.tar.gz"`" - - #echo "rootfs_file: [$rootfs_files]" - if test "`echo "$rootfs_files" | wc -l | tr -d " "`" -gt 1 - then - echo "Multiple rootfs files not supported, yet" - else - if test -n "$rootfs_files" - then - rootfs_source="$source/$rootfs_files" - echo "Using [$rootfs_source]" - break - fi - fi - done - - test -z "$rootfs_source" && die "No rootfs.tar.gz found" - - echo -e "\nPlease choose the target of this installation:\n" - - echo -e "\t [1] SD / MMC" - echo -e "\t [2] Compact Flash" - - echo "" - while true - do - echo -n "Your target: " - read junk - - case "$junk" in - 1) if (mount | grep -q "/media/card ") - then - rootfs_target="/media/card"; break - else - echo -e "\nInstallation target [/media/card] not mounted\n" - fi ;; - 2) if (mount | grep -q "/media/cf ") - then - rootfs_target="/media/cf"; break - else - echo -e "\nInstallation target [/media/cf] not mounted\n" - fi ;; - esac - done - - echo -e "\nPlease choose the type of this installation:\n" - - echo -e "\t [1] Imagefile (loopfile)" - echo -e "\t [2] Direct Install" - - echo "" - while true - do - echo -n "Install type: " - read junk - - case "$junk" in - 1) if test -x /sbin/mkfs.ext2 - then - rootfs_type="image" - break - else - echo -e "\nNOTE: mkfs.ext2 (from e2fsprogs-mke2fs) not found, loop-images not supported\n" - fi ;; - 2) rootfs_type="direct" ; break ;; - esac - done - - case "$rootfs_type" in - image) install_rootfs_image "$rootfs_target";; - direct) install_rootfs_direct "$rootfs_target";; - esac -} - -clear_directories(){ - test "$1" = "/" -o "$1" = "/ " && die "clear_directories(): You don't want to do that." - - ! test -d "$1" && die "clear_directories(): [$1] not found." - - for d in bin dev media proc sys usr boot etc lib mnt sbin tmp var - do - if test -d "$1/$d" - then - echo "Removing [$1/$d]..." - rm -rf "$1/$d" - fi - done - -} - - -install_rootfs_direct(){ - - mount | grep -q "$1 " || die "Installation target [$1] not mounted" - - echo -e "Do you want to remove existing directories from [$1]\n before installing the new rootfs?" - echo "" - - while true - do - echo -n "Remove old directories? [Y|n] " - read junk /dev/tty0 2>&1 - - case "$junk" in - Y|y|"") clear_directories "$1"; break ;; - esac - done - - echo "Please press to begin the installation" - read junk /dev/tty0 2>&1 - - test -d "$1" || die "Directory [$1] not found" - - echo -n "Installing rootfs, please wait..." - tar -xzf "$rootfs_source" -C "$1" >/dev/null 2>&1 && echo ok || die "tar -xzf \"$rootfs_source\" -C \"$1\" failed!" - - echo -n "Syncing drives..." - sync - echo "done" - -# umount "$1" - - echo "Press to bring up the altboot menu" - read junk /dev/tty0 2>&1 - exec /sbin/init.altboot -force - -} - -install_rootfs_image(){ - - mount | grep -q "$1 " || die "Installation target [$1] not mounted" - - echo "" - echo "Please enter a name for the image file." - echo "Do not use the character" - echo "" - - - while true - do - echo -n "Image name: " - read junk - - if test -n "$junk" - then - if test -e "$1/boot-images/${junk}-rootfs.bin" - then - echo -e "\nFile [$1/boot-images/${junk}-rootfs.bin] already exists." - - while true - do - echo -n "Overwrite? [y|N] " - read junk2 - - case "$junk2" in - Y|y) break;; - n|N|"") install_rootfs_image "$1" - exit 0;; - esac - done - rootfs_image_name="${junk}-rootfs.bin" - break - else - echo -n "Use [$junk] as name? [Y|n] " - read junk2 - - case "$junk2" in - "Y"|"y"|"") rootfs_image_name="${junk}-rootfs.bin" - break ;; - *) echo "err ]$junk]";; - esac - fi - fi - done - - echo "" - echo "Please enter the image size in MegaBytes" - echo "Must be at least 30Mb" - echo "" - - while true - do - echo -n "Image size: " - read junk - - junk="`echo "$junk" | sed "s/[a-zA-Z]//g"`" - - if test -n "$junk" - then - if test "$junk" -gt 29 - then - echo -n "Is [${junk}Mb] correct? [Y|n] " - read junk2 - - case "$junk2" in - Y|y|"") rootfs_image_size="$junk" - break ;; - esac - - else - echo "Image size of [${junk}Mb] is too small!" - fi - fi - done - - test -z "$rootfs_image_name" -o -z "$rootfs_image_size" && die "DEBUG: Empty VAR in install_rootfs_image()" - - echo "" - echo "Creating [$rootfs_image_name] (${rootfs_image_size}Mb) on [$1]" - echo "Please wait..." - mkdir -p "$1/boot-images" - - dd if=/dev/zero of="$1/boot-images/$rootfs_image_name" bs=1024k count=$rootfs_image_size >/dev/null - - echo -n "Creating an ext2 filesystem on $rootfs_image_name..." - losetup /dev/loop0 "$1/boot-images/$rootfs_image_name" || die "losetup /dev/loop0 \"$1/boot-images/$rootfs_image_name\" failed!" - mkfs.ext2 -m0 /dev/loop0 >/dev/null 2>&1 && echo done || die "mkfs.ext2 -m0 /dev/loop0 failed!" - - echo -n "Mounting loopfile..." - mkdir -p /media/image - mount /dev/loop0 /media/image && echo ok || die "mount /dev/loop0 /media/image failed!" - - echo -n "Installing rootfs, please wait..." - tar -xzf "$rootfs_source" -C "/media/image" >/dev/null 2>&1 && echo ok || die "tar -xzf \"$rootfs_source\" -C \"$1\" failed!" - - echo -n "Syncing drives..." - sync - echo "done" - - umount "/media/image" && losetup -d /dev/loop0 - - echo "Press to bring up the altboot menu" - read junk /dev/tty0 2>&1 - exec /sbin/init.altboot -force - -} - - - -#run_module - -case "$1" in -title) echo "$M_TITLE";; -flags) echo "$M_FLAGS";; -run) run_module "$2";; -esac diff --git a/packages/altboot/files/altboot-menu/Advanced/70-setKernel b/packages/altboot/files/altboot-menu/Advanced/70-setKernel deleted file mode 100644 index 50f61d034f..0000000000 --- a/packages/altboot/files/altboot-menu/Advanced/70-setKernel +++ /dev/null @@ -1,68 +0,0 @@ -# !/bin/sh -M_TITLE="Choose kernel for next boot" - -# Deprecated due to altbootctl -exit 0 - -# Only kernel 2.6 offers kexec support -uname -r | grep -q "^2.6" || exit 0 - -run_module() { - - test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!" - - test -z "$KEXEC_KERNEL_DIR" && KEXEC_KERNEL_DIR="/boot" - test -x "$KEXEC_BIN" || mdie "kexec-tools not found [$KEXEC_BIN]" - - # Mount /proc, etc - # init_rootfs - - if test `ls -1 $KEXEC_KERNEL_DIR | grep -v "kexec.cfg" | wc -l | tr -d " "` -gt 1 - then - echo -e "\nSelect the kernel for use of the next boot:\n" - - cnt=1 ; reset_pref "kexec_klist" - for k in `ls -1 $KEXEC_KERNEL_DIR/zImage* | grep -v "kexec.cfg" ` - do - echo -e "\t[$cnt] $k" - set_pref "kexec_klist" "$cnt" "$k" - - let cnt=$cnt+1 - done - - echo "" - - while true - do - echo -n "Select a kernel: " - read junk - - #echo_pref kexec_klist - - get_pref "kexec_klist" "$junk" KEXEC_SELECTED_KERNEL && break - - done - else - KEXEC_SELECTED_KERNEL="`ls -1 $KEXEC_KERNEL_DIR/zImage* | grep -v "kexec.cfg" `" - fi - - echo -e "\nUsing [$KEXEC_SELECTED_KERNEL]" - - if ! test -e "$KEXEC_SELECTED_KERNEL.kexec.cfg" - then - echo -e "\nWARNING: This kernel has not been configured." - echo -e "It will only boot correctly if CMDLINE is compiled in.\n" - fi - - export USE_KEXEC_ON_NEXT_BOOT=yes - export KEXEC_SELECTED_KERNEL - show_menu -} - - - -case "$1" in -title) echo "$M_TITLE";; -run) run_module;; -esac - diff --git a/packages/altboot/files/altboot-menu/Advanced/80-configure-kexec b/packages/altboot/files/altboot-menu/Advanced/80-configure-kexec deleted file mode 100644 index 1b8fc6e547..0000000000 --- a/packages/altboot/files/altboot-menu/Advanced/80-configure-kexec +++ /dev/null @@ -1,248 +0,0 @@ -# !/bin/sh -M_TITLE="Configure kexec CMDLINE" - -# Deprecated due to altbootctl -exit 0 - - -# Only kernel 2.6 offers kexec support -uname -r | grep -q "^2.6" || exit 0 - -run_module() { - - test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!" - - test -z "$KEXEC_KERNEL_DIR" && KEXEC_KERNEL_DIR="/boot" - test -x "$KEXEC_BIN" || mdie "kexec-tools not found [$KEXEC_BIN]" - - # Mount /proc, etc - init_rootfs - - if test `ls -1 $KEXEC_KERNEL_DIR | grep -v "kexec.cfg" | wc -l | tr -d " "` -gt 1 - then - echo -e "\nPlease select the kernel you want to configure:\n" - - cnt=1 ; reset_pref "kexec_klist" - for k in `ls -1 $KEXEC_KERNEL_DIR/zImage* | grep -v "kexec.cfg" ` - do - echo -e "\t[$cnt] $k" - set_pref "kexec_klist" "$cnt" "$k" - - let cnt=$cnt+1 - done - - echo "" - - while true - do - echo -n "Select a kernel: " - read junk - - get_pref "kexec_klist" "$junk" KEXEC_KERNEL && break - - done - else - KEXEC_KERNEL="`ls -1 $KEXEC_KERNEL_DIR/zImage* | grep -v "kexec.cfg" `" - fi - - echo -e "\nUsing [$KEXEC_KERNEL]" - - configure_rootdev - configure_roottype - configure_verbose - configure_custom - - CMDLINE="console=ttyS0,115200n8 console=tty1 dyntick=enable fbcon=rotate:1 noinitrd root=$KERNEL_ROOTDEV rootfstype=$KERNEL_ROOTFSTYPE $KERNEL_VERBOSE $KERNEL_CUSTOM" - - echo -en "\nWriting CMDLINE to $KEXEC_KERNEL.kexec.cfg..." - echo "$CMDLINE" > $KEXEC_KERNEL.kexec.cfg && echo ok || mdie FAILED - - show_menu -} - -configure_rootdev() { - - echo -e "\nPlease choose a root device (root=*):\n" - - cnt=1 ; reset_pref "kexec_rootdev" - for root in /dev/mtdblock2 /dev/hda1 "Manual Entry" - do - echo -e "\t[$cnt] $root" - set_pref kexec_rootdev "$cnt" "$root" - let cnt=cnt+1 - done - - echo "" - - while true - do - echo -n "Select a root device: " - read junk - - get_pref kexec_rootdev "$junk" KERNEL_ROOTDEV && break - done - - if test "$KERNEL_ROOTDEV" = "Manual Entry" - then - echo "" - - KERNEL_ROOTDEV="" - - while test -z "$KERNEL_ROOTDEV" - do - while true - do - echo -n "Enter the root device: " - read junk - test -n "$junk" && break - done - - echo -en "\nIs [$junk] correct? [Y|n] " - read junk2 - while true - do - if test "$junk2" = y -o "$junk2" = Y -o -z "$junk2" - then - KERNEL_ROOTDEV="$junk" - break - fi - - break - done - done - fi - - echo "Using [$KERNEL_ROOTDEV] as root device" -} - -configure_roottype() { - - echo -e "\nPlease choose a rootfs type (rootfs=*):\n" - - cnt=1 ; reset_pref "kexec_rootfstype" - for root in jffs2 ext2 ext3 "Manual Entry" - do - echo -e "\t[$cnt] $root" - set_pref kexec_rootfstype "$cnt" "$root" - let cnt=cnt+1 - done - - echo "" - - while true - do - echo -n "Select a rootfs type: " - read junk - - get_pref kexec_rootfstype "$junk" KERNEL_ROOTFSTYPE && break - done - - if test "$KERNEL_ROOTFSTYPE" = "Manual Entry" - then - echo "" - - KERNEL_ROOTFSTYPE="" - - while test -z "$KERNEL_ROOTFSTYPE" - do - while true - do - echo -n "Enter the rootfs type: " - read junk - test -n "$junk" && break - done - - echo -en "\nIs [$junk] correct? [Y|n] " - read junk2 - while true - do - if test "$junk2" = y -o "$junk2" = Y -o -z "$junk2" - then - KERNEL_ROOTFSTYPE="$junk" - break - fi - - break - done - done - fi - - echo "Using [$KERNEL_ROOTFSTYPE] as rootfs type" -} - -configure_verbose() { - echo -e "\nDo you want to see kernel messages? ([quiet | debug]):\n" - - echo -e "\t[1] Yes" - echo -e "\t[2] No" - - echo "" - - while true - do - echo -n "Select one of the above: " - read junk - - test "$junk" = 1 -o "$junk" = 2 && break - done - - test "$junk" = 1 && KERNEL_VERBOSE="debug" || KERNEL_VERBOSE="quiet" - -} - -configure_custom() { - echo -e "\nDo you want to set custom kernel options?\n" - - echo -e "\t[1] Yes" - echo -e "\t[2] No" - - echo "" - - while true - do - echo -n "Select one of the above: " - read junk - - test "$junk" = 1 -o "$junk" = 2 && break - done - - if test "$junk" = 1 - then - - echo "" - - KERNEL_CUSTOM="" - - while test -z "$KERNEL_CUSTOM" - do - while true - do - echo -n "Enter kernel options: " - read junk - test -n "$junk" && break - done - - echo -en "\nIs [$junk] correct? [Y|n] " - read junk2 - while true - do - if test "$junk2" = y -o "$junk2" = Y -o -z "$junk2" - then - KERNEL_CUSTOM="$junk" - break - fi - - break - done - done - fi - - echo "Using [$KERNEL_CUSTOM] as custom kernel options" - -} - -case "$1" in -title) echo "$M_TITLE";; -run) run_module;; -esac - diff --git a/packages/altboot/files/altboot-menu/Advanced/80-copyrootfs b/packages/altboot/files/altboot-menu/Advanced/80-copyrootfs deleted file mode 100644 index 2d305e349f..0000000000 --- a/packages/altboot/files/altboot-menu/Advanced/80-copyrootfs +++ /dev/null @@ -1,323 +0,0 @@ -# !/bin/sh -M_TITLE="Copy rootfs to SD/CF" -M_FLAGS="noRemember" - -# Unfinished script. -exit 0 - -ask_target() { - available_disks="`mount | grep "/media" | grep -v ram | awk '{print $3}'`" - - if test -z "$available_disks" - then - die "No mounted targets found!" - fi - - cnt=1 - for d in $available_disks - do - echo -e "\t[$cnt] $d" - let cnt=$cnt+1 - done - - while test -z "$ROOTFS_TARGET" - do - echo -n "Target: " - read junk /dev/null 2>&1 - then - echo -n "Use [$junk]MB? [y|n] " - read junk2 - if test "$junk2" = y - then - ROOTFS_IMAGE_SIZE="$junk" - fi - fi - done - - echo -e "\nPlease enter a name for the image file." - echo "The name must _not_ contain whitespaces or the '-' sign." - - while test -z "$ROOTFS_IMAGE_NAME" - do - echo -n "File name: " - read junk - - if ! test -z "$junk" - then - echo -n "Use [$junk] as image name? [y|n] " - read junk2 - - if test "$junk2" = y - then - ROOTFS_IMAGE_NAME="$junk" - fi - fi - done - - echo -e "\nDo you want to format [$ROOTFS_TARGET_DEV] to the ext2 filesystem?" - - while true - do - echo -n "Format to ext2? [y|n] " - read junk - case "$junk" in - y) format_target - break ;; - n) break ;; - esac - done - - /etc/init.d/devices start - - echo -en "\nCreating image file [$ROOTFS_TARGET/$IMAGE_PATH/$ROOTFS_IMAGE_NAME-rootfs.bin] (${ROOTFS_IMAGE_SIZE}MB)..." - mkdir -p "$ROOTFS_TARGET/$IMAGE_PATH" - - dd if=/dev/zero of="$ROOTFS_TARGET/$IMAGE_PATH/$ROOTFS_IMAGE_NAME-rootfs.bin" bs=1024k count=$ROOTFS_IMAGE_SIZE >/dev/null 2>&1 && echo ok || die "FAILED" - losetup /dev/loop1 "$ROOTFS_TARGET/$IMAGE_PATH/$ROOTFS_IMAGE_NAME-rootfs.bin" - - echo -n "Creating filesystem..." - mkfs.ext2 -m0 /dev/loop1 >/dev/null 2>&1 && echo ok || die FAILED - - mkdir -p /media/temp - mount /dev/loop1 /media/temp || die "mount /dev/loop1 /media/temo FAILED!" - - copy_files - -} - -copy_files() { - echo -e "\nCopying files..." - - exclude_list="tmp sys proc var dev media root" - mkdir_list="var proc sys dev media/card media/cf /media/hdd" - - if (cat /etc/fstab | grep -q "/home") - then - echo "Note: /home appears to be mounted on a different flash partition: not copying /home" - exclude_list="$exclude_list home" - mkdir_list="$mkdir_list home/root" - - fi - - - - source_dirs="`ls -1 /`" - - echo -n "Excluding [" - for d in $exclude_list - do - echo -n "$d " - source_dirs="`echo "$source_dirs" | grep -v "$d"`" - done - echo "] from copy" - - - cd / - for dir in $source_dirs - do - if test -d "$dir" - then - echo -n "Copying [$dir]..." - cp -a $dir /media/temp && echo ok || echo FAILED - fi - done - - for dir in $mkdir_list - do - mkdir -p /media/temp/$dir - done - - rm /media/temp/etc/rcS.s/S39sd - -} -run_module() { - - test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!" - - echo -e "${C_RED}* * * * * WARNING * * * * *${C_RESET}" - echo -e "${C_RED}Continueing will delete the content of the selected target device.\nTHIS IS NO JOKE. If you do now know what this menu-item does, exit NOW${C_RESET}" - - mount -o remount,rw / - - while true - do - echo -en "\nContinue? [y|n] " - read junk /dev/null 2>&1 && echo ok || echo "FAILED" -# -# echo -n "Trying to mount SD card..." -# /etc/init.d/sd start >/dev/null 2>&1 -# sleep 3 -# /etc/sdcontrol insert >/dev/null 2>&1 && echo ok || echo "FAILED" - - #exit 0 - echo -e "\nPlease select the target device:" - - # Sets ROOTFS_TARGET* - ask_target - - # Sets ROOTFS_TARGET_TYPE ([direct | image] - ask_format - - # Ask confirmation - ask_confirm - - case "$ROOTFS_TARGET_TYPE" in - direct) direct_install;; - image) image_install;; - esac -} - -case "$1" in -title) echo "$M_TITLE";; -flags) echo "$M_FLAGS";; -run) run_module;; -esac diff --git a/packages/altboot/files/altboot.func b/packages/altboot/files/altboot.func deleted file mode 100644 index ae38c5b437..0000000000 --- a/packages/altboot/files/altboot.func +++ /dev/null @@ -1,870 +0,0 @@ -#! /bin/sh - -C_RED="\033[31m" -C_YELLOW="\033[35m" -C_BLUE="\033[34m" -C_WHITE="\033[38m" -C_RESET="\033[0m" - - -# This function checks for the presence of a real filesystem and loop-images on the target -# $1 = folder of rootfs, $2 = runlevel (defaults to 5) -# $2 = name of calling module -check_target() { - # Check if there is a /sbin/init or /sbin/init.sysvinit on the card - if test -x $1/sbin/init -o -x $1/$REAL_INIT - then - real_fs_found=1 - else - echo -e "Note: No INIT [$REAL_INIT] found on target" - fi - - # Check for loop-images - if (ls $1/$IMAGE_PATH/*rootfs.bin) >/dev/null 2>&1 - then - image_found=1 - else - echo "Note: No boot-images found in [$1/$IMAGE_PATH]" - fi - - # Check if we have both, a real fs and boot-images. If so, ask the user what to boot - if test "$real_fs_found" = 1 -a "$image_found" = 1 - then - echo -e "\nI have found a real filesystem and boot-images on the target" - echo -e "What do you want to boot?\n" - - echo -e "\t[1] The real filesystem" - echo -e "\t[2] A loop-image" - echo "" - - while test -z "$ans" - do - echo -n "Your choice: " - - if test "$AUTOBOOT" != "yes" - then - read junk < "$OUT_TTY" - else - if test -e /etc/.altboot-real-or-loop.last - then - junk="`cat /etc/.altboot-real-or-loop.last`" - test -z "$junk" && read junk < "$OUT_TTY" || echo "$junk (autoboot)" - else - read junk < "$OUT_TTY" - fi - fi - - if test "$junk" = 1 -o "$junk" = 2 - then - ans="$junk" - echo "$junk" > /etc/.altboot-real-or-loop.last - fi - done - - case "$ans" in - 1) pivot_realfs "$1" "$2">"$OUT_TTY";; - 2) pivot_image "$1" "$2">"$OUT_TTY";; - esac - - exit 0 - fi - - # Boot a real filesystem - test "$real_fs_found" = 1 && pivot_realfs "$1" >"$OUT_TTY" - - # Boot a loop-image - test "$image_found" = 1 && pivot_image "$1" >"$OUT_TTY" - - if test "$real_fs_found" != 1 -a "$image_found" != 1 - then - mdie "No direct-install or loop-images found. Nothing to do!" - fi -} - -boot_new_rootfs_splash() { -C_RED="\033[37;44m" -C_RESET="\033[0m" - - echo -e "${C_RED}+----------------------------------------------------------+${C_RESET}" - echo -e "${C_RED}| |${C_RESET}" - echo -e "${C_RED}| Booting the selected rootfs... |${C_RESET}" - echo -e "${C_RED}| |${C_RESET}" - echo -e "${C_RED}+----------------------------------------------------------+${C_RESET}" - -} - -# This function pivot_root's into a real filesystem calling $newrootfs/sbin/init -# $1 = The new rootfs -pivot_realfs() { - #test -z "$2" && RL="5" || RL="$2" - mkdir -p $1/media/ROM || die "mkdir -p $1/media/ROM failed" - - mount -o remount,ro / >/dev/null 2>&1 - - test "$ENABLE_IMAGECONF" = yes && image_conf $1 - - do_pivot "$1" "$RL" -} - -# This function loop-mounts an image-file and pivot_root's into it -# $1: The new rootfs -pivot_image() { - #test -z "$2" && RL="5" || RL="$2" - cd $1/$IMAGE_PATH - - # Check for rootfs images on the card - if test "`ls *rootfs.bin | wc -l | tr -d " "`" -gt 1 - then - echo -e "\n\nPlease select a rootfs:\n" - - # Show all available images - x=0 - for file in `ls *rootfs.bin` - do - let x=$x+1 - echo -e "\t\t[$x] $file" - done - - echo "" - - IMAGE_NAME="" - while test -z "$IMAGE_NAME" - do - echo -en "Please choose one of the above: " - if test "$AUTOBOOT" != "yes" - then - read junk < "$OUT_TTY" - else - if test -e /etc/.altboot-loopimage.last - then - junk="`cat /etc/.altboot-loopimage.last`" - test -z "$junk" && read junk < "$OUT_TTY" || echo "$junk (autoboot)" - else - read junk < "$OUT_TTY" - fi - fi - - x=0 - for file in `ls *rootfs.bin` - do - let x=$x+1 - if test "$x" = "$junk" - then - IMAGE_NAME="$file" - echo "$junk" > /etc/.altboot-loopimage.last - fi - done - done - else - IMAGE_NAME="`ls *rootfs.bin`" - test -z "$IMAGE_NAME" && die "No rootfs found (*rootfs.bin) in $1/$IMAGE_PATH" - fi - - - echo "" - - mkdir -p /media/image || die "mkdir -p /media/image failed" - - LOOP_MODULE="$(find /lib/modules/`uname -r`/ -name "loop.ko")" - test -n "$LOOP_MODULE" && ( insmod "$LOOP_MODULE" ; sleep 3 ) - - ! test -e /dev/loop0 && mknod /dev/loop0 b 7 0 - - losetup /dev/loop0 $1/$IMAGE_PATH/$IMAGE_NAME || die "losetup /dev/loop0 $1/$IMAGE_PATH/$IMAGE_NAME failed!" - check_fs /dev/loop0 $IMAGE_TYPE - - echo -e "\n* * * Mounting rootfs image * * *\n" - - # Busybox's "mount" doesn't seem to like "-o loop" for some reason - # It works on collie and b0rks on poodle. - if [ "$IMAGE_TYPE" = "" ]; then - IMAGE_TYPE="auto" - fi - - # If mount fails it has the tendency to spew out a _lot_ of error messages. - # We direct the output to /dev/null so the user can see which step actually failed. - mount /dev/loop0 -t $IMAGE_TYPE /media/image >/dev/null 2>&1 || die "mount -t $IMAGE_TYPE /dev/loop0 /media/image failed!" - - mkdir -p /media/image/media/ROM || die "mkdir -p /media/image/media/ROM failed" - - test "$ENABLE_IMAGECONF" = yes && image_conf /media/image - - do_pivot /media/image "$RL" -} - -#$1=mountpoint of the soon-to-be rootfs, $2=Runlevel -do_pivot(){ - - if test "$USE_KEXEC_ON_NEXT_BOOT" = yes - then - if test -e "$KEXEC_SELECTED_KERNEL.kexec.cfg" - then - CMDLINE="--append=\"`cat $KEXEC_SELECTED_KERNEL.kexec.cfg`\"" - else - CMDLINE="" - echo "WARNING: This kernel has not been configured!" - echo "Trying to boot anyway..." - fi - - echo "$KEXEC_BIN -l $KEXEC_SELECTED_KERNEL $CMDLINE" - $KEXEC_BIN -l $KEXEC_SELECTED_KERNEL $CMDLINE - sync - - read junk - $KEXEC_BIN -e - exit 0 - fi - - - echo -n "Pivoting root..." - if (/sbin/pivot_root "$1" "$1/media/ROM") - then - echo "Success" - - # This is important since we are still cd'ed into the old root - cd / - - ! test -d "$1" && mkdir -p "$1" - - # Move mountpoints from the old rootfs into the new one. - # The *real* mount is kinda touchy feely about that - /bin/busybox mount -o move /media/ROM/proc /proc >/dev/null 2>&1 - - for mpt in ` mount | grep "/media/ROM/" | awk '{print $3}'` - do - new_mpt="`echo "$mpt" | sed -n "s/\/media\/ROM//p"`" - - echo "Moving mountpoint [$mpt] -> [$new_mpt]" >"$OUT_TTY" 2>&1 - - ! test -d "$new_mpt" && mkdir -p "$new_mpt" - /bin/busybox mount -o move "$mpt" "$new_mpt" - done - - clear - boot_new_rootfs_splash - echo "Calling INIT" - - exec /usr/sbin/chroot . $REAL_INIT $2 >"$OUT_TTY" 2>&1 - #exec /usr/sbin/chroot . /sbin/init $2 >/dev/tty0 2>&1 - else - echo "FAILED" - die "* * * pivot_root failed! * * *" - fi - -} - -# $1: Path to mounted rootfs -image_conf(){ - ! test -d "$1" && die "image_conf: [$1] not found / no directory" - - test -e "$1/etc/.image_conf.done" && return - - echo -e "\n\n* * * rootfs configuration * * *\n" - echo -e "This setup lets you reconfigure your new rootfs." - echo "Most probably the rootfs is configured with" - echo "defaults based on a flash installation." - echo "If unsure, go with the defaults by pressing ." - echo "" - - if ( cat $1/etc/fstab | grep -v "^#" | grep -q "/home " ) - then - while true - do - echo "Usually your /home directory is located on another flash partition." - echo -n "Do you want me to move /home inside the loop-image? [N|y] " - read junk - - if test "$junk" = "y" -o "$junk" = "Y" - then - cat $1/etc/fstab | sed "/.*\/home.*/s/\/home/\/home.flash/" > $1/etc/fstab_ - mv $1/etc/fstab_ $1/etc/fstab - - mkdir -p $1/home.flash - break - fi - - test "$junk" = "" -o "$junk" = n -o "$junk" = N && break - done - - fi - - echo "" - - if ( cat $1/etc/ipkg.conf | grep -q ^lists_dir ) - then - while true - do - echo -e "Wasting RAM is never a good idea.\nOnly say Y if your rootfs is very small in size" - echo -en "Do you want to store ipkg package data\nin RAM? [N|y] " - read junk - - if test "$junk" = "" -o "$junk" = n -o "$junk" = N - then - cat $1/etc/ipkg.conf | sed "/^lists_dir.*/s/\(.*\)/#\ \1/"> $1/etc/ipkg.conf_ - mv $1/etc/ipkg.conf_ $1/etc/ipkg.conf - break - fi - - test "$junk" = "y" -o "$junk" = "Y" && break - done - fi - - echo "" - - if ( cat $1/etc/ipkg.conf | grep -q "^dest sd" ) - then - while true - do - echo -en "Do you want to keep the SD, CF and /home\nipkg install targets? [N|y] " - read junk - - if test "$junk" = "" -o "$junk" = n -o "$junk" = N - then - cat $1/etc/ipkg.conf | sed "/^dest\ \(sd\|cf\|home\).*/s/\(.*\)/#\ \1/" > $1/etc/ipkg.conf_ - mv $1/etc/ipkg.conf_ $1/etc/ipkg.conf - break - fi - - test "$junk" = "y" -o "$junk" = "Y" && break - done - fi - - - touch "$1/etc/.image_conf.done" -} - -# This functions configures the master password for altboot if none is set -set_password() { - - test -e /etc/altboot.pwd && . /etc/altboot.pwd - - mount -o remount,rw / - if test -z "$MASTER_PASSWORD" -a "$ENABLE_DEBUG" != yes - then - echo -e "\nAltboot is a boot-manager which allows to boot from SD,\nCF, USB-Storage and NFS" - echo -e "\nFor security reasons altboot requires a password\nto boot into init=/bin/sh." - echo -e "${C_RED}This is *not* your root password!\nIt is used by altboot alone!${C_RESET}\n" - - while true - do - echo -en "\nNew password: " - - stty -echo <"$OUT_TTY" >"$OUT_TTY" 2>&1 - read junk1 < "$OUT_TTY" - stty echo <"$OUT_TTY" >"$OUT_TTY" 2>&1 - - if ! test -z "$junk1" - then - echo -en "\nRepeat: " - - stty -echo <"$OUT_TTY" >"$OUT_TTY" 2>&1 - read junk2 < "$OUT_TTY" - stty echo <"$OUT_TTY" >"$OUT_TTY" 2>&1 - echo "" - - if test "$junk1" = "$junk2" - then - crypt_pw="`echo "$junk1" | md5sum | awk '{print $1}'`" - - if test -e "/etc/altboot.pwd" - then - sed "/^MASTER_PASSWORD/s/\(.*\=\).*/\1\"$crypt_pw\"/" "${ALTBOOT_CFG_FILE}" > ${ALTBOOT_CFG_FILE}_ - mv ${ALTBOOT_CFG_FILE}_ ${ALTBOOT_CFG_FILE} - MASTER_PASSWORD="$crypt_pw" - echo "Password changed." - else - echo "MASTER_PASSWORD=\"$crypt_pw\"" > /etc/altboot.pwd - echo "Password installed" - fi - - break - else - echo -e "Passwords didn't match, try again\n" - fi - fi - done - fi - -} - -# This function asks for altboots master password. It only returns if the correct password was supplied -verify_master_pw() { - - test -e /etc/altboot.pwd && . /etc/altboot.pwd - - if test -n "$MASTER_PASSWORD" -a "$MASTER_PASSWORD" != "[none]" - then - auth_timeout="3" - - echo -e "\nPlease enter your altboot master password" - - cnt=0 - while true - do - let cnt=$cnt+$auth_timeout - echo -n "Password: " - stty -echo <"$OUT_TTY" >"$OUT_TTY" 2>&1 - read junk < "$OUT_TTY" - stty echo <"$OUT_TTY" >"$OUT_TTY" 2>&1 - - if test "`echo "$junk" | md5sum | awk '{print $1}'`" = "$MASTER_PASSWORD" - then - break - else - echo "[`echo "$junk" | md5sum | awk '{print $1}'`]" - echo "[$MASTER_PASSWORD]" - echo "Wrong password, sleeping $cnt seconds..." - sleep $cnt - -# if test "$cnt" -gt 10 -# then -# break -# fi - fi - done - - echo "" - fi -} - - -check_fs() { - if [ "$FSCK_IMAGES" = "yes" ] - then - FSCK="" - if [ "$2" = "" ]; then - FSTYPE="ext2" - else - FSTYPE="$2" - fi - case "$FSTYPE" in - ext2 | ext3) - if [ -e /sbin/fsck.ext3 ]; then - FSCK="/sbin/fsck.ext3" - elif [ -e /sbin/e3fsck ]; then - FSCK="/sbin/e3fsck" - elif [ -e /sbin/fsck.ext2 ]; then - FSCK="/sbin/fsck.ext2" - elif [ -e /sbin/e2fsck ]; then - FSCK="/sbin/e2fsck" - fi - test -n "$FSCK" && FSCK="$FSCK -p" - ;; - vfat) - if [ -e /sbin/dosfsck ]; then - FSCK="/sbi