ar71xx: add support for buffalo WZR-450HP2
[openwrt/svn-archive/archive.git] / target / linux / ar71xx / image / Makefile
index 78e2d705cec5582c21001083c2a715fde397975f..3256cb8bb59730983eed9b48e63e718bdb3c6436 100644 (file)
@@ -215,6 +215,14 @@ define ubinize
        ( cd $(2); $(STAGING_DIR_HOST)/bin/ubinize -o $(3) -p $(4) -m $(5) $(6) $(1))
 endef
 
+#
+# Embed lzma-compressed kernel inside lzma-loader.
+#
+# $(1), suffix of output filename, e.g. generic, lowercase board name, etc.
+# $(2), suffix of target file to build, e.g. bin, gz, elf
+# $(3), kernel command line to pass from lzma-loader to kernel
+# $(4), unused here
+# $(5), suffix of kernel filename, e.g. -initramfs, or empty
 define Image/BuildLoader
        -rm -rf $(KDIR)/lzma-loader
        $(LOADER_MAKE) LOADER=loader-$(1).$(2) KERNEL_CMDLINE="$(3)"\
@@ -224,6 +232,13 @@ define Image/BuildLoader
        -$(CP) $(KDIR)/loader-$(1).$(2) $(KDIR)/loader-$(1)$(5).$(2)
 endef
 
+#
+# Build lzma-loader alone which will search for lzma-compressed kernel identified by
+# uImage header with magic "OKLI" at boot time.
+#
+# $(4), offset into the flash space to start searching uImage magic "OKLI".
+# $(5), size of search range starting at $(4).  With 0 as the value, uImage
+#      header is expected to be at precisely $(4)
 define Image/BuildLoaderAlone
        -rm -rf $(KDIR)/lzma-loader
        $(LOADER_MAKE) LOADER=loader-$(1).$(2) KERNEL_CMDLINE="$(3)" \
@@ -302,7 +317,7 @@ define Image/BuildKernel
        $(call MkuImage,lzma,,$(KDIR)/vmlinux.bin.lzma,$(UIMAGE)-lzma.bin)
        cp $(KDIR)/loader-generic.elf $(VMLINUX)-lzma.elf
        -mkdir -p $(KDIR_TMP)
-       $(call Image/Build/Profile/$(PROFILE),buildkernel)
+       $(call Image/Build/Profile/$(IMAGE_PROFILE),buildkernel)
 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
        cp $(KDIR)/vmlinux-initramfs.elf $(VMLINUX)-initramfs.elf
        cp $(KDIR)/vmlinux-initramfs $(VMLINUX)-initramfs.bin
@@ -1015,6 +1030,8 @@ define Image/Build/Zcomax
 endef
 
 
+# $(1): template name to be defined, etc. squashfs-only, 64k, 64kraw, etc.
+# $(2): jffs2 blocksize.
 define Jffs2Template
   define Image/Build/Template/$(1)/jffs2-$(2)
     $$(call Image/Build/$$(1),jffs2-$(2),$$(2),$$(3),$$(4),$$(5),$$(6),$$(7),$$(8),$$(9),$$(10))
@@ -1267,6 +1284,7 @@ $(eval $(call SingleProfile,WZRHP64K,64kraw,WZRHPG300NH2,wzr-hp-g300nh2,WZR-HP-G
 $(eval $(call SingleProfile,WZRHP64K,64kraw,WZRHPAG300H,wzr-hp-ag300h,WZR-HP-AG300H,ttyS0,115200,WZR-HP-AG300H))
 $(eval $(call SingleProfile,WZRHP64K,64kraw,WZRHPG450H,wzr-hp-g450h,WZR-HP-G450H,ttyS0,115200,WZR-HP-AG450H))
 $(eval $(call SingleProfile,WZRHP64K,64kraw,WZR600DHP,wzr-600dhp,WZR-HP-AG300H,ttyS0,115200,WZR-600DHP))
+$(eval $(call SingleProfile,WZRHP64K,64kraw,WZR450HP2,wzr-450hp2,WZR-450HP2,ttyS0,115200,WZR-450HP2))
 
 $(eval $(call SingleProfile,Zcomax,64k,ZCN1523H28,zcn-1523h-2-8,ZCN-1523H-2,ttyS0,115200,$$(zcn1523h_mtdlayout)))
 $(eval $(call SingleProfile,Zcomax,64k,ZCN1523H516,zcn-1523h-5-16,ZCN-1523H-5,ttyS0,115200,$$(zcn1523h_mtdlayout)))