From: domen@coderock.org
To: linux-kernel@vger.kernel.org
Cc: damm@opensource.se, domen@coderock.org
Subject: [patch 2/5] autoparam: makefile
Date: Thu, 07 Jul 2005 13:25:53 +0200 [thread overview]
Message-ID: <20050707112634.943174000@homer> (raw)
In-Reply-To: 20050707112551.331553000@homer
[-- Attachment #1: autoparam_2-makefile --]
[-- Type: text/plain, Size: 2409 bytes --]
From: Domen Puncer <domen@coderock.org>
Build .kernel-parameters.o when vmlinux is (re)built.
Add target "kernelparams" which generates descriptions of parameters
in Documentation/kernel-parameters-gen.txt
Signed-off-by: Domen Puncer <domen@coderock.org>
Makefile | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletion(-)
Index: a/Makefile
===================================================================
--- a.orig/Makefile
+++ a/Makefile
@@ -650,6 +650,7 @@ define rule_vmlinux__
/bin/false; \
fi;
$(verify_kallsyms)
+ $(extract_kernel_parameters)
endef
@@ -916,6 +917,15 @@ modules modules_install: FORCE
endif # CONFIG_MODULES
+# Extract kernel parameters
+# ---------------------------------------------------------------------------
+
+define extract_kernel_parameters
+ $(Q)$(OBJCOPY) -j __param_strings $(objtree)/vmlinux -O binary \
+ $(objtree)/.kernel-parameters.o
+ $(Q)$(OBJCOPY) -R __param_strings $(objtree)/vmlinux $(objtree)/vmlinux
+endef
+
# Generate asm-offsets.h
# ---------------------------------------------------------------------------
@@ -946,7 +956,8 @@ endef
# Directories & files removed with 'make clean'
CLEAN_DIRS += $(MODVERDIR)
CLEAN_FILES += vmlinux System.map \
- .tmp_kallsyms* .tmp_version .tmp_vmlinux* .tmp_System.map
+ .tmp_kallsyms* .tmp_version .tmp_vmlinux* .tmp_System.map \
+ .kernel-parameters.o
# Directories & files removed with 'make mrproper'
MRPROPER_DIRS += include/config include2
@@ -1048,6 +1059,8 @@ help:
@echo ''
@echo 'Documentation targets:'
@$(MAKE) -f $(srctree)/Documentation/DocBook/Makefile dochelp
+ @echo ' kernelparams - Generates list of boot parameters in'
+ @echo ' Documentation/kernel-parameters-gen.txt'
@echo ''
@echo 'Architecture specific targets ($(ARCH)):'
@$(if $(archhelp),$(archhelp),\
@@ -1142,6 +1155,15 @@ help:
@echo ''
endif # KBUILD_EXTMOD
+
+kernelparams:
+ $(Q)if [ ! -f $(objtree)/.kernel-parameters.o ]; then \
+ echo "You have to build a kernel (vmlinux) first."; \
+ exit 1; \
+ fi
+ $(O)$(PERL) -w $(srctree)/scripts/kernelparams.pl $(objtree)/.kernel-parameters.o \
+ > $(srctree)/Documentation/kernel-parameters-gen.txt
+
# Generate tags for editors
# ---------------------------------------------------------------------------
--
next prev parent reply other threads:[~2005-07-07 15:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-07 11:25 [patch 0/5] autoparam v0.2: generating parameter descriptions on compile domen
2005-07-07 11:25 ` [patch 1/5] autoparam: includes domen
2005-07-07 11:25 ` domen [this message]
2005-07-07 11:25 ` [patch 3/5] autoparam: extract script domen
2005-07-07 11:25 ` [patch 4/5] autoparam: af_unix workaround domen
2005-07-07 17:13 ` Alexey Dobriyan
2005-07-07 11:25 ` [patch 5/5] autoparam: ide workarounds domen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050707112634.943174000@homer \
--to=domen@coderock.org \
--cc=damm@opensource.se \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox