ar71xx: use MkImageLzma template for Ubiquiti XM devices
[openwrt.git] / target / linux / ar71xx / image / Makefile
index 24b1fa3..db57ed4 100644 (file)
@@ -138,20 +138,20 @@ define Image/Build/MyLoader
                $(call imgname,$(1),$(2))-16M.img
 endef
 
-ubntxm_mtdlayout=mtdparts=spi0.0:256k(u-boot),64k(u-boot-env),1024k(kernel),6528k(rootfs),256k(cfg),64k(EEPROM)
+ubntxm_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1024k(kernel),6528k(rootfs),256k(cfg)ro,64k(EEPROM)ro,7552k@0x50000(firmware)
 define Image/Build/UBNTXM
        $(call PatchKernelLzma,$(2),$(3) $(ubntxm_mtdlayout))
-       mkimage -A mips -O linux -T kernel -a 0x80060000 -C lzma -e \
-               0x80060000 \
-               -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
-               -d $(KDIR)/vmlinux-$(2).bin.lzma \
-               $(KDIR)/vmlinux-$(2).uImage.bin
+       $(call MkImageLzma,$(KDIR)/vmlinux-$(2).bin.lzma,$(KDIR)/vmlinux-$(2).uImage.bin)
        dd if=$(KDIR)/vmlinux-$(2).uImage.bin of=$(KDIR)/vmlinux-$(2).uImage bs=1024k conv=sync
        -$(STAGING_DIR_HOST)/bin/mkfwimage \
                -B $(4) -v $(5).$(6).OpenWrt.$(REVISION) \
                -k $(KDIR)/vmlinux-$(2).uImage \
                -r $(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \
-               -o $(call imgname,$(1),$(2)).bin
+               -o $(call imgname,$(1),$(2))-factory.bin
+       ( \
+               dd if=$(KDIR)/vmlinux-$(2).uImage; \
+               dd if=$(BIN_DIR)/openwrt-$(BOARD)-root.$(1); \
+       ) > $(call imgname,$(1),$(2))-sysupgrade.bin
 endef
 
 define Image/Build/UBNT
@@ -161,7 +161,11 @@ define Image/Build/UBNT
                -B $(4) -v $(5).$(6).OpenWrt.$(REVISION) \
                -k $(KDIR)/vmlinux-$(2).lzma \
                -r $(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \
-               -o $(call imgname,$(1),$(2)).bin
+               -o $(call imgname,$(1),$(2))-factory.bin
+       -sh $(TOPDIR)/scripts/combined-image.sh \
+               "$(KDIR)/vmlinux-$(2).lzma" \
+               "$(BIN_DIR)/openwrt-$(BOARD)-root.$(1)" \
+               $(call imgname,$(1),$(2))-sysupgrade.bin
 endef
 
 define Image/Build/Planex
@@ -431,6 +435,11 @@ endef
 
 define Image/Build/squashfs
        $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
+       dd if=$(KDIR)/root.squashfs of=$(KDIR)/root.squashfs-4k.tmp0 bs=4k conv=sync
+       $(call add_jffs2_mark,$(KDIR)/root.squashfs-4k.tmp0)
+       dd if=$(KDIR)/root.squashfs-4k.tmp0 of=$(IMGNAME)-root.squashfs-4k bs=4k conv=sync
+       $(call add_jffs2_mark,$(IMGNAME)-root.squashfs-4k)
+       rm -f $(KDIR)/root.squashfs-4k.tmp0
 endef
 
 define Image/Build
This page took 0.025287 seconds and 4 git commands to generate.