Add lilo package for use in making bootable images for x86
[openwrt/svn-archive/archive.git] / utils / lilo / mkbootable
1 #!/bin/sh
2 # Copyright (C) 2006 OpenWrt.org
3 LOOPDEV="/dev/loop1"
4
5 mkdir mount
6 cp bin/openwrt-x86-2.4-ext2.img bin/boot.img
7 gzip -9 < bin/openwrt-x86-2.4-ext2.img > initrd.gz
8 sudo losetup $LOOPDEV bin/boot.img
9 sudo mount $LOOPDEV mount
10 sudo cp build_i386/linux/arch/i386/boot/bzImage mount/vmlinuz
11 sudo cp initrd.gz mount/initrd.gz
12 sudo mkdir mount/boot
13 sudo build_i386/lilo-22.7.2/lilo -C package/lilo/bdlilo.conf
14 sudo umount mount
15 echo releasing $LOOPDEV
16 sudo losetup -d $LOOPDEV
17 rm -r -f mount