1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

[lantiq] add lantiq svip support

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32925 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
blogic
2012-07-31 18:49:54 +00:00
parent a07db05063
commit 0d1207bd0b
22 changed files with 17723 additions and 53 deletions

View File

@@ -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