From: pavlov Date: Thu, 1 Feb 2007 01:07:26 +0000 (+0000) Subject: clean up the x86 image build a bit, fixing unconditional copy of grub files X-Git-Url: http://git.rohieb.name/openwrt.git/commitdiff_plain/532f7ffb63d6f0e078cf04640abfbf6c84a3ebde clean up the x86 image build a bit, fixing unconditional copy of grub files git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6237 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/target/linux/x86-2.6/image/Makefile b/target/linux/x86-2.6/image/Makefile index 24ac9e1fb..dc1d33343 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))