From: "Américo Wang" <xiyou.wangcong@gmail.com>
To: Christian Kujau <lists@nerdbynature.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
nicolas.2p.debian@free.fr, mmarek@suse.cz, max@stro.at,
linux-kbuild@vger.kernel.org
Subject: Re: cannot create include/linux/version.h.tmp: Read-only file system
Date: Mon, 7 Mar 2011 15:05:10 +0800 [thread overview]
Message-ID: <20110307070510.GA1166@cr0.redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.01.1103061600260.23816@trent.utfs.org>
On Sun, Mar 06, 2011 at 04:22:21PM -0800, Christian Kujau wrote:
>Hi,
>
>I'm trying to build a kernel with O= with the kernel source residing
>on a readonly NFS share. The main build finishes just fine, vmlinux & the
>modules are all built, but "make deb-pkg" and "make rpm-pkg" fail to
>build:
>
>--------------------------
>$ make V=1 O=/mnt/sdb/s0/ deb-pkg
>[...]
>set -e; : ' CHK include/linux/version.h'; mkdir -p
>include/linux/;
>(echo \#define LINUX_VERSION_CODE 132646; echo '#define
>KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';) <
>/usr/local/src/linux-2.6-git/Makefile > include/linux/version.h.tmp; if [
>-r include/linux/version.h ] && cmp -s include/linux/version.h
>include/linux/version.h.tmp; then rm -f include/linux/version.h.tmp; else
>: ' UPD include/linux/version.h'; mv -f include/linux/version.h.tmp
>include/linux/version.h; fi
>/bin/sh: cannot create include/linux/version.h.tmp: Read-only file system
>make[4]: *** [include/linux/version.h] Error 2
>
>--------------------------
>$ make V=1 O=/mnt/sdb/s0/ rpm-pkg
>[...]
>make -f /usr/local/src/linux-2.6-git/scripts/Makefile.clean
>obj=arch/x86/boot/compressed
> rm -rf .tmp_versions
> rm -f vmlinux System.map .tmp_kallsyms* .tmp_version .tmp_vmlinux*
>.tmp_System.map
>set -e; cd ..; ln -sf /usr/local/src/linux-2.6-git kernel-2.6.38rc7
>ln: creating symbolic link `kernel-2.6.38rc7': Permission denied
>make[2]: *** [rpm-pkg] Error 1
>--------------------------
>
>The full buidlogs are here: http://nerdbynature.de/bits/2.6.38-rc7/make/
>
>Note that e.g. "make binrpm-pkg" succeeds and puts the .rpm in $HOME, I
>wonder if at least deb-pkg could be fixed..?
>
The following patch should fix both of them. :)
------------------>
Signed-off: WANG Cong <xiyou.wangcong@gmail.com>
---
diff --git a/Makefile b/Makefile
index 26d7d82..37163fa 100644
--- a/Makefile
+++ b/Makefile
@@ -979,7 +979,7 @@ define filechk_version.h
echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';)
endef
-include/linux/version.h: $(srctree)/Makefile FORCE
+include/linux/version.h: $(objtree)/Makefile FORCE
$(call filechk,version.h)
include/generated/utsrelease.h: include/config/kernel.release FORCE
diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index d0b931b..b5c3b67 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -26,7 +26,7 @@ RPM := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \
else echo rpm; fi)
# Remove hyphens since they have special meaning in RPM filenames
-KERNELPATH := kernel-$(subst -,,$(KERNELRELEASE))
+KERNELPATH := $(objtree)/kernel-$(subst -,,$(KERNELRELEASE))
MKSPEC := $(srctree)/scripts/package/mkspec
PREV := set -e; cd ..;
next prev parent reply other threads:[~2011-03-07 7:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-07 0:22 Christian Kujau
2011-03-07 7:05 ` Américo Wang [this message]
2011-03-07 10:45 ` Christian Kujau
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=20110307070510.GA1166@cr0.redhat.com \
--to=xiyou.wangcong@gmail.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lists@nerdbynature.de \
--cc=max@stro.at \
--cc=mmarek@suse.cz \
--cc=nicolas.2p.debian@free.fr \
/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
all inboxes | Powered by JetHome®