aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/image
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/lantiq/image')
-rw-r--r--target/linux/lantiq/image/Makefile75
1 files changed, 75 insertions, 0 deletions
diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile
index 0ef73f1997..96179a5bc1 100644
--- a/target/linux/lantiq/image/Makefile
+++ b/target/linux/lantiq/image/Makefile
@@ -12,6 +12,7 @@ JFFS2_BLOCKSIZE = 64k 128k 256k
ase_cmdline=-console=ttyLTQ0,115200 rootfstype=squashfs,jffs2
xway_cmdline=-console=ttyLTQ1,115200 rootfstype=squashfs,jffs2
falcon_cmdline=-console=ttyLTQ0,115200 rootfstype=squashfs,jffs2
+svip_cmdline=-console=ttyLTQ0,115200 rootfstype=squashfs,jffs2
sx76x_cmdline=console=ttyLTQ1,115200 rootfstype=squashfs,jffs2
define CompressLzma
@@ -42,6 +43,22 @@ define MkImageEVA
cat ./eva.dummy.squashfs >> $(KDIR)/$(1).eva
endef
+define CompressGzip
+ gzip -c $(1) > $(2)
+endef
+
+define PatchKernelGzip
+ cp $(KDIR)/vmlinux $(KDIR)/vmlinux-$(1)
+ $(STAGING_DIR_HOST)/bin/patch-cmdline $(KDIR)/vmlinux-$(1) '$(strip $(2))'
+ $(call CompressGzip,$(KDIR)/vmlinux-$(1),$(KDIR)/vmlinux-$(1).gzip)
+endef
+
+define MkImageGzip
+ mkimage -A mips -O linux -T kernel -a 0x80002000 -C gzip \
+ -e 0x80002000 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
+ -d $(KDIR)/vmlinux-$(1).gzip $(KDIR)/uImage-$(1)
+endef
+
define Image/Build/squashfs
cat $(KDIR)/uImage-$(2) $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image
$(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image)
@@ -80,6 +97,12 @@ define Image/BuildKernelEVA/Template
$(CP) $(KDIR)/$(1).eva $(BIN_DIR)/$(IMG_PREFIX)-$(1).eva
endef
+define Image/BuildKernelGzip/Template
+ $(call PatchKernelGzip,$(1),$(if $(2),$(2) machtype=$(1),))
+ $(call MkImageGzip,$(1))
+ $(CP) $(KDIR)/uImage-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage
+endef
+
ifeq ($(CONFIG_TARGET_lantiq_danube),y)
Image/BuildKernel/Profile/EASY50712=$(call Image/BuildKernel/Template,EASY50712,$(xway_cmdline))
@@ -198,6 +221,58 @@ define Image/Build/Profile/Generic
endef
endif
+ifeq ($(CONFIG_TARGET_lantiq_svip_be),y)
+define Image/BuildKernel/Profile/EASY33016
+ $(call Image/BuildKernelGzip/Template,EASY33016,$(svip_cmdline))
+endef
+
+define Image/Build/Profile/EASY33016
+ $(call Image/Build/$(1),$(1),EASY33016)
+endef
+
+define Image/BuildKernel/Profile/EASY336
+ $(call Image/BuildKernelGzip/Template,EASY33016,$(svip_cmdline))
+endef
+
+define Image/Build/Profile/EASY336
+ $(call Image/Build/$(1),$(1),EASY33016)
+endef
+
+define Image/BuildKernel/Profile/Generic
+ $(call Image/BuildKernelGzip/Template,EASY33016,$(svip_cmdline))
+ $(call Image/BuildKernelGzip/Template,EASY336,$(svip_cmdline))
+ $(call Image/BuildKernelGzip/Template,NONE)
+endef
+
+define Image/Build/Profile/Generic
+ $(call Image/Build/$(1),$(1),EASY33016)
+ $(call Image/Build/$(1),$(1),EASY336)
+ $(call Image/Build/$(1),$(1),NONE)
+ $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1).rootfs
+endef
+endif
+
+ifeq ($(CONFIG_TARGET_lantiq_svip_le),y)
+define Image/BuildKernel/Profile/EASY336
+ $(call Image/BuildKernelGzip/Template,EASY33016,$(svip_cmdline))
+endef
+
+define Image/Build/Profile/EASY336
+ $(call Image/Build/$(1),$(1),EASY33016)
+endef
+
+define Image/BuildKernel/Profile/Generic
+ $(call Image/BuildKernelGzip/Template,EASY336,$(svip_cmdline))
+ $(call Image/BuildKernelGzip/Template,NONE)
+endef
+
+define Image/Build/Profile/Generic
+ $(call Image/Build/$(1),$(1),EASY336)
+ $(call Image/Build/$(1),$(1),NONE)
+ $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1).rootfs
+endef
+endif
+
define Image/BuildKernel
$(call Image/BuildKernel/Profile/$(PROFILE))
endef