image: add a helper variable for getting kernel/rootfs from within image Build/*...
[openwrt/openwrt.git] / target / linux / brcm2708 / image / Makefile
index 6916a2b4aed43a273142517bd93c178d970d4885..81a7647ec295fb24ad10fdf6ae734480c863a2a3 100644 (file)
@@ -30,7 +30,7 @@ define Build/boot-img
        mcopy -i $@.boot $(KDIR)/fixup_cd.dat ::
        mcopy -i $@.boot cmdline.txt ::
        mcopy -i $@.boot config.txt ::
-       mcopy -i $@.boot $(word 1,$^) ::kernel.img
+       mcopy -i $@.boot $(IMAGE_KERNEL) ::kernel.img
        $(foreach dts,$(shell echo $(DEVICE_DTS)),mcopy -i $@.boot $(DTS_DIR)/$(dts).dtb ::;)
        mmd -i $@.boot ::/overlays
        mcopy -i $@.boot $(DTS_DIR)/overlays/*.dtbo ::/overlays/
@@ -38,7 +38,7 @@ define Build/boot-img
 endef
 
 define Build/sdcard-img
-       ./gen_rpi_sdcard_img.sh $@ $@.boot $(word 2,$^) \
+       ./gen_rpi_sdcard_img.sh $@ $@.boot $(IMAGE_ROOTFS) \
                $(CONFIG_BRCM2708_SD_BOOT_PARTSIZE) $(CONFIG_TARGET_ROOTFS_PARTSIZE)
        $(if $(CONFIG_TARGET_IMAGES_GZIP),gzip -9n -c $@ > $(BIN_DIR)/$(notdir $@).gz)
 endef
@@ -49,9 +49,7 @@ define Device/Default
   KERNEL := kernel-bin | kernel-img
   IMAGES := sdcard.img
   IMAGE/sdcard.img := boot-img | sdcard-img
-  DEVICE_DTS :=
 endef
-DEVICE_VARS += DEVICE_DTS
 
 define Device/rpi
   DEVICE_TITLE := Raspberry Pi B/B+/CM/Zero