aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/image/Makefile
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2016-11-21 08:46:48 +0100
committerMathias Kresin <dev@kresin.me>2016-12-24 10:03:38 +0100
commit0cf581ca3a2a692938003a7038d93f2e24d9125a (patch)
tree94bdee9217bcdd040ba563afef1851f2a68bba95 /target/linux/ramips/image/Makefile
parenta75ce960ac1b9d67af280e17e1e653b3b39def20 (diff)
downloadupstream-0cf581ca3a2a692938003a7038d93f2e24d9125a.tar.gz
upstream-0cf581ca3a2a692938003a7038d93f2e24d9125a.tar.bz2
upstream-0cf581ca3a2a692938003a7038d93f2e24d9125a.zip
ramips: use new image build code for more devices
Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux/ramips/image/Makefile')
-rw-r--r--target/linux/ramips/image/Makefile59
1 files changed, 5 insertions, 54 deletions
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index 25396f5984..255aa8c5e6 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -85,6 +85,11 @@ define Build/edimax-header
@mv $@.new $@
endef
+define Build/poray-header
+ $(STAGING_DIR_HOST)/bin/mkporayfw $(1) -f $@ -o $@.new
+ mv $@.new $@
+endef
+
define Build/senao-header
$(STAGING_DIR_HOST)/bin/mksenaofw $(1) -e $@ -o $@.new
mv $@.new $@
@@ -179,63 +184,9 @@ ralink_default_fw_size_4M=3866624
BuildFirmware/Default4M/squashfs=$(call BuildFirmware/OF,$(1),$(2),$(3),$(ralink_default_fw_size_4M),$(4))
BuildFirmware/Default4M/initramfs=$(call BuildFirmware/OF/initramfs,$(1),$(2),$(3),$(4))
-# Build images for default ralink layout for 8MB flash
-# kernel + roots = 0x7b0000
-# $(1) = squashfs/initramfs
-# $(2) = lowercase board name
-# $(3) = dts file
-# $(4) = uImage header name field
ralink_default_fw_size_8M=8060928
-BuildFirmware/Default8M/squashfs=$(call BuildFirmware/OF,$(1),$(2),$(3),$(ralink_default_fw_size_8M),$(4))
-BuildFirmware/Default8M/initramfs=$(call BuildFirmware/OF/initramfs,$(1),$(2),$(3),$(4))
-
ralink_default_fw_size_16M=16121856
-BuildFirmware/Default16M/squashfs=$(call BuildFirmware/OF,$(1),$(2),$(3),$(ralink_default_fw_size_16M),$(4))
-BuildFirmware/Default16M/initramfs=$(call BuildFirmware/OF/initramfs,$(1),$(2),$(3),$(4))
-
ralink_default_fw_size_32M=33226752
-BuildFirmware/Default32M/squashfs=$(call BuildFirmware/OF,$(1),$(2),$(3),$(ralink_default_fw_size_32M),$(4))
-BuildFirmware/Default32M/initramfs=$(call BuildFirmware/OF/initramfs,$(1),$(2),$(3),$(4))
-
-# Build images for a custom sized flash layout
-# $(1) = squashfs/initramfs
-# $(2) = lowercase board name
-# $(3) = dts file
-# $(4) = kernel + rootfs size
-BuildFirmware/CustomFlash/squashfs=$(call BuildFirmware/OF,$(1),$(2),$(3),$(4),$(5),$(6))
-BuildFirmware/CustomFlash/initramfs=$(call BuildFirmware/OF/initramfs,$(1),$(2),$(3))
-
-# Some boards need a special header inside the uImage to make them bootable
-define BuildFirmware/CustomFlashFactory/squashfs
- $(call BuildFirmware/CustomFlash/$(1),$(1),$(2),$(3),$(4))
- $(call BuildFirmware/CustomFlash/$(1),$(1),$(2),$(3),$(4),$(5),$(6))
-endef
-BuildFirmware/CustomFlashFactory/initramfs=$(call BuildFirmware/OF/initramfs,$(1),$(2),$(3))
-
-# wrappers for boards that have 4MB and 8MB versions
-define BuildFirmware/DefaultDualSize/squashfs
- $(call BuildFirmware/Default4M/$(1),$(1),$(2)-4M,$(3)-4M)
- $(call BuildFirmware/Default8M/$(1),$(1),$(2)-8M,$(3)-8M)
-endef
-define BuildFirmware/DefaultDualSize/initramfs
- $(call BuildFirmware/OF/initramfs,$(1),$(2)-4M,$(3)-4M)
- $(call BuildFirmware/OF/initramfs,$(1),$(2)-8M,$(3)-8M)
-endef
-
-define BuildFirmware/PorayDualSize/squashfs
- $(call BuildFirmware/DefaultDualSize/$(1),$(1),$(2),$(3))
- if [ -e "$(call sysupname,$(1),$(2)-4M)" ]; then \
- mkporayfw -B $(3) -F 4M \
- -f $(call sysupname,$(1),$(2)-4M) \
- -o $(call imgname,$(1),$(2)-4M)-factory.bin; \
- fi
- if [ -e "$(call sysupname,$(1),$(2)-8M)" ]; then \
- mkporayfw -B $(3) -F 8M \
- -f $(call sysupname,$(1),$(2)-8M) \
- -o $(call imgname,$(1),$(2)-8M)-factory.bin; \
- fi
-endef
-BuildFirmware/PorayDualSize/initramfs=$(call BuildFirmware/DefaultDualSize/initramfs,$(1),$(2),$(3))
ifeq ($(SUBTARGET),rt288x)