aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-10-20 06:29:44 +0000
committerJohn Crispin <blogic@openwrt.org>2014-10-20 06:29:44 +0000
commitb677d147817984d43a562a7bc7210ee6a584e485 (patch)
tree05a304f9f4eb66204d3461c3f5b6ccf910959dae
parent4cd9d06c9c6b8476e0a83ac819aab91757339311 (diff)
downloadmaster-187ad058-b677d147817984d43a562a7bc7210ee6a584e485.tar.gz
master-187ad058-b677d147817984d43a562a7bc7210ee6a584e485.tar.bz2
master-187ad058-b677d147817984d43a562a7bc7210ee6a584e485.zip
ar71xx: add comments for Image/BuildLoader{, Alone}.
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42990 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/ar71xx/image/Makefile17
1 files changed, 17 insertions, 0 deletions
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index 78e2d705ce..a382f3a54b 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -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)" \
@@ -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))