summaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2005-06-23 05:09:05 +0000
committerEric Andersen <andersen@codepoet.org>2005-06-23 05:09:05 +0000
commitd7d57699ef83cce36d87bef73c9e1fbdc765a64c (patch)
treee43edbfd5eaaadf7acd1237081dce715d1ea0a57 /target
parentf5723cdb9b3d899278a56368c9bec89a2e51d800 (diff)
downloadbuildroot-novena-d7d57699ef83cce36d87bef73c9e1fbdc765a64c.tar.gz
buildroot-novena-d7d57699ef83cce36d87bef73c9e1fbdc765a64c.zip
Add support for building a few commonly used bootloaders
Diffstat (limited to 'target')
-rw-r--r--target/Config.in5
-rw-r--r--target/powerpc/yaboot/Config.in6
-rw-r--r--target/powerpc/yaboot/yaboot.mk44
-rw-r--r--target/x86/grub/Config.in6
-rw-r--r--target/x86/grub/grub.mk70
-rw-r--r--target/x86/syslinux/Config.in6
-rw-r--r--target/x86/syslinux/syslinux.mk40
7 files changed, 177 insertions, 0 deletions
diff --git a/target/Config.in b/target/Config.in
index 88b4b0e36..010f76b39 100644
--- a/target/Config.in
+++ b/target/Config.in
@@ -6,6 +6,11 @@ source "target/jffs2/Config.in"
source "target/squashfs/Config.in"
source "target/tar/Config.in"
+source "target/x86/grub/Config.in"
+source "target/x86/syslinux/Config.in"
+source "target/powerpc/yaboot/Config.in"
+
endmenu
source "target/device/Config.in"
+
diff --git a/target/powerpc/yaboot/Config.in b/target/powerpc/yaboot/Config.in
new file mode 100644
index 000000000..2072421d6
--- /dev/null
+++ b/target/powerpc/yaboot/Config.in
@@ -0,0 +1,6 @@
+config BR2_TARGET_YABOOT
+ bool "grub bootloader"
+ default n
+ depends on BR2_powerpc
+ help
+ The yaboot bootloader for new world powerpc systems.
diff --git a/target/powerpc/yaboot/yaboot.mk b/target/powerpc/yaboot/yaboot.mk
new file mode 100644
index 000000000..d463bcb7d
--- /dev/null
+++ b/target/powerpc/yaboot/yaboot.mk
@@ -0,0 +1,44 @@
+ifeq ($(ARCH),powerpc)
+
+#############################################################
+#
+# yaboot
+#
+#############################################################
+
+YABOOT_SOURCE:=yaboot-1.3.13.tar.gz
+YABOOT_SITE:=http://penguinppc.org/bootloaders/yaboot
+YABOOT_DIR:=$(BUILD_DIR)/yaboot-1.3.13
+
+$(DL_DIR)/$(YABOOT_SOURCE):
+ $(WGET) -P $(DL_DIR) $(YABOOT_SITE)/$(YABOOT_SOURCE)
+
+yaboot-source: $(DL_DIR)/$(YABOOT_SOURCE)
+
+$(YABOOT_DIR)/Makefile: $(DL_DIR)/$(YABOOT_SOURCE)
+ zcat $(DL_DIR)/$(YABOOT_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ touch -c $(YABOOT_DIR)/Makefile
+
+$(YABOOT_DIR)/second/yaboot: $(YABOOT_DIR)/Makefile
+ make -C $(YABOOT_DIR) CROSS=$(TARGET_CROSS)
+ touch -c $(YABOOT_DIR)/second/yaboot
+
+yaboot: $(YABOOT_DIR)/second/yaboot
+
+yaboot-clean:
+ make -C $(YABOOT_DIR) clean
+
+yaboot-dirclean:
+ rm -rf $(YABOOT_DIR)
+
+endif
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_TARGET_YABOOT)),y)
+TARGETS+=yaboot
+endif
+
diff --git a/target/x86/grub/Config.in b/target/x86/grub/Config.in
new file mode 100644
index 000000000..2dc241a23
--- /dev/null
+++ b/target/x86/grub/Config.in
@@ -0,0 +1,6 @@
+config BR2_TARGET_GRUB
+ bool "grub bootloader"
+ default n
+ depends on BR2_i386
+ help
+ The GRand Unified Bootloader for x86 systems.
diff --git a/target/x86/grub/grub.mk b/target/x86/grub/grub.mk
new file mode 100644
index 000000000..bac341814
--- /dev/null
+++ b/target/x86/grub/grub.mk
@@ -0,0 +1,70 @@
+ifeq ($(ARCH),i386)
+#############################################################
+#
+# grub
+#
+#############################################################
+GRUB_SOURCE:=grub_0.95+cvs20040624.orig.tar.gz
+GRUB_PATCH=grub_0.95+cvs20040624-17.diff.gz
+GRUB_SITE=http://ftp.debian.org/debian/pool/main/g/grub
+GRUB_CAT:=zcat
+GRUB_DIR:=$(BUILD_DIR)/grub-0.95+cvs20040624
+GRUB_BINARY:=grub/grub
+GRUB_TARGET_BINARY:=bin/grub
+
+$(DL_DIR)/$(GRUB_SOURCE):
+ $(WGET) -P $(DL_DIR) $(GRUB_SITE)/$(GRUB_SOURCE)
+
+$(DL_DIR)/$(GRUB_PATCH):
+ $(WGET) -P $(DL_DIR) $(GRUB_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 -
+ $(GRUB_CAT) $(DL_DIR)/$(GRUB_PATCH) | patch -p1 -d $(GRUB_DIR)
+ for i in `cat $(GRUB_DIR)/debian/patches/00list`; do \
+ cat $(GRUB_DIR)/debian/patches/$$i | patch -p1 -d $(GRUB_DIR); \
+ done
+ touch $(GRUB_DIR)/.unpacked
+
+$(GRUB_DIR)/.configured: $(GRUB_DIR)/.unpacked
+ (cd $(GRUB_DIR); rm -rf config.cache; \
+ $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ CPPFLAGS="$(GRUB_CFLAGS)" \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --prefix=/ \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --disable-auto-linux-mem-opt \
+ );
+ touch $(GRUB_DIR)/.configured
+
+$(GRUB_DIR)/$(GRUB_BINARY): $(GRUB_DIR)/.configured
+ $(MAKE) CC=$(TARGET_CC) -C $(GRUB_DIR)
+
+grub-target_binary: $(GRUB_DIR)/$(GRUB_BINARY)
+
+grub: grub-target_binary
+
+grub-clean:
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(GRUB_DIR) uninstall
+ -grub -C $(GRUB_DIR) clean
+
+grub-dirclean:
+ rm -rf $(GRUB_DIR)
+
+endif
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_TARGET_GRUB)),y)
+TARGETS+=grub
+endif
diff --git a/target/x86/syslinux/Config.in b/target/x86/syslinux/Config.in
new file mode 100644
index 000000000..98465fcd7
--- /dev/null
+++ b/target/x86/syslinux/Config.in
@@ -0,0 +1,6 @@
+config BR2_TARGET_SYSLINUX
+ bool "syslinux bootloader"
+ default n
+ depends on BR2_i386
+ help
+ The syslinux bootloader for x86 systems.
diff --git a/target/x86/syslinux/syslinux.mk b/target/x86/syslinux/syslinux.mk
new file mode 100644
index 000000000..05092ac57
--- /dev/null
+++ b/target/x86/syslinux/syslinux.mk
@@ -0,0 +1,40 @@
+ifeq ($(ARCH),i386)
+#############################################################
+#
+# syslinux to make target msdos/iso9660 filesystems bootable
+#
+#############################################################
+
+SYSLINUX_DIR=$(BUILD_DIR)/syslinux-3.09
+SYSLINUX_SOURCE=syslinux-3.09.tar.bz2
+SYSLINUX_SITE=http://www.kernel.org/pub/linux/utils/boot/syslinux/
+
+$(DL_DIR)/$(SYSLINUX_SOURCE):
+ $(WGET) -P $(DL_DIR) $(SYSLINUX_SITE)/$(SYSLINUX_SOURCE)
+
+$(SYSLINUX_DIR)/Makefile: $(DL_DIR)/$(SYSLINUX_SOURCE) $(SYSLINUX_PATCH)
+ bzcat $(DL_DIR)/$(SYSLINUX_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ touch -c $(SYSLINUX_DIR)/Makefile
+
+$(SYSLINUX_DIR)/isolinux.bin: $(SYSLINUX_DIR)/Makefile
+ $(MAKE) -C $(SYSLINUX_DIR)
+ touch -c $(SYSLINUX_DIR)/isolinux.bin
+
+syslinux: $(SYSLINUX_DIR)/isolinux.bin
+
+syslinux-clean:
+ -make -C $(SYSLINUX_DIR) clean
+
+syslinux-dirclean:
+ rm -rf $(SYSLINUX_DIR)
+
+endif
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_TARGET_SYSLINUX)),y)
+TARGETS+=syslinux
+endif