ramips: rt3833: fix build breakage
[openwrt/openwrt.git] / target / linux / ramips / image / rt3883.mk
index edfd43cd6b216c3ae669f5ac54837e9dddba2f6c..4844abd1b7d94bbdff2222c208b3ae3d0b6cb4e4 100644 (file)
 #
 # RT3662/RT3883 Profiles
 #
-
-define Device/TEW691GR
-  DTS := TEW-691GR
-  IMAGES += factory.bin
-  IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | umedia-header 0x026910
-  DEVICE_TITLE := TRENDnet TEW-691GR
-  DEVICE_PACKAGES := swconfig
+define Build/mkrtn56uimg
+       $(STAGING_DIR_HOST)/bin/mkrtn56uimg $(1) $@
 endef
-TARGET_DEVICES += TEW691GR
 
-
-define Device/TEW692GR
-  DTS := TEW-692GR
-  IMAGES += factory.bin
-  IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | umedia-header 0x026920
-  DEVICE_TITLE := TRENDnet TEW-692GR
+define Device/br-6475nd
+  DTS := BR-6475ND
+  BLOCKSIZE := 64k
+  IMAGE_SIZE := 7744k
+  IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \
+       edimax-header -s CSYS -m RN54 -f 0x70000 -S 0x01100000 | pad-rootfs | \
+       append-metadata | check-size $$$$(IMAGE_SIZE)
+  DEVICE_TITLE := Edimax BR-6475nD
   DEVICE_PACKAGES := swconfig
 endef
