public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Fabio Erculiani" <lxnay@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/genkernel:master commit in: /, doc/, defaults/
Date: Wed, 20 Jul 2011 15:55:46 +0000 (UTC)	[thread overview]
Message-ID: <dfca908b6fc9ce21c714b12bdc96d8049af70f8d.lxnay@gentoo> (raw)

commit:     dfca908b6fc9ce21c714b12bdc96d8049af70f8d
Author:     Fabio Erculiani <lxnay <AT> sabayon <DOT> org>
AuthorDate: Wed Jul 20 15:54:56 2011 +0000
Commit:     Fabio Erculiani <lxnay <AT> gentoo <DOT> org>
CommitDate: Wed Jul 20 15:54:56 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=dfca908b

Make possible to compile XEN based kernels providing --kernel-target= and --kernel-binary= switches

---
 defaults/config.sh  |    2 ++
 doc/genkernel.8.txt |    6 ++++++
 gen_cmdline.sh      |   11 +++++++++++
 gen_compile.sh      |   10 +++++++---
 4 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/defaults/config.sh b/defaults/config.sh
index 7f339ea..6d26757 100755
--- a/defaults/config.sh
+++ b/defaults/config.sh
@@ -3,8 +3,10 @@
 # Arch-specific options that normally shouldn't be changed.
 #
 KERNEL_MAKE_DIRECTIVE="bzImage"
+KERNEL_MAKE_DIRECTIVE_OVERRIDE="--INVALID--"
 KERNEL_MAKE_DIRECTIVE_2=""
 KERNEL_BINARY="arch/i386/boot/bzImage"
+KERNEL_BINARY_OVERRIDE=""
 
 COMPRESS_INITRD=yes
 

diff --git a/doc/genkernel.8.txt b/doc/genkernel.8.txt
index 2d7f775..fc00834 100644
--- a/doc/genkernel.8.txt
+++ b/doc/genkernel.8.txt
@@ -189,6 +189,12 @@ LOW-LEVEL COMPILATION OPTIONS
 *--kernel-make*=<makeprg>::
     GNU Make to use for the kernel compilation.
 
+*--kernel-target*=<t>::
+    Override default make target (bzImage)
+
+*--kernel-binary*=<path>::
+    Override default kernel binary path (arch/foo/boot/bar)
+
 *--utils-cc*=<compiler>::
     Compiler to use for utilities.
 

diff --git a/gen_cmdline.sh b/gen_cmdline.sh
index f7eb707..b3e451d 100755
--- a/gen_cmdline.sh
+++ b/gen_cmdline.sh
@@ -57,6 +57,9 @@ longusage() {
   echo "	--kernel-ld=<linker>	Linker to use for kernel"
   echo "	--kernel-cross-compile=<cross var> CROSS_COMPILE kernel variable"
   echo "	--kernel-make=<makeprg> GNU Make to use for kernel"
+  echo "	--kernel-target=<t>	Override default make target (bzImage)"
+  echo "	--kernel-binary=<path>	Override default kernel binary path (arch/foo/boot/bar)"
+
   echo "	--utils-cc=<compiler>	Compiler to use for utilities"
   echo "	--utils-as=<assembler>	Assembler to use for utils"
   echo "	--utils-ld=<linker>	Linker to use for utils"
@@ -166,6 +169,14 @@ parse_cmdline() {
 			CMD_KERNEL_MAKE=`parse_opt "$*"`
 			print_info 2 "CMD_KERNEL_MAKE: ${CMD_KERNEL_MAKE}"
 			;;
+		--kernel-target=*)
+			KERNEL_MAKE_DIRECTIVE_OVERRIDE=`parse_opt "$*"`
+			print_info 2 "KERNEL_MAKE_DIRECTIVE_OVERRIDE: ${KERNEL_MAKE_DIRECTIVE_OVERRIDE}"
+			;;
+		--kernel-binary=*)
+			KERNEL_BINARY_OVERRIDE=`parse_opt "$*"`
+			print_info 2 "KERNEL_BINARY_OVERRIDE: ${KERNEL_BINARY_OVERRIDE}"
+			;;
 		--kernel-cross-compile=*)
 			CMD_KERNEL_CROSS_COMPILE=`parse_opt "$*"`
 			CMD_KERNEL_CROSS_COMPILE=$(echo ${CMD_KERNEL_CROSS_COMPILE}|sed -e 's/.*[^-]$/&-/g')

diff --git a/gen_compile.sh b/gen_compile.sh
index 3a815e8..9fc35af 100755
--- a/gen_compile.sh
+++ b/gen_compile.sh
@@ -296,8 +296,12 @@ compile_kernel() {
 	[ "${KERNEL_MAKE}" = '' ] &&
 		gen_die "KERNEL_MAKE undefined - I don't know how to compile a kernel for this arch!"
 	cd ${KERNEL_DIR}
-	print_info 1 "        >> Compiling ${KV} ${KERNEL_MAKE_DIRECTIVE/_install/ [ install ]/}..."
-	compile_generic "${KERNEL_MAKE_DIRECTIVE}" kernel
+	local kernel_make_directive="${KERNEL_MAKE_DIRECTIVE}"
+	if [ "${KERNEL_MAKE_DIRECTIVE_OVERRIDE}" != "--INVALID--" ]; then
+		kernel_make_directive="${KERNEL_MAKE_DIRECTIVE_OVERRIDE}"
+	fi
+	print_info 1 "        >> Compiling ${KV} ${kernel_make_directive/_install/ [ install ]/}..."
+	compile_generic "${kernel_make_directive}" kernel
 	if [ "${KERNEL_MAKE_DIRECTIVE_2}" != '' ]
 	then
 		print_info 1 "        >> Starting supplimental compile of ${KV}: ${KERNEL_MAKE_DIRECTIVE_2}..."
@@ -313,7 +317,7 @@ compile_kernel() {
 		print_info 1 "        >> Not installing firmware as it's included in the kernel already (CONFIG_FIRMWARE_IN_KERNEL=y)..."
 	fi
 
-	local tmp_kernel_binary=$(find_kernel_binary ${KERNEL_BINARY})
+	local tmp_kernel_binary=$(find_kernel_binary ${KERNEL_BINARY_OVERRIDE:-${KERNEL_BINARY}})
 	local tmp_kernel_binary2=$(find_kernel_binary ${KERNEL_BINARY_2})
 	if [ -z "${tmp_kernel_binary}" ]
 	then



             reply	other threads:[~2011-07-20 15:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-20 15:55 Fabio Erculiani [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-07-16 15:03 [gentoo-commits] proj/genkernel:master commit in: /, doc/, defaults/ Thomas Deutschmann
2020-03-04  0:02 Thomas Deutschmann
2019-10-02 22:45 Thomas Deutschmann
2019-07-29 20:10 Thomas Deutschmann
2012-10-13 22:52 Robin H. Johnson
2012-07-19 20:56 Richard Yao
2012-07-19 20:43 Richard Yao
2012-07-19 20:24 Richard Yao
2011-08-28  9:19 Fabio Erculiani
2011-07-20 19:24 Fabio Erculiani
2011-06-01  1:44 Sebastian Pipping
2011-05-31 13:18 Sebastian Pipping

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=dfca908b6fc9ce21c714b12bdc96d8049af70f8d.lxnay@gentoo \
    --to=lxnay@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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