From 311126663391137547e9cffafc8e29ba2667c00e Mon Sep 17 00:00:00 2001 From: root Date: Sun, 9 May 2010 08:40:56 +0200 Subject: trying to upgrade to grub 2, currently broken --- Makefile | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 585d29c..e8568ab 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ help: .PHONY: help run all step1 step2 step3 step4 step5 mount-disk umount-disk mount-root umount-root # software versions -GRUB_VERSION=0.97 +GRUB_VERSION=1.97.2 KERNEL_VERSION=2.6.33.3 UCLIBC_VERSION=0.9.31 BUSYBOX_VERSION=1.16.1 @@ -113,9 +113,8 @@ grub: mkdir grub-build && cd grub-build && ../grub-$(GRUB_VERSION)/configure --prefix=`pwd` cd grub-build && make $(PARALLEL) cd grub-build && make install - cp grub-build/lib/grub/i386-pc/stage1 target/boot/grub - cp grub-build/lib/grub/i386-pc/stage2 target/boot/grub - cp menu.lst target/boot/grub + cp grub-build/boot.img target/boot/grub/ + cp grub.cfg target/boot/grub grub-loader: -umount target @@ -124,12 +123,20 @@ grub-loader: -/sbin/losetup -d /dev/loop0 -/sbin/losetup -d /dev/loop1 /sbin/losetup -o 512 /dev/loop1 minilinux.img - ln -s /dev/loop1 /dev/loop01 + mount /dev/loop1 target + ln -s /dev/loop1 /dev/loop0p1 /sbin/losetup /dev/loop0 minilinux.img - grub-build/sbin/grub --batch --no-floppy --device-map=devices.map < grub.install + grub-build/bin/grub-mkimage -o core.img -v + cp core.img /boot/grub + cp core.img target/boot/grub + grub-build/sbin/grub-setup -v \ + -b ../../`pwd`/grub-build/boot.img \ + -r '(hd0,1)' -m devices.map '(hd0)' --force + umount target /sbin/losetup -d /dev/loop0 /sbin/losetup -d /dev/loop1 - rm /dev/loop01 + rm -f /dev/loop0p1 + rm -f /boot/grub/core.img /sbin/losetup -o 512 /dev/loop0 minilinux.img mount /dev/loop0 target -- cgit v1.2.3-54-g00ecf