build a Devolo dLAN USB Extender specific image
authorFlorian Fainelli <florian@openwrt.org>
Wed, 8 Aug 2012 21:51:00 +0000 (21:51 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Wed, 8 Aug 2012 21:51:00 +0000 (21:51 +0000)
The kernel has to be rounded up to the nearest 1MB, then we append
the root filesystem at its end.

SVN-Revision: 33066

target/linux/mcs814x/image/Makefile

index 89772c98efe9c8bf26660040d6485af0b1465bfd..f0642e3f9d6184fe5000b1c8c3b73f5c6f2a46bc 100644 (file)
@@ -32,14 +32,21 @@ define Image/Prepare
        cp $(LINUX_DIR)/arch/$(ARCH)/boot/zImage $(KDIR)/zImage
 endef
 
+define Image/Build/dlan
+       dd if=$(KDIR)/uImage-dlan-usb-extender bs=1M conv=sync of=$(KDIR)/$(IMG_PREFIX)-dlan-usb-extender-upgrade.bin
+       cat $(KDIR)/root.$(1) >> $(KDIR)/$(IMG_PREFIX)-dlan-usb-extender-upgrade.bin
+       cp $(KDIR)/$(IMG_PREFIX)-dlan-usb-extender-upgrade.bin $(BIN_DIR)/
+endef
+
 define Image/BuildKernel
        $(foreach dtb,$(TARGET_DTBS),$(call Image/Build/DTB,$(dtb)))
        $(call Image/Build/Initramfs)
 endef
 
 define Image/Build
-       $(call Image/Build/$(1))
        dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
+       $(call Image/Build/$(1))
+       $(call Image/Build/dlan,$(1))
 endef
 
 $(eval $(call BuildImage))