From e64ba29a7fa3fd756b056ad6295cb1c0fc1d3da5 Mon Sep 17 00:00:00 2001 From: groz Date: Fri, 18 Aug 2006 12:37:04 +0000 Subject: [PATCH] Updated to properly set up 2.6 with early userspace file system boot git-svn-id: svn://svn.openwrt.org/openwrt/packages@4590 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- utils/lilo/Makefile | 4 ++-- utils/lilo/S11Pivot | 27 --------------------------- utils/lilo/bdlilo.conf | 11 +++++++---- utils/lilo/boot.msg | 5 +++-- utils/lilo/lilo.conf | 10 ++++++---- utils/lilo/mkbootable | 4 +--- 6 files changed, 19 insertions(+), 42 deletions(-) delete mode 100755 utils/lilo/S11Pivot diff --git a/utils/lilo/Makefile b/utils/lilo/Makefile index 88f16ab50..90492a708 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 6962b6d9c..000000000 --- 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 2d773caad..867993e7c 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 d587e5923..a7c5119c9 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 84e8b7d20..aeadb43cf 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 c95242ad0..378b30502 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