From: Tom Rini <trini@konsulko.com>
To: linux-kbuild@vger.kernel.org
Cc: Michal Marek <mmarek@suse.com>,
linux-kernel@vger.kernel.org,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>
Subject: [PATCH] kbuild/mkspec: Fix architectures where KBUILD_IMAGE isn't a full path
Date: Sat, 11 Mar 2017 23:59:22 +0000 [thread overview]
Message-ID: <1489276762-22280-1-git-send-email-trini@konsulko.com> (raw)
On some architectures, such as arm64, KBUILD_IMAGE is not a full path
but instead just the build target. The builddeb script handles this
case correctly today and will try arch/$ARCH/boot/$KBUILD_IMAGE so we
can just borrow that logic and adapt it slightly for spec file syntax.
Cc: Michal Marek <mmarek@suse.com>
Cc: linux-kbuild@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
It is currently a mixed-bag on if architectures will use a build target
(arm, arm64, arc are certainly by inspection and a few others 'may') or
a full path (x86, blackfin, s390). Given that builddeb gets this case
correct, I think changing mkspec is the right way to go here.
---
scripts/package/mkspec | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index bb43f153fd8e..aa5f3db43f12 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -101,7 +101,11 @@ echo "%ifarch ppc64"
echo "cp vmlinux arch/powerpc/boot"
echo "cp arch/powerpc/boot/"'$KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE"
echo "%else"
-echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE"
+echo "if [ -e $KBUILD_IMAGE ]; then"
+echo ' cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE"
+echo "else"
+echo ' cp arch/$ARCH/boot/$KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE"
+echo "fi"
echo "%endif"
echo "%endif"
--
2.7.4
next reply other threads:[~2017-03-11 23:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-11 23:59 Tom Rini [this message]
2017-03-15 14:51 ` Tom Rini
2017-03-15 15:03 ` Michal Marek
2017-03-15 15:37 ` Tom Rini
2017-03-20 10:13 ` Will Deacon
2017-03-20 17:00 ` Masahiro Yamada
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=1489276762-22280-1-git-send-email-trini@konsulko.com \
--to=trini@konsulko.com \
--cc=catalin.marinas@arm.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.com \
--cc=will.deacon@arm.com \
/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
Powered by JetHome