aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/x86-2.6
diff options
context:
space:
mode:
authorTim Yardley <lst@openwrt.org>2007-02-01 01:07:26 +0000
committerTim Yardley <lst@openwrt.org>2007-02-01 01:07:26 +0000
commit48a4bcc0b79248121e2b50089f0fbbc181490ea4 (patch)
treeccc095a47ed75d28f9139902b32e9e8ced8c1d8d /target/linux/x86-2.6
parentdc4f082aea2691022b5ac1a92b22e6519fc5c61d (diff)
downloadupstream-48a4bcc0b79248121e2b50089f0fbbc181490ea4.tar.gz
upstream-48a4bcc0b79248121e2b50089f0fbbc181490ea4.tar.bz2
upstream-48a4bcc0b79248121e2b50089f0fbbc181490ea4.zip
clean up the x86 image build a bit, fixing unconditional copy of grub files
SVN-Revision: 6237
Diffstat (limited to 'target/linux/x86-2.6')
-rw-r--r--target/linux/x86-2.6/image/Makefile17
1 files changed, 12 insertions, 5 deletions
diff --git a/target/linux/x86-2.6/image/Makefile b/target/linux/x86-2.6/image/Makefile
index 24ac9e1fba..dc1d333434 100644
--- a/target/linux/x86-2.6/image/Makefile
+++ b/target/linux/x86-2.6/image/Makefile
@@ -34,7 +34,8 @@ ifeq ($(CONFIG_X86_GRUB_IMAGES),y)
endef
define Image/Build/grub
- mkdir -p $(KDIR)/root.grub/boot/grub
+ # left here because the image builder doesnt need these
+ $(INSTALL_DIR) $(KDIR)/root.grub/boot/grub
$(CP) \
$(KDIR)/*stage* \
$(KDIR)/root.grub/boot/grub/
@@ -47,8 +48,8 @@ ifeq ($(CONFIG_X86_GRUB_IMAGES),y)
endef
endif
-define Image/Prepare
- cp $(LINUX_DIR)/arch/i386/boot/bzImage $(KDIR)/bzImage
+ifeq ($(CONFIG_X86_GRUB_IMAGES),y)
+ define Image/Prepare/grub
# for the image builder
$(CP) \
$(STAGING_DIR)/usr/lib/grub/i386-pc/stage1 \
@@ -56,12 +57,18 @@ define Image/Prepare
$(STAGING_DIR)/usr/lib/grub/i386-pc/e2fs_stage1_5 \
$(KDIR)/
$(CP) $(STAGING_DIR)/usr/sbin/grub $(STAGING_DIR)/bin
+ endef
+endif
+
+define Image/Prepare
+ $(CP) $(LINUX_DIR)/arch/i386/boot/bzImage $(KDIR)/bzImage
+ $(call Image/Prepare/grub)
endef
define Image/Build
$(call Image/Build/grub,$(1))
- cp $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).fs
- cp $(KDIR)/bzImage $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz
+ $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).fs
+ $(CP) $(KDIR)/bzImage $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz
endef
$(eval $(call BuildImage))