From: Gerry Rozema Date: Fri, 18 Aug 2006 12:37:04 +0000 (+0000) Subject: Updated to properly set up 2.6 with early userspace file system boot X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=2a0adf68529b2ff866164d939b30e0cb18378ef0 Updated to properly set up 2.6 with early userspace file system boot SVN-Revision: 4590 --- diff --git a/utils/lilo/Makefile b/utils/lilo/Makefile index 88f16ab503..90492a7085 100755 --- a/utils/lilo/Makefile +++ b/utils/lilo/Makefile @@ -22,7 +22,7 @@ include $(INCLUDE_DIR)/package.mk define Package/lilo SECTION:=base -CATEGORY:=X86 Boot Images +CATEGORY:=Boot Loaders TITLE:=lilo DESCRIPTION:=lilo URL:=ftp://metalab.unc.edu/pub/Linux/system/boot/lilo/ @@ -44,7 +44,7 @@ define Package/lilo/install $(CP) $(PKG_BUILD_DIR)/lilo.static $(1)/sbin/lilo $(CP) lilo.conf $(1)/etc $(CP) boot.msg $(1)/etc - $(CP) S11Pivot $(1)/etc/init.d + #$(CP) S11Pivot $(1)/etc/init.d endef $(eval $(call BuildPackage,lilo)) diff --git a/utils/lilo/S11Pivot b/utils/lilo/S11Pivot deleted file mode 100755 index 6962b6d9cf..0000000000 --- a/utils/lilo/S11Pivot +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -# Copyright (C) 2006 OpenWrt.org - -#pivot function blatantly stolen from the firstboot stuff in the WRT54 arch files -pivot() { # - mount -o move /proc $1/proc && \ - pivot_root $1 $1$2 && { - mount -o move $2/dev /dev - mount -o move $2/tmp /tmp - mount -o move $2/sys /sys - return 0 - } -} - -#just a little bit of time for the usb to settle down and get plugged in -#technically it probably should be done in hotplug, but, we need to handle -#the case of no key at all, and fall thru to ramdisk when it's selected -sleep 5 - -if [[ "$NOPIVOT" = "1" ]]; then - echo starting from a ramdisk -else - mount /dev/discs/disc0/disc /mnt - mkdir -p /mnt/old - pivot /mnt /old -fi - diff --git a/utils/lilo/bdlilo.conf b/utils/lilo/bdlilo.conf index 2d773caad5..867993e7c7 100755 --- a/utils/lilo/bdlilo.conf +++ b/utils/lilo/bdlilo.conf @@ -14,14 +14,17 @@ prompt delay =1 timeout =100 message =mount/etc/boot.msg -append =" root=/dev/ram0 console=ttyS0,115200n81 " image =mount/vmlinuz label =openwrt - initrd =mount/initrd.gz + append =" rootfs=/dev/disc console=ttyS0,115200n81 " image =mount/vmlinuz label =ramdisk - initrd =mount/initrd.gz - append =" NOPIVOT=1 root=/dev/ram0 console=ttyS0,115200n81" + append =" console=ttyS0,115200n81" + +image =mount/vmlinuz + label =failsafe + append =" FAILSAFE=MenuRequest console=ttyS0,115200n81" + diff --git a/utils/lilo/boot.msg b/utils/lilo/boot.msg index d587e5923c..a7c5119c99 100755 --- a/utils/lilo/boot.msg +++ b/utils/lilo/boot.msg @@ -1,6 +1,7 @@ Boot Options:- -openwrt - OpenWrt with usb stick root -ramdisk - OpenWrt with ram root +openwrt - OpenWrt with usb stick root +ramdisk - OpenWrt with ramdisk root +failsafe - OpenWrt failsafe diff --git a/utils/lilo/lilo.conf b/utils/lilo/lilo.conf index 84e8b7d208..aeadb43cfd 100755 --- a/utils/lilo/lilo.conf +++ b/utils/lilo/lilo.conf @@ -10,15 +10,17 @@ prompt delay =1 timeout =100 message =/etc/boot.msg -append =" root=/dev/ram0 console=ttyS0,115200n81 " image =/vmlinuz label =openwrt - initrd =/initrd.gz + append =" rootfs=/dev/disc console=ttyS0,115200n81 " image =/vmlinuz label =ramdisk - initrd =/initrd.gz - append =" NOPIVOT=1 root=/dev/ram0 console=ttyS0,115200n81" + append =" console=ttyS0,115200n81" + +image =/vmlinuz + label =failsafe + append =" FAILSAFE=MenuRequest console=ttyS0,115200n81" diff --git a/utils/lilo/mkbootable b/utils/lilo/mkbootable index c95242ad0a..378b30502b 100755 --- a/utils/lilo/mkbootable +++ b/utils/lilo/mkbootable @@ -3,12 +3,10 @@ LOOPDEV="/dev/loop1" mkdir mount -cp bin/openwrt-x86-2.4-ext2.img bin/boot.img -gzip -9 < bin/openwrt-x86-2.4-ext2.img > initrd.gz +cp bin/openwrt-x86-2.6-ext2.img bin/boot.img sudo losetup $LOOPDEV bin/boot.img sudo mount $LOOPDEV mount sudo cp build_i386/linux/arch/i386/boot/bzImage mount/vmlinuz -sudo cp initrd.gz mount/initrd.gz sudo mkdir mount/boot sudo build_i386/lilo-22.7.2/lilo -C package/lilo/bdlilo.conf sudo umount mount