From 7b297dc027dab0a74b755934e00a697abaf9b6ad Mon Sep 17 00:00:00 2001 From: Rod Whitby Date: Fri, 30 Mar 2007 18:04:53 +0000 Subject: slugos-init: Add support for handing boot control over to altboot. --- packages/slugos-init/files/turnup | 13 ++++++++++++- packages/slugos-init/slugos-init_0.10.bb | 5 ++++- 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/slugos-init/files/turnup b/packages/slugos-init/files/turnup index 556d942e26..119d84f2c8 100644 --- a/packages/slugos-init/files/turnup +++ b/packages/slugos-init/files/turnup @@ -372,6 +372,8 @@ boot_rootfs() { nfs) shift 2;; flash) ;; ram) ;; + altboot) + ;; *) echo "turnup: boot_rootfs($type, $ffs, $device): unknown type" >&2 return 1;; esac @@ -405,6 +407,11 @@ boot_rootfs() { echo "turnup: boot_rootfs: failed to write $ffs/linuxrc.new" >&2 return 1 };; + altboot) + ln -s "boot/altboot" "$ffs"/linuxrc.new || { + echo "turnup: boot_rootfs: failed to create $ffs/linuxrc.new" >&2 + return 1 + };; *) { echo '#!/bin/sh' # echo 'modprobe ehci-hcd' # echo 'modprobe ohci-hcd' @@ -572,7 +579,7 @@ boot_reset() { local ffs typ status case "$1" in - flash|ram)type="$1" + flash|ram|altboot)type="$1" shift;; *) echo "turnup: boot_reset($1): invalid type" >&2 return 1;; @@ -799,6 +806,8 @@ nfs) shift nfs "$@";; flash) boot_reset flash;; ram) boot_reset ram;; +altboot) + boot_reset altboot;; preserve) shift sysconf save "$@";; @@ -841,6 +850,8 @@ usage: turnup command [options] ram Boot (once) into a ramdisk, subsequent boots will be to the flash file system. + altboot + Hand over boot control to the altboot utility. preserve Save the system configuration to the SysConf partition, you will need to create the SysConf partition from the boot loader diff --git a/packages/slugos-init/slugos-init_0.10.bb b/packages/slugos-init/slugos-init_0.10.bb index 56f3c7242a..90ad6f4cee 100644 --- a/packages/slugos-init/slugos-init_0.10.bb +++ b/packages/slugos-init/slugos-init_0.10.bb @@ -4,7 +4,7 @@ PRIORITY = "required" LICENSE = "GPL" DEPENDS = "base-files devio" RDEPENDS = "busybox devio" -PR = "r80" +PR = "r81" SRC_URI = "file://boot/flash \ file://boot/disk \ @@ -102,6 +102,9 @@ do_install() { install -m 0755 boot/$p ${D}/boot done + # Support for altboot + ln -s /sbin/init.altboot ${D}/boot/altboot + # Configuration files install -m 0644 conffiles ${D}${sysconfdir}/default -- cgit v1.2.3