From: Mike Marciniszyn <mike.marciniszyn@intel.com>
To: Michal Marek <mmarek@suse.cz>
Cc: linux-kbuild@vger.kernel.org
Subject: [RFC PATCH v3] kbuild: fix error when building from src rpm
Date: Tue, 04 Jun 2013 15:37:25 -0400 [thread overview]
Message-ID: <20130604193725.25028.74479.stgit@phlsvslse11.ph.intel.com> (raw)
The following issue can be reproduced with Linus' tree.
+ cp /home/user/rpmbuild-test/BUILDROOT/kernel-3.9.2.x86_64/boot/vmlinuz-3.9.2
cp: missing destination file operand after
`/home/user/rpmbuild-test/BUILDROOT/kernel-3.9.2-1.x86_64/boot/vmlinuz-3.9.2'
Try `cp --help' for more information.
error: Bad exit status from /var/tmp/rpm-tmp.R4o0iI (%install)
make defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
*** Default configuration is based on 'x86_64_defconfig'
#
# configuration written to .config
#
make rpm-pkg
Use the resulting src rpm to build as follows:
mkdir ~/rpmbuild-test
cd ~/rpmbuild-test
rpmbuild --rebuild --define "_topdir `pwd`" -vv
~/rpmbuild/SRPMS/kernel-3.10.0_rc1+-1.src.rpm
The issue is because the %install script uses $KBUILD_IMAGE and it hasn't
been set.
echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE"
It probably isn't as simple as allowing it to come from the environment, since
it might be architecture specific.
This patch changes the manual install code to user the kernel's make install
with an INSTALL_PATH override. installkernel with then install the
files into $RPM_BUILD_ROOT/boot.
Unfortunately, the /sbin/installkernel on RH6.4 has issues when presented
a target directory that is not /boot. The trace looks like:
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
---
scripts/package/mkspec | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index fbbfd08..9b4f209 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -83,17 +83,7 @@ echo 'mkdir -p $RPM_BUILD_ROOT/lib/firmware'
echo "%endif"
echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{?_smp_mflags} KBUILD_SRC= modules_install'
-echo "%ifarch ia64"
-echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/efi/vmlinuz-$KERNELRELEASE"
-echo 'ln -s '"efi/vmlinuz-$KERNELRELEASE" '$RPM_BUILD_ROOT'"/boot/"
-echo "%else"
-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 "%endif"
-echo "%endif"
+echo 'INSTALL_PATH=$RPM_BUILD_ROOT/boot make %{?_smp_mflags} KBUILD_SRC= install'
echo 'make %{?_smp_mflags} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr KBUILD_SRC= headers_install'
echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE"
next reply other threads:[~2013-06-04 19:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-04 19:37 Mike Marciniszyn [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-06-04 20:12 [RFC PATCH v3] kbuild: fix error when building from src rpm Marciniszyn, Mike
2013-06-05 9:53 ` Michal Marek
2013-06-05 10:17 ` Marciniszyn, Mike
2013-06-05 14:06 ` Doug Ledford
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=20130604193725.25028.74479.stgit@phlsvslse11.ph.intel.com \
--to=mike.marciniszyn@intel.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=mmarek@suse.cz \
/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