-TARGET_DEVICES += TEW692GR
-
-
-# $(1) = squashfs/initramfs
-# $(2) = lowercase board name
-# $(3) = dts file
-# $(4) = kernel size
-# $(5) = rootfs size
-# $(6) = signature
-# $(7) = model
-# $(8) = flash address
-# $(9) = start address
-define BuildFirmware/EdimaxCombined/squashfs
-       $(call PatchKernelLzmaDtb,$(2),$(3))
-       $(call MkImage,lzma,$(KDIR)/vmlinux-$(2).bin.lzma,$(KDIR)/vmlinux-$(2).bin.uImage)
-       if [ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.uImage"` -gt `expr $(4) - 20` ]; then \
-               echo "Warning: $(KDIR)/vmlinux-$(2).bin.uImage is too big" >&2; \
-               exit 1; \
-       else if [ `stat -c%s "$(KDIR)/root.$(1)"` -gt $(5) ]; then \
-               echo "Warning: $(KDIR)/root.$(1) is too big" >&2; \
-               exit 1; \
-       else \
-               ( dd if=$(KDIR)/vmlinux-$(2).bin.uImage bs=`expr $(4) - 20` conv=sync ; dd if=$(KDIR)/root.$(1) ) > $(KDIR)/vmlinux-$(2).bin.uImage.combined ; \
-       fi ; fi
-       mkedimaximg -i "$(KDIR)/vmlinux-$(2).bin.uImage.combined" \
-               -o $(call imgname,$(1),$(2)).bin \
-               -s $(6) -m $(7) -f $(8) -S $(9)
-endef
-
-define BuildFirmware/RTN56U/squashfs
-       $(call BuildFirmware/Default8M/$(1),$(1),rt-n56u,RT-N56U)
-       -mkrtn56uimg -s $(call sysupname,$(1),rt-n56u)
-       -cp $(call sysupname,$(1),rt-n56u) $(call imgname,$(1),rt-n56u)-factory.bin
-       -mkrtn56uimg -f $(call imgname,$(1),rt-n56u)-factory.bin
+TARGET_DEVICES += br-6475nd
+
+define Device/cy-swr1100
+  $(Device/seama)
+  DTS := CY-SWR1100
+  BLOCKSIZE := 64k
+  KERNEL := $(KERNEL_DTB)
+  SEAMA_SIGNATURE := wrgnd10_samsung_ss815
+  DEVICE_TITLE := Samsung CY-SWR1100
+  DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 \
+       kmod-usb-ledtrig-usbport swconfig
 endef
+TARGET_DEVICES += cy-swr1100
 
 
-Image/Build/Profile/CYSWR1100=$(call BuildFirmware/Seama/$(1),$(1),cy-swr1100,CY-SWR1100,wrgnd10_samsung_ss815,$(ralink_default_fw_size_8M))
-Image/Build/Profile/DIR645=$(call BuildFirmware/Seama/$(1),$(1),dir-645,DIR-645,wrgn39_dlob.hans_dir645,$(ralink_default_fw_size_8M))
-hpm_mtd_size=16449536
-Image/Build/Profile/HPM=$(call BuildFirmware/CustomFlash/$(1),$(1),hpm,HPM,$(hpm_mtd_size))
-Image/Build/Profile/RTN56U=$(call BuildFirmware/RTN56U/$(1),$(1),rt-n56u,RT-N56U)
-kernel_size_BR6475ND:=2097152
-rootfs_size_BR6475ND:=5832704
-Image/Build/Profile/BR6475ND=$(call BuildFirmware/EdimaxCombined/$(1),$(1),br-6475nd,BR-6475ND,$(kernel_size_BR6475ND),$(rootfs_size_BR6475ND),CSYS,RN54,0x70000,0x01100000)
-
-
-define LegacyDevice/CYSWR1100
-  DEVICE_TITLE := Samsung CY-SWR1100
+define Device/dir-645
+  $(Device/seama)
+  DTS := DIR-645
+  BLOCKSIZE := 4k
+  KERNEL := $(KERNEL_DTB)
+  SEAMA_SIGNATURE := wrgn39_dlob.hans_dir645
+  DEVICE_TITLE := D-Link DIR-645
   DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 swconfig
 endef
-LEGACY_DEVICES += CYSWR1100
+TARGET_DEVICES += dir-645
 
 
-define LegacyDevice/DIR645
-  DEVICE_TITLE := D-Link DIR-645
+define Device/belkin_f9k1109v1
+  DTS := F9K1109V1
+  BLOCKSIZE := 64k
+  DEVICE_TITLE := Belkin F9K1109 Version 1.0
   DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 swconfig
+  IMAGE_SIZE := 7224k
+  KERNEL := kernel-bin | patch-dtb | lzma -d16 | uImage lzma
+  # Stock firmware checks for this uImage image name during upload.
+  UIMAGE_NAME := N750F9K1103VB
 endef
-LEGACY_DEVICES += DIR645
-
+TARGET_DEVICES += belkin_f9k1109v1
 
-define LegacyDevice/HPM
+define Device/hpm
+  DTS := HPM
+  BLOCKSIZE := 64k
+  IMAGE_SIZE := 16064k
   DEVICE_TITLE := Omnima HPM
   DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2
 endef
-LEGACY_DEVICES += HPM
+TARGET_DEVICES += hpm
 
 
-define LegacyDevice/RTN56U
+define Device/rt-n56u
+  DTS := RT-N56U
+  BLOCKSIZE := 64k
+  IMAGE/sysupgrade.bin += | mkrtn56uimg -s
   DEVICE_TITLE := Asus RT-N56U
   DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 swconfig
 endef
-LEGACY_DEVICES += RTN56U
+TARGET_DEVICES += rt-n56u
 
 
-define LegacyDevice/BR6475ND
-  DEVICE_TITLE := Edimax BR-6475nD
+define Device/tew-691gr
+  DTS := TEW-691GR
+  BLOCKSIZE := 64k
+  IMAGES += factory.bin
+  IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
+       umedia-header 0x026910
+  DEVICE_TITLE := TRENDnet TEW-691GR
+  DEVICE_PACKAGES := swconfig
+endef
+TARGET_DEVICES += tew-691gr
+
+
+define Device/tew-692gr
+  DTS := TEW-692GR
+  BLOCKSIZE := 64k
+  IMAGES += factory.bin
+  IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
+       umedia-header 0x026920
+  DEVICE_TITLE := TRENDnet TEW-692GR
   DEVICE_PACKAGES := swconfig
 endef
-LEGACY_DEVICES += BR6475ND
+TARGET_DEVICES += tew-692gr
+
+
+define Device/wlr-6000
+  DTS := WLR-6000
+  BLOCKSIZE := 4k
+  IMAGE_SIZE := 7244k
+  IMAGES += factory.dlf
+  IMAGE/factory.dlf := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
+       senao-header -r 0x0202 -p 0x41 -t 2
+  DEVICE_TITLE := Sitecom WLR-6000
+  DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 swconfig
+endef
+TARGET_DEVICES += wlr-6000
+
+
+define Device/wmdr-143n
+  DTS := WMDR-143N
+  BLOCKSIZE := 64k
+  DEVICE_TITLE := Loewe WMDR-143N
+endef
+TARGET_DEVICES += wmdr-143n