kbuild fixes for 2.6.17-rc1
Subsystems (6)
PATCH 1/1 kbuild fixes for 2.6.17-rc1
Hi Linus
Here follows kbuild fixes for 2.6.17-rc1 + a number of kconfig fixes.
Most noteworthy kbuild fixes:
o fix NULL dereference in modpost
o fix mips build after introducing -fasm-offsets gcc flag
o fix several make <single-target> bugs
o rebuild less when source-tree are moved
o rebuild initramfs if content of initramfs changes
For kconfig Roman Zippel wrote:
The first four patches I'd like to see to go into 2.6.17 if possible. Although I'm quite confident about the remaining patches, a bit more testing can't hurt.
The mentioned first four kconfig patches are included in this set.
short-log, diffstat, log + full diff follows.
The 'rebuild initramfs if content of initramfs changes' counts for the majority of the diff.
Please pull from:
git pull git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild.git
Sam
Alexey Dobriyan:
ver_linux: don't print reiser4progs version if none found
Andreas Gruenbacher:
kbuild: modules_install for external modules must not remove existing modules
Atsushi Nemoto:
kbuild: mips: fix sed regexp to generate asm-offset.h
Brian Gerst:
kbuild: fix garbled text in modules.txt
Carl-Daniel Hailfinger:
kbuild: fix unneeded rebuilds in drivers/media/video after moving source tree
kbuild: fix unneeded rebuilds in drivers/net/chelsio after moving source tree
Eric Sesterhenn:
kbuild: fix NULL dereference in scripts/mod/modpost.c
Paolo 'Blaisorblade' Giarrusso:
kbuild: fix mode of checkstack.pl and other files.
Roman Zippel:
kconfig: fix default value for choice input
kconfig: revert conf behaviour change
kconfig: recenter menuconfig
kconfig: fix typo in change count initialization
Sam Ravnborg:
kbuild: use relative path to -I
kbuild: fix building single targets with make O=.. single-target
kbuild: fix make dir/
kbuild: properly pass options to hostcc when doing make O=..
kbuild: rebuild initramfs if content of initramfs changes
Documentation/kbuild/modules.txt | 2 Kbuild | 2 Makefile | 54 ++++---- arch/ppc/boot/lib/Makefile | 2 arch/sparc/math-emu/Makefile | 2 drivers/media/video/Makefile | 2 drivers/media/video/bt8xx/Makefile | 2 drivers/media/video/cx25840/Makefile | 2 drivers/media/video/cx88/Makefile | 6 drivers/media/video/em28xx/Makefile | 2 drivers/media/video/saa7134/Makefile | 6 drivers/net/chelsio/Makefile | 2 scripts/Kbuild.include | 5 scripts/Makefile.lib | 5 scripts/gen_initramfs_list.sh | 225 +++++++++++++++++++++++------------ scripts/kconfig/conf.c | 21 --- scripts/kconfig/confdata.c | 2 scripts/kconfig/lxdialog/menubox.c | 19 +- scripts/mod/modpost.c | 2 scripts/ver_linux | 4 usr/Makefile | 91 +++++--------- 21 files changed, 254 insertions(+), 204 deletions(-)
commit b5ac4817de3032796c558b0a32062e7392b5ea60
Author: Roman Zippel <[email protected]> Date: Sun Apr 9 17:27:28 2006 +0200
kconfig: fix typo in change count initialization
Configuration needs saving when either of these conditions is true.
commit 94f2505be3b6afaf50129e949b1840bc4dd0b3e8
Author: Roman Zippel <[email protected]> Date: Sun Apr 9 17:27:14 2006 +0200
kconfig: recenter menuconfig
Move the menuconfig output more into the centre again, it's using a fixed position depending on the window width using the fact that the menu output has to work in a 80 chars terminal.
commit 59c6a3f4d745584f2f78cdf1f5e221a19518926c
Author: Roman Zippel <[email protected]> Date: Sun Apr 9 17:26:50 2006 +0200
kconfig: revert conf behaviour change
After the last patch fixed the real problem, revert this needless behaviour change of conf, which only hid the real problem.
commit 40aee729b350672c2550640622416a855e27938f
Author: Roman Zippel <[email protected]> Date: Sun Apr 9 17:26:39 2006 +0200
kconfig: fix default value for choice input
The wrong default value can cause conf to end up in endless loop for choice questions.
commit eaaae38c1ac4ccbec6d2de7255b0538f38fb29d6
Author: Eric Sesterhenn <[email protected]> Date: Tue Apr 11 00:54:16 2006 +0200
kbuild: fix NULL dereference in scripts/mod/modpost.c
before is NULL in this case, concluding from the surrounding code it seems that after is the right one to use.
commit 71378be91f5473e89c8be170c6e49edda3bdbb67
Author: Paolo 'Blaisorblade' Giarrusso <[email protected]> Date: Fri Apr 7 16:16:40 2006 +0200
kbuild: fix mode of checkstack.pl and other files.
Make it executable like it should be. Do the same for other files intended to be executed by the user - the ones called by the build process needn't be executable as they already work (as argument to their interpreter).
commit d39a206bc35d46a3b2eb98cd4f34e340d5e56a50
Author: Sam Ravnborg <[email protected]> Date: Tue Apr 11 13:24:32 2006 +0200
kbuild: rebuild initramfs if content of initramfs changes
initramfs.cpio.gz being build in usr/ and included in the kernel was not rebuild when the included files changed.
To fix this the following was done:
- let gen_initramfs.sh generate a list of files and directories included in the initramfs
- gen_initramfs generate the gzipped cpio archive so we could simplify the kbuild file (Makefile)
- utilising the kbuild infrastructure so when uid/gid root mapping changes the initramfs will be rebuild
With this change we have a much more robust initramfs generation.
commit d9df92e22aca939857c5bc9ecb130ef22307ccc1
Author: Sam Ravnborg <[email protected]> Date: Fri Apr 7 08:36:49 2006 +0200
kbuild: properly pass options to hostcc when doing make O=..
This fix a longstanding bug where proper options was not passed to hostcc in case of a make O=.. build.
This bug showed up in (not yet merged) klibc, and is not known to have any counterpart in-kernel.
Fixed by moving the flags macro to Kbuild.include so it can be used by both Makefile.lib and Makefile.host.
commit 7d2d8fe0cb88914d26219db51341d780a032b198
Author: Andreas Gruenbacher <[email protected]> Date: Wed Apr 5 23:33:50 2006 +0200
kbuild: modules_install for external modules must not remove existing modules
When installing external modules with `make modules_install', the first thing that happens is a rm -rf of the target directory. This works only once, and breaks when installing more than one (set of) external module(s).
With following fix we have the functionality:
- for a in-kernel modules_install the $(MODLIB)/kernel directory will be deleted before module installation
- for external modules the existing modules will be left as is assuming one may be building and installign several external modules
commit aa360879ed38fbe88057cc43f720881ab9e6a63a
Author: Sam Ravnborg <[email protected]> Date: Thu Apr 6 08:25:31 2006 +0200
kbuild: fix make dir/
kbuild added an extra '/' after the directory - resulting in all files being rebuild in a subdirectory.
commit ea88df9bf895720289331e41ed73cdcb04059900
Author: Alexey Dobriyan <[email protected]> Date: Wed Sep 21 21:37:24 2005 +0400
ver_linux: don't print reiser4progs version if none found
Sam: did the same for reiserprogs
commit 0947640f4388de50a39f762748b08e586a482527
Author: Atsushi Nemoto <[email protected]> Date: Tue Mar 28 00:18:54 2006 +0900
kbuild: mips: fix sed regexp to generate asm-offset.h
Changes to Makefile.kbuild ("kbuild: add -fverbose-asm to i386 Makefile") breaks asm-offset.h file on MIPS. Other archs possibly suffer this change too but I'm not sure.
Here is a fix just for MIPS.
commit bc2546a67975a7bddc72f8c48b0bb2081b56f853
Author: Sam Ravnborg <[email protected]> Date: Wed Apr 5 12:57:21 2006 +0200
kbuild: fix building single targets with make O=.. single-target
This fixes single targets build so it now works relaiably in following cases:
- build with mixed kernel source and output files (make single-target)
- build with separate output directory (make O=.. single-target)
- external module with mixed kernel source and output files (make M='pwd' single-target)
- external module with separate kernel source and output files (make O=.. M='pwd' single-target)
commit b46da0567d3baa6783106e7463801292cdc79ddd
Author: Sam Ravnborg <[email protected]> Date: Tue Apr 4 16:56:10 2006 +0200
kbuild: use relative path to -I
Using a relative path has the advantage that when the kernel source tree is moved the relevant .o files will not be rebuild just because the path to the kernel src has changed.
This also got rid of a user of TOPDIR - which has been deprecated for a long time now.
commit 1417ae0869472f4f3768779c51c3979faca20b2e
Author: Carl-Daniel Hailfinger <[email protected]> Date: Tue Apr 4 01:02:30 2006 +0200
kbuild: fix unneeded rebuilds in drivers/net/chelsio after moving source tree
This fixes some uneeded rebuilds under drivers/net/chelsio after moving the source tree. The makefiles used $(TOPDIR) for include paths, which is unnecessary. Changed to use relative paths.
Compile tested, produces byte-identical code to the previous makefiles.
commit 8036dc6bdca0faa981be01377728678a6f6f3fde
Author: Carl-Daniel Hailfinger <[email protected]> Date: Tue Apr 4 00:35:36 2006 +0200
kbuild: fix unneeded rebuilds in drivers/media/video after moving source tree
This fixes some uneeded rebuilds under drivers/media/video after moving the source tree. The makefiles used $(src) and $(srctree) for include paths, which is unnecessary. Changed to use relative paths.
Compile tested, produces byte-identical code to the previous makefiles.
commit a7d7cb3cd6c97cbbe21d528c014e5f592006457d
Author: Brian Gerst <[email protected]> Date: Sat Mar 25 14:48:37 2006 -0500
kbuild: fix garbled text in modules.txt
Documentation/kbuild/modules.txt +1 -1
@@ -44,7 +44,7 @@ What is covered within this file is main of modules. The author of an external modules should supply a makefile that hides most of the complexity so one only has to type 'make' to build the module. A complete example will be present in -chapter ¤. Creating a kbuild file for an external module". +chapter 4, "Creating a kbuild file for an external module". === 2. How to build external modules
Kbuild +1 -1
@@ -18,7 +18,7 @@ define sed-y "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}" endef # Override default regexp for specific architectures -sed-$(CONFIG_MIPS) := "/^@@@/s///p" +sed-$(CONFIG_MIPS) := "/^@@@/{s/^@@@//; s/ \#.*\$$//; p;}" quiet_cmd_offsets = GEN $@ define cmd_offsets
Makefile +28 -26
75 lines not on this page · raw message
arch/ppc/boot/lib/Makefile +1 -1
@@ -3,7 +3,7 @@ # Makefile for some libs needed by zImag # CFLAGS_kbd.o := -Idrivers/char -CFLAGS_vreset.o := -I$(srctree)/arch/ppc/boot/include +CFLAGS_vreset.o := -Iarch/ppc/boot/include zlib := infblock.c infcodes.c inffast.c inflate.c inftrees.c infutil.c
arch/sparc/math-emu/Makefile +1 -1
@@ -5,4 +5,4 @@ # obj-y := math.o EXTRA_AFLAGS := -ansi -EXTRA_CFLAGS = -I. -I$(TOPDIR)/include/math-emu -w +EXTRA_CFLAGS = -I. -Iinclude/math-emu -w
drivers/media/video/Makefile +1 -1
@@ -84,4 +84,4 @@ obj-$(CONFIG_USB_IBMCAM) += usbvi obj-$(CONFIG_USB_KONICAWC) += usbvideo/ obj-$(CONFIG_USB_VICAM) += usbvideo/ -EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/dvb-core +EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
drivers/media/video/bt8xx/Makefile +1 -1
@@ -9,4 +9,4 @@ bttv-objs := bttv-driver.o btt obj-$(CONFIG_VIDEO_BT848) += bttv.o EXTRA_CFLAGS += -I$(src)/.. -EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/dvb-core +EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
drivers/media/video/cx25840/Makefile +1 -1
@@ -3,4 +3,4 @@ cx25840-objs := cx25840-core.o cx2584 obj-$(CONFIG_VIDEO_CX25840) += cx25840.o -EXTRA_CFLAGS += -I$(src)/.. +EXTRA_CFLAGS += -Idrivers/media/video
drivers/media/video/cx88/Makefile +3 -3
@@ -8,9 +8,9 @@ obj-$(CONFIG_VIDEO_CX88_DVB) += cx88-dvb obj-$(CONFIG_VIDEO_CX88_ALSA) += cx88-alsa.o obj-$(CONFIG_VIDEO_CX88_VP3054) += cx88-vp3054-i2c.o -EXTRA_CFLAGS += -I$(src)/.. -EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/dvb-core -EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/frontends +EXTRA_CFLAGS += -Idrivers/media/video +EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core +EXTRA_CFLAGS += -Idrivers/media/dvb/frontends extra-cflags-$(CONFIG_VIDEO_BUF_DVB) += -DHAVE_VIDEO_BUF_DVB=1 extra-cflags-$(CONFIG_DVB_CX22702) += -DHAVE_CX22702=1
drivers/media/video/em28xx/Makefile +1 -1
@@ -3,4 +3,4 @@ em28xx-objs := em28xx-video.o em28xx obj-$(CONFIG_VIDEO_EM28XX) += em28xx.o -EXTRA_CFLAGS += -I$(src)/.. +EXTRA_CFLAGS += -Idrivers/media/video
drivers/media/video/saa7134/Makefile +3 -3
@@ -11,9 +11,9 @@ obj-$(CONFIG_VIDEO_SAA7134_OSS) += saa71 obj-$(CONFIG_VIDEO_SAA7134_DVB) += saa7134-dvb.o -EXTRA_CFLAGS += -I$(src)/.. -EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/dvb-core -EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/frontends +EXTRA_CFLAGS += -Idrivers/media/video +EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core +EXTRA_CFLAGS += -Idrivers/media/dvb/frontends extra-cflags-$(CONFIG_VIDEO_BUF_DVB) += -DHAVE_VIDEO_BUF_DVB=1 extra-cflags-$(CONFIG_DVB_MT352) += -DHAVE_MT352=1
drivers/net/chelsio/Makefile +1 -1
@@ -4,7 +4,7 @@ # obj-$(CONFIG_CHELSIO_T1) += cxgb.o -EXTRA_CFLAGS += -I$(TOPDIR)/drivers/net/chelsio $(DEBUG_FLAGS) +EXTRA_CFLAGS += -Idrivers/net/chelsio $(DEBUG_FLAGS) cxgb-objs := cxgb2.o espi.o pm3393.o sge.o subr.o mv88x201x.o
scripts/Kbuild.include +5 -0
@@ -87,6 +87,11 @@ # Usage: # $(Q)$(MAKE) $(build)=dir build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj +# Prefix -I with $(srctree) if it is not an absolute path +addtree = $(if $(filter-out -I/%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1))) $(1) +# Find all -I options and call addtree +flags = $(foreach o,$($(1)),$(if $(filter -I%,$(o)),$(call addtree,$(o)),$(o))) + # If quiet is set, only print short version of command cmd = @$(echo-cmd) $(cmd_$(1))
scripts/Makefile.lib +0 -5
@@ -99,11 +99,6 @@ __a_flags = $(_a_flags) __cpp_flags = $(_cpp_flags) else -# Prefix -I with $(srctree) if it is not an absolute path -addtree = $(if $(filter-out -I/%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1))) $(1) -# Find all -I options and call addtree -flags = $(foreach o,$($(1)),$(if $(filter -I%,$(o)),$(call addtree,$(o)),$(o))) - # -I$(obj) locates generated .h files # $(call addtree,-I$(obj)) locates .h files in srctree, from generated .c files # and locates generated .h files
scripts/bloat-o-meter +0 -0
scripts/checkstack.pl +0 -0
scripts/gen_initramfs_list.sh +152 -73
297 lines not on this page · raw message
scripts/kconfig/conf.c +3 -18
@@ -63,20 +63,6 @@ static void check_stdin(void) } } -static char *fgets_check_stream (char *s,int size,FILE *stream) -{ -char *ret =fgets (s, size, stream); - -if (ret ==NULL &&feof (stream)) { -printf (_ ("aborted!\n\n" )); -printf (_ ("Console input is closed. " )); -printf (_ ("Run 'make oldconfig' to update configuration.\n\n" )); -exit (1 ); - } - -return ret; -} -static void conf_askvalue (struct symbol *sym,const char *def) {enum symbol_type type =sym_get_type (sym);
@@ -114,7 +100,7 @@ static void conf_askvalue(struct symbolcheck_stdin ();case ask_all:fflush (stdout); -fgets_check_stream (line,128 , stdin); +fgets (line,128 , stdin);return ;case set_default:printf ("%s\n" , def);
@@ -328,8 +314,7 @@ static int conf_choice(struct menu *menuprintf ("%*s%s\n" , indent -1 ,"" ,menu_get_prompt (menu)); def_sym =sym_get_choice_value (sym); cnt = def =0 ; - line[0 ] ='0' ; - line[1 ] =0 ; + line[0 ] =0 ;for (child = menu->list; child; child = child->next) {if (!menu_is_visible (child))continue ;
@@ -370,7 +355,7 @@ static int conf_choice(struct menu *menucheck_stdin ();case ask_all:fflush (stdout); -fgets_check_stream (line,128 , stdin); +fgets (line,128 , stdin);strip (line);if (line[0 ] =='?' ) { printf("\n%s\n", menu->sym->help ?
scripts/kconfig/confdata.c +1 -1
@@ -325,7 +325,7 @@ int conf_read(const char *name) sym->flags |= e->right.sym->flags &SYMBOL_NEW ; } - sym_change_count = conf_warnings && conf_unsaved; + sym_change_count = conf_warnings || conf_unsaved;return 0 ; }
scripts/kconfig/lxdialog/menubox.c +10 -9
@@ -58,8 +58,7 @@#include "dialog.h" -#define ITEM_IDENT 1/* Indent of menu entries. Fixed for all menus */ -static int menu_width; +static int menu_width, item_x;/* * Print menu item
@@ -70,7 +69,7 @@ static void do_print_item(WINDOW * win,int j;char *menu_item =malloc (menu_width +1 ); -strncpy (menu_item, item, menu_width -ITEM_IDENT ); +strncpy (menu_item, item, menu_width - item_x); menu_item[menu_width] =0 ; j =first_alpha (menu_item,"YyNnMmHh" );
@@ -87,13 +86,13 @@ #elsewclrtoeol (win);#endif wattrset (win, selected ? item_selected_attr : item_attr); -mvwaddstr (win, choice,ITEM_IDENT , menu_item); +mvwaddstr (win, choice, item_x, menu_item);if (hotkey) {wattrset (win, selected ? tag_key_selected_attr : tag_key_attr); -mvwaddch (win, choice,ITEM_IDENT + j, menu_item[j]); +mvwaddch (win, choice, item_x + j, menu_item[j]); }if (selected) { -wmove (win, choice,ITEM_IDENT +1 ); +wmove (win, choice, item_x +1 ); }free (menu_item);wrefresh (win);
@@ -227,6 +226,8 @@ int dialog_menu(const char *title, constdraw_box (dialog, box_y, box_x, menu_height +2 , menu_width +2 , menubox_border_attr, menubox_attr); + item_x = (menu_width -70 ) /2 ; +/* Set choice to default item */ for (i =0 ; i < item_no; i++)if (strcmp (current, items[i *2 ]) ==0 )
@@ -263,10 +264,10 @@ int dialog_menu(const char *title, constwnoutrefresh (menu);print_arrows (dialog, item_no, scroll, - box_y, box_x +ITEM_IDENT +1 , menu_height); + box_y, box_x + item_x +1 , menu_height);print_buttons (dialog, height, width,0 ); -wmove (menu, choice,ITEM_IDENT +1 ); +wmove (menu, choice, item_x +1 );wrefresh (menu);while (key !=ESC ) {
@@ -349,7 +350,7 @@ int dialog_menu(const char *title, constprint_item (scroll + choice, choice, TRUE);print_arrows (dialog, item_no, scroll, - box_y, box_x +ITEM_IDENT +1 , menu_height); + box_y, box_x + item_x +1 , menu_height);wnoutrefresh (dialog);wrefresh (menu);
scripts/mod/modpost.c +1 -1
@@ -658,7 +658,7 @@ static void warn_sec_mismatch(const charwarn ("%s - Section mismatch: reference to %s:%s from %s " "before '%s' (at offset -0x%llx)\n" , modname, secname, refsymname, fromsec, - elf->strtab + before->st_name, + elf->strtab + after->st_name, (long long )r.r_offset); }else { warn("%s - Section mismatch: reference to %s:%s from %s "
scripts/namespace.pl +0 -0
scripts/show_delta +0 -0
scripts/ver_linux +2 -2
@@ -39,10 +39,10 @@ tune2fs 2>&1 | grep "^tune2fs" | sed 's/ fsck.jfs -V 2>&1 | grep version | sed 's/,//' | awk \ 'NR==1 {print "jfsutils ", $3}' -reiserfsck -V 2>&1 | grep reiserfsck | awk \ +reiserfsck -V 2>&1 | grep ^reiserfsck | awk \ 'NR==1{print "reiserfsprogs ", $2}' -fsck.reiser4 -V 2>&1 | grep fsck.reiser4 | awk \ +fsck.reiser4 -V 2>&1 | grep ^fsck.reiser4 | awk \ 'NR==1{print "reiser4progs ", $2}' xfs_db -V 2>&1 | grep version | awk \
usr/Makefile +37 -54
102 lines not on this page · raw message