summaryrefslogtreecommitdiff
path: root/target/linux/ramips
diff options
context:
space:
mode:
authorNicolas Thill <nico@openwrt.org>2010-04-12 23:15:56 +0000
committerNicolas Thill <nico@openwrt.org>2010-04-12 23:15:56 +0000
commite2b57ecf5f1f50f7b5f5644e483e06dd67a3cb5f (patch)
treef8563604e7685c30b0a2a675ca80379a34114565 /target/linux/ramips
parent040c06438896144dfe148910f922a0d9bb0058b0 (diff)
downloadmtk-20170518-e2b57ecf5f1f50f7b5f5644e483e06dd67a3cb5f.zip
mtk-20170518-e2b57ecf5f1f50f7b5f5644e483e06dd67a3cb5f.tar.gz
mtk-20170518-e2b57ecf5f1f50f7b5f5644e483e06dd67a3cb5f.tar.bz2
define a shared IMG_PREFIX variable used as a basename for image files, it contains board & subtarget infos (if appropriate) allowing subtargets to share the same bin directory without overwriting each other's files
SVN-Revision: 20834
Diffstat (limited to 'target/linux/ramips')
-rw-r--r--target/linux/ramips/image/Makefile20
1 files changed, 9 insertions, 11 deletions
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index 4cca2fc..f0fcfb2 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -7,17 +7,15 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
-IMGNAME:=$(BIN_DIR)/openwrt-$(BOARD)
-
define imgname
-$(IMGNAME)-$(2)-$(patsubst jffs2-%,jffs2,$(patsubst squashfs-%,squashfs,$(1)))
+$($BIN_DIR)/$(IMG_PREFIX)-$(2)-$(patsubst jffs2-%,jffs2,$(patsubst squashfs-%,squashfs,$(1)))
endef
-VMLINUX:=$(IMGNAME)-vmlinux
-UIMAGE:=$(IMGNAME)-uImage
+VMLINUX:=$(IMG_PREFIX)-vmlinux
+UIMAGE:=$(IMG_PREFIX)-uImage
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
- VMLINUX:=$(IMGNAME)-vmlinux-initramfs
- UIMAGE:=$(IMGNAME)-uImage-initramfs
+ VMLINUX:=$(IMG_PREFIX)-vmlinux-initramfs
+ UIMAGE:=$(IMG_PREFIX)-uImage-initramfs
endif
ifeq ($(CONFIG_RALINK_RT305X),y)
@@ -47,11 +45,11 @@ define MkImage
endef
define Image/BuildKernel
- cp $(KDIR)/vmlinux.elf $(VMLINUX).elf
- cp $(KDIR)/vmlinux $(VMLINUX).bin
+ cp $(KDIR)/vmlinux.elf $(BIN_DIR)/$(VMLINUX).elf
+ cp $(KDIR)/vmlinux $(BIN_DIR)/$(VMLINUX).bin
$(call CompressLzma,$(KDIR)/vmlinux,$(KDIR)/vmlinux.bin.lzma)
$(call MkImage,lzma,$(KDIR)/vmlinux.bin.lzma,$(KDIR)/uImage.lzma)
- cp $(KDIR)/uImage.lzma $(UIMAGE).bin
+ cp $(KDIR)/uImage.lzma $(BIN_DIR)/$(UIMAGE).bin
endef
define BuildFirmware/Generic
@@ -113,7 +111,7 @@ endef
define Image/Build
$(call Image/Build/$(1))
- dd if=$(KDIR)/root.$(1) of=$(IMGNAME)-root.$(1) bs=128k conv=sync
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
$(call Image/Build/Profile/$(PROFILE),$(1))
endef