From 8a206670fe823a6bf7d59df2dc46110cf9334d29 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Wed, 6 Feb 2008 12:24:05 -0300 Subject: [PATCH] Moved Moved architecture/x86/boot/lilo-* to package/x86/lilo/boot/ --- x86/lilo/boot/lilo-conf-144 | 30 ++++++++++ x86/lilo/boot/lilo-conf-1x2 | 29 ++++++++++ x86/lilo/boot/lilo-conf-288 | 29 ++++++++++ x86/lilo/boot/lilo-help.txt | 5 ++ x86/lilo/boot/makeimages.sh | 106 ++++++++++++++++++++++++++++++++++++ 5 files changed, 199 insertions(+) create mode 100644 x86/lilo/boot/lilo-conf-144 create mode 100644 x86/lilo/boot/lilo-conf-1x2 create mode 100644 x86/lilo/boot/lilo-conf-288 create mode 100644 x86/lilo/boot/lilo-help.txt create mode 100644 x86/lilo/boot/makeimages.sh diff --git a/x86/lilo/boot/lilo-conf-144 b/x86/lilo/boot/lilo-conf-144 new file mode 100644 index 000000000..d25e8e9d4 --- /dev/null +++ b/x86/lilo/boot/lilo-conf-144 @@ -0,0 +1,30 @@ +disk=/dev/floppy/0 + bios = 0x00 + sectors = 18 + heads = 2 + cylinders = 80 + +nowarn +boot=/dev/floppy/0 +install=/mnt/boot.b +map=/mnt/map +vga=normal +message=/mnt/lilo-help.txt +geometric +compact +prompt + +image=/mnt/vmlinuz + read-write + append="root=/dev/fd devfs=nomount \ + load_ramdisk=1 prompt_ramdisk=1 \ + ramdisk_size=4096 init=/linuxrc" + label=ramdisk + +image=/mnt/vmlinuz + label=linux + +image=/mnt/memtest.bin + label=memtest + optional + diff --git a/x86/lilo/boot/lilo-conf-1x2 b/x86/lilo/boot/lilo-conf-1x2 new file mode 100644 index 000000000..dda325089 --- /dev/null +++ b/x86/lilo/boot/lilo-conf-1x2 @@ -0,0 +1,29 @@ +disk=/dev/floppy/0 + bios = 0x00 + sectors = 18 + heads = 2 + cylinders = 80 + +nowarn +boot=/dev/floppy/0 +install=/mnt/boot.b +map=/mnt/map +vga=normal +message=/mnt/lilo-help.txt +geometric +compact +prompt + +image=/mnt/vmlinuz + read-write + append="root=/dev/ram devfs=nomount init=/linuxrc" + initrd=/mnt/initrd.gz + label=ramdisk + +image=/mnt/vmlinuz + label=linux + +image=/mnt/memtest.bin + label=memtest + optional + diff --git a/x86/lilo/boot/lilo-conf-288 b/x86/lilo/boot/lilo-conf-288 new file mode 100644 index 000000000..22692f1ca --- /dev/null +++ b/x86/lilo/boot/lilo-conf-288 @@ -0,0 +1,29 @@ +disk=/dev/floppy/0 + bios = 0x00 + sectors = 36 + heads = 2 + cylinders = 80 + +nowarn +boot=/dev/floppy/0 +install=/mnt/boot.b +map=/mnt/map +vga=normal +message=/mnt/lilo-help.txt +geometric +compact +prompt + +image=/mnt/vmlinuz + read-write + append="root=/dev/ram devfs=nomount init=/linuxrc" + initrd=/mnt/initrd.gz + label=ramdisk + +image=/mnt/vmlinuz + label=linux + +image=/mnt/memtest.bin + label=memtest + optional + diff --git a/x86/lilo/boot/lilo-help.txt b/x86/lilo/boot/lilo-help.txt new file mode 100644 index 000000000..65d71be07 --- /dev/null +++ b/x86/lilo/boot/lilo-help.txt @@ -0,0 +1,5 @@ + +This is the T2-SDE install system (for Linux). +If you don't know what to do now just +press enter and start reading the documentation. + diff --git a/x86/lilo/boot/makeimages.sh b/x86/lilo/boot/makeimages.sh new file mode 100644 index 000000000..5963cadb0 --- /dev/null +++ b/x86/lilo/boot/makeimages.sh @@ -0,0 +1,106 @@ +#!/bin/sh +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../lilo/boot/makeimages.sh +# Copyright (C) 2008 The OpenSDE Project +# Copyright (C) 2004 - 2006 The T2 SDE Project +# +# More information can be found in the files COPYING and README. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. A copy of the +# GNU General Public License can be found in the file COPYING. +# --- SDE-COPYRIGHT-NOTE-END --- + +if [ "$1" = -reroot ] ; then + echo "Old PATH: $PATH" + PATH="../../sbin:../../bin:../../../sbin:../usr/bin:$PATH" + echo "New PATH: $PATH" + echo "Old LD_LIBRARY_PATH: $LD_LIBRARY_PATH" + export LD_LIBRARY_PATH="../../lib:../../usr/lib:$LD_LIBRARY_PATH" + LD_LIBRARY_PATH=${LD_LIBRARY_PATH%:} + echo "New LD_LIBRARY_PATH: $LD_LIBRARY_PATH" + shift +fi + +if [ "$1" = -combo ] ; then + combo=1 +elif [ "$#" != 0 ] ; then + echo "usage: $0 [-reroot] [-combo]" + exit 1 +fi + +tmpfile=`mktemp -p $PWD` +tmpdir=$tmpfile.dir +mkdir $tmpdir || exit 1 +rc=0 + +tmpdev= +for x in /dev/loop/* ; do + if losetup $x $tmpfile 2> /dev/null ; then + tmpdev=$x ; break + fi +done +if [ -z "$tmpdev" ] ; then + echo "No free loopback device found!" + rm -f $tmpfile ; rmdir $tmpdir + exit 1 +fi +echo "Using $tmpdev." + +for image in initrd boot_144 boot_288 +do + case ${image} in + initrd) + echo "Creating ${image}.gz ..." + size=4096 ;; + boot_144) + echo "Creating ${image}.img ..." + size=1440 ;; + boot_288) + echo "Creating ${image}.img ..." + size=2880 ;; + esac + + dd if=/dev/zero of=$tmpfile bs=1024 count=$size &> /dev/null + losetup -d $tmpdev ; losetup $tmpdev $tmpfile || rc=1 + mke2fs -q $tmpdev &> /dev/null ; mount $tmpdev $tmpdir || rc=1 + + case ${image} in + initrd) + cp -a initrd/* $tmpdir || rc=1 + ;; + + boot_144|boot_288) + cp -a boot/{vmlinuz,lilo-help.txt} $tmpdir || rc=1 + if [ -f /boot/boot-text.b ]; then + cp /boot/boot-text.b $tmpdir/boot.b || rc=1 + fi + liloconf=lilo-conf-${image#boot_} + if [ $image = boot_288 -o "$combo" = 1 ] ; then + cp initrd.gz $tmpdir || rc=1 + [ $image = boot_144 ] && liloconf=lilo-conf-1x2 + fi + sed -e "s,/mnt/,$tmpdir/,g" \ + -e "s,/dev/floppy/0,$tmpdev,;" \ + < boot/$liloconf > $tmpdir/lilo.conf || rc=1 + lilo -C $tmpdir/lilo.conf > /dev/null || rc=1 + ;; + esac + + umount $tmpdir + + case ${image} in + initrd) gzip -9 < $tmpfile > $image.gz || rc=1 ;; + *) cp $tmpfile $image.img || rc=1 ;; + esac +done + +losetup -d $tmpdev +rm -f $tmpfile +rmdir $tmpdir + +exit $rc +