Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.


  Search this Thread
Old 01-27-2010, 10:20 AM   #1
LQ Newbie
Registered: Jan 2010
Posts: 4

Rep: Reputation: 0
error: while rebuilding kernel src rpm.

when i run "make rpm", it creates a default kernel.spec,(i did not touch that kernel.spec) and builds kernel-2.6.*.src.rpm. Thats ok. But when i tried to rebuild that *.src.rpm , i got that error :

+ cp /var/tmp/kernel-
cp: missing destination file operand after `/var/tmp/kernel-'
Try `cp --help' for more information.
error: Bad exit status from /var/tmp/rpm-tmp.58300 (%install)

RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.58300 (%install)

My kernel.spec is :

Name: kernel
Summary: The Linux Kernel
Release: 3
License: GPL
Group: System Environment/Kernel
Vendor: The Linux Community
URL: The Linux Kernel Archives
Source: kernel-
BuildRoot: /var/tmp/%{name}-%{PACKAGE_VERSION}-root
Provides: kernel-
%define __spec_install_post /usr/lib/rpm/brp-compress || :
%define debug_package %{nil}

The Linux Kernel, the operating system core itself

%setup -q

make clean && make %{?_smp_mflags}

%ifarch ia64
mkdir -p $RPM_BUILD_ROOT/boot/efi $RPM_BUILD_ROOT/lib/modules
mkdir -p $RPM_BUILD_ROOT/lib/firmware
mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib/modules
mkdir -p $RPM_BUILD_ROOT/lib/firmware
INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{_smp_mflags} KBUILD_SRC= modules_install
%ifarch ia64
cp $KBUILD_IMAGE $RPM_BUILD_ROOT/boot/efi/vmlinuz-
ln -s efi/vmlinuz- $RPM_BUILD_ROOT/boot/
%ifarch ppc64
cp vmlinux arch/powerpc/boot
cp arch/powerpc/boot/$KBUILD_IMAGE $RPM_BUILD_ROOT/boot/vmlinuz-
cp $KBUILD_IMAGE $RPM_BUILD_ROOT/boot/vmlinuz-
cp $RPM_BUILD_ROOT/boot/
cp .config $RPM_BUILD_ROOT/boot/config-
%ifnarch ppc64
cp vmlinux vmlinux.orig
bzip2 -9 vmlinux
mv vmlinux.bz2 $RPM_BUILD_ROOT/boot/vmlinux-
mv vmlinux.orig vmlinux


%defattr (-, root, root)
%dir /lib/modules

How to fix that issue?
Old 01-27-2010, 12:37 PM   #2
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2018 CentOS6.10 CentOS7.5 + 50+ other Linux OS, for test only.
Posts: 17,126

Rep: Reputation: 3491Reputation: 3491Reputation: 3491Reputation: 3491Reputation: 3491Reputation: 3491Reputation: 3491Reputation: 3491Reputation: 3491Reputation: 3491Reputation: 3491
Welcome to LQ.

Sorry, thought I found the error. ..


Last edited by knudfl; 01-27-2010 at 12:40 PM.
Old 01-27-2010, 12:41 PM   #3
LQ Newbie
Registered: Jan 2010
Posts: 4

Original Poster
Rep: Reputation: 0
The other kernel.specs are really complicated. I just want to know that How to set $KBUILD_IMAGE to make target well?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
rpm -ivh gcc-4.1.1-52.el5.2.src.rpm failed with no error henli Linux - Newbie 5 04-15-2009 02:08 PM
How to build kernel RPM without rebuilding the whole thing every time JoeyAdams Fedora 2 06-22-2008 09:15 PM
rebuilding dovecot beta src.rpm with mysql 5 error dtra Linux - Software 0 05-08-2006 08:07 AM
rebuilding cyrus-sasl src.rpm w/mysql support fails willwrk4u Red Hat 1 04-17-2004 03:34 PM
Creating /usr/src/linux-<xx> from kernel.<xx>.src.rpm jmourik Linux - Newbie 2 02-19-2003 04:24 PM > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 10:02 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration