From: Nicolas Thill Date: Wed, 4 Oct 2006 17:09:08 +0000 (+0000) Subject: update lilo to latest version (missing source), move files in ./files X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=88dc297deb993d5c5ad9dc8f44b0e75dd66f428e;hp=23523c37e08bc5991e7857bc6c6191aa7e214efa update lilo to latest version (missing source), move files in ./files SVN-Revision: 4907 --- diff --git a/utils/lilo/Makefile b/utils/lilo/Makefile index 90492a7085..77a45b7c29 100644 --- a/utils/lilo/Makefile +++ b/utils/lilo/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lilo -PKG_VERSION:=22.7.2 +PKG_VERSION:=22.7.3 PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) @@ -21,16 +21,16 @@ PKG_CAT:=zcat include $(INCLUDE_DIR)/package.mk define Package/lilo -SECTION:=base -CATEGORY:=Boot Loaders -TITLE:=lilo -DESCRIPTION:=lilo -URL:=ftp://metalab.unc.edu/pub/Linux/system/boot/lilo/ -DEPENDS:=@LINUX_2_6_X86||LINUX_2_4_X86 + SECTION:=base + CATEGORY:=Boot Loaders + DEPENDS:=@LINUX_2_6_X86||LINUX_2_4_X86 + TITLE:=lilo + URL:=ftp://metalab.unc.edu/pub/Linux/system/boot/lilo/ endef - - +define Package/lilo/conffiles +/etc/lilo.conf +endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) alles @@ -38,13 +38,11 @@ define Build/Compile endef define Package/lilo/install - mkdir -p $(1)/sbin - mkdir -p $(1)/etc/init.d - mkdir -p $(1)/boot + install -d -m0755 $(1)/sbin $(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 + install -d -m0755 $(1)/etc + $(CP) ./files/lilo.conf $(1)/etc/ + $(CP) ./files/boot.msg $(1)/etc/ endef $(eval $(call BuildPackage,lilo)) diff --git a/utils/lilo/README b/utils/lilo/README deleted file mode 100755 index 1315e8ba2a..0000000000 --- a/utils/lilo/README +++ /dev/null @@ -1,35 +0,0 @@ -Using this package to create a bootable usb stick for openwrt. - -The status of this package is currently 'it works for me', and it will -require more effort before it's generic across the board. Currently -only tested to be working on x86-2.6 using an initramfs image. -My development environment for this is a via epia with a -serial console (no monitors or keyboards attached). - -To create the images that are bootable, configure your buildroot to include -the lilo package in the image, as well as e2fsprogs. Have it create an -ext2 file system as the target file system. Let it build the works. - -When the build is finished, you will need to run the script 'mkbootable' -located in the lilo package directory, it requires root privileges to -loop mount the fs for installing lilo. When it's done, you have an -8 meg ext2fs root file system ready to run. - -To use the image, dd it directly onto a usb stick. It should go onto -/dev/sda not /dev/sda1, it's assuming the stick is not partitioned. -When you boot the stick, you will get a lilo menu on the serial terminal. -The three options allow you to boot with the stick itself as the root file -system, or, to boot into a ramdisk, and not mount the stick at all. The -stick will likely show up at /dev/disc - -Boot the unit, and select the ramdisk. Once up in the ramdisk, you can -use the e2fstools to expand the image to fill the stick and add a journal -to use it as ext3. - -e2fsck -f /dev/disc -tune2fs -j /dev/disc -resize2fs /dev/disc - -Reboot the box, and, have fun with openwrt on your x86 using the usb -stick to boot and run from. - diff --git a/utils/lilo/bdlilo.conf b/utils/lilo/bdlilo.conf deleted file mode 100755 index cbb26d6c12..0000000000 --- a/utils/lilo/bdlilo.conf +++ /dev/null @@ -1,30 +0,0 @@ -serial=0,115200n8 -boot =/dev/loop1 -disk =/dev/loop1 - bios =0x80 - sectors =63 - heads =255 - cylinders =999 -lba32 -compact -install =mount/boot/boot.b -map =mount/boot/map - -prompt -delay =1 -timeout =100 -message =mount/etc/boot.msg - - -image =mount/vmlinuz - label =openwrt - append =" rootfs=/dev/discs/disc0/disc console=ttyS0,115200n81 " - -image =mount/vmlinuz - label =ramdisk - 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 deleted file mode 100755 index a7c5119c99..0000000000 --- a/utils/lilo/boot.msg +++ /dev/null @@ -1,7 +0,0 @@ - -Boot Options:- - -openwrt - OpenWrt with usb stick root -ramdisk - OpenWrt with ramdisk root -failsafe - OpenWrt failsafe - diff --git a/utils/lilo/files/README b/utils/lilo/files/README new file mode 100644 index 0000000000..1315e8ba2a --- /dev/null +++ b/utils/lilo/files/README @@ -0,0 +1,35 @@ +Using this package to create a bootable usb stick for openwrt. + +The status of this package is currently 'it works for me', and it will +require more effort before it's generic across the board. Currently +only tested to be working on x86-2.6 using an initramfs image. +My development environment for this is a via epia with a +serial console (no monitors or keyboards attached). + +To create the images that are bootable, configure your buildroot to include +the lilo package in the image, as well as e2fsprogs. Have it create an +ext2 file system as the target file system. Let it build the works. + +When the build is finished, you will need to run the script 'mkbootable' +located in the lilo package directory, it requires root privileges to +loop mount the fs for installing lilo. When it's done, you have an +8 meg ext2fs root file system ready to run. + +To use the image, dd it directly onto a usb stick. It should go onto +/dev/sda not /dev/sda1, it's assuming the stick is not partitioned. +When you boot the stick, you will get a lilo menu on the serial terminal. +The three options allow you to boot with the stick itself as the root file +system, or, to boot into a ramdisk, and not mount the stick at all. The +stick will likely show up at /dev/disc + +Boot the unit, and select the ramdisk. Once up in the ramdisk, you can +use the e2fstools to expand the image to fill the stick and add a journal +to use it as ext3. + +e2fsck -f /dev/disc +tune2fs -j /dev/disc +resize2fs /dev/disc + +Reboot the box, and, have fun with openwrt on your x86 using the usb +stick to boot and run from. + diff --git a/utils/lilo/files/bdlilo.conf b/utils/lilo/files/bdlilo.conf new file mode 100644 index 0000000000..cbb26d6c12 --- /dev/null +++ b/utils/lilo/files/bdlilo.conf @@ -0,0 +1,30 @@ +serial=0,115200n8 +boot =/dev/loop1 +disk =/dev/loop1 + bios =0x80 + sectors =63 + heads =255 + cylinders =999 +lba32 +compact +install =mount/boot/boot.b +map =mount/boot/map + +prompt +delay =1 +timeout =100 +message =mount/etc/boot.msg + + +image =mount/vmlinuz + label =openwrt + append =" rootfs=/dev/discs/disc0/disc console=ttyS0,115200n81 " + +image =mount/vmlinuz + label =ramdisk + append =" console=ttyS0,115200n81" + +image =mount/vmlinuz + label =failsafe + append =" FAILSAFE=MenuRequest console=ttyS0,115200n81" + diff --git a/utils/lilo/files/boot.msg b/utils/lilo/files/boot.msg new file mode 100644 index 0000000000..a7c5119c99 --- /dev/null +++ b/utils/lilo/files/boot.msg @@ -0,0 +1,7 @@ + +Boot Options:- + +openwrt - OpenWrt with usb stick root +ramdisk - OpenWrt with ramdisk root +failsafe - OpenWrt failsafe + diff --git a/utils/lilo/files/lilo.conf b/utils/lilo/files/lilo.conf new file mode 100644 index 0000000000..d4a769e1b4 --- /dev/null +++ b/utils/lilo/files/lilo.conf @@ -0,0 +1,26 @@ +serial=0,115200n8 +disk=/dev/discs/disc0/disc +bios=0x80 +lba32 +compact +install =/boot/boot.b +map =/boot/map +backup =/dev/null +prompt +delay =1 +timeout =100 +message =/etc/boot.msg + +image =/vmlinuz + label =openwrt + append =" rootfs=/dev/discs/disc0/disc console=ttyS0,115200n81 " + +image =/vmlinuz + label =ramdisk + append =" console=ttyS0,115200n81" + +image =/vmlinuz + label =failsafe + append =" FAILSAFE=MenuRequest console=ttyS0,115200n81" + + diff --git a/utils/lilo/files/mkbootable b/utils/lilo/files/mkbootable new file mode 100755 index 0000000000..378b30502b --- /dev/null +++ b/utils/lilo/files/mkbootable @@ -0,0 +1,15 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org +LOOPDEV="/dev/loop1" + +mkdir mount +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 mkdir mount/boot +sudo build_i386/lilo-22.7.2/lilo -C package/lilo/bdlilo.conf +sudo umount mount +echo releasing $LOOPDEV +sudo losetup -d $LOOPDEV +rm -r -f mount diff --git a/utils/lilo/lilo.conf b/utils/lilo/lilo.conf deleted file mode 100755 index d4a769e1b4..0000000000 --- a/utils/lilo/lilo.conf +++ /dev/null @@ -1,26 +0,0 @@ -serial=0,115200n8 -disk=/dev/discs/disc0/disc -bios=0x80 -lba32 -compact -install =/boot/boot.b -map =/boot/map -backup =/dev/null -prompt -delay =1 -timeout =100 -message =/etc/boot.msg - -image =/vmlinuz - label =openwrt - append =" rootfs=/dev/discs/disc0/disc console=ttyS0,115200n81 " - -image =/vmlinuz - label =ramdisk - append =" console=ttyS0,115200n81" - -image =/vmlinuz - label =failsafe - append =" FAILSAFE=MenuRequest console=ttyS0,115200n81" - - diff --git a/utils/lilo/mkbootable b/utils/lilo/mkbootable deleted file mode 100755 index 378b30502b..0000000000 --- a/utils/lilo/mkbootable +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -# Copyright (C) 2006 OpenWrt.org -LOOPDEV="/dev/loop1" - -mkdir mount -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 mkdir mount/boot -sudo build_i386/lilo-22.7.2/lilo -C package/lilo/bdlilo.conf -sudo umount mount -echo releasing $LOOPDEV -sudo losetup -d $LOOPDEV -rm -r -f mount