From b56891b0723ac2ce099c937a6d20a51b8d1a0c69 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Tue, 11 Apr 2006 15:27:13 +0000 Subject: [PATCH] Clifford Wolf: Downgraded grub to good old grub-0.97 [2006041117050726972] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@7518 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/x86/grub/gcc40.patch | 55 ++++++++++++++++++++++++++++++ package/x86/grub/grub.conf | 10 +++++- package/x86/grub/grub.desc | 4 +-- package/x86/grub/stone_mod_grub.sh | 28 ++++++--------- 4 files changed, 77 insertions(+), 20 deletions(-) create mode 100644 package/x86/grub/gcc40.patch diff --git a/package/x86/grub/gcc40.patch b/package/x86/grub/gcc40.patch new file mode 100644 index 000000000..aabc07800 --- /dev/null +++ b/package/x86/grub/gcc40.patch @@ -0,0 +1,55 @@ +diff -dur grub-0.97/netboot/main.c src.grub.1130286324.30284.3996273791/grub-0.97/netboot/main.c +--- grub-0.97/netboot/main.c 2004-05-21 00:19:33.000000000 +0200 ++++ src.grub.1130286324.30284.3996273791/grub-0.97/netboot/main.c 2005-10-26 02:37:58.000000000 +0200 +@@ -54,9 +54,9 @@ + + static int vendorext_isvalid; + static unsigned long netmask; +-static struct bootpd_t bootp_data; ++struct bootpd_t bootp_data; + static unsigned long xid; +-static unsigned char *end_of_rfc1533 = NULL; ++unsigned char *end_of_rfc1533 = NULL; + + #ifndef NO_DHCP_SUPPORT + #endif /* NO_DHCP_SUPPORT */ +--- grub-0.97/netboot/natsemi.c 2003-07-09 13:45:38.000000000 +0200 ++++ src.grub.1130288662.25040.1734126933/grub-0.97/netboot/natsemi.c 2005-10-26 03:18:03.000000000 +0200 +@@ -608,7 +608,7 @@ + const char *p) /* Packet */ + { + u32 status, to, nstype; +- u32 tx_status; ++ volatile u32 tx_status; + + /* Stop the transmitter */ + outl(TxOff, ioaddr + ChipCmd); +@@ -647,7 +647,7 @@ + + to = currticks() + TX_TIMEOUT; + +- while ((((volatile u32) tx_status=txd.cmdsts) & OWN) && (currticks() < to)) ++ while (((tx_status=txd.cmdsts) & OWN) && (currticks() < to)) + /* wait */ ; + + if (currticks() >= to) { +--- grub-0.97/netboot/sis900.c~ 2003-07-09 13:45:38.000000000 +0200 ++++ grub-0.97/netboot/sis900.c 2005-10-26 03:30:39.000000000 +0200 +@@ -901,7 +901,7 @@ + const char *p) /* Packet */ + { + u32 status, to, nstype; +- u32 tx_status; ++ volatile u32 tx_status; + + /* Stop the transmitter */ + outl(TxDIS, ioaddr + cr); +@@ -940,7 +940,7 @@ + + to = currticks() + TX_TIMEOUT; + +- while ((((volatile u32) tx_status=txd.cmdsts) & OWN) && (currticks() < to)) ++ while (((tx_status=txd.cmdsts) & OWN) && (currticks() < to)) + /* wait */ ; + + if (currticks() >= to) { diff --git a/package/x86/grub/grub.conf b/package/x86/grub/grub.conf index bc304932b..af3cb9595 100644 --- a/package/x86/grub/grub.conf +++ b/package/x86/grub/grub.conf @@ -23,10 +23,18 @@ grub_postmake() { mkdir -p $root/boot/grub - cp -v $datadir/grub/i386-pc/* $root/boot/grub/ + trg=${arch_target/-linux-gnu} + trg=i386-${trg/i*-/} + + cp -v $libdir/grub/$trg/* $root/boot/grub/ cp $confdir/stone_mod_grub.sh $root/etc/stone.d/mod_grub.sh echo '$STONE grub grub_setup' > $root/etc/stone.d/setup_grub.sh + if [ ! -f $root/boot/grub/menu.lst ] ; then + cp docs/menu.lst $root/boot/grub/ + fi + cp docs/menu.lst $root/boot/grub/menu.lst.example + counter=1 confopt="$confopt --enable-diskless" { echo diff --git a/package/x86/grub/grub.desc b/package/x86/grub/grub.desc index 6a0ca2b8a..d9f577d1c 100644 --- a/package/x86/grub/grub.desc +++ b/package/x86/grub/grub.desc @@ -46,8 +46,8 @@ [L] GPL [S] Stable -[V] 1.93 +[V] 0.97 [P] X -?---5---9 203.900 -[D] 928182752 grub-1.93.tar.gz ftp://alpha.gnu.org/gnu/grub/ +[D] 3065767847 grub-0.97.tar.gz ftp://alpha.gnu.org/gnu/grub/ diff --git a/package/x86/grub/stone_mod_grub.sh b/package/x86/grub/stone_mod_grub.sh index 952033fe6..a8ac932d8 100644 --- a/package/x86/grub/stone_mod_grub.sh +++ b/package/x86/grub/stone_mod_grub.sh @@ -24,9 +24,8 @@ create_device_map() { gui_cmd '(Re-)Create GRUB Device Map' "$( cat << "EOT" -( set -x -rm -f /boot/grub/device.map -grub-mkdevicemap --no-floppy; ) +rm -vf /boot/grub/device.map +echo quit | grub --batch --device-map=/boot/grub/device.map EOT )" } @@ -92,35 +91,30 @@ convert_device () { } create_boot_menu() { - cat << EOT > /boot/grub/grub.cfg + cat << EOT > /boot/grub/menu.lst timeout 8 default 0 fallback 1 title ROCK Linux -linux $bootdrive$bootpath/vmlinuz root=/dev/ram0 ro +kernel $bootdrive$bootpath/vmlinuz root=/dev/ram0 ro initrd $bootdrive$bootpath/initrd.img EOT if [ -f /boot/memtest86.bin ] ; then - cat << EOT >> /boot/grub/grub.cfg + cat << EOT >> /boot/grub/menu.lst title MemTest86 (SGI memory tester) -linux $bootdrive$bootpath/memtest86.bin +kernel $bootdrive$bootpath/memtest86.bin EOT fi - gui_message "This is the new /boot/grub/grub.cfg file: + gui_message "This is the new /boot/grub/menu.lst file: -$( cat /boot/grub/grub.cfg )" +$( cat /boot/grub/menu.lst )" } grub_install() { - gui_cmd 'Installing GRUB' "$( cat << "EOT" -( set -x -grub-mkimage -o /boot/grub/core.img _chain pc ext2 -grub-setup -r $bootdrive '(hd0)'; ) -EOT - )" + gui_cmd 'Installing GRUB' "echo -e 'root $bootdrive\\nsetup (hd0)\\nquit' | grub --batch --device-map=/boot/grub/device.map" } grub_init() { @@ -191,8 +185,8 @@ main() { '' '' \ "Edit /boot/grub/device.map (Device Map)" \ "gui_edit 'GRUB Device Map' /boot/grub/device.map" \ - "Edit /boot/grub/grub.cfg (Boot Menu)" \ - "gui_edit 'GRUB Boot Menu' /boot/grub/grub.cfg" + "Edit /boot/grub/menu.lst (Boot Menu)" \ + "gui_edit 'GRUB Boot Menu' /boot/grub/menu.lst" do : ; done }