kbuild fixes for -rc1
Hi Linus.
Please pull the following two fixes for kbuild. One fix for make rpm (which is also stable material) And one fix so we are more robust for wrong asm symlinks
None of these has been in -next but they are trivial and I would like to see them applied soon.
Thanks,
Sam
The following changes since commit e013e13bf605b9e6b702adffbe2853cfc60e7806:
Jens Axboe (1):
libata: fix bug with non-ncq devices
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes.git master
Evgeniy Manachkin (1):
kbuild: mkspec - fix build rpm
Sam Ravnborg (1):
kbuild: improve check-symlink
Makefile | 5 +++++ scripts/package/mkspec | 3 +++ 2 files changed, 8 insertions(+), 0 deletions(-)
Makefile +5 -0
@@ -961,6 +961,7 @@ export CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH) # The asm symlink changes when $(ARCH) changes. # Detect this and ask user to run make mrproper +# If asm is a stale symlink (point to dir that does not exist) remove it define check-symlink set -e; \ if [ -L include/asm ]; then \
@@ -970,6 +971,10 @@ define check-symlink echo " set ARCH or save .config and run 'make mrproper' to fix it"; \ exit 1; \ fi; \ + test -e $$asmlink || rm include/asm; \ + elif [ -d include/asm ]; then \ + echo "ERROR: $@ is a directory but a symlink was expected";\ + exit 1; \ fi endef
scripts/package/mkspec +3 -0
@@ -64,8 +64,10 @@ fi echo "%install" echo "%ifarch ia64" echo 'mkdir -p $RPM_BUILD_ROOT/boot/efi $RPM_BUILD_ROOT/lib/modules' +echo 'mkdir -p $RPM_BUILD_ROOT/boot/efi $RPM_BUILD_ROOT/lib/firmware' echo "%else" echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib/modules' +echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib/firmware' echo "%endif" echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{_smp_mflags} modules_install'
@@ -92,5 +94,6 @@ echo "%files" echo '%defattr (-, root, root)' echo "%dir /lib/modules" echo "/lib/modules/$KERNELRELEASE" +echo "/lib/firmware" echo "/boot/*" echo ""
kbuild maintainer news [Was: kbuild fixes for -rc1]
In case anyone was wondering...
I have been busy moving to a new house the last couple of months.
As we are now well installed (as in the important stuff is finished) I can now spend some time as kbuild maintainer again.
But in order not to be buried alive in email I deleted all mails I received in my absense period.
So if you have any pending kbuild patches around please resend them to me with a cc: to at least linux-kbuild.
But please do not expect promt replies there is still a shitload of things to do.
Sam
Re: kbuild maintainer news [Was: kbuild fixes for -rc1]
Quoted 2 lines · Sam Ravnborg
So if you have any pending kbuild patches around please resend them to me with a cc: to at least linux-kbuild.
A similar patch to what you just pushed for rpm's to avoid package installation problems due to firmware is waiting also for deb-pkg. Please push the patch in [1] to Linus and stable. Original mail attached.
Cheers,
FJP
[1] http://lkml.org/lkml/2008/9/13/102
[Adding linux-kbuild as that seems to be the closest to a maintainer for scripts/package/]
Quoted 5 lines · Frans Pop
Quoted 4 lines · Jonathan McDowell
The below is a simplistic fix for "make deb-pkg"; it splits the firmware out to a linux-firmware-image package and adds an (unversioned) Suggests to the linux package for this firmware.
Quoted 7 lines
Quoted 1 line
Frans, does this solve your problem in an acceptable manner?
Yes it does. Thanks for the patch Jonathan.
Tested both with kernel configs that result in firmware and that do not result in firmware.A few minor nitpicks below.
Ta, I've fixed both the indents. I've also changed the firmware package to be arch: all.
Quoted 2 lines
Quoted 1 line
Signed-off-by Jonathan McDowell <[email protected]>Acked-by Frans Pop <[email protected]>
-----
scripts/package/builddeb +22 -2
@@ -15,15 +15,18 @@ set -e version=$KERNELRELEASE revision=`cat .version` tmpdir="$objtree/debian/tmp" +fwdir="$objtree/debian/fwtmp" packagename=linux-$version +fwpackagename=linux-firmware-image if [ "$ARCH" == "um" ] ; then packagename=user-mode-linux-$version fi # Setup the directory structure -rm -rf "$tmpdir" +rm -rf "$tmpdir" "$fwdir" mkdir -p "$tmpdir/DEBIAN" "$tmpdir/lib" "$tmpdir/boot" +mkdir -p "$fwdir/DEBIAN" "$fwdir/lib" if [ "$ARCH" == "um" ] ; then mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/share/doc/$packagename" "$tmpdir/usr/bin" fi
@@ -107,6 +110,7 @@ Standards-Version: 3.6.1 Package: $packagename Provides: kernel-image-$version, linux-image-$version +Suggests: $fwpackagename Architecture: any Description: Linux kernel, version $version This package contains the Linux kernel, modules and corresponding other
@@ -118,8 +122,24 @@ fi chown -R root:root "$tmpdir" chmod -R go-w "$tmpdir" +# Do we have firmware? Move it out of the way and build it into a package. +if [ -e "$tmpdir/lib/firmware" ]; then + mv "$tmpdir/lib/firmware" "$fwdir/lib/" + + cat <<EOF >> debian/control + +Package: $fwpackagename +Architecture: all +Description: Linux kernel firmware, version $version + This package contains firmware from the Linux kernel, version $version +EOF + + dpkg-gencontrol -isp -p$fwpackagename -P"$fwdir" + dpkg --build "$fwdir" .. +fi + # Perform the final magic -dpkg-gencontrol -isp +dpkg-gencontrol -isp -p$packagename dpkg --build "$tmpdir" .. exit 0
-----
J.
Signature · 2 lines
"Just because I'll spend 4 hours automating a task that takes 4 minutes by hand doesn't mean I'm not lazy." -- Mike Sphar, asr
PATCH 1/1 fix allmodconfig breakage
In reply to Sam Ravnborg If you use KCONFIG_ALLCONFIG (even with empty file) you get
broken allmodconfig/allyesconfig; CONFIG_MODULES gets turned off, with obvious massive fallout.
Breakage had been introduced when conf_set_all_new_symbols()
got used for allmodconfig et.al.
What happens is that sym_calc_value(modules_sym) done inconf_read_simple() sets SYMBOL_VALID on both modules_sym and MODULES. When we get to conf_set_all_new_symbols(), we set sym->def[S_DEF_USER] on everything, but it has no effect on sym->curr for the symbols that already have SYMBOL_VALID - these are stuck.
Solution: use sym_clear_all_valid() in there. Note that it
makes reevaluation of modules_sym redundant - sym_clear_all_valid() will do that itself.
---
scripts/kconfig/confdata.c +1 -2
@@ -852,8 +852,7 @@ void conf_set_all_new_symbols(enum conf_def_mode mode) } -if (modules_sym) -sym_calc_value (modules_sym); +sym_clear_all_valid ();if (mode != def_random)return ;
Re: [PATCH] fix allmodconfig breakage
Quoted 13 lines · Al Viro
If you use
KCONFIG_ALLCONFIG(even with empty file) you get
broken allmodconfig/allyesconfig;CONFIG_MODULESgets turned off, with obvious massive fallout.Breakage had been introduced when
conf_set_all_new_symbols()
got used for allmodconfig et.al.What happens is that
sym_calc_value(modules_sym)done inconf_read_simple()setsSYMBOL_VALIDon bothmodules_symand MODULES. When we get toconf_set_all_new_symbols(), we set sym->def[S_DEF_USER] on everything, but it has no effect onsym->currfor the symbols that already haveSYMBOL_VALID- these are stuck.
Quoted 3 lines
Solution: use
sym_clear_all_valid()in there. Note that it
makes reevaluation ofmodules_symredundant -sym_clear_all_valid()will do that itself.
Fixes http://bugzilla.kernel.org/show_bug.cgi?id=11512
Quoted 16 lines
Signed-off-by Al Viro <[email protected]>---
scripts/kconfig/confdata.c +1
-2@@ -852,8 +852,7 @@ void conf_set_all_new_symbols(enum conf_def_mode mode) } -if (modules_sym) -sym_calc_value (modules_sym); +sym_clear_all_valid ();if (mode != def_random)return ;
Re: [PATCH] fix allmodconfig breakage
In reply to Al ViroHi,
Quoted 13 lines · Al Viro
If you use
KCONFIG_ALLCONFIG(even with empty file) you get
broken allmodconfig/allyesconfig;CONFIG_MODULESgets turned off, with obvious massive fallout.Breakage had been introduced when
conf_set_all_new_symbols()
got used for allmodconfig et.al.What happens is that
sym_calc_value(modules_sym)done inconf_read_simple()setsSYMBOL_VALIDon bothmodules_symand MODULES. When we get toconf_set_all_new_symbols(), we set sym->def[S_DEF_USER] on everything, but it has no effect onsym->currfor the symbols that already haveSYMBOL_VALID- these are stuck.
Quoted 5 lines
Solution: use
sym_clear_all_valid()in there. Note that it
makes reevaluation ofmodules_symredundant -sym_clear_all_valid()will do that itself.Signed-off-by Al Viro <[email protected]>
Thanks for looking into this.
bye, Roman