diff options
author | John Crispin <blogic@openwrt.org> | 2014-10-20 06:29:51 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2014-10-20 06:29:51 +0000 |
commit | 96ea58bf327b36f8a3e3fd459d3a904b25540152 (patch) | |
tree | 148efb391fd4a993ebae6f0283d55c69491dddf6 /target | |
parent | b677d147817984d43a562a7bc7210ee6a584e485 (diff) | |
download | upstream-96ea58bf327b36f8a3e3fd459d3a904b25540152.tar.gz upstream-96ea58bf327b36f8a3e3fd459d3a904b25540152.tar.bz2 upstream-96ea58bf327b36f8a3e3fd459d3a904b25540152.zip |
ramips: add comments for image/Makefile.
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42991 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/ramips/image/Makefile | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index aab8a4f825..9a47f86e16 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -56,7 +56,9 @@ endef # # The real magic happens inside these templates # - +# $(1), compression method +# $(2), filename of image data +# $(3), output filename define MkImage $(eval imagename=$(if $(4),$(4),MIPS OpenWrt Linux-$(LINUX_VERSION))) -mkimage -A mips -O linux -T kernel -C $(1) $(call kernel_entry)\ @@ -79,6 +81,9 @@ define MkImageSysupgrade/squashfs fi endef +# $(1), lowercase board name like "mt7620a_v22sg" +# $(2), DTS filename without .dts extension +# $(3), optional filename suffix, e.g. "-initramfs" define PatchKernelLzmaDtb cp $(KDIR)/vmlinux$(3) $(KDIR)/vmlinux-$(1)$(3) $(LINUX_DIR)/scripts/dtc/dtc -O dtb -o $(KDIR)/$(2).dtb ../dts/$(2).dts @@ -86,16 +91,29 @@ define PatchKernelLzmaDtb $(call CompressLzma,$(KDIR)/vmlinux-$(1)$(3),$(KDIR)/vmlinux-$(1)$(3).bin.lzma) endef +# $(1), lowercase board name +# $(2), DTS filename without .dts extension +# $(3), ih_name field of uImage header +# $(4), optional filename suffix, e.g. "-initramfs" define MkImageLzmaDtb $(call PatchKernelLzmaDtb,$(1),$(2),$(4)) $(call MkImage,lzma,$(KDIR)/vmlinux-$(1)$(4).bin.lzma,$(KDIR)/vmlinux-$(1)$(4).uImage,$(3)) endef +# $(1), Rootfs type, e.g. squashfs +# $(2), lowercase board name +# $(3), DTS filename without .dts extension +# $(4), maximum size of sysupgrade image +# $(5), uImage header's ih_name field define BuildFirmware/OF $(call MkImageLzmaDtb,$(2),$(3),$(5)) $(call MkImageSysupgrade/$(1),$(1),$(2),$(4),$(6)) endef +# $(1), squashfs/initramfs +# $(2), lowercase board name +# $(3), DTS filename without .dts extension +# $(4), ih_name field of uImage header define BuildFirmware/OF/initramfs $(call MkImageLzmaDtb,$(2),$(3),$(4),-initramfs) $(CP) $(KDIR)/vmlinux-$(2)-initramfs.uImage $(call imgname,$(1),$(2))-uImage.bin @@ -116,6 +134,7 @@ BuildFirmware/Default4M/initramfs=$(call BuildFirmware/OF/initramfs,$(1),$(2),$( # $(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)) |