summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2010-06-14 21:41:12 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2010-06-14 21:41:12 +0200
commit22b80a23fcee4c7a1b88f2fd5cf017d96c515b92 (patch)
tree1785a4099a6c2b3b2e981307cc734562f42e1818 /boot
parentf4b7efe504a028035dd121e38caff2c781183ef9 (diff)
parentfa2a311b7756fc458ae55b5aa90ac865cef6c498 (diff)
Merge branch 'bootloaders-cleanup' of git://git.busybox.net/~tpetazzoni/git/buildroot
Diffstat (limited to 'boot')
-rw-r--r--boot/Config.in12
-rw-r--r--boot/at91bootstrap/Config.in91
-rw-r--r--boot/at91bootstrap/at91bootstrap.mk89
-rw-r--r--boot/at91dataflashboot/Config.in25
-rw-r--r--boot/at91dataflashboot/at91dataflashboot-1.05-do-not-install.patch22
-rw-r--r--boot/at91dataflashboot/at91dataflashboot-1.05-eabi-fixes.patch43
-rw-r--r--boot/at91dataflashboot/at91dataflashboot.mk45
-rw-r--r--boot/barebox/Config.in14
-rw-r--r--boot/barebox/barebox.mk61
-rw-r--r--boot/common.mk1
-rw-r--r--boot/grub/Config.in146
-rw-r--r--boot/grub/grub.100-autoreconf.patch1407
-rw-r--r--boot/grub/grub.200-fix_mbr_handling.patch11
-rw-r--r--boot/grub/grub.300-honor_UCLIBC_HAS_LFS.patch34
-rw-r--r--boot/grub/grub.400-nic_update2.patch.bz2bin0 -> 328903 bytes
-rw-r--r--boot/grub/grub.mk118
-rw-r--r--boot/grub/menu.lst7
-rw-r--r--boot/grub/splash.xpm.gzbin0 -> 45185 bytes
-rw-r--r--boot/grub2/Config.in9
-rw-r--r--boot/grub2/grub2.mk93
-rw-r--r--boot/syslinux/Config.in12
-rw-r--r--boot/syslinux/syslinux-3.85-makefile.patch17
-rw-r--r--boot/syslinux/syslinux.mk54
-rw-r--r--boot/u-boot/Config.in112
-rw-r--r--boot/u-boot/u-boot.mk193
25 files changed, 2616 insertions, 0 deletions
diff --git a/boot/Config.in b/boot/Config.in
new file mode 100644
index 000000000..6bcc98af5
--- /dev/null
+++ b/boot/Config.in
@@ -0,0 +1,12 @@
+menu "Bootloaders"
+
+source "boot/barebox/Config.in"
+source "boot/grub/Config.in"
+source "boot/grub2/Config.in"
+source "boot/syslinux/Config.in"
+source "boot/u-boot/Config.in"
+source "boot/at91bootstrap/Config.in"
+source "boot/at91dataflashboot/Config.in"
+
+endmenu
+
diff --git a/boot/at91bootstrap/Config.in b/boot/at91bootstrap/Config.in
new file mode 100644
index 000000000..1bf8d50d2
--- /dev/null
+++ b/boot/at91bootstrap/Config.in
@@ -0,0 +1,91 @@
+menuconfig BR2_TARGET_AT91BOOTSTRAP
+ depends on BR2_arm
+ bool "AT91 Bootstrap"
+
+if BR2_TARGET_AT91BOOTSTRAP
+
+config BR2_TARGET_AT91BOOTSTRAP_BOARD
+ string "Bootstrap board"
+ default ""
+ help
+ This is used to do a make <board>_config
+
+choice
+ prompt "Boot Memory"
+ default BR2_TARGET_AT91BOOT_DATAFLASHCARD
+ help
+ Select Chip for which AT91 bootstrap should be built
+
+config BR2_TARGET_AT91BOOT_DATAFLASH
+ bool "AT45 Dataflash"
+
+config BR2_TARGET_AT91BOOT_DATAFLASHCARD
+ bool "AT45 Dataflash Card"
+
+config BR2_TARGET_AT91BOOT_NANDFLASH
+ bool "NAND Flash"
+
+config BR2_TARGET_AT91BOOT_FLASH
+ bool "Internal Flash or external parallel flash"
+
+config BR2_TARGET_AT91BOOT_SDCARD
+ bool "SD-Card"
+
+config BR2_TARGET_AT91BOOT_EEPROM
+ bool "EEPROM"
+
+endchoice
+
+config BR2_TARGET_AT91BOOTSTRAP_MEMORY
+ string
+ default "dataflash" if BR2_TARGET_AT91BOOT_DATAFLASH
+ default "dataflashcard" if BR2_TARGET_AT91BOOT_DATAFLASHCARD
+ default "nandflash" if BR2_TARGET_AT91BOOT_NANDFLASH
+ default "flash" if BR2_TARGET_AT91BOOT_FLASH
+ default "sdcard" if BR2_TARGET_AT91BOOT_SDCARD
+ default "eeprom" if BR2_TARGET_AT91BOOT_EEPROM
+
+config BR2_AT91BOOTSTRAP_IMG_SIZE
+ string "Image Size to copy to SDRAM"
+ default "0x32000" if BR2_TARGET_AT91BOOT_DATAFLASH
+ default "0x32000" if BR2_TARGET_AT91BOOT_DATAFLASHCARD
+ default "0x30000" if BR2_TARGET_AT91BOOT_NANDFLASH
+ default "0x100000" if BR2_TARGET_AT91BOOT_FLASH
+ default "0x30000" if BR2_TARGET_AT91BOOT_SDCARD
+ default "0x30000" if BR2_TARGET_AT91BOOT_EEPROM
+ help
+ Select the size of your application
+ AT91 Bootstrap will copy this amount from flash to SDRAM
+
+choice
+ prompt "Start address of application"
+ default BR2_AT91BOOTSTRAP_JUMP_TO_DEFAULT
+ help
+ Location of the application start address
+
+config BR2_AT91BOOTSTRAP_JUMP_TO_DEFAULT
+ bool "Copy to the default U-Boot start location in the SDRAM"
+ help
+ This is where you copy the U-Boot boot loader
+
+config BR2_AT91BOOTSTRAP_JUMP_TO_HIGH_SDRAM
+ bool "Copy to the last Megabyte of the SDRAM"
+ help
+ This is where you copy a boot loader
+
+config BR2_AT91BOOTSTRAP_JUMP_TO_START_OF_SDRAM
+ bool "Copy to the start of the SDRAM"
+ help
+ This is where you copy a standalone application
+endchoice
+
+config BR2_AT91BOOTSTRAP_JUMP_ADDR
+ string
+ default "0x23F00000" if BR2_AT91BOOTSTRAP_JUMP_TO_DEFAULT
+ default "0x23F00000" if BR2_AT91BOOTSTRAP_JUMP_TO_HIGH_SDRAM
+ default "0x20000000" if BR2_AT91BOOTSTRAP_JUMP_TO_START_OF_SDRAM
+
+endif
+
+
+
diff --git a/boot/at91bootstrap/at91bootstrap.mk b/boot/at91bootstrap/at91bootstrap.mk
new file mode 100644
index 000000000..903069653
--- /dev/null
+++ b/boot/at91bootstrap/at91bootstrap.mk
@@ -0,0 +1,89 @@
+#############################################################
+#
+# at91bootstrap
+#
+#############################################################
+AT91BOOTSTRAP_VERSION:=2.13
+AT91BOOTSTRAP_NAME:=at91bootstrap-$(AT91BOOTSTRAP_VERSION)
+AT91BOOTSTRAP_SITE:=ftp://www.at91.com/pub/buildroot/
+AT91BOOTSTRAP_SOURCE:=$(AT91BOOTSTRAP_NAME).tar.bz2
+AT91BOOTSTRAP_DIR:=$(BUILD_DIR)/$(AT91BOOTSTRAP_NAME)
+AT91BOOTSTRAP:=$(call qstrip,$(BR2_AT91BOOTSTRAP))
+AT91BOOTSTRAP_ZCAT:=$(BZCAT)
+
+AT91BOOTSTRAP_BOARD:=$(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_BOARD))
+AT91BOOTSTRAP_MEMORY:=$(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_MEMORY))
+AT91BOOTSTRAP_BINARY:=$(AT91BOOTSTRAP_BOARD)-$(AT91BOOTSTRAP_MEMORY)boot.bin
+AT91BOOTSTRAP_TARGET:=$(AT91BOOTSTRAP_DIR)/binaries/$(AT91BOOTSTRAP_BINARY)
+AT91BOOTSTRAP_JUMP_ADDR:=$(call qstrip,$(BR2_AT91BOOTSTRAP_JUMP_ADDR))
+AT91BOOTSTRAP_IMG_SIZE:=$(call qstrip,$(BR2_AT91BOOTSTRAP_IMG_SIZE))
+
+AT91_CUSTOM_FLAGS:=
+ifneq ($(AT91BOOTSTRAP_JUMP_ADDR),)
+AT91_CUSTOM_FLAGS+=-DJUMP_ADDR=$(AT91BOOTSTRAP_JUMP_ADDR)
+endif
+ifneq ($(AT91BOOTSTRAP_IMG_SIZE),)
+AT91_CUSTOM_FLAGS+=-DIMG_SIZE=$(AT91BOOTSTRAP_IMG_SIZE)
+endif
+
+$(DL_DIR)/$(AT91BOOTSTRAP_SOURCE):
+ $(call DOWNLOAD,$(AT91BOOTSTRAP_SITE),$(AT91BOOTSTRAP_SOURCE))
+
+$(AT91BOOTSTRAP_DIR)/.unpacked: $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE)
+ mkdir -p $(BUILD_DIR)
+ $(AT91BOOTSTRAP_ZCAT) $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ toolchain/patch-kernel.sh $(AT91BOOTSTRAP_DIR) boot/at91bootstrap/ at91bootstrap-$(AT91BOOTSTRAP_VERSION)\*.patch
+ touch $(AT91BOOTSTRAP_DIR)/.unpacked
+
+$(AT91BOOTSTRAP_DIR)/.configured: $(AT91BOOTSTRAP_DIR)/.unpacked .config
+ $(MAKE) \
+ MEMORY=$(AT91BOOTSTRAP_MEMORY) \
+ CROSS_COMPILE=$(TARGET_CROSS) \
+ -C $(AT91BOOTSTRAP_DIR) \
+ $(AT91BOOTSTRAP_BOARD)_defconfig
+ touch $(AT91BOOTSTRAP_DIR)/.configured
+
+$(AT91BOOTSTRAP_TARGET): $(AT91BOOTSTRAP_DIR)/.configured
+ $(MAKE) \
+ MEMORY=$(AT91BOOTSTRAP_MEMORY) \
+ CROSS_COMPILE=$(TARGET_CROSS) \
+ AT91_CUSTOM_FLAGS="$(AT91_CUSTOM_FLAGS)" \
+ -C $(AT91BOOTSTRAP_DIR)
+
+$(AT91BOOTSTRAP_DIR)/.installed:: $(AT91BOOTSTRAP_TARGET)
+ mkdir -p $(BINARIES_DIR)
+ make MEMORY=$(AT91BOOTSTRAP_MEMORY) \
+ CROSS_COMPILE=$(TARGET_CROSS) \
+ DESTDIR=$(BINARIES_DIR) \
+ -C $(AT91BOOTSTRAP_DIR) install
+ touch $@
+
+.PHONY: at91bootstrap at91bootstrap-source
+
+at91bootstrap: $(AT91BOOTSTRAP_DIR)/.installed
+
+at91bootstrap-source: $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE)
+
+at91bootstrap-unpacked: $(AT91BOOTSTRAP_DIR)/.unpacked
+
+.PHONY: at91bootstrap-clean at91bootstrap-dirclean
+
+at91bootstrap-clean:
+ make -C $(AT91BOOTSTRAP_DIR) clean
+
+at91bootstrap-dirclean:
+ rm -rf $(AT91BOOTSTRAP_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(BR2_TARGET_AT91BOOTSTRAP),y)
+TARGETS+=at91bootstrap
+
+# we NEED a board name
+ifeq ($(AT91BOOTSTRAP_BOARD),)
+$(error No AT91Bootstrap board name set. Check your BR2_TARGET_AT91BOOTSTRAP_BOARD setting)
+endif
+endif
diff --git a/boot/at91dataflashboot/Config.in b/boot/at91dataflashboot/Config.in
new file mode 100644
index 000000000..25b9723c8
--- /dev/null
+++ b/boot/at91dataflashboot/Config.in
@@ -0,0 +1,25 @@
+menuconfig BR2_TARGET_DATAFLASHBOOT
+ depends on BR2_arm
+ bool "AT91 DataFlashBoot"
+
+if BR2_TARGET_DATAFLASHBOOT
+
+choice
+ prompt "Target Architecture"
+ default BR2_TARGET_DATAFLASHBOOT_AT91RM9200
+ help
+ Select Chip for which Dataflash boot should be built
+ Currently only AT91RM9200 Supported
+
+config BR2_TARGET_DATAFLASHBOOT_AT91RM9200
+ bool "AT91RM9200"
+
+config BR2_TARGET_DATAFLASHBOOT_AT91SAM9261
+ bool "AT91SAM9261"
+
+config BR2_TARGET_DATAFLASHBOOT_AT91SAM9261S
+ bool "AT91SAM9261S"
+
+endchoice
+
+endif # BR2_TARGET_DATAFLASHBOOT
diff --git a/boot/at91dataflashboot/at91dataflashboot-1.05-do-not-install.patch b/boot/at91dataflashboot/at91dataflashboot-1.05-do-not-install.patch
new file mode 100644
index 000000000..41d97ad20
--- /dev/null
+++ b/boot/at91dataflashboot/at91dataflashboot-1.05-do-not-install.patch
@@ -0,0 +1,22 @@
+Disable the automatic installation of at91dataflashboot since it tries
+to install things to /tftpboot, which is not possible when not
+building as root.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: at91dataflashboot-1.05/Makefile
+===================================================================
+--- at91dataflashboot-1.05.orig/Makefile
++++ at91dataflashboot-1.05/Makefile
+@@ -40,7 +40,7 @@
+
+ I=config.h com.h dataflash.h embedded_services.h main.h stdio.h include/AT91RM9200.h include/lib_AT91RM9200.h
+
+-all: clean $(BINNAME) $(LSSNAME) install
++all: clean $(BINNAME) $(LSSNAME)
+ $(SIZE) $(OUTNAME)
+
+ # C objects here
diff --git a/boot/at91dataflashboot/at91dataflashboot-1.05-eabi-fixes.patch b/boot/at91dataflashboot/at91dataflashboot-1.05-eabi-fixes.patch
new file mode 100644
index 000000000..e38905f7c
--- /dev/null
+++ b/boot/at91dataflashboot/at91dataflashboot-1.05-eabi-fixes.patch
@@ -0,0 +1,43 @@
+Get at91dataflashboot to build with EABI toolchains, by providing the
+__aeabi_uidiv and __aeabi_uidivmod symbols. The code is based on
+U-Boot's code.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ _udivsi3.S | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+Index: DataflashBoot-1.05/_udivsi3.S
+===================================================================
+--- DataflashBoot-1.05.orig/_udivsi3.S
++++ DataflashBoot-1.05/_udivsi3.S
+@@ -12,8 +12,11 @@
+ .text
+ .globl __udivsi3
+ .type __udivsi3 ,function
++ .globl __aeabi_uidiv
++ .type __aeabi_uidiv ,function
+ .align 0
+ __udivsi3 :
++ __aeabi_uidiv:
+ cmp divisor, #0
+ beq Ldiv0
+ mov curbit, #1
+@@ -68,6 +71,17 @@
+ mov r0, #0 @ about as wrong as it could be
+ ldmia sp!, {pc}
+ .size __udivsi3 , . - __udivsi3
++
++.globl __aeabi_uidivmod
++__aeabi_uidivmod:
++
++ stmfd sp!, {r0, r1, ip, lr}
++ bl __aeabi_uidiv
++ ldmfd sp!, {r1, r2, ip, lr}
++ mul r3, r0, r2
++ sub r1, r1, r3
++ mov pc, lr
++
+ /* # 235 "libgcc1.S" */
+ /* # 320 "libgcc1.S" */
+ /* # 421 "libgcc1.S" */
diff --git a/boot/at91dataflashboot/at91dataflashboot.mk b/boot/at91dataflashboot/at91dataflashboot.mk
new file mode 100644
index 000000000..d11f842d8
--- /dev/null
+++ b/boot/at91dataflashboot/at91dataflashboot.mk
@@ -0,0 +1,45 @@
+#############################################################
+#
+# DataFlashBoot
+#
+#############################################################
+DATAFLASHBOOT_VERSION:=1.05
+DATAFLASHBOOT_NAME:=DataflashBoot-$(DATAFLASHBOOT_VERSION)
+DATAFLASHBOOT_SITE:=ftp://www.at91.com/pub/buildroot/
+DATAFLASHBOOT_SOURCE:=$(DATAFLASHBOOT_NAME).tar.bz2
+DATAFLASHBOOT_DIR:=$(BUILD_DIR)/at91dataflashboot-$(DATAFLASHBOOT_VERSION)
+DATAFLASHBOOT_BINARY:=$(DATAFLASHBOOT_NAME).bin
+
+$(DL_DIR)/$(DATAFLASHBOOT_SOURCE):
+ $(call DOWNLOAD,$(DATAFLASHBOOT_SITE),$(DATAFLASHBOOT_SOURCE))
+
+$(DATAFLASHBOOT_DIR)/.unpacked: $(DL_DIR)/$(DATAFLASHBOOT_SOURCE)
+ mkdir -p $(@D)
+ $(BZCAT) $(DL_DIR)/$(DATAFLASHBOOT_SOURCE) | tar $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) -
+ touch $(DATAFLASHBOOT_DIR)/.unpacked
+
+$(DATAFLASHBOOT_DIR)/.patched: $(DATAFLASHBOOT_DIR)/.unpacked
+ toolchain/patch-kernel.sh $(@D) boot/at91dataflashboot \
+ at91dataflashboot-$(DATAFLASHBOOT_VERSION)-\*.patch
+
+$(DATAFLASHBOOT_DIR)/$(DATAFLASHBOOT_BINARY): $(DATAFLASHBOOT_DIR)/.patched
+ ls $(DATAFLASHBOOT_DIR)/.unpacked
+ make -C $(DATAFLASHBOOT_DIR) CROSS_COMPILE=$(TARGET_CROSS)
+
+dataflashboot-clean:
+ make -C $(DATAFLASHBOOT_DIR) clean
+
+dataflashboot-dirclean:
+ rm -rf $(DATAFLASHBOOT_DIR)
+
+dataflash: $(DATAFLASHBOOT_DIR)/$(DATAFLASHBOOT_BINARY)
+ cp $(DATAFLASHBOOT_DIR)/$(DATAFLASHBOOT_BINARY) $(BINARIES_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(BR2_TARGET_DATAFLASHBOOT),y)
+TARGETS+=dataflash
+endif
diff --git a/boot/barebox/Config.in b/boot/barebox/Config.in
new file mode 100644
index 000000000..0c90f0382
--- /dev/null
+++ b/boot/barebox/Config.in
@@ -0,0 +1,14 @@
+menuconfig BR2_TARGET_BAREBOX
+ bool "Barebox"
+ help
+ The Barebox bootloader, formerly known as U-Boot v2.
+
+ http://www.barebox.org
+
+if BR2_TARGET_BAREBOX
+config BR2_TARGET_BAREBOX_BOARD_DEFCONFIG
+ string "board defconfig"
+ help
+ Name of the board for which Barebox should be built, without
+ the _defconfig suffix.
+endif
diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk
new file mode 100644
index 000000000..7c2cbc123
--- /dev/null
+++ b/boot/barebox/barebox.mk
@@ -0,0 +1,61 @@
+#############################################################
+#
+# Barebox
+#
+#############################################################
+
+BAREBOX_VERSION:=2010.05.0
+BAREBOX_SOURCE:=barebox-$(BAREBOX_VERSION).tar.bz2
+BAREBOX_SITE:=http://www.barebox.org/download/
+BAREBOX_DIR:=$(BUILD_DIR)/barebox-$(BAREBOX_VERSION)
+BAREBOX_CAT:=$(BZCAT)
+BAREBOX_BOARD_DEFCONFIG:=$(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))
+
+ifeq ($(KERNEL_ARCH),i386)
+BAREBOX_ARCH=x86
+else ifeq ($(KERNEL_ARCH),powerpc)
+BAREBOX_ARCH=ppc
+else
+BAREBOX_ARCH=$(KERNEL_ARCH)
+endif
+
+BAREBOX_MAKE_FLAGS = ARCH=$(BAREBOX_ARCH) CROSS_COMPILE=$(TARGET_CROSS)
+
+$(DL_DIR)/$(BAREBOX_SOURCE):
+ $(call DOWNLOAD,$(BAREBOX_SITE),$(BAREBOX_SOURCE))
+
+$(BAREBOX_DIR)/.unpacked: $(DL_DIR)/$(BAREBOX_SOURCE)
+ mkdir -p $(@D)
+ $(INFLATE$(suffix $(BAREBOX_SOURCE))) $(DL_DIR)/$(BAREBOX_SOURCE) \
+ | tar $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) -
+ touch $@
+
+$(BAREBOX_DIR)/.patched: $(BAREBOX_DIR)/.unpacked
+ toolchain/patch-kernel.sh $(BAREBOX_DIR) boot/barebox \
+ barebox-$(BAREBOX_VERSION)-\*.patch \
+ barebox-$(BAREBOX_VERSION)-\*.patch.$(ARCH)
+ touch $@
+
+$(BAREBOX_DIR)/.configured: $(BAREBOX_DIR)/.patched
+ $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(BAREBOX_DIR) $(BAREBOX_BOARD_DEFCONFIG)_defconfig
+ touch $@
+
+$(BAREBOX_DIR)/.built: $(BAREBOX_DIR)/.configured
+ $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(BAREBOX_DIR)
+ touch $@
+
+$(BAREBOX_DIR)/.installed: $(BAREBOX_DIR)/.built
+ cp $(BAREBOX_DIR)/barebox.bin $(BINARIES_DIR)
+ touch $@
+
+barebox: $(BAREBOX_DIR)/.installed
+
+ifeq ($(BR2_TARGET_BAREBOX),y)
+TARGETS+=barebox
+
+# we NEED a board defconfig file
+ifeq ($(BAREBOX_BOARD_DEFCONFIG),)
+$(error No Barebox defconfig file. Check your BR2_TARGET_BAREBOX_BOARD_DEFCONFIG setting)
+endif
+
+endif
diff --git a/boot/common.mk b/boot/common.mk
new file mode 100644
index 000000000..dc0bfb496
--- /dev/null
+++ b/boot/common.mk
@@ -0,0 +1 @@
+include boot/*/*.mk \ No newline at end of file
diff --git a/boot/grub/Config.in b/boot/grub/Config.in
new file mode 100644
index 000000000..bc7a73e73
--- /dev/null
+++ b/boot/grub/Config.in
@@ -0,0 +1,146 @@
+config BR2_TARGET_GRUB
+ bool "grub"
+ depends on BR2_i386 || BR2_x86_64
+ help
+ The GRand Unified Bootloader for x86 systems.
+
+config BR2_TARGET_GRUB_SPLASH
+ bool "Splashimage support"
+ depends on BR2_TARGET_GRUB
+ help
+ Add support for splashimage.
+
+ A splashimage is a 14-color indexed .xpm picture which
+ is displayed as background for the grub menu.
+
+config BR2_TARGET_GRUB_DISKLESS
+ bool "diskless support"
+ depends on BR2_TARGET_GRUB
+ help
+ enable diskless support
+
+config BR2_TARGET_GRUB_3c595
+ bool "3Com595 driver"
+ depends on BR2_TARGET_GRUB
+ help
+ enable 3Com595 driver
+
+config BR2_TARGET_GRUB_3c90x
+ bool "3Com90x driver"
+ depends on BR2_TARGET_GRUB
+ help
+ enable 3Com90x driver
+
+config BR2_TARGET_GRUB_davicom
+ bool "Davicom driver"
+ depends on BR2_TARGET_GRUB
+ help
+ enable Davicom driver
+
+config BR2_TARGET_GRUB_e1000
+ bool "Etherexpress Pro/1000 driver"
+ depends on BR2_TARGET_GRUB
+ help
+ enable Etherexpress Pro/1000 driver
+
+config BR2_TARGET_GRUB_eepro100
+ bool "Etherexpress Pro/100 driver"
+ depends on BR2_TARGET_GRUB
+ help
+ enable Etherexpress Pro/100 driver
+
+config BR2_TARGET_GRUB_epic100
+ bool "SMC 83c170 EPIC/100 driver"
+ depends on BR2_TARGET_GRUB
+ help
+ enable SMC 83c170 EPIC/100 driver
+
+config BR2_TARGET_GRUB_forcedeth
+ bool "Nvidia Geforce driver"
+ depends on BR2_TARGET_GRUB
+ help
+ enable Nvidia Geforce driver
+
+config BR2_TARGET_GRUB_natsemi
+ bool "NatSemi DP8381x driver"
+ depends on BR2_TARGET_GRUB
+ help
+ enable NatSemi DP8381x driver
+
+config BR2_TARGET_GRUB_ns83820
+ bool "NS83820 driver"
+ depends on BR2_TARGET_GRUB
+ help
+ enable NS83820 driver
+
+config BR2_TARGET_GRUB_ns8390
+ bool "NE2000 PCI driver"
+ depends on BR2_TARGET_GRUB
+ help
+ enable NE2000 PCI driver
+
+config BR2_TARGET_GRUB_pcnet32
+ bool "AMD Lance/PCI PCNet/32 driver"
+ depends on BR2_TARGET_GRUB
+ help
+ enable AMD Lance/PCI PCNet/32 driver
+
+config BR2_TARGET_GRUB_pnic
+ bool "Bochs Pseudo Nic driver"
+ depends on BR2_TARGET_GRUB
+ help
+ enable Bochs Pseudo Nic driver
+
+config BR2_TARGET_GRUB_rtl8139
+ bool "Realtek 8139 driver"
+ depends on BR2_TARGET_GRUB
+ help
+ enable Realtek 8139 driver
+
+config BR2_TARGET_GRUB_r8169
+ bool "Realtek 8169 driver"
+ depends on BR2_TARGET_GRUB
+ help
+ enable Realtek 8169 driver
+
+config BR2_TARGET_GRUB_sis900
+ bool "SIS 900 and SIS 7016 driver"
+ depends on BR2_TARGET_GRUB
+ help
+ enable SIS 900 and SIS 7016 driver
+
+config BR2_TARGET_GRUB_tg3
+ bool "Broadcom Tigon3 driver"
+ depends on BR2_TARGET_GRUB
+ help
+ enable Broadcom Tigon3 driver
+
+config BR2_TARGET_GRUB_tulip
+ bool "Tulip driver"
+ depends on BR2_TARGET_GRUB
+ help
+ enable Tulip driver
+
+config BR2_TARGET_GRUB_tlan
+ bool "TI ThunderLAN driver"
+ depends on BR2_TARGET_GRUB
+ help
+ enable TI ThunderLAN driver
+
+config BR2_TARGET_GRUB_undi
+ bool "PXE UNDI driver"
+ depends on BR2_TARGET_GRUB
+ help
+ enable PXE UNDI driver
+
+config BR2_TARGET_GRUB_via_rhine
+ bool "Rhine-I/II driver"
+ depends on BR2_TARGET_GRUB
+ help
+ enable Rhine-I/II driver
+
+config BR2_TARGET_GRUB_w89c840
+ bool "Winbond W89c840 driver"
+ depends on BR2_TARGET_GRUB
+ help
+ enable Winbond W89c840 driver
diff --git a/boot/grub/grub.100-autoreconf.patch b/boot/grub/grub.100-autoreconf.patch
new file mode 100644
index 000000000..e5dd8343a
--- /dev/null
+++ b/boot/grub/grub.100-autoreconf.patch
@@ -0,0 +1,1407 @@
+diff -rup grub-0.97.oorig/aclocal.m4 grub-0.97/aclocal.m4
+--- grub-0.97.oorig/aclocal.m4 2005-05-08 04:41:18.000000000 +0200
++++ grub-0.97/aclocal.m4 2006-03-12 14:00:35.000000000 +0100
+@@ -1,7 +1,7 @@
+-# generated automatically by aclocal 1.9.4 -*- Autoconf -*-
++# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
+
+-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+-# Free Software Foundation, Inc.
++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
++# 2005 Free Software Foundation, Inc.
+ # This file is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+ # with or without modifications, as long as this notice is preserved.
+@@ -11,23 +11,11 @@
+ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ # PARTICULAR PURPOSE.
+
+-# -*- Autoconf -*-
+-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+-# Generated from amversion.in; do not edit by hand.
+-
+-# 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; either version 2, or (at your option)
+-# any later version.
+-
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-
+-# You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
++# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
+
+ # AM_AUTOMAKE_VERSION(VERSION)
+ # ----------------------------
+@@ -40,26 +28,15 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api
+ # Call AM_AUTOMAKE_VERSION so it can be traced.
+ # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+ AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+- [AM_AUTOMAKE_VERSION([1.9.4])])
+-
+-# AM_AUX_DIR_EXPAND
+-
+-# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
++ [AM_AUTOMAKE_VERSION([1.9.6])])
+
+-# 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; either version 2, or (at your option)
+-# any later version.
++# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-
+-# You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+-# 02111-1307, USA.
++# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
+
+ # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+ # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+@@ -106,26 +83,16 @@ AC_PREREQ([2.50])dnl
+ am_aux_dir=`cd $ac_aux_dir && pwd`
+ ])
+
+-# AM_CONDITIONAL -*- Autoconf -*-
++# AM_CONDITIONAL -*- Autoconf -*-
+
+-# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
+-
+-# 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; either version 2, or (at your option)
+-# any later version.
+-
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-
+-# You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+-# 02111-1307, USA.
++# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
++# Free Software Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
+
+-# serial 6
++# serial 7
+
+ # AM_CONDITIONAL(NAME, SHELL-CONDITION)
+ # -------------------------------------
+@@ -149,26 +116,15 @@ AC_CONFIG_COMMANDS_PRE(
+ Usually this means the macro was only invoked conditionally.]])
+ fi])])
+
+-# serial 7 -*- Autoconf -*-
+
+-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
++# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ # Free Software Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
+
+-# 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; either version 2, or (at your option)
+-# any later version.
+-
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-
+-# You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+-# 02111-1307, USA.
+-
++# serial 8
+
+ # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+ # written in clear, in which case automake, when reading aclocal.m4,
+@@ -177,7 +133,6 @@ fi])])
+ # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+-
+ # _AM_DEPENDENCIES(NAME)
+ # ----------------------
+ # See how the compiler implements dependency checking.
+@@ -317,27 +272,16 @@ AM_CONDITIONAL([AMDEP], [test "x$enable_
+ AC_SUBST([AMDEPBACKSLASH])
+ ])
+
+-# Generate code to set up dependency tracking. -*- Autoconf -*-
+-
+-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
+-# Free Software Foundation, Inc.
+-
+-# 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; either version 2, or (at your option)
+-# any later version.
++# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-
+-# You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+-# 02111-1307, USA.
++# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
++# Free Software Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
+
+-#serial 2
++#serial 3
+
+ # _AM_OUTPUT_DEPENDENCY_COMMANDS
+ # ------------------------------
+@@ -396,30 +340,19 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS]
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+ ])
+
+-# Do all the work for Automake. -*- Autoconf -*-
++# Do all the work for Automake. -*- Autoconf -*-
+
+-# This macro actually does too much some checks are only needed if
+-# your package does certain things. But this isn't really a big deal.
+-
+-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ # Free Software Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
+
+-# 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; either version 2, or (at your option)
+-# any later version.
+-
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-
+-# You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+-# 02111-1307, USA.
++# serial 12
+
+-# serial 11
++# This macro actually does too much. Some checks are only needed if
++# your package does certain things. But this isn't really a big deal.
+
+ # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+ # AM_INIT_AUTOMAKE([OPTIONS])
+@@ -521,51 +454,27 @@ for _am_header in $config_headers :; do
+ done
+ echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
++# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
++
+ # AM_PROG_INSTALL_SH
+ # ------------------
+ # Define $install_sh.
+-
+-# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+-
+-# 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; either version 2, or (at your option)
+-# any later version.
+-
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-
+-# You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+-# 02111-1307, USA.
+-
+ AC_DEFUN([AM_PROG_INSTALL_SH],
+ [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+ install_sh=${install_sh-"$am_aux_dir/install-sh"}
+ AC_SUBST(install_sh)])
+
+-# -*- Autoconf -*-
+-# Copyright (C) 2003 Free Software Foundation, Inc.
+-
+-# 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; either version 2, or (at your option)
+-# any later version.
+-
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-
+-# You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+-# 02111-1307, USA.
++# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
+
+-# serial 1
++# serial 2
+
+ # Check whether the underlying file-system supports filenames
+ # with a leading dot. For instance MS-DOS doesn't.
+@@ -580,28 +489,17 @@ fi
+ rmdir .tst 2>/dev/null
+ AC_SUBST([am__leading_dot])])
+
+-# Add --enable-maintainer-mode option to configure.
++# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
+ # From Jim Meyering
+
+-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004
++# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
+ # Free Software Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
+
+-# 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; either version 2, or (at your option)
+-# any later version.
+-
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-
+-# You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+-# 02111-1307, USA.
+-
+-# serial 3
++# serial 4
+
+ AC_DEFUN([AM_MAINTAINER_MODE],
+ [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+@@ -620,26 +518,15 @@ AC_DEFUN([AM_MAINTAINER_MODE],
+
+ AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+-# Check to see how 'make' treats includes. -*- Autoconf -*-
+-
+-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
++# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+-# 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; either version 2, or (at your option)
+-# any later version.
+-
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-
+-# You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+-# 02111-1307, USA.
++# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
+
+-# serial 2
++# serial 3
+
+ # AM_MAKE_INCLUDE()
+ # -----------------
+@@ -683,27 +570,16 @@ AC_MSG_RESULT([$_am_result])
+ rm -f confinc confmf
+ ])
+
+-# -*- Autoconf -*-
+-
+-
+-# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+-
+-# 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; either version 2, or (at your option)
+-# any later version.
++# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-
+-# You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+-# 02111-1307, USA.
++# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
++# Free Software Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
+
+-# serial 3
++# serial 4
+
+ # AM_MISSING_PROG(NAME, PROGRAM)
+ # ------------------------------
+@@ -729,27 +605,16 @@ else
+ fi
+ ])
+
++# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
++
+ # AM_PROG_MKDIR_P
+ # ---------------
+ # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
+-
+-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+-
+-# 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; either version 2, or (at your option)
+-# any later version.
+-
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-
+-# You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+-# 02111-1307, USA.
+-
++#
+ # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
+ # created by `make install' are always world readable, even if the
+ # installer happens to have an overly restrictive umask (e.g. 077).
+@@ -803,26 +668,15 @@ else
+ fi
+ AC_SUBST([mkdir_p])])
+
+-# Helper functions for option handling. -*- Autoconf -*-
++# Helper functions for option handling. -*- Autoconf -*-
+
+-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+-
+-# 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; either version 2, or (at your option)
+-# any later version.
+-
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-
+-# You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+-# 02111-1307, USA.
++# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
+
+-# serial 2
++# serial 3
+
+ # _AM_MANGLE_OPTION(NAME)
+ # -----------------------
+@@ -847,28 +701,16 @@ AC_DEFUN([_AM_SET_OPTIONS],
+ AC_DEFUN([_AM_IF_OPTION],
+ [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+-#
+-# Check to make sure that the build environment is sane.
+-#
+-
+-# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
+-
+-# 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; either version 2, or (at your option)
+-# any later version.
++# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-
+-# You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+-# 02111-1307, USA.
++# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
++# Free Software Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
+
+-# serial 3
++# serial 4
+
+ # AM_SANITY_CHECK
+ # ---------------
+@@ -911,25 +753,14 @@ Check your system clock])
+ fi
+ AC_MSG_RESULT(yes)])
+
+-# AM_PROG_INSTALL_STRIP
+-
+-# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+-
+-# 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; either version 2, or (at your option)
+-# any later version.
+-
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-
+-# You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+-# 02111-1307, USA.
++# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
+
++# AM_PROG_INSTALL_STRIP
++# ---------------------
+ # One issue with vendor `install' (even GNU) is that you can't
+ # specify the program used to strip binaries. This is especially
+ # annoying in cross-compiling environments, where the build's strip
+@@ -952,25 +783,13 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+ # Check how to create a tarball. -*- Autoconf -*-
+
+-# Copyright (C) 2004 Free Software Foundation, Inc.
+-
+-# 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; either version 2, or (at your option)
+-# any later version.
+-
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-
+-# You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+-# 02111-1307, USA.
+-
+-# serial 1
++# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
+
++# serial 2
+
+ # _AM_PROG_TAR(FORMAT)
+ # --------------------
+Only in grub-0.97/: autom4te.cache
+diff -rup grub-0.97.oorig/configure grub-0.97/configure
+--- grub-0.97.oorig/configure 2005-05-08 04:48:12.000000000 +0200
++++ grub-0.97/configure 2006-03-12 14:00:38.000000000 +0100
+@@ -311,7 +311,7 @@ ac_includes_default="\
+ # include <unistd.h>
+ #endif"
+
+-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT PERL CC ac_ct_CC CFLAGS LDFLAGS CPPFLAGS EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CCAS RANLIB ac_ct_RANLIB STAGE1_CFLAGS STAGE2_CFLAGS GRUB_CFLAGS OBJCOPY ac_ct_OBJCOPY GRUB_LIBS CPP EGREP NETBOOT_SUPPORT_TRUE NETBOOT_SUPPORT_FALSE DISKLESS_SUPPORT_TRUE DISKLESS_SUPPORT_FALSE HERCULES_SUPPORT_TRUE HERCULES_SUPPORT_FALSE SERIAL_SUPPORT_TRUE SERIAL_SUPPORT_FALSE SERIAL_SPEED_SIMULATION_TRUE SERIAL_SPEED_SIMULATION_FALSE BUILD_EXAMPLE_KERNEL_TRUE BUILD_EXAMPLE_KERNEL_FALSE FSYS_CFLAGS NET_CFLAGS NET_EXTRAFLAGS NETBOOT_DRIVERS CCASFLAGS LIBOBJS LTLIBOBJS'
++ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT PERL CC ac_ct_CC CFLAGS LDFLAGS CPPFLAGS EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CCAS RANLIB ac_ct_RANLIB STAGE1_CFLAGS STAGE2_CFLAGS GRUB_CFLAGS OBJCOPY ac_ct_OBJCOPY GRUB_LIBS CPP EGREP NETBOOT_SUPPORT_TRUE NETBOOT_SUPPORT_FALSE DISKLESS_SUPPORT_TRUE DISKLESS_SUPPORT_FALSE GRAPHICS_SUPPORT_TRUE GRAPHICS_SUPPORT_FALSE HERCULES_SUPPORT_TRUE HERCULES_SUPPORT_FALSE SERIAL_SUPPORT_TRUE SERIAL_SUPPORT_FALSE SERIAL_SPEED_SIMULATION_TRUE SERIAL_SPEED_SIMULATION_FALSE BUILD_EXAMPLE_KERNEL_TRUE BUILD_EXAMPLE_KERNEL_FALSE FSYS_CFLAGS NET_CFLAGS NET_EXTRAFLAGS NETBOOT_DRIVERS CCASFLAGS LIBOBJS LTLIBOBJS'
+ ac_subst_files=''
+
+ # Initialize some variables set by options.
+@@ -914,6 +914,7 @@ Optional Features:
+ set the default memory location for WD/SMC
+ --enable-cs-scan=LIST probe for CS89x0 base address using LIST
+ --enable-diskless enable diskless support
++ --disable-graphics disable graphics terminal support
+ --disable-hercules disable hercules terminal support
+ --disable-serial disable serial terminal support
+ --enable-serial-speed-simulation
+@@ -1032,7 +1033,7 @@ esac
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+- cd $ac_popdir
++ cd "$ac_popdir"
+ done
+ fi
+
+@@ -2631,8 +2632,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -2690,8 +2690,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -2807,8 +2806,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -2862,8 +2860,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -2908,8 +2905,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -2953,8 +2949,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -3458,8 +3453,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -3523,8 +3517,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -3595,8 +3588,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -3656,8 +3648,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4095,8 +4086,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4161,8 +4151,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4234,8 +4223,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4300,8 +4288,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4366,8 +4353,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4440,8 +4426,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4506,8 +4491,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4597,8 +4581,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4673,8 +4656,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4745,8 +4727,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -5070,8 +5051,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -5241,8 +5221,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -5313,8 +5292,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -5966,6 +5944,22 @@ else
+ fi
+
+
++# Check whether --enable-graphics or --disable-graphics was given.
++if test "${enable_graphics+set}" = set; then
++ enableval="$enable_graphics"
++
++fi;
++
++
++if test "x$enable_graphics" != xno; then
++ GRAPHICS_SUPPORT_TRUE=
++ GRAPHICS_SUPPORT_FALSE='#'
++else
++ GRAPHICS_SUPPORT_TRUE='#'
++ GRAPHICS_SUPPORT_FALSE=
++fi
++
++
+ # Check whether --enable-hercules or --disable-hercules was given.
+ if test "${enable_hercules+set}" = set; then
+ enableval="$enable_hercules"
+@@ -6270,6 +6264,13 @@ echo "$as_me: error: conditional \"DISKL
+ Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
++if test -z "${GRAPHICS_SUPPORT_TRUE}" && test -z "${GRAPHICS_SUPPORT_FALSE}"; then
++ { { echo "$as_me:$LINENO: error: conditional \"GRAPHICS_SUPPORT\" was never defined.
++Usually this means the macro was only invoked conditionally." >&5
++echo "$as_me: error: conditional \"GRAPHICS_SUPPORT\" was never defined.
++Usually this means the macro was only invoked conditionally." >&2;}
++ { (exit 1); exit 1; }; }
++fi
+ if test -z "${HERCULES_SUPPORT_TRUE}" && test -z "${HERCULES_SUPPORT_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"HERCULES_SUPPORT\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+@@ -6907,6 +6908,8 @@ s,@NETBOOT_SUPPORT_TRUE@,$NETBOOT_SUPPOR
+ s,@NETBOOT_SUPPORT_FALSE@,$NETBOOT_SUPPORT_FALSE,;t t
+ s,@DISKLESS_SUPPORT_TRUE@,$DISKLESS_SUPPORT_TRUE,;t t
+ s,@DISKLESS_SUPPORT_FALSE@,$DISKLESS_SUPPORT_FALSE,;t t
++s,@GRAPHICS_SUPPORT_TRUE@,$GRAPHICS_SUPPORT_TRUE,;t t
++s,@GRAPHICS_SUPPORT_FALSE@,$GRAPHICS_SUPPORT_FALSE,;t t
+ s,@HERCULES_SUPPORT_TRUE@,$HERCULES_SUPPORT_TRUE,;t t
+ s,@HERCULES_SUPPORT_FALSE@,$HERCULES_SUPPORT_FALSE,;t t
+ s,@SERIAL_SUPPORT_TRUE@,$SERIAL_SUPPORT_TRUE,;t t
+@@ -7088,11 +7091,6 @@ esac
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+ esac
+
+- if test x"$ac_file" != x-; then
+- { echo "$as_me:$LINENO: creating $ac_file" >&5
+-echo "$as_me: creating $ac_file" >&6;}
+- rm -f "$ac_file"
+- fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+@@ -7131,6 +7129,12 @@ echo "$as_me: error: cannot find input f
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
++
++ if test x"$ac_file" != x-; then
++ { echo "$as_me:$LINENO: creating $ac_file" >&5
++echo "$as_me: creating $ac_file" >&6;}
++ rm -f "$ac_file"
++ fi
+ _ACEOF
+ cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+diff -rup grub-0.97.oorig/docs/Makefile.in grub-0.97/docs/Makefile.in
+--- grub-0.97.oorig/docs/Makefile.in 2005-05-08 04:42:34.000000000 +0200
++++ grub-0.97/docs/Makefile.in 2006-03-12 14:00:43.000000000 +0100
+@@ -1,8 +1,8 @@
+-# Makefile.in generated by automake 1.9.4 from Makefile.am.
++# Makefile.in generated by automake 1.9.6 from Makefile.am.
+ # @configure_input@
+
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+-# 2003, 2004 Free Software Foundation, Inc.
++# 2003, 2004, 2005 Free Software Foundation, Inc.
+ # This Makefile.in is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+ # with or without modifications, as long as this notice is preserved.
+@@ -15,8 +15,6 @@
+ @SET_MAKE@
+
+
+-SOURCES = $(kernel_SOURCES)
+-
+ srcdir = @srcdir@
+ top_srcdir = @top_srcdir@
+ VPATH = @srcdir@
+@@ -120,6 +118,8 @@ ECHO_T = @ECHO_T@
+ EGREP = @EGREP@
+ EXEEXT = @EXEEXT@
+ FSYS_CFLAGS = @FSYS_CFLAGS@
++GRAPHICS_SUPPORT_FALSE = @GRAPHICS_SUPPORT_FALSE@
++GRAPHICS_SUPPORT_TRUE = @GRAPHICS_SUPPORT_TRUE@
+ GRUB_CFLAGS = @GRUB_CFLAGS@
+ GRUB_LIBS = @GRUB_LIBS@
+ HERCULES_SUPPORT_FALSE = @HERCULES_SUPPORT_FALSE@
+@@ -304,9 +304,11 @@ kernel-kernel.obj: kernel.c
+ restore=: && backupdir="$(am__leading_dot)am$$$$" && \
+ am__cwd=`pwd` && cd $(srcdir) && \
+ rm -rf $$backupdir && mkdir $$backupdir && \
+- for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
+- if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
+- done; \
++ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
++ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
++ if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
++ done; \
++ else :; fi && \
+ cd "$$am__cwd"; \
+ if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+ -o $@ $<; \
+@@ -371,10 +373,11 @@ multiboot.dvi: multiboot.texi $(multiboo
+ multiboot.pdf: multiboot.texi $(multiboot_TEXINFOS)
+ multiboot.html: multiboot.texi $(multiboot_TEXINFOS)
+ .dvi.ps:
++ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ $(DVIPS) -o $@ $<
+
+ uninstall-info-am:
+- $(PRE_UNINSTALL)
++ @$(PRE_UNINSTALL)
+ @if (install-info --version && \
+ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
+ list='$(INFO_DEPS)'; \
+@@ -390,7 +393,7 @@ uninstall-info-am:
+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
+ (if cd "$(DESTDIR)$(infodir)"; then \
+- echo " rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9])"; \
++ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
+ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
+ else :; fi); \
+ done
+@@ -403,10 +406,13 @@ dist-info: $(INFO_DEPS)
+ $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
+ esac; \
+ if test -f $$base; then d=.; else d=$(srcdir); fi; \
+- for file in $$d/$$base*; do \
+- relfile=`expr "$$file" : "$$d/\(.*\)"`; \
+- test -f $(distdir)/$$relfile || \
+- cp -p $$file $(distdir)/$$relfile; \
++ base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
++ for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \
++ if test -f $$file; then \
++ relfile=`expr "$$file" : "$$d/\(.*\)"`; \
++ test -f $(distdir)/$$relfile || \
++ cp -p $$file $(distdir)/$$relfile; \
++ else :; fi; \
+ done; \
+ done
+
+diff -rup grub-0.97.oorig/grub/Makefile.in grub-0.97/grub/Makefile.in
+--- grub-0.97.oorig/grub/Makefile.in 2005-05-08 04:42:34.000000000 +0200
++++ grub-0.97/grub/Makefile.in 2006-03-12 14:00:43.000000000 +0100
+@@ -1,8 +1,8 @@
+-# Makefile.in generated by automake 1.9.4 from Makefile.am.
++# Makefile.in generated by automake 1.9.6 from Makefile.am.
+ # @configure_input@
+
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+-# 2003, 2004 Free Software Foundation, Inc.
++# 2003, 2004, 2005 Free Software Foundation, Inc.
+ # This Makefile.in is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+ # with or without modifications, as long as this notice is preserved.
+@@ -14,8 +14,6 @@
+
+ @SET_MAKE@
+
+-SOURCES = $(grub_SOURCES)
+-
+ srcdir = @srcdir@
+ top_srcdir = @top_srcdir@
+ VPATH = @srcdir@
+@@ -97,6 +95,8 @@ ECHO_T = @ECHO_T@
+ EGREP = @EGREP@
+ EXEEXT = @EXEEXT@
+ FSYS_CFLAGS = @FSYS_CFLAGS@
++GRAPHICS_SUPPORT_FALSE = @GRAPHICS_SUPPORT_FALSE@
++GRAPHICS_SUPPORT_TRUE = @GRAPHICS_SUPPORT_TRUE@
+ GRUB_CFLAGS = @GRUB_CFLAGS@
+ GRUB_LIBS = @GRUB_LIBS@
+ HERCULES_SUPPORT_FALSE = @HERCULES_SUPPORT_FALSE@
+diff -rup grub-0.97.oorig/lib/Makefile.in grub-0.97/lib/Makefile.in
+--- grub-0.97.oorig/lib/Makefile.in 2005-05-08 04:42:35.000000000 +0200
++++ grub-0.97/lib/Makefile.in 2006-03-12 14:00:44.000000000 +0100
+@@ -1,8 +1,8 @@
+-# Makefile.in generated by automake 1.9.4 from Makefile.am.
++# Makefile.in generated by automake 1.9.6 from Makefile.am.
+ # @configure_input@
+
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+-# 2003, 2004 Free Software Foundation, Inc.
++# 2003, 2004, 2005 Free Software Foundation, Inc.
+ # This Makefile.in is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+ # with or without modifications, as long as this notice is preserved.
+@@ -14,8 +14,6 @@
+
+ @SET_MAKE@
+
+-SOURCES = $(libcommon_a_SOURCES)
+-
+ srcdir = @srcdir@
+ top_srcdir = @top_srcdir@
+ VPATH = @srcdir@
+@@ -96,6 +94,8 @@ ECHO_T = @ECHO_T@
+ EGREP = @EGREP@
+ EXEEXT = @EXEEXT@
+ FSYS_CFLAGS = @FSYS_CFLAGS@
++GRAPHICS_SUPPORT_FALSE = @GRAPHICS_SUPPORT_FALSE@
++GRAPHICS_SUPPORT_TRUE = @GRAPHICS_SUPPORT_TRUE@
+ GRUB_CFLAGS = @GRUB_CFLAGS@
+ GRUB_LIBS = @GRUB_LIBS@
+ HERCULES_SUPPORT_FALSE = @HERCULES_SUPPORT_FALSE@
+diff -rup grub-0.97.oorig/Makefile.in grub-0.97/Makefile.in
+--- grub-0.97.oorig/Makefile.in 2005-05-08 04:42:40.000000000 +0200
++++ grub-0.97/Makefile.in 2006-03-12 14:00:49.000000000 +0100
+@@ -1,8 +1,8 @@
+-# Makefile.in generated by automake 1.9.4 from Makefile.am.
++# Makefile.in generated by automake 1.9.6 from Makefile.am.
+ # @configure_input@
+
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+-# 2003, 2004 Free Software Foundation, Inc.
++# 2003, 2004, 2005 Free Software Foundation, Inc.
+ # This Makefile.in is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+ # with or without modifications, as long as this notice is preserved.
+@@ -101,6 +101,8 @@ ECHO_T = @ECHO_T@
+ EGREP = @EGREP@
+ EXEEXT = @EXEEXT@
+ FSYS_CFLAGS = @FSYS_CFLAGS@
++GRAPHICS_SUPPORT_FALSE = @GRAPHICS_SUPPORT_FALSE@
++GRAPHICS_SUPPORT_TRUE = @GRAPHICS_SUPPORT_TRUE@
+ GRUB_CFLAGS = @GRUB_CFLAGS@
+ GRUB_LIBS = @GRUB_LIBS@
+ HERCULES_SUPPORT_FALSE = @HERCULES_SUPPORT_FALSE@
+@@ -250,7 +252,13 @@ uninstall-info-am:
+ # (which will cause the Makefiles to be regenerated when you run `make');
+ # (2) otherwise, pass the desired values on the `make' command line.
+ $(RECURSIVE_TARGETS):
+- @set fnord $$MAKEFLAGS; amf=$$2; \
++ @failcom='exit 1'; \
++ for f in x $$MAKEFLAGS; do \
++ case $$f in \
++ *=* | --[!k]*);; \
++ *k*) failcom='fail=yes';; \
++ esac; \
++ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+@@ -262,7 +270,7 @@ $(RECURSIVE_TARGETS):
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
++ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+@@ -270,7 +278,13 @@ $(RECURSIVE_TARGETS):
+
+ mostlyclean-recursive clean-recursive distclean-recursive \
+ maintainer-clean-recursive:
+- @set fnord $$MAKEFLAGS; amf=$$2; \
++ @failcom='exit 1'; \
++ for f in x $$MAKEFLAGS; do \
++ case $$f in \
++ *=* | --[!k]*);; \
++ *k*) failcom='fail=yes';; \
++ esac; \
++ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+@@ -291,7 +305,7 @@ maintainer-clean-recursive:
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
++ || eval $$failcom; \
+ done && test -z "$$fail"
+ tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+diff -rup grub-0.97.oorig/netboot/Makefile.in grub-0.97/netboot/Makefile.in
+--- grub-0.97.oorig/netboot/Makefile.in 2005-05-08 04:42:35.000000000 +0200
++++ grub-0.97/netboot/Makefile.in 2006-03-12 14:00:44.000000000 +0100
+@@ -1,8 +1,8 @@
+-# Makefile.in generated by automake 1.9.4 from Makefile.am.
++# Makefile.in generated by automake 1.9.6 from Makefile.am.
+ # @configure_input@
+
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+-# 2003, 2004 Free Software Foundation, Inc.
++# 2003, 2004, 2005 Free Software Foundation, Inc.
+ # This Makefile.in is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+ # with or without modifications, as long as this notice is preserved.
+@@ -14,8 +14,6 @@
+
+ @SET_MAKE@
+
+-SOURCES = $(libdrivers_a_SOURCES) $(EXTRA_libdrivers_a_SOURCES)
+-
+ srcdir = @srcdir@
+ top_srcdir = @top_srcdir@
+ VPATH = @srcdir@
+@@ -97,6 +95,8 @@ ECHO_T = @ECHO_T@
+ EGREP = @EGREP@
+ EXEEXT = @EXEEXT@
+ FSYS_CFLAGS = @FSYS_CFLAGS@
++GRAPHICS_SUPPORT_FALSE = @GRAPHICS_SUPPORT_FALSE@
++GRAPHICS_SUPPORT_TRUE = @GRAPHICS_SUPPORT_TRUE@
+ GRUB_CFLAGS = @GRUB_CFLAGS@
+ GRUB_LIBS = @GRUB_LIBS@
+ HERCULES_SUPPORT_FALSE = @HERCULES_SUPPORT_FALSE@
+diff -rup grub-0.97.oorig/stage1/Makefile.in grub-0.97/stage1/Makefile.in
+--- grub-0.97.oorig/stage1/Makefile.in 2005-05-08 04:42:36.000000000 +0200
++++ grub-0.97/stage1/Makefile.in 2006-03-12 14:00:45.000000000 +0100
+@@ -1,8 +1,8 @@
+-# Makefile.in generated by automake 1.9.4 from Makefile.am.
++# Makefile.in generated by automake 1.9.6 from Makefile.am.
+ # @configure_input@
+
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+-# 2003, 2004 Free Software Foundation, Inc.
++# 2003, 2004, 2005 Free Software Foundation, Inc.
+ # This Makefile.in is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+ # with or without modifications, as long as this notice is preserved.
+@@ -15,8 +15,6 @@
+ @SET_MAKE@
+
+
+-SOURCES = $(stage1_exec_SOURCES)
+-
+ srcdir = @srcdir@
+ top_srcdir = @top_srcdir@
+ VPATH = @srcdir@
+@@ -102,6 +100,8 @@ ECHO_T = @ECHO_T@
+ EGREP = @EGREP@
+ EXEEXT = @EXEEXT@
+ FSYS_CFLAGS = @FSYS_CFLAGS@
++GRAPHICS_SUPPORT_FALSE = @GRAPHICS_SUPPORT_FALSE@
++GRAPHICS_SUPPORT_TRUE = @GRAPHICS_SUPPORT_TRUE@
+ GRUB_CFLAGS = @GRUB_CFLAGS@
+ GRUB_LIBS = @GRUB_LIBS@
+ HERCULES_SUPPORT_FALSE = @HERCULES_SUPPORT_FALSE@
+diff -rup grub-0.97.oorig/stage2/Makefile.in grub-0.97/stage2/Makefile.in
+--- grub-0.97.oorig/stage2/Makefile.in 2005-05-08 04:42:39.000000000 +0200
++++ grub-0.97/stage2/Makefile.in 2006-03-12 14:00:48.000000000 +0100
+@@ -1,8 +1,8 @@
+-# Makefile.in generated by automake 1.9.4 from Makefile.am.
++# Makefile.in generated by automake 1.9.6 from Makefile.am.
+ # @configure_input@
+
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+-# 2003, 2004 Free Software Foundation, Inc.
++# 2003, 2004, 2005 Free Software Foundation, Inc.
+ # This Makefile.in is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+ # with or without modifications, as long as this notice is preserved.
+@@ -18,8 +18,6 @@
+
+
+
+-SOURCES = $(libgrub_a_SOURCES) $(diskless_exec_SOURCES) $(e2fs_stage1_5_exec_SOURCES) $(fat_stage1_5_exec_SOURCES) $(ffs_stage1_5_exec_SOURCES) $(iso9660_stage1_5_exec_SOURCES) $(jfs_stage1_5_exec_SOURCES) $(minix_stage1_5_exec_SOURCES) $(nbloader_exec_SOURCES) $(pre_stage2_exec_SOURCES) $(pxeloader_exec_SOURCES) $(reiserfs_stage1_5_exec_SOURCES) $(start_exec_SOURCES) $(start_eltorito_exec_SOURCES) $(ufs2_stage1_5_exec_SOURCES) $(vstafs_stage1_5_exec_SOURCES) $(xfs_stage1_5_exec_SOURCES)
+-
+ srcdir = @srcdir@
+ top_srcdir = @top_srcdir@
+ VPATH = @srcdir@
+@@ -100,7 +98,7 @@ am_libgrub_a_OBJECTS = libgrub_a-boot.$(
+ libgrub_a-fsys_xfs.$(OBJEXT) libgrub_a-gunzip.$(OBJEXT) \
+ libgrub_a-md5.$(OBJEXT) libgrub_a-serial.$(OBJEXT) \
+ libgrub_a-stage2.$(OBJEXT) libgrub_a-terminfo.$(OBJEXT) \
+- libgrub_a-tparm.$(OBJEXT)
++ libgrub_a-tparm.$(OBJEXT) libgrub_a-graphics.$(OBJEXT)
+ libgrub_a_OBJECTS = $(am_libgrub_a_OBJECTS)
+ PROGRAMS = $(noinst_PROGRAMS)
+ am__objects_1 = diskless_exec-asm.$(OBJEXT) \
+@@ -125,7 +123,8 @@ am__objects_1 = diskless_exec-asm.$(OBJE
+ diskless_exec-serial.$(OBJEXT) \
+ diskless_exec-smp-imps.$(OBJEXT) \
+ diskless_exec-stage2.$(OBJEXT) \
+- diskless_exec-terminfo.$(OBJEXT) diskless_exec-tparm.$(OBJEXT)
++ diskless_exec-terminfo.$(OBJEXT) diskless_exec-tparm.$(OBJEXT) \
++ diskless_exec-graphics.$(OBJEXT)
+ am_diskless_exec_OBJECTS = $(am__objects_1)
+ diskless_exec_OBJECTS = $(am_diskless_exec_OBJECTS)
+ diskless_exec_DEPENDENCIES = ../netboot/libdrivers.a
+@@ -217,7 +216,8 @@ am_pre_stage2_exec_OBJECTS = pre_stage2_
+ pre_stage2_exec-smp-imps.$(OBJEXT) \
+ pre_stage2_exec-stage2.$(OBJEXT) \
+ pre_stage2_exec-terminfo.$(OBJEXT) \
+- pre_stage2_exec-tparm.$(OBJEXT)
++ pre_stage2_exec-tparm.$(OBJEXT) \
++ pre_stage2_exec-graphics.$(OBJEXT)
+ pre_stage2_exec_OBJECTS = $(am_pre_stage2_exec_OBJECTS)
+ @NETBOOT_SUPPORT_TRUE@pre_stage2_exec_DEPENDENCIES = \
+ @NETBOOT_SUPPORT_TRUE@ ../netboot/libdrivers.a
+@@ -344,6 +344,8 @@ ECHO_T = @ECHO_T@
+ EGREP = @EGREP@
+ EXEEXT = @EXEEXT@
+ FSYS_CFLAGS = @FSYS_CFLAGS@
++GRAPHICS_SUPPORT_FALSE = @GRAPHICS_SUPPORT_FALSE@
++GRAPHICS_SUPPORT_TRUE = @GRAPHICS_SUPPORT_TRUE@
+ GRUB_CFLAGS = @GRUB_CFLAGS@
+ GRUB_LIBS = @GRUB_LIBS@
+ HERCULES_SUPPORT_FALSE = @HERCULES_SUPPORT_FALSE@
+@@ -435,7 +437,7 @@ noinst_HEADERS = apic.h defs.h dir.h dis
+ fat.h filesys.h freebsd.h fs.h hercules.h i386-elf.h \
+ imgact_aout.h iso9660.h jfs.h mb_header.h mb_info.h md5.h \
+ nbi.h pc_slice.h serial.h shared.h smp-imps.h term.h \
+- terminfo.h tparm.h nbi.h ufs2.h vstafs.h xfs.h
++ terminfo.h tparm.h nbi.h ufs2.h vstafs.h xfs.h graphics.h
+
+ EXTRA_DIST = setjmp.S apm.S $(noinst_SCRIPTS)
+
+@@ -448,7 +450,7 @@ libgrub_a_SOURCES = boot.c builtins.c ch
+ disk_io.c fsys_ext2fs.c fsys_fat.c fsys_ffs.c fsys_iso9660.c \
+ fsys_jfs.c fsys_minix.c fsys_reiserfs.c fsys_ufs2.c \
+ fsys_vstafs.c fsys_xfs.c gunzip.c md5.c serial.c stage2.c \
+- terminfo.c tparm.c
++ terminfo.c tparm.c graphics.c
+
+ libgrub_a_CFLAGS = $(GRUB_CFLAGS) -I$(top_srcdir)/lib \
+ -DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 \
+@@ -479,8 +481,10 @@ START_ELTORITO_LINK = -nostdlib -Wl,-N -
+ @SERIAL_SUPPORT_TRUE@SERIAL_FLAGS = -DSUPPORT_SERIAL=1
+ @HERCULES_SUPPORT_FALSE@HERCULES_FLAGS =
+ @HERCULES_SUPPORT_TRUE@HERCULES_FLAGS = -DSUPPORT_HERCULES=1
++@GRAPHICS_SUPPORT_FALSE@GRAPHICS_FLAGS =
++@GRAPHICS_SUPPORT_TRUE@GRAPHICS_FLAGS = -DSUPPORT_GRAPHICS=1
+ STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
+- $(NETBOOT_FLAGS) $(SERIAL_FLAGS) $(HERCULES_FLAGS)
++ $(NETBOOT_FLAGS) $(SERIAL_FLAGS) $(HERCULES_FLAGS) $(GRAPHICS_FLAGS)
+
+ STAGE1_5_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000
+ STAGE1_5_COMPILE = $(STAGE2_COMPILE) -DNO_DECOMPRESSION=1 -DSTAGE1_5=1
+@@ -490,7 +494,8 @@ pre_stage2_exec_SOURCES = asm.S bios.c b
+ cmdline.c common.c console.c disk_io.c fsys_ext2fs.c \
+ fsys_fat.c fsys_ffs.c fsys_iso9660.c fsys_jfs.c fsys_minix.c \
+ fsys_reiserfs.c fsys_ufs2.c fsys_vstafs.c fsys_xfs.c gunzip.c \
+- hercules.c md5.c serial.c smp-imps.c stage2.c terminfo.c tparm.c
++ hercules.c md5.c serial.c smp-imps.c stage2.c terminfo.c tparm.c \
++ graphics.c
+
+ pre_stage2_exec_CFLAGS = $(STAGE2_COMPILE) $(FSYS_CFLAGS)
+ pre_stage2_exec_CCASFLAGS = $(STAGE2_COMPILE) $(FSYS_CFLAGS)
+@@ -766,6 +771,7 @@ distclean-compile:
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diskless_exec-fsys_ufs2.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diskless_exec-fsys_vstafs.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diskless_exec-fsys_xfs.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diskless_exec-graphics.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diskless_exec-gunzip.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diskless_exec-hercules.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diskless_exec-md5.Po@am__quote@
+@@ -820,6 +826,7 @@ distclean-compile:
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgrub_a-fsys_ufs2.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgrub_a-fsys_vstafs.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgrub_a-fsys_xfs.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgrub_a-graphics.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgrub_a-gunzip.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgrub_a-md5.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgrub_a-serial.Po@am__quote@
+@@ -850,6 +857,7 @@ distclean-compile:
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pre_stage2_exec-fsys_ufs2.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pre_stage2_exec-fsys_vstafs.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pre_stage2_exec-fsys_xfs.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pre_stage2_exec-graphics.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pre_stage2_exec-gunzip.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pre_stage2_exec-hercules.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pre_stage2_exec-md5.Po@am__quote@
+@@ -1367,6 +1375,20 @@ libgrub_a-tparm.obj: tparm.c
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgrub_a_CFLAGS) $(CFLAGS) -c -o libgrub_a-tparm.obj `if test -f 'tparm.c'; then $(CYGPATH_W) 'tparm.c'; else $(CYGPATH_W) '$(srcdir)/tparm.c'; fi`
+
++libgrub_a-graphics.o: graphics.c
++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgrub_a_CFLAGS) $(CFLAGS) -MT libgrub_a-graphics.o -MD -MP -MF "$(DEPDIR)/libgrub_a-graphics.Tpo" -c -o libgrub_a-graphics.o `test -f 'graphics.c' || echo '$(srcdir)/'`graphics.c; \
++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgrub_a-graphics.Tpo" "$(DEPDIR)/libgrub_a-graphics.Po"; else rm -f "$(DEPDIR)/libgrub_a-graphics.Tpo"; exit 1; fi
++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='graphics.c' object='libgrub_a-graphics.o' libtool=no @AMDEPBACKSLASH@
++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgrub_a_CFLAGS) $(CFLAGS) -c -o libgrub_a-graphics.o `test -f 'graphics.c' || echo '$(srcdir)/'`graphics.c
++
++libgrub_a-graphics.obj: graphics.c
++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgrub_a_CFLAGS) $(CFLAGS) -MT libgrub_a-graphics.obj -MD -MP -MF "$(DEPDIR)/libgrub_a-graphics.Tpo" -c -o libgrub_a-graphics.obj `if test -f 'graphics.c'; then $(CYGPATH_W) 'graphics.c'; else $(CYGPATH_W) '$(srcdir)/graphics.c'; fi`; \
++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgrub_a-graphics.Tpo" "$(DEPDIR)/libgrub_a-graphics.Po"; else rm -f "$(DEPDIR)/libgrub_a-graphics.Tpo"; exit 1; fi
++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='graphics.c' object='libgrub_a-graphics.obj' libtool=no @AMDEPBACKSLASH@
++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgrub_a_CFLAGS) $(CFLAGS) -c -o libgrub_a-graphics.obj `if test -f 'graphics.c'; then $(CYGPATH_W) 'graphics.c'; else $(CYGPATH_W) '$(srcdir)/graphics.c'; fi`
++
+ diskless_exec-bios.o: bios.c
+ @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(diskless_exec_CFLAGS) $(CFLAGS) -MT diskless_exec-bios.o -MD -MP -MF "$(DEPDIR)/diskless_exec-bios.Tpo" -c -o diskless_exec-bios.o `test -f 'bios.c' || echo '$(srcdir)/'`bios.c; \
+ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/diskless_exec-bios.Tpo" "$(DEPDIR)/diskless_exec-bios.Po"; else rm -f "$(DEPDIR)/diskless_exec-bios.Tpo"; exit 1; fi
+@@ -1731,6 +1753,20 @@ diskless_exec-tparm.obj: tparm.c
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(diskless_exec_CFLAGS) $(CFLAGS) -c -o diskless_exec-tparm.obj `if test -f 'tparm.c'; then $(CYGPATH_W) 'tparm.c'; else $(CYGPATH_W) '$(srcdir)/tparm.c'; fi`
+
++diskless_exec-graphics.o: graphics.c
++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(diskless_exec_CFLAGS) $(CFLAGS) -MT diskless_exec-graphics.o -MD -MP -MF "$(DEPDIR)/diskless_exec-graphics.Tpo" -c -o diskless_exec-graphics.o `test -f 'graphics.c' || echo '$(srcdir)/'`graphics.c; \
++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/diskless_exec-graphics.Tpo" "$(DEPDIR)/diskless_exec-graphics.Po"; else rm -f "$(DEPDIR)/diskless_exec-graphics.Tpo"; exit 1; fi
++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='graphics.c' object='diskless_exec-graphics.o' libtool=no @AMDEPBACKSLASH@
++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(diskless_exec_CFLAGS) $(CFLAGS) -c -o diskless_exec-graphics.o `test -f 'graphics.c' || echo '$(srcdir)/'`graphics.c
++
++diskless_exec-graphics.obj: graphics.c
++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(diskless_exec_CFLAGS) $(CFLAGS) -MT diskless_exec-graphics.obj -MD -MP -MF "$(DEPDIR)/diskless_exec-graphics.Tpo" -c -o diskless_exec-graphics.obj `if test -f 'graphics.c'; then $(CYGPATH_W) 'graphics.c'; else $(CYGPATH_W) '$(srcdir)/graphics.c'; fi`; \
++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/diskless_exec-graphics.Tpo" "$(DEPDIR)/diskless_exec-graphics.Po"; else rm -f "$(DEPDIR)/diskless_exec-graphics.Tpo"; exit 1; fi
++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='graphics.c' object='diskless_exec-graphics.obj' libtool=no @AMDEPBACKSLASH@
++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(diskless_exec_CFLAGS) $(CFLAGS) -c -o diskless_exec-graphics.obj `if test -f 'graphics.c'; then $(CYGPATH_W) 'graphics.c'; else $(CYGPATH_W) '$(srcdir)/graphics.c'; fi`
++
+ e2fs_stage1_5_exec-common.o: common.c
+ @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(e2fs_stage1_5_exec_CFLAGS) $(CFLAGS) -MT e2fs_stage1_5_exec-common.o -MD -MP -MF "$(DEPDIR)/e2fs_stage1_5_exec-common.Tpo" -c -o e2fs_stage1_5_exec-common.o `test -f 'common.c' || echo '$(srcdir)/'`common.c; \
+ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/e2fs_stage1_5_exec-common.Tpo" "$(DEPDIR)/e2fs_stage1_5_exec-common.Po"; else rm -f "$(DEPDIR)/e2fs_stage1_5_exec-common.Tpo"; exit 1; fi
+@@ -2599,6 +2635,20 @@ pre_stage2_exec-tparm.obj: tparm.c
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pre_stage2_exec_CFLAGS) $(CFLAGS) -c -o pre_stage2_exec-tparm.obj `if test -f 'tparm.c'; then $(CYGPATH_W) 'tparm.c'; else $(CYGPATH_W) '$(srcdir)/tparm.c'; fi`
+
++pre_stage2_exec-graphics.o: graphics.c
++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pre_stage2_exec_CFLAGS) $(CFLAGS) -MT pre_stage2_exec-graphics.o -MD -MP -MF "$(DEPDIR)/pre_stage2_exec-graphics.Tpo" -c -o pre_stage2_exec-graphics.o `test -f 'graphics.c' || echo '$(srcdir)/'`graphics.c; \
++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/pre_stage2_exec-graphics.Tpo" "$(DEPDIR)/pre_stage2_exec-graphics.Po"; else rm -f "$(DEPDIR)/pre_stage2_exec-graphics.Tpo"; exit 1; fi
++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='graphics.c' object='pre_stage2_exec-graphics.o' libtool=no @AMDEPBACKSLASH@
++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pre_stage2_exec_CFLAGS) $(CFLAGS) -c -o pre_stage2_exec-graphics.o `test -f 'graphics.c' || echo '$(srcdir)/'`graphics.c
++
++pre_stage2_exec-graphics.obj: graphics.c
++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pre_stage2_exec_CFLAGS) $(CFLAGS) -MT pre_stage2_exec-graphics.obj -MD -MP -MF "$(DEPDIR)/pre_stage2_exec-graphics.Tpo" -c -o pre_stage2_exec-graphics.obj `if test -f 'graphics.c'; then $(CYGPATH_W) 'graphics.c'; else $(CYGPATH_W) '$(srcdir)/graphics.c'; fi`; \
++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/pre_stage2_exec-graphics.Tpo" "$(DEPDIR)/pre_stage2_exec-graphics.Po"; else rm -f "$(DEPDIR)/pre_stage2_exec-graphics.Tpo"; exit 1; fi
++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='graphics.c' object='pre_stage2_exec-graphics.obj' libtool=no @AMDEPBACKSLASH@
++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pre_stage2_exec_CFLAGS) $(CFLAGS) -c -o pre_stage2_exec-graphics.obj `if test -f 'graphics.c'; then $(CYGPATH_W) 'graphics.c'; else $(CYGPATH_W) '$(srcdir)/graphics.c'; fi`
++
+ reiserfs_stage1_5_exec-common.o: common.c
+ @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(reiserfs_stage1_5_exec_CFLAGS) $(CFLAGS) -MT reiserfs_stage1_5_exec-common.o -MD -MP -MF "$(DEPDIR)/reiserfs_stage1_5_exec-common.Tpo" -c -o reiserfs_stage1_5_exec-common.o `test -f 'common.c' || echo '$(srcdir)/'`common.c; \
+ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/reiserfs_stage1_5_exec-common.Tpo" "$(DEPDIR)/reiserfs_stage1_5_exec-common.Po"; else rm -f "$(DEPDIR)/reiserfs_stage1_5_exec-common.Tpo"; exit 1; fi
+diff -rup grub-0.97.oorig/util/Makefile.in grub-0.97/util/Makefile.in
+--- grub-0.97.oorig/util/Makefile.in 2005-05-08 04:42:39.000000000 +0200
++++ grub-0.97/util/Makefile.in 2006-03-12 14:00:48.000000000 +0100
+@@ -1,8 +1,8 @@
+-# Makefile.in generated by automake 1.9.4 from Makefile.am.
++# Makefile.in generated by automake 1.9.6 from Makefile.am.
+ # @configure_input@
+
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+-# 2003, 2004 Free Software Foundation, Inc.
++# 2003, 2004, 2005 Free Software Foundation, Inc.
+ # This Makefile.in is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+ # with or without modifications, as long as this notice is preserved.
+@@ -15,8 +15,6 @@
+ @SET_MAKE@
+
+
+-SOURCES = $(mbchk_SOURCES)
+-
+ srcdir = @srcdir@
+ top_srcdir = @top_srcdir@
+ VPATH = @srcdir@
+@@ -102,6 +100,8 @@ ECHO_T = @ECHO_T@
+ EGREP = @EGREP@
+ EXEEXT = @EXEEXT@
+ FSYS_CFLAGS = @FSYS_CFLAGS@
++GRAPHICS_SUPPORT_FALSE = @GRAPHICS_SUPPORT_FALSE@
++GRAPHICS_SUPPORT_TRUE = @GRAPHICS_SUPPORT_TRUE@
+ GRUB_CFLAGS = @GRUB_CFLAGS@
+ GRUB_LIBS = @GRUB_LIBS@
+ HERCULES_SUPPORT_FALSE = @HERCULES_SUPPORT_FALSE@
diff --git a/boot/grub/grub.200-fix_mbr_handling.patch b/boot/grub/grub.200-fix_mbr_handling.patch
new file mode 100644
index 000000000..fdee0ef87
--- /dev/null
+++ b/boot/grub/grub.200-fix_mbr_handling.patch
@@ -0,0 +1,11 @@
+--- grub-0.97.oorig/stage2/disk_io.c 2004-05-23 18:35:24.000000000 +0200
++++ grub-0.97/stage2/disk_io.c 2006-03-12 14:11:51.000000000 +0100
+@@ -365,7 +365,7 @@ rawwrite (int drive, int sector, char *b
+ int
+ devwrite (int sector, int sector_count, char *buf)
+ {
+-#if defined(GRUB_UTIL) && defined(__linux__)
++#if defined(GRUB_UTIL) && defined(__linux__) && !defined(SUPPORT_LOOPDEV)
+ if (current_partition != 0xFFFFFF
+ && is_disk_device (device_map, current_drive))
+ {
diff --git a/boot/grub/grub.300-honor_UCLIBC_HAS_LFS.patch b/boot/grub/grub.300-honor_UCLIBC_HAS_LFS.patch
new file mode 100644
index 000000000..5b941865b
--- /dev/null
+++ b/boot/grub/grub.300-honor_UCLIBC_HAS_LFS.patch
@@ -0,0 +1,34 @@
+diff -rup grub-0.97.orig/grub/asmstub.c grub-0.97/grub/asmstub.c
+--- grub-0.97.orig/grub/asmstub.c 2006-11-29 20:36:20.000000000 +0100
++++ grub-0.97/grub/asmstub.c 2006-11-29 21:26:16.000000000 +0100
+@@ -18,10 +18,13 @@
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
++#include <features.h>
++#if !defined __UCLIBC__ || (defined __UCLIBC__ && defined __UCLIBC_HAS_LFS__)
+ /* Try to use glibc's transparant LFS support. */
+ #define _LARGEFILE_SOURCE 1
+ /* lseek becomes synonymous with lseek64. */
+ #define _FILE_OFFSET_BITS 64
++#endif
+
+ /* Simulator entry point. */
+ int grub_stage2 (void);
+diff -rup grub-0.97.orig/lib/device.c grub-0.97/lib/device.c
+--- grub-0.97.orig/lib/device.c 2006-11-29 20:36:20.000000000 +0100
++++ grub-0.97/lib/device.c 2006-11-29 21:25:19.000000000 +0100
+@@ -18,10 +18,13 @@
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
++#include <features.h>
++#if !defined __UCLIBC__ || (defined __UCLIBC__ && defined __UCLIBC_HAS_LFS__)
+ /* Try to use glibc's transparant LFS support. */
+ #define _LARGEFILE_SOURCE 1
+ /* lseek becomes synonymous with lseek64. */
+ #define _FILE_OFFSET_BITS 64
++#endif
+
+ #include <stdio.h>
+ #include <stdlib.h>
diff --git a/boot/grub/grub.400-nic_update2.patch.bz2 b/boot/grub/grub.400-nic_update2.patch.bz2
new file mode 100644
index 000000000..8592f15ff
--- /dev/null
+++ b/boot/grub/grub.400-nic_update2.patch.bz2
Binary files differ
diff --git a/boot/grub/grub.mk b/boot/grub/grub.mk
new file mode 100644
index 000000000..3805afec6
--- /dev/null
+++ b/boot/grub/grub.mk
@@ -0,0 +1,118 @@
+#############################################################
+#
+# grub
+#
+#############################################################
+GRUB_SOURCE:=grub_0.97.orig.tar.gz
+GRUB_PATCH:=grub_0.97-35.diff.gz
+GRUB_SITE:=http://snapshot.debian.net/archive/2008/03/29/debian/pool/main/g/grub/
+GRUB_PATCH_SITE:=$(GRUB_SITE)
+GRUB_CAT:=$(ZCAT)
+GRUB_DIR:=$(BUILD_DIR)/grub-0.97
+GRUB_BINARY:=grub/grub
+GRUB_TARGET_BINARY:=sbin/grub
+GRUB_SPLASHIMAGE=$(TOPDIR)/boot/grub/splash.xpm.gz
+
+
+GRUB_CFLAGS=-DSUPPORT_LOOPDEV
+ifeq ($(BR2_LARGEFILE),)
+GRUB_CFLAGS+=-U_FILE_OFFSET_BITS
+endif
+
+
+GRUB_CONFIG-$(BR2_TARGET_GRUB_SPLASH) += --enable-graphics
+GRUB_CONFIG-$(BR2_TARGET_GRUB_DISKLESS) += --enable-diskless
+GRUB_CONFIG-$(BR2_TARGET_GRUB_3c595) += --enable-3c595
+GRUB_CONFIG-$(BR2_TARGET_GRUB_3c90x) += --enable-3c90x
+GRUB_CONFIG-$(BR2_TARGET_GRUB_davicom) += --enable-davicom
+GRUB_CONFIG-$(BR2_TARGET_GRUB_e1000) += --enable-e1000
+GRUB_CONFIG-$(BR2_TARGET_GRUB_eepro100) += --enable-eepro100
+GRUB_CONFIG-$(BR2_TARGET_GRUB_epic100) += --enable-epic100
+GRUB_CONFIG-$(BR2_TARGET_GRUB_forcedeth) += --enable-forcedeth
+GRUB_CONFIG-$(BR2_TARGET_GRUB_natsemi) += --enable-natsemi
+GRUB_CONFIG-$(BR2_TARGET_GRUB_ns83820) += --enable-ns83820
+GRUB_CONFIG-$(BR2_TARGET_GRUB_ns8390) += --enable-ns8390
+GRUB_CONFIG-$(BR2_TARGET_GRUB_pcnet32) += --enable-pcnet32
+GRUB_CONFIG-$(BR2_TARGET_GRUB_pnic) += --enable-pnic
+GRUB_CONFIG-$(BR2_TARGET_GRUB_rtl8139) += --enable-rtl8139
+GRUB_CONFIG-$(BR2_TARGET_GRUB_r8169) += --enable-r8169
+GRUB_CONFIG-$(BR2_TARGET_GRUB_sis900) += --enable-sis900
+GRUB_CONFIG-$(BR2_TARGET_GRUB_tg3) += --enable-tg3
+GRUB_CONFIG-$(BR2_TARGET_GRUB_tulip) += --enable-tulip
+GRUB_CONFIG-$(BR2_TARGET_GRUB_tlan) += --enable-tlan
+GRUB_CONFIG-$(BR2_TARGET_GRUB_undi) += --enable-undi
+GRUB_CONFIG-$(BR2_TARGET_GRUB_via_rhine) += --enable-via-rhine
+GRUB_CONFIG-$(BR2_TARGET_GRUB_w89c840) += --enable-w89c840
+
+$(DL_DIR)/$(GRUB_SOURCE):
+ $(call DOWNLOAD,$(GRUB_SITE),$(GRUB_SOURCE))
+
+$(DL_DIR)/$(GRUB_PATCH):
+ $(call DOWNLOAD,$(GRUB_PATCH_SITE),$(GRUB_PATCH))
+
+grub-source: $(DL_DIR)/$(GRUB_SOURCE) $(DL_DIR)/$(GRUB_PATCH)
+
+$(GRUB_DIR)/.unpacked: $(DL_DIR)/$(GRUB_SOURCE) $(DL_DIR)/$(GRUB_PATCH)
+ $(GRUB_CAT) $(DL_DIR)/$(GRUB_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ toolchain/patch-kernel.sh $(GRUB_DIR) $(DL_DIR) $(GRUB_PATCH)
+ for i in `grep -v "^#" $(GRUB_DIR)/debian/patches/00list`; do \
+ cat $(GRUB_DIR)/debian/patches/$$i | patch -p1 -d $(GRUB_DIR); \
+ done
+ toolchain/patch-kernel.sh $(GRUB_DIR) boot/grub grub.\*.patch{,.bz2}
+ touch $@
+
+$(GRUB_DIR)/.configured: $(GRUB_DIR)/.unpacked
+ (cd $(GRUB_DIR); rm -rf config.cache; \
+ $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ CPPFLAGS="$(GRUB_CFLAGS)" \
+ ./configure $(QUIET) \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --prefix=/ \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --disable-auto-linux-mem-opt \
+ $(GRUB_CONFIG-y) \
+ )
+ touch $@
+
+$(GRUB_DIR)/$(GRUB_BINARY): $(GRUB_DIR)/.configured
+ $(MAKE) CC=$(TARGET_CC) -C $(GRUB_DIR)
+ rm -f $(GRUB_DIR)/$(GRUB_BINARY)
+ $(MAKE) CC=$(TARGET_CC) CFLAGS+=-static -C $(GRUB_DIR)/grub grub
+ mkdir -p $(dir $(STAGING_DIR)/$(GRUB_TARGET_BINARY))
+ mv $(GRUB_DIR)/$(GRUB_BINARY) $(STAGING_DIR)/$(GRUB_TARGET_BINARY).static
+ $(MAKE) CC=$(TARGET_CC) -C $(GRUB_DIR)/grub
+
+$(GRUB_DIR)/.installed: $(GRUB_DIR)/$(GRUB_BINARY)
+ cp $(GRUB_DIR)/$(GRUB_BINARY) $(TARGET_DIR)/$(GRUB_TARGET_BINARY)
+ test -d $(TARGET_DIR)/boot/grub || mkdir -p $(TARGET_DIR)/boot/grub
+ cp $(GRUB_DIR)/stage1/stage1 $(GRUB_DIR)/stage2/*1_5 $(GRUB_DIR)/stage2/stage2 $(TARGET_DIR)/boot/grub/
+ifeq ($(BR2_TARGET_GRUB_SPLASH),y)
+ test -f $(TARGET_DIR)/boot/grub/$(GRUB_SPLASHIMAGE) || \
+ cp $(GRUB_SPLASHIMAGE) $(TARGET_DIR)/boot/grub/
+endif
+ touch $@
+
+grub: $(GRUB_DIR)/.installed
+
+grub-clean:
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(GRUB_DIR) uninstall
+ -$(MAKE) -C $(GRUB_DIR) clean
+ rm -f $(TARGET_DIR)/boot/grub/$(GRUB_SPLASHIMAGE) \
+ $(TARGET_DIR)/sbin/$(GRUB_BINARY) \
+ $(TARGET_DIR)/boot/grub/{stage{1,2},*1_5}
+
+grub-dirclean:
+ rm -rf $(GRUB_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(BR2_TARGET_GRUB),y)
+TARGETS+=grub
+endif
diff --git a/boot/grub/menu.lst b/boot/grub/menu.lst
new file mode 100644
index 000000000..d76bf6323
--- /dev/null
+++ b/boot/grub/menu.lst
@@ -0,0 +1,7 @@
+default=0
+timeout=5
+splashimage=(hd0,0)/boot/grub/splash.xpm.gz
+hiddenmenu
+title Buildroot
+ root (hd0,0)
+ kernel /boot/bzImage rw root=/dev/hda1 vga=791
diff --git a/boot/grub/splash.xpm.gz b/boot/grub/splash.xpm.gz
new file mode 100644
index 000000000..96e88822a
--- /dev/null
+++ b/boot/grub/splash.xpm.gz
Binary files differ
diff --git a/boot/grub2/Config.in b/boot/grub2/Config.in
new file mode 100644
index 000000000..1301b5b80
--- /dev/null
+++ b/boot/grub2/Config.in
@@ -0,0 +1,9 @@
+config BR2_TARGET_GRUB2
+ bool "grub2"
+ # Only supports PC, Mac (Power, x86 and x86-64), Pegasos
+ depends on BR2_i386 || BR2_powerpc
+ # Build process is broken (./configure doesn't work, Ruby
+ # required, etc.)
+ depends on BROKEN
+ help
+ The GRand Unified Bootloader for x86 systems, take #2.
diff --git a/boot/grub2/grub2.mk b/boot/grub2/grub2.mk
new file mode 100644
index 000000000..6c3bbefe3
--- /dev/null
+++ b/boot/grub2/grub2.mk
@@ -0,0 +1,93 @@
+#############################################################
+#
+# grub2
+#
+# TODO
+#
+# * grub2's autogen uses ruby, which isn't part of the core Debian
+# installation. So either decide it is a requirement for Buildroot,
+# or build it for the host.
+#
+# * improve the installation procedure. For the moment, it just
+# installs everything in $(TARGET_DIR).
+#
+#############################################################
+GRUB2_SOURCE:=grub2_1.98.orig.tar.gz
+GRUB2_PATCH:=grub2_1.98-1.diff.gz
+GRUB2_SITE=$(BR2_DEBIAN_MIRROR)/debian/pool/main/g/grub2
+GRUB2_PATCH_SITE:=$(GRUB2_SITE)
+GRUB2_CAT:=$(ZCAT)
+GRUB2_DIR:=$(BUILD_DIR)/grub-1.98
+
+GRUB2_CFLAGS=-DSUPPORT_LOOPDEV
+ifeq ($(BR2_LARGEFILE),)
+GRUB2_CFLAGS+=-U_FILE_OFFSET_BITS
+endif
+
+$(DL_DIR)/$(GRUB2_SOURCE):
+ $(call DOWNLOAD,$(GRUB2_SITE),$(GRUB2_SOURCE))
+
+$(DL_DIR)/$(GRUB2_PATCH):
+ $(call DOWNLOAD,$(GRUB2_PATCH_SITE),$(GRUB2_PATCH))
+
+grub2-source: $(DL_DIR)/$(GRUB2_SOURCE) $(DL_DIR)/$(GRUB2_PATCH)
+
+$(GRUB2_DIR)/.unpacked: $(DL_DIR)/$(GRUB2_SOURCE) $(DL_DIR)/$(GRUB2_PATCH)
+ mkdir -p $(@D)
+ $(GRUB2_CAT) $(DL_DIR)/$(GRUB2_SOURCE) | tar $(TAR_STRIP_COMPONENTS)=1 -C $(@D) -xvf -
+ toolchain/patch-kernel.sh $(@D) $(DL_DIR) $(GRUB2_PATCH)
+ for i in `grep -v "^#" $(@D)/debian/patches/00list`; do \
+ cat $(@D)/debian/patches/$$i | patch -p1 -d $(@D); \
+ done
+ toolchain/patch-kernel.sh $(@D) boot/grub2 grub-\*.patch
+ touch $@
+
+$(GRUB2_DIR)/.configured: $(GRUB2_DIR)/.unpacked
+ (cd $(GRUB2_DIR); rm -rf config.cache; \
+ $(TARGET_CONFIGURE_OPTS) ; \
+ ./autogen.sh ; \
+ $(TARGET_CONFIGURE_OPTS) \
+ $(TARGET_CONFIGURE_ARGS) \
+ CPPFLAGS="$(GRUB2_CFLAGS)" \
+ grub_cv_i386_check_nested_functions=no \
+ ./configure $(QUIET) \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --prefix=/ \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --disable-grub-mkfont \
+ --disable-grub-fstest \
+ --disable-grub-emu-usb \
+ --disable-werror \
+ $(DISABLE_LARGEFILE) \
+ $(GRUB2_CONFIG-y) \
+ )
+ touch $@
+
+$(GRUB2_DIR)/.compiled: $(GRUB2_DIR)/.configured
+ $(MAKE) CC=$(TARGET_CC) -C $(@D)
+ touch $@
+
+$(GRUB2_DIR)/.installed: $(GRUB2_DIR)/.compiled
+ $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
+ touch $@
+
+grub2: host-automake host-autoconf $(GRUB2_DIR)/.installed
+
+grub2-clean:
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(GRUB2_DIR) uninstall
+ -$(MAKE) -C $(GRUB2_DIR) clean
+
+grub2-dirclean:
+ rm -rf $(GRUB2_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(BR2_TARGET_GRUB2),y)
+TARGETS+=grub2
+endif
diff --git a/boot/syslinux/Config.in b/boot/syslinux/Config.in
new file mode 100644
index 000000000..c65bc1f10
--- /dev/null
+++ b/boot/syslinux/Config.in
@@ -0,0 +1,12 @@
+config BR2_TARGET_SYSLINUX
+ bool "syslinux"
+ depends on BR2_i386
+ help
+ The syslinux bootloader for x86 systems.
+ This includes: syslinux, pxelinux, extlinux.
+
+config BR2_TARGET_PXELINUX
+ bool "pxelinux"
+ depends on BR2_i386 || BR2_x86_64
+ help
+ The pxelinux loader for x86 systems.
diff --git a/boot/syslinux/syslinux-3.85-makefile.patch b/boot/syslinux/syslinux-3.85-makefile.patch
new file mode 100644
index 000000000..ff85b8dc9
--- /dev/null
+++ b/boot/syslinux/syslinux-3.85-makefile.patch
@@ -0,0 +1,17 @@
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: syslinux-3.85/Makefile
+===================================================================
+--- syslinux-3.85.orig/Makefile
++++ syslinux-3.85/Makefile
+@@ -43,7 +43,7 @@
+ mbr/mbr_c.bin mbr/altmbr_c.bin mbr/gptmbr_c.bin \
+ mbr/mbr_f.bin mbr/altmbr_f.bin mbr/gptmbr_f.bin \
+ core/pxelinux.0 core/isolinux.bin core/isolinux-debug.bin \
+- gpxe/gpxelinux.0 dos/syslinux.com win32/syslinux.exe \
++ gpxe/gpxelinux.0 dos/syslinux.com \
+ dosutil/*.com dosutil/*.sys \
+ $(MODULES)
+
diff --git a/boot/syslinux/syslinux.mk b/boot/syslinux/syslinux.mk
new file mode 100644
index 000000000..192e90502
--- /dev/null
+++ b/boot/syslinux/syslinux.mk
@@ -0,0 +1,54 @@
+#############################################################
+#
+# syslinux to make target msdos/iso9660 filesystems bootable
+#
+#############################################################
+
+SYSLINUX_VERSION:=3.85
+SYSLINUX_DIR=$(BUILD_DIR)/syslinux-$(SYSLINUX_VERSION)
+SYSLINUX_SOURCE=syslinux-$(SYSLINUX_VERSION).tar.bz2
+SYSLINUX_CAT:=$(BZCAT)
+SYSLINUX_SITE=$(BR2_KERNEL_MIRROR)/linux/utils/boot/syslinux/3.xx/
+
+$(DL_DIR)/$(SYSLINUX_SOURCE):
+ $(call DOWNLOAD,$(SYSLINUX_SITE),$(SYSLINUX_SOURCE))
+
+syslinux-source: $(DL_DIR)/$(SYSLINUX_SOURCE)
+
+$(SYSLINUX_DIR)/.unpacked: $(DL_DIR)/$(SYSLINUX_SOURCE) $(SYSLINUX_PATCH)
+ mkdir -p $(@D)
+ $(SYSLINUX_CAT) $(DL_DIR)/$(SYSLINUX_SOURCE) | tar $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) -
+ toolchain/patch-kernel.sh $(@D) boot/syslinux/ \*.patch
+ touch -c $@
+
+$(SYSLINUX_DIR)/.compiled: $(SYSLINUX_DIR)/.unpacked
+ $(TARGET_MAKE_ENV) $(MAKE) CC="$(HOSTCC)" AR="$(HOSTAR)" -C $(SYSLINUX_DIR)
+ touch -c $@
+
+$(BINARIES_DIR)/isolinux.bin: $(SYSLINUX_DIR)/.compiled
+ cp -a $(SYSLINUX_DIR)/core/isolinux.bin $@
+
+$(BINARIES_DIR)/pxelinux.bin: $(SYSLINUX_DIR)/.compiled
+ cp -a $(SYSLINUX_DIR)/core/pxelinux.bin $@
+
+syslinux: host-nasm $(BINARIES_DIR)/isolinux.bin
+pxelinux: host-nasm $(BINARIES_DIR)/pxelinux.bin
+
+pxelinux-clean syslinux-clean:
+ rm -f $(BINARIES_DIR)/isolinux.bin $(BINARIES_DIR)/pxelinux.bin
+ -$(MAKE) -C $(SYSLINUX_DIR) clean
+
+pxelinux-dirclean syslinux-dirclean:
+ rm -rf $(SYSLINUX_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(BR2_TARGET_SYSLINUX),y)
+TARGETS+=syslinux
+endif
+ifeq ($(BR2_TARGET_PXELINUX),y)
+TARGETS+=pxelinux
+endif
diff --git a/boot/u-boot/Config.in b/boot/u-boot/Config.in
new file mode 100644
index 000000000..aa680cf3d
--- /dev/null
+++ b/boot/u-boot/Config.in
@@ -0,0 +1,112 @@
+menuconfig BR2_TARGET_UBOOT
+ bool "U-Boot"
+ help
+ Build "Das U-Boot" Boot Monitor
+
+if BR2_TARGET_UBOOT
+config BR2_TARGET_UBOOT_BOARDNAME
+ string "U-Boot board name"
+ help
+ One of U-Boot supported boards to be built.
+ This will be suffixed with _config to meet U-Boot standard naming.
+
+choice
+ prompt "U-Boot Version"
+ default BR2_TARGET_UBOOT_2010_03
+ help
+ Select the specific U-Boot version you want to use
+
+config BR2_TARGET_UBOOT_2010_03
+ bool "2010.03"
+
+config BR2_TARGET_UBOOT_2009_11
+ bool "2009.11"
+
+config BR2_TARGET_UBOOT_2009_08
+ bool "2009.08"
+
+config BR2_TARGET_UBOOT_CUSTOM_TARBALL
+ bool "Custom tarball"
+
+endchoice
+
+if BR2_TARGET_UBOOT_CUSTOM_TARBALL
+
+config BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION
+ string "URL of custom U-Boot tarball"
+
+endif
+
+config BR2_TARGET_UBOOT_VERSION
+ string
+ default "2010.03" if BR2_TARGET_UBOOT_2010_03
+ default "2009.11" if BR2_TARGET_UBOOT_2009_11
+ default "2009.08" if BR2_TARGET_UBOOT_2009_08
+ default "custom" if BR2_TARGET_UBOOT_CUSTOM_TARBALL
+
+config BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR
+ string "custom patch dir"
+ help
+ If your board requires custom patches, add the path to the
+ directory containing the patches here. The patches must be
+ named u-boot-<version>-<something>.patch.
+
+ Most users may leave this empty
+
+config BR2_TARGET_UBOOT_TOOL_MKIMAGE
+ bool "mkimage tool in target"
+ help
+ Install mkimage tool in target.
+
+config BR2_TARGET_UBOOT_TOOL_ENV
+ bool "fw_printenv tool in target"
+ help
+ Install fw_printenv / fw_setenv tools in target.
+
+menuconfig BR2_TARGET_UBOOT_NETWORK
+ bool "Network Settings"
+ default y
+ help
+ Network settings for U-boot
+
+if BR2_TARGET_UBOOT_NETWORK
+
+config BR2_TARGET_UBOOT_SERVERIP
+ string "server ip"
+ default "10.175.196.221"
+ help
+ TFTP server ip address
+
+config BR2_TARGET_UBOOT_IPADDR
+ string "ip address"
+ default "10.175.196.18"
+ help
+ Target ip address
+
+config BR2_TARGET_UBOOT_GATEWAY
+ string "gateway ip"
+ default "10.175.196.1"
+ help
+ Gateway ip address
+
+config BR2_TARGET_UBOOT_NETMASK
+ string "netmask"
+ default "255.255.255.0"
+ help
+ Network Mask
+
+config BR2_TARGET_UBOOT_ETHADDR
+ string "ethernet address"
+ default "04:25:fe:ed:00:18"
+ help
+ Target MAC address for the ethernet interface.
+ This should be changed for production units
+
+config BR2_TARGET_UBOOT_ETH1ADDR
+ string "ethernet 2 address"
+ help
+ Target MAC address for the second ethernet interface.
+
+endif # BR2_TARGET_UBOOT_NETWORK
+
+endif # BR2_TARGET_UBOOT
diff --git a/boot/u-boot/u-boot.mk b/boot/u-boot/u-boot.mk
new file mode 100644
index 000000000..ad67343a9
--- /dev/null
+++ b/boot/u-boot/u-boot.mk
@@ -0,0 +1,193 @@
+#############################################################
+#
+# U-Boot
+#
+#############################################################
+U_BOOT_VERSION:=$(call qstrip,$(BR2_TARGET_UBOOT_VERSION))
+U_BOOT_BOARD_NAME:=$(call qstrip,$(BR2_TARGET_UBOOT_BOARDNAME))
+
+# U-Boot may not be selected in the configuration, but mkimage might
+# be needed to build/prepare a kernel image. In this case, we just
+# pick some random stable U-Boot version that will be used just to
+# build mkimage.
+ifeq ($(U_BOOT_VERSION),)
+U_BOOT_VERSION=2010.03
+endif
+
+ifeq ($(U_BOOT_VERSION),custom)
+# Handle custom U-Boot tarballs as specified by the configuration
+U_BOOT_TARBALL=$(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION))
+U_BOOT_SITE:=$(dir $(U_BOOT_TARBALL))
+U_BOOT_SOURCE:=$(notdir $(U_BOOT_TARBALL))
+else
+# Handle stable official U-Boot versions
+U_BOOT_SITE:=ftp://ftp.denx.de/pub/u-boot
+U_BOOT_SOURCE:=u-boot-$(U_BOOT_VERSION).tar.bz2
+endif
+
+U_BOOT_DIR:=$(BUILD_DIR)/u-boot-$(U_BOOT_VERSION)
+U_BOOT_CAT:=$(BZCAT)
+U_BOOT_BIN:=u-boot.bin
+
+MKIMAGE:=$(HOST_DIR)/usr/bin/mkimage
+
+U_BOOT_TARGETS:=$(BINARIES_DIR)/$(U_BOOT_BIN) $(MKIMAGE)
+
+# u-boot still uses arch=ppc for powerpc
+U_BOOT_ARCH=$(KERNEL_ARCH:powerpc=ppc)
+
+U_BOOT_INC_CONF_FILE:=$(U_BOOT_DIR)/include/config.h
+
+ifeq ($(BR2_TARGET_UBOOT_TOOL_MKIMAGE),y)
+U_BOOT_TARGETS+=$(TARGET_DIR)/usr/bin/mkimage
+endif
+ifeq ($(BR2_TARGET_UBOOT_TOOL_ENV),y)
+U_BOOT_TARGETS+=$(TARGET_DIR)/usr/sbin/fw_printenv
+endif
+
+U_BOOT_CONFIGURE_OPTS += CONFIG_NOSOFTFLOAT=1
+
+# Define a helper function
+define insert_define
+@echo "#ifdef $(strip $(1))" >> $(U_BOOT_INC_CONF_FILE)
+@echo "#undef $(strip $(1))" >> $(U_BOOT_INC_CONF_FILE)
+@echo "#endif" >> $(U_BOOT_INC_CONF_FILE)
+@echo '#define $(strip $(1)) $(call qstrip,$(2))' >> $(U_BOOT_INC_CONF_FILE)
+endef
+
+$(DL_DIR)/$(U_BOOT_SOURCE):
+ $(call DOWNLOAD,$(U_BOOT_SITE),$(U_BOOT_SOURCE))
+
+$(U_BOOT_DIR)/.unpacked: $(DL_DIR)/$(U_BOOT_SOURCE)
+ mkdir -p $(@D)
+ $(INFLATE$(suffix $(U_BOOT_SOURCE))) $(DL_DIR)/$(U_BOOT_SOURCE) \
+ | tar $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) -
+ touch $@
+
+$(U_BOOT_DIR)/.patched: $(U_BOOT_DIR)/.unpacked
+ toolchain/patch-kernel.sh $(U_BOOT_DIR) boot/u-boot \
+ u-boot-$(U_BOOT_VERSION)-\*.patch \
+ u-boot-$(U_BOOT_VERSION)-\*.patch.$(ARCH)
+ifneq ($(qstrip $(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR)),)
+ toolchain/patch-kernel.sh $(U_BOOT_DIR) $(U_BOOT_CUSTOM_PATCH_DIR) u-boot-$(U_BOOT_VERSION)-\*.patch
+endif
+ touch $@
+
+$(U_BOOT_DIR)/.configured: $(U_BOOT_DIR)/.patched
+ifeq ($(U_BOOT_BOARD_NAME),)
+ $(error NO U-Boot board name set. Check your BR2_TARGET_UBOOT_BOARDNAME setting)
+endif
+ $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS)" \
+ $(U_BOOT_CONFIGURE_OPTS) \
+ $(MAKE) -C $(U_BOOT_DIR) \
+ $(U_BOOT_BOARD_NAME)_config
+ touch $@
+
+$(U_BOOT_DIR)/.header_modified: $(U_BOOT_DIR)/.configured
+ # Modify configuration header in $(U_BOOT_INC_CONF_FILE)
+ifdef BR2_TARGET_UBOOT_NETWORK
+ @echo >> $(U_BOOT_INC_CONF_FILE)
+ @echo "/* Add a wrapper around the values Buildroot sets. */" >> $(U_BOOT_INC_CONF_FILE)
+ @echo "#ifndef __BR2_ADDED_CONFIG_H" >> $(U_BOOT_INC_CONF_FILE)
+ @echo "#define __BR2_ADDED_CONFIG_H" >> $(U_BOOT_INC_CONF_FILE)
+ $(call insert_define, DATE, $(DATE))
+ $(call insert_define, CONFIG_LOAD_SCRIPTS, 1)
+ifneq ($(strip $(BR2_TARGET_UBOOT_IPADDR)),"")
+ $(call insert_define, CONFIG_IPADDR, $(BR2_TARGET_UBOOT_IPADDR))
+endif
+ifneq ($(strip $(BR2_TARGET_UBOOT_GATEWAY)),"")
+ $(call insert_define, CONFIG_GATEWAYIP, $(BR2_TARGET_UBOOT_GATEWAY))
+endif
+ifneq ($(strip $(BR2_TARGET_UBOOT_NETMASK)),"")
+ $(call insert_define, CONFIG_NETMASK, $(BR2_TARGET_UBOOT_NETMASK))
+endif
+ifneq ($(strip $(BR2_TARGET_UBOOT_SERVERIP)),"")
+ $(call insert_define, CONFIG_SERVERIP, $(BR2_TARGET_UBOOT_SERVERIP))
+endif
+ifneq ($(strip $(BR2_TARGET_UBOOT_ETHADDR)),"")
+ $(call insert_define, CONFIG_ETHADDR, $(BR2_TARGET_UBOOT_ETHADDR))
+endif
+ifneq ($(strip $(BR2_TARGET_UBOOT_ETH1ADDR)),"")
+ $(call insert_define, CONFIG_ETH1ADDR, $(BR2_TARGET_UBOOT_ETH1ADDR))
+endif
+ @echo "#endif /* __BR2_ADDED_CONFIG_H */" >> $(U_BOOT_INC_CONF_FILE)
+endif # BR2_TARGET_UBOOT_NETWORK
+ touch $@
+
+# Build U-Boot itself
+$(U_BOOT_DIR)/$(U_BOOT_BIN): $(U_BOOT_DIR)/.header_modified
+ $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS)" \
+ $(U_BOOT_CONFIGURE_OPTS) \
+ $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" ARCH=$(U_BOOT_ARCH) \
+ -C $(U_BOOT_DIR)
+
+# Copy the result to the images/ directory
+$(BINARIES_DIR)/$(U_BOOT_BIN): $(U_BOOT_DIR)/$(U_BOOT_BIN)
+ rm -f $(BINARIES_DIR)/$(U_BOOT_BIN)
+ cp -dpf $(U_BOOT_DIR)/$(U_BOOT_BIN) $(BINARIES_DIR)/
+
+# Build just mkimage for the host. It might have already been built by
+# the U-Boot build procedure, but mkimage may also be needed even if
+# U-Boot isn't selected in the configuration, to generate a kernel
+# uImage.
+$(MKIMAGE): $(U_BOOT_DIR)/.patched
+ mkdir -p $(@D)
+ $(MAKE) -C $(U_BOOT_DIR) tools
+ cp -dpf $(U_BOOT_DIR)/tools/mkimage $(@D)
+
+# Build manually mkimage for the target
+$(TARGET_DIR)/usr/bin/mkimage: $(U_BOOT_DIR)/.configured
+ mkdir -p $(@D)
+ $(TARGET_CC) -I$(U_BOOT_DIR)/include -I$(U_BOOT_DIR)/tools \
+ -DUSE_HOSTCC -o $@ \
+ $(U_BOOT_DIR)/common/image.c \
+ $(wildcard $(addprefix $(U_BOOT_DIR)/tools/,default_image.c \
+ fit_image.c imximage.c kwbimage.c mkimage.c)) \
+ $(addprefix $(U_BOOT_DIR)/lib_generic/,crc32.c md5.c sha1.c) \
+ $(U_BOOT_DIR)/tools/os_support.c \
+ $(U_BOOT_DIR)/libfdt/fdt*.c
+
+ $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $@
+
+# Build manually fw_printenv for the target
+$(TARGET_DIR)/usr/sbin/fw_printenv: $(U_BOOT_DIR)/.configured
+ mkdir -p $(@D)
+ $(TARGET_CC) -I$(U_BOOT_DIR)/include -I$(LINUX_HEADERS_DIR)/include \
+ -DUSE_HOSTCC -o $@ \
+ $(U_BOOT_DIR)/tools/env/*.c $(U_BOOT_DIR)/lib_generic/crc32.c
+ $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $@
+ ln -sf fw_printenv $(TARGET_DIR)/usr/sbin/fw_setenv
+
+u-boot: $(U_BOOT_TARGETS)
+
+u-boot-clean:
+ -$(MAKE) -C $(U_BOOT_DIR) clean
+ rm -f $(MKIMAGE)
+
+u-boot-dirclean:
+ rm -rf $(U_BOOT_DIR)
+
+u-boot-source: $(DL_DIR)/$(U_BOOT_SOURCE)
+
+u-boot-unpacked: $(U_BOOT_DIR)/.patched
+
+u-boot-configured: $(U_BOOT_DIR)/.header_modified
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(BR2_TARGET_UBOOT),y)
+TARGETS+=u-boot
+
+# we NEED a board name
+ifeq ($(U_BOOT_BOARD_NAME),)
+$(error NO U-Boot board name set. Check your BR2_TARGET_UBOOT_BOARDNAME setting)
+endif
+
+endif