From 620c231c7a7f48745094727bb612f6321cfc8844 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Tue, 17 Jan 2012 14:50:51 -0200 Subject: kbuild: do not check for ancient modutils tools scripts/depmod.sh checks for the output of '-V' expecting that it has module-init-tools in it. It's a hack to prevent users from using modutils instead of module-init-tools, that only works with 2.4.x kernels. This however prints an annoying warning for kmod tool, that is currently replacing module-init-tools. Rather than putting another check for kmod's version, just remove it since users of 2.4.x kernel are unlikely to upgrade to 3.x, and if they do, let depmod fail in that case because they should know what they are doing. Signed-off-by: Lucas De Marchi Acked-by: WANG Cong Acked-By: Kay Sievers Signed-off-by: Michal Marek --- scripts/depmod.sh | 6 ------ 1 file changed, 6 deletions(-) (limited to 'scripts') diff --git a/scripts/depmod.sh b/scripts/depmod.sh index a27235685949..2ae481703141 100755 --- a/scripts/depmod.sh +++ b/scripts/depmod.sh @@ -9,12 +9,6 @@ fi DEPMOD=$1 KERNELRELEASE=$2 -if ! "$DEPMOD" -V 2>/dev/null | grep -q module-init-tools; then - echo "Warning: you may need to install module-init-tools" >&2 - echo "See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt" >&2 - sleep 1 -fi - if ! test -r System.map -a -x "$DEPMOD"; then exit 0 fi -- cgit v1.2.3 From 6e2e340b59d2d4e7b6b7f2c2d02b0d5ca4df6458 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Tue, 14 Feb 2012 21:58:56 +0100 Subject: ARM: 7324/1: modpost: Fix section warnings for ARM for many compilers It turns out that many compilers don't show section warnings on ARM currently because handling for ARM_CALL relocs are missing from modpost.c. Based on commit c2e26114 ([ARM] 3205/1: Handle new EABI relocations when loading kernel modules) it seems that R_ARM_PC24, R_ARM_CALL and R_ARM_JUMP24 can be handled the same way. Note that at least Debian libc6-dev is missing defines for both R_ARM_CALL and R_ARM_JUMP24 in /usr/include/elf.h. So for now we need to define them in modpost.c if not defined. Acked-by: Rusty Russell Cc: Ben Hutchings Cc: Anders Kaseorg Cc: Greg KH Signed-off-by: Tony Lindgren Signed-off-by: Russell King --- scripts/mod/modpost.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'scripts') diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 2bd594e6d1b4..9adb667dd31a 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1494,6 +1494,13 @@ static int addend_386_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r) return 0; } +#ifndef R_ARM_CALL +#define R_ARM_CALL 28 +#endif +#ifndef R_ARM_JUMP24 +#define R_ARM_JUMP24 29 +#endif + static int addend_arm_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r) { unsigned int r_typ = ELF_R_TYPE(r->r_info); @@ -1505,6 +1512,8 @@ static int addend_arm_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r) (elf->symtab_start + ELF_R_SYM(r->r_info)); break; case R_ARM_PC24: + case R_ARM_CALL: + case R_ARM_JUMP24: /* From ARM ABI: ((S + A) | T) - P */ r->r_addend = (int)(long)(elf->hdr + sechdr->sh_offset + -- cgit v1.2.3 From 6c635224602d760c1208ada337562f40d8ae93a5 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 15 Feb 2012 14:17:29 +0000 Subject: builddeb: Don't create files in /tmp with predictable names The current use of /tmp for file lists is insecure. Put them under $objtree/debian instead. Signed-off-by: Ben Hutchings Cc: stable@vger.kernel.org # 2.6.39+ Acked-by: maximilian attems Signed-off-by: Michal Marek --- scripts/package/builddeb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'scripts') diff --git a/scripts/package/builddeb b/scripts/package/builddeb index f6cbc3ddb68b..3c6c0b14c807 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -238,14 +238,14 @@ EOF fi # Build header package -(cd $srctree; find . -name Makefile -o -name Kconfig\* -o -name \*.pl > /tmp/files$$) -(cd $srctree; find arch/$SRCARCH/include include scripts -type f >> /tmp/files$$) -(cd $objtree; find .config Module.symvers include scripts -type f >> /tmp/objfiles$$) +(cd $srctree; find . -name Makefile -o -name Kconfig\* -o -name \*.pl > "$objtree/debian/hdrsrcfiles") +(cd $srctree; find arch/$SRCARCH/include include scripts -type f >> "$objtree/debian/hdrsrcfiles") +(cd $objtree; find .config Module.symvers include scripts -type f >> "$objtree/debian/hdrobjfiles") destdir=$kernel_headers_dir/usr/src/linux-headers-$version mkdir -p "$destdir" -(cd $srctree; tar -c -f - -T /tmp/files$$) | (cd $destdir; tar -xf -) -(cd $objtree; tar -c -f - -T /tmp/objfiles$$) | (cd $destdir; tar -xf -) -rm -f /tmp/files$$ /tmp/objfiles$$ +(cd $srctree; tar -c -f - -T "$objtree/debian/hdrsrcfiles") | (cd $destdir; tar -xf -) +(cd $objtree; tar -c -f - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -) +rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles" arch=$(dpkg --print-architecture) cat <> debian/control -- cgit v1.2.3 From 42f1c01b79d54a00012c553b95fc7fe266d82394 Mon Sep 17 00:00:00 2001 From: Greg Dietsche Date: Fri, 20 Jan 2012 17:10:35 -0600 Subject: coccicheck: change handling of C={1,2} when M= is set This patch reverts a portion of d0bc1fb4 so that coccicheck will work properly when C=1 or C=2. Reported-and-tested-by: Brice Goglin Signed-off-by: Greg Dietsche Signed-off-by: Julia Lawall Signed-off-by: Michal Marek --- scripts/coccicheck | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'scripts') diff --git a/scripts/coccicheck b/scripts/coccicheck index 3c2776466d87..823e972149e5 100755 --- a/scripts/coccicheck +++ b/scripts/coccicheck @@ -9,15 +9,10 @@ if [ "$C" = "1" -o "$C" = "2" ]; then # FLAGS="-ignore_unknown_options -very_quiet" # OPTIONS=$* - if [ "$KBUILD_EXTMOD" = "" ] ; then - # Workaround for Coccinelle < 0.2.3 - FLAGS="-I $srctree/include -very_quiet" - shift $(( $# - 1 )) - OPTIONS=$1 - else - echo M= is not currently supported when C=1 or C=2 - exit 1 - fi +# Workaround for Coccinelle < 0.2.3 + FLAGS="-I $srctree/include -very_quiet" + shift $(( $# - 1 )) + OPTIONS=$1 else ONLINE=0 FLAGS="-very_quiet" -- cgit v1.2.3