2009-06-05 23:35:17

by Sam Ravnborg

[permalink] [raw]
Subject: kbuild-next content

I have been offline for a while - but found some time this weekend
to do some kbuild work.
This is the patches that has accumulated in kbuild-next so far.

I have almost everything applied that I had queued up.
So if there is something missing assume I deleted it by mistake
and resend it to me.

I have a number of patches sitting in my local trees but
I need to look over them once more before they are ready
for public review.
This is mostly related to generated headers and simplfied
vmlinux.lds scripts (Tim is eagerly await this...).

Patches will follow.

Sam

Amerigo Wang (2):
kbuild/headers_check: refine extern check
kbuild: clean up scripts/headers.sh

Cheng Renquan (1):
kbuild: remove extra ifdef/endif of top Makefile

David VomLehn (1):
kbuild/Documentation: Incorrect makefile syntax in example

Frans Pop (9):
kbuild, deb-pkg: minor general improvements in builddeb script
kbuild, deb-pkg: refactor code to reduce duplication
kbuild, deb-pkg: fix 'file not found' error when building .deb package for arm
kbuild, deb-pkg: pass Debian maintainer script parameters to packaging hook scripts
kbuild, deb-pkg: allow to specify a custom revision for .deb packages
kbuild, deb-pkg: allow alternative hook scripts directory in .deb packages
kbuild, deb-pkg: improve changelog entry and package descriptions
kbuild, deb-pkg: generate debian/copyright file
kbuild, deb-pkg: improve Source field

Jan Beulich (1):
initconst adjustments

Jiri Slaby (1):
kbuild: allow docproc invocation from external

Manish Katiyar (1):
kernel/kallsyms.c: replace deprecated __initcall with device_initcall and fix whitespace

Markus Heidelberg (10):
kconfig: fix typo "mconfig" to "menuconfig" in a comment
kconfig: add a note about the deps to the 'silentoldconfig' help
kconfig: resort the documentation of the environment variables
gitignore: ignore Kconfig i18n files
kconfig qconf: fix -Wall compiler warnings
kconfig qconf: fix namespace for Horizontal and Vertical enum values
kconfig qconf: add namespace for use of Key_ enum values
kconfig qconf: fix the type of the desktop widget
kconfig: do not hardcode ".config" filename
kconfig: do not hardcode "include/config/auto.conf" filename

Mike Frysinger (1):
ignore *.patch files

Peter Korsgaard (1):
kconfig: handle comment entries within choice/endchoice

Randy Dunlap (1):
menu: fix embedded menu presentation

Robert P. J. Day (1):
scripts/headers_check.pl: correct RE in header CONFIG leak check

Sam Ravnborg (2):
kbuild: fix header export when __ASSEMBLY__ is used
kbuild: add hint about __refdata to modpost

Sergei Poselenov (1):
kbuild: fix "Argument list too long" error for "make headers_check",

dann frazier (1):
Remove bashisms from scripts

maximilian attems (5):
kbuild, deb-pkg: improve maintainer identification
kbuild, deb-pkg: fix generated package name
kbuild, deb-pkg: fix Provides field
kbuild, deb-pkg: fix Section field
kbuild, deb-pkg: bump standards version

.gitignore | 1 +
Documentation/kbuild/kconfig.txt | 116 ++++++++++++++-------------
Documentation/kbuild/modules.txt | 2 +-
Makefile | 26 ++----
README | 1 +
include/asm-generic/vmlinux.lds.h | 5 +-
include/linux/init.h | 3 +-
init/Kconfig | 16 ++--
kernel/kallsyms.c | 134 ++++++++++++++++++-------------
scripts/Makefile.headersinst | 8 ++-
scripts/basic/docproc.c | 13 ++-
scripts/gcc-version.sh | 2 +-
scripts/headers.sh | 7 --
scripts/headers_check.pl | 16 +++--
scripts/headers_install.pl | 2 +-
scripts/kconfig/.gitignore | 3 +
scripts/kconfig/Makefile | 4 +-
scripts/kconfig/conf.c | 7 +-
scripts/kconfig/confdata.c | 20 +++--
scripts/kconfig/lkc.h | 1 +
scripts/kconfig/lxdialog/checklist.c | 3 +-
scripts/kconfig/mconf.c | 10 ++-
scripts/kconfig/qconf.cc | 48 ++++++-----
scripts/kconfig/util.c | 6 +-
scripts/mod/modpost.c | 50 +++++++++---
scripts/package/builddeb | 149 +++++++++++++++++++++++-----------
scripts/ver_linux | 2 +-
27 files changed, 395 insertions(+), 260 deletions(-)


2009-06-05 23:41:15

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 01/39] kconfig: handle comment entries within choice/endchoice

From: Peter Korsgaard <[email protected]>

Implement support for comment entries within choice groups. Comment entries
are displayed visually distinct from normal configs, and selecting them is
a no-op.

Signed-off-by: Peter Korsgaard <[email protected]>
Cc: Roman Zippel <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/kconfig/lxdialog/checklist.c | 3 ++-
scripts/kconfig/mconf.c | 10 +++++++++-
2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/scripts/kconfig/lxdialog/checklist.c b/scripts/kconfig/lxdialog/checklist.c
index b2a878c..bcc6f19 100644
--- a/scripts/kconfig/lxdialog/checklist.c
+++ b/scripts/kconfig/lxdialog/checklist.c
@@ -41,7 +41,8 @@ static void print_item(WINDOW * win, int choice, int selected)
wmove(win, choice, check_x);
wattrset(win, selected ? dlg.check_selected.atr
: dlg.check.atr);
- wprintw(win, "(%c)", item_is_tag('X') ? 'X' : ' ');
+ if (!item_is_tag(':'))
+ wprintw(win, "(%c)", item_is_tag('X') ? 'X' : ' ');

wattrset(win, selected ? dlg.tag_selected.atr : dlg.tag.atr);
mvwaddch(win, choice, item_x, item_str()[0]);
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index 6841e95..3bcacb4 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -732,7 +732,12 @@ static void conf_choice(struct menu *menu)
for (child = menu->list; child; child = child->next) {
if (!menu_is_visible(child))
continue;
- item_make("%s", _(menu_get_prompt(child)));
+ if (child->sym)
+ item_make("%s", _(menu_get_prompt(child)));
+ else {
+ item_make("*** %s ***", _(menu_get_prompt(child)));
+ item_set_tag(':');
+ }
item_set_data(child);
if (child->sym == active)
item_set_selected(1);
@@ -748,6 +753,9 @@ static void conf_choice(struct menu *menu)
case 0:
if (selected) {
child = item_data();
+ if (!child->sym)
+ break;
+
sym_set_tristate_value(child->sym, yes);
}
return;
--
1.6.3.rc3.40.g75b44

2009-06-05 23:41:28

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 02/39] kbuild, deb-pkg: minor general improvements in builddeb script

From: Frans Pop <[email protected]>

Minor coding style improvements and typo fix in leading comment.

Signed-off-by: Frans Pop <[email protected]>
Cc: Andres Salomon <[email protected]>
Acked-by: maximilian attems <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/package/builddeb | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 1264b8e..eff7f9d 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -4,7 +4,7 @@
# Copyright 2003 Wichert Akkerman <[email protected]>
#
# Simple script to generate a deb package for a Linux kernel. All the
-# complexity of what to do with a kernel after it is installer or removed
+# complexity of what to do with a kernel after it is installed or removed
# is left to other scripts and packages: they can install scripts in the
# /etc/kernel/{pre,post}{inst,rm}.d/ directories that will be called on
# package install and removal.
@@ -13,13 +13,13 @@ set -e

# Some variables and settings used throughout the script
version=$KERNELRELEASE
-revision=`cat .version`
+revision=$(cat .version)
tmpdir="$objtree/debian/tmp"
fwdir="$objtree/debian/fwtmp"
packagename=linux-$version
fwpackagename=linux-firmware-image

-if [ "$ARCH" == "um" ] ; then
+if [ "$ARCH" = "um" ] ; then
packagename=user-mode-linux-$version
fi

@@ -27,12 +27,12 @@ fi
rm -rf "$tmpdir" "$fwdir"
mkdir -p "$tmpdir/DEBIAN" "$tmpdir/lib" "$tmpdir/boot"
mkdir -p "$fwdir/DEBIAN" "$fwdir/lib"
-if [ "$ARCH" == "um" ] ; then
+if [ "$ARCH" = "um" ] ; then
mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/share/doc/$packagename" "$tmpdir/usr/bin"
fi

# Build and install the kernel
-if [ "$ARCH" == "um" ] ; then
+if [ "$ARCH" = "um" ] ; then
$MAKE linux
cp System.map "$tmpdir/usr/lib/uml/modules/$version/System.map"
cp .config "$tmpdir/usr/share/doc/$packagename/config"
@@ -46,7 +46,7 @@ fi

if grep -q '^CONFIG_MODULES=y' .config ; then
INSTALL_MOD_PATH="$tmpdir" make KBUILD_SRC= modules_install
- if [ "$ARCH" == "um" ] ; then
+ if [ "$ARCH" = "um" ] ; then
mv "$tmpdir/lib/modules/$version"/* "$tmpdir/usr/lib/uml/modules/$version/"
rmdir "$tmpdir/lib/modules/$version"
fi
@@ -77,9 +77,8 @@ linux ($version-$revision) unstable; urgency=low
EOF

# Generate a control file
-if [ "$ARCH" == "um" ]; then
-
-cat <<EOF > debian/control
+if [ "$ARCH" = "um" ]; then
+ cat <<EOF > debian/control
Source: linux
Section: base
Priority: optional
@@ -101,7 +100,7 @@ Description: User Mode Linux kernel, version $version
EOF

else
-cat <<EOF > debian/control
+ cat <<EOF > debian/control
Source: linux
Section: base
Priority: optional
@@ -116,6 +115,7 @@ Description: Linux kernel, version $version
This package contains the Linux kernel, modules and corresponding other
files version $version
EOF
+
fi

# Fix some ownership and permissions
@@ -143,4 +143,3 @@ dpkg-gencontrol -isp -p$packagename
dpkg --build "$tmpdir" ..

exit 0
-
--
1.6.3.rc3.40.g75b44

2009-06-05 23:41:48

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 04/39] kbuild, deb-pkg: fix 'file not found' error when building .deb package for arm

From: Frans Pop <[email protected]>

Not all architectures prepend the $(boot) path in $(KBUILD_IMAGE).
Allow for that fact in the builddeb script. Example is arm.

Signed-off-by: Frans Pop <[email protected]>
Acked-by: maximilian attems <[email protected]>
Cc: Andres Salomon <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/package/builddeb | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index feebd69..4876ff3 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -53,7 +53,10 @@ if [ "$ARCH" = "um" ] ; then
else
cp System.map "$tmpdir/boot/System.map-$version"
cp .config "$tmpdir/boot/config-$version"
- cp $KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version"
+ # Not all arches include the boot path in KBUILD_IMAGE
+ if ! cp $KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version"; then
+ cp arch/$ARCH/boot/$KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version"
+ fi
fi

if grep -q '^CONFIG_MODULES=y' .config ; then
--
1.6.3.rc3.40.g75b44

2009-06-05 23:42:12

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 03/39] kbuild, deb-pkg: refactor code to reduce duplication

From: Frans Pop <[email protected]>

Factor out code to build package into separate function and
only write "source" section for the debian/control file once.

Signed-off-by: Frans Pop <[email protected]>
Acked-by: maximilian attems <[email protected]>
Cc: Andres Salomon <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/package/builddeb | 37 ++++++++++++++++++++-----------------
1 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index eff7f9d..feebd69 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -11,6 +11,18 @@

set -e

+create_package() {
+ local pname="$1" pdir="$2"
+
+ # Fix ownership and permissions
+ chown -R root:root "$pdir"
+ chmod -R go-w "$pdir"
+
+ # Create the package
+ dpkg-gencontrol -isp -p$pname -P"$pdir"
+ dpkg --build "$pdir" ..
+}
+
# Some variables and settings used throughout the script
version=$KERNELRELEASE
revision=$(cat .version)
@@ -77,13 +89,16 @@ linux ($version-$revision) unstable; urgency=low
EOF

# Generate a control file
-if [ "$ARCH" = "um" ]; then
- cat <<EOF > debian/control
+cat <<EOF > debian/control
Source: linux
Section: base
Priority: optional
Maintainer: $name
Standards-Version: 3.6.1
+EOF
+
+if [ "$ARCH" = "um" ]; then
+ cat <<EOF >> debian/control

Package: $packagename
Provides: kernel-image-$version, linux-image-$version
@@ -100,12 +115,7 @@ Description: User Mode Linux kernel, version $version
EOF

else
- cat <<EOF > debian/control
-Source: linux
-Section: base
-Priority: optional
-Maintainer: $name
-Standards-Version: 3.6.1
+ cat <<EOF >> debian/control

Package: $packagename
Provides: kernel-image-$version, linux-image-$version
@@ -118,10 +128,6 @@ EOF

fi

-# Fix some ownership and permissions
-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/"
@@ -134,12 +140,9 @@ 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" ..
+ create_package "$fwpackagename" "$fwdir"
fi

-# Perform the final magic
-dpkg-gencontrol -isp -p$packagename
-dpkg --build "$tmpdir" ..
+create_package "$packagename" "$tmpdir"

exit 0
--
1.6.3.rc3.40.g75b44

2009-06-05 23:42:29

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 05/39] kbuild, deb-pkg: pass Debian maintainer script parameters to packaging hook scripts

From: Frans Pop <[email protected]>

The Debian packaging scripts created by the deb-pkg target do not pass
on the standard Debian maintainer script parameters to hook scripts,
which means that those scripts cannot tell whether they are being called
during e.g. install vs. upgrade, or removal vs. purge of the package.

As there are several variantions in how hook scripts are called from
kernel packages, we pass the parameters in the environment variable
DEB_MAINT_PARAMS rather than as extra arguments.

Bump version of builddep script to 1.3.

Signed-off-by: Frans Pop <[email protected]>
Acked-by: maximilian attems <[email protected]>
Cc: Andres Salomon <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/package/builddeb | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 4876ff3..5eecbbe 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# builddeb 1.2
+# builddeb 1.3
# Copyright 2003 Wichert Akkerman <[email protected]>
#
# Simple script to generate a deb package for a Linux kernel. All the
@@ -75,6 +75,9 @@ for script in postinst postrm preinst prerm ; do

set -e

+# Pass maintainer script parameters to hook scripts
+export DEB_MAINT_PARAMS="\$@"
+
test -d /etc/kernel/$script.d && run-parts --arg="$version" /etc/kernel/$script.d
exit 0
EOF
--
1.6.3.rc3.40.g75b44

2009-06-05 23:42:39

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 06/39] kbuild, deb-pkg: allow to specify a custom revision for .deb packages

From: Frans Pop <[email protected]>

Allow to specify a custom revision for the generated .deb by
exporting the environment variable KDEB_PKGVERSION.

Signed-off-by: Frans Pop <[email protected]>
Acked-by: maximilian attems <[email protected]>
Cc: Andres Salomon <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/package/builddeb | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 5eecbbe..5868c0f 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -26,6 +26,11 @@ create_package() {
# Some variables and settings used throughout the script
version=$KERNELRELEASE
revision=$(cat .version)
+if [ -n "$KDEB_PKGVERSION" ]; then
+ packageversion=$KDEB_PKGVERSION
+else
+ packageversion=$version-$revision
+fi
tmpdir="$objtree/debian/tmp"
fwdir="$objtree/debian/fwtmp"
packagename=linux-$version
@@ -87,7 +92,7 @@ done
name="Kernel Compiler <$(id -nu)@$(hostname -f)>"
# Generate a simple changelog template
cat <<EOF > debian/changelog
-linux ($version-$revision) unstable; urgency=low
+linux ($packageversion) unstable; urgency=low

* A standard release

--
1.6.3.rc3.40.g75b44

2009-06-05 23:42:51

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 07/39] kbuild, deb-pkg: allow alternative hook scripts directory in .deb packages

From: Frans Pop <[email protected]>

Hook scripts in the default directory /etc/kernel are also executed by
official Debian kernel packages as well as kernel packages created using
make-kpkg. Allow to specify an alternative hook scripts directory by
exporting the environment variable KDEB_HOOKDIR.

Signed-off-by: Frans Pop <[email protected]>
Acked-by: maximilian attems <[email protected]>
Cc: Andres Salomon <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/package/builddeb | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 5868c0f..c01f812 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -6,8 +6,9 @@
# Simple script to generate a deb package for a Linux kernel. All the
# complexity of what to do with a kernel after it is installed or removed
# is left to other scripts and packages: they can install scripts in the
-# /etc/kernel/{pre,post}{inst,rm}.d/ directories that will be called on
-# package install and removal.
+# /etc/kernel/{pre,post}{inst,rm}.d/ directories (or an alternative location
+# specified in KDEB_HOOKDIR) that will be called on package install and
+# removal.

set -e

@@ -73,8 +74,11 @@ if grep -q '^CONFIG_MODULES=y' .config ; then
fi

# Install the maintainer scripts
+# Note: hook scripts under /etc/kernel are also executed by official Debian
+# kernel packages, as well as kernel packages built using make-kpkg
+debhookdir=${KDEB_HOOKDIR:-/etc/kernel}
for script in postinst postrm preinst prerm ; do
- mkdir -p "$tmpdir/etc/kernel/$script.d"
+ mkdir -p "$tmpdir$debhookdir/$script.d"
cat <<EOF > "$tmpdir/DEBIAN/$script"
#!/bin/sh

@@ -83,7 +87,7 @@ set -e
# Pass maintainer script parameters to hook scripts
export DEB_MAINT_PARAMS="\$@"

-test -d /etc/kernel/$script.d && run-parts --arg="$version" /etc/kernel/$script.d
+test -d $debhookdir/$script.d && run-parts --arg="$version" $debhookdir/$script.d
exit 0
EOF
chmod 755 "$tmpdir/DEBIAN/$script"
--
1.6.3.rc3.40.g75b44

2009-06-05 23:43:05

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 13/39] kbuild, deb-pkg: fix Provides field

From: maximilian attems <[email protected]>

kernel-image naming has been dropped for the Lenny release
and was only transitional for Etch.

As it builds modules it provides linux-modules-$version.

Signed-off-by: maximilian attems <[email protected]>
Signed-off-by: Frans Pop <[email protected]>
Cc: Andres Salomon <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/package/builddeb | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 1ade570..e1dd189 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -154,7 +154,7 @@ if [ "$ARCH" = "um" ]; then
cat <<EOF >> debian/control

Package: $packagename
-Provides: kernel-image-$version, linux-image-$version
+Provides: linux-image, linux-image-2.6, linux-modules-$version
Architecture: any
Description: User Mode Linux kernel, version $version
User-mode Linux is a port of the Linux kernel to its own system call
@@ -171,7 +171,7 @@ else
cat <<EOF >> debian/control

Package: $packagename
-Provides: kernel-image-$version, linux-image-$version
+Provides: linux-image, linux-image-2.6, linux-modules-$version
Suggests: $fwpackagename
Architecture: any
Description: Linux kernel, version $version
--
1.6.3.rc3.40.g75b44

2009-06-05 23:43:57

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 10/39] kbuild, deb-pkg: improve maintainer identification

From: maximilian attems <[email protected]>

Try harder to find email and maintainer name.
Debian's own devscripts all use DEBEMAIL or DEBFULLNAME prior to an
eventual EMAIL or NAME environment variable. Match their logic.

"Anonymous" sounds nicer then "Kernel Compiler" if no name is found.

Signed-off-by: maximilian attems <[email protected]>
Signed-off-by: Frans Pop <[email protected]>
Cc: Andres Salomon <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/package/builddeb | 22 +++++++++++++++++++---
1 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 122becc..9d464fd 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -95,14 +95,30 @@ EOF
chmod 755 "$tmpdir/DEBIAN/$script"
done

-name="Kernel Compiler <$(id -nu)@$(hostname -f)>"
+# Try to determine maintainer and email values
+if [ -n "$DEBEMAIL" ]; then
+ email=$DEBEMAIL
+elif [ -n "$EMAIL" ]; then
+ email=$EMAIL
+else
+ email=$(id -nu)@$(hostname -f)
+fi
+if [ -n "$DEBFULLNAME" ]; then
+ name=$DEBFULLNAME
+elif [ -n "$NAME" ]; then
+ name=$NAME
+else
+ name="Anonymous"
+fi
+maintainer="$name <$email>"
+
# Generate a simple changelog template
cat <<EOF > debian/changelog
linux ($packageversion) unstable; urgency=low

* Custom built Linux kernel.

- -- $name $(date -R)
+ -- $maintainer $(date -R)
EOF

# Generate copyright file
@@ -130,7 +146,7 @@ cat <<EOF > debian/control
Source: linux
Section: base
Priority: optional
-Maintainer: $name
+Maintainer: $maintainer
Standards-Version: 3.6.1
EOF

--
1.6.3.rc3.40.g75b44

2009-06-05 23:43:34

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 22/39] kbuild: remove extra ifdef/endif of top Makefile

From: Cheng Renquan <[email protected]>

The GNU make's origin function know undefined variable well,
so the outer ifdef/endif conditional checking is unneeded.

>From `info make` documentation, origin will return

`undefined'
if VARIABLE was never defined.
`command line'
if VARIABLE was defined on the command line.
...

Therefore, $(origin V) will get a value anyway, killing ifdef/endif is
viable and safe.

Furthermore, I've checked the minimal requirements from
Documentation/Changes is GNU make 3.79.1, and that version of GNU make
has support of origin function well already, so now it's safe to kill
the outer conditional checking, without upgrading the minimal
requirements.

Signed-off-by: Cheng Renquan <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
Makefile | 26 +++++++++-----------------
1 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/Makefile b/Makefile
index 610d1c3..e270254 100644
--- a/Makefile
+++ b/Makefile
@@ -35,10 +35,8 @@ MAKEFLAGS += -rR --no-print-directory
# To put more focus on warnings, be less verbose as default
# Use 'make V=1' to see the full commands

-ifdef V
- ifeq ("$(origin V)", "command line")
- KBUILD_VERBOSE = $(V)
- endif
+ifeq ("$(origin V)", "command line")
+ KBUILD_VERBOSE = $(V)
endif
ifndef KBUILD_VERBOSE
KBUILD_VERBOSE = 0
@@ -54,10 +52,8 @@ endif
# See the file "Documentation/sparse.txt" for more details, including
# where to get the "sparse" utility.

-ifdef C
- ifeq ("$(origin C)", "command line")
- KBUILD_CHECKSRC = $(C)
- endif
+ifeq ("$(origin C)", "command line")
+ KBUILD_CHECKSRC = $(C)
endif
ifndef KBUILD_CHECKSRC
KBUILD_CHECKSRC = 0
@@ -69,12 +65,10 @@ endif
ifdef SUBDIRS
KBUILD_EXTMOD ?= $(SUBDIRS)
endif
-ifdef M
- ifeq ("$(origin M)", "command line")
- KBUILD_EXTMOD := $(M)
- endif
-endif

+ifeq ("$(origin M)", "command line")
+ KBUILD_EXTMOD := $(M)
+endif

# kbuild supports saving output files in a separate directory.
# To locate output files in a separate directory two syntaxes are supported.
@@ -98,10 +92,8 @@ ifeq ($(KBUILD_SRC),)

# OK, Make called in directory where kernel src resides
# Do we want to locate output files in a separate directory?
-ifdef O
- ifeq ("$(origin O)", "command line")
- KBUILD_OUTPUT := $(O)
- endif
+ifeq ("$(origin O)", "command line")
+ KBUILD_OUTPUT := $(O)
endif

# That's our default target when none is given on the command line
--
1.6.3.rc3.40.g75b44

2009-06-05 23:43:22

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 16/39] initconst adjustments

From: Jan Beulich <[email protected]>

- add .init.rodata to INIT_DATA, and group all initconst flavors
together
- move strings generated from __setup_param() into .init.rodata
- add .*init.rodata to modpost's sets of init sections
- make modpost warn about references between meminit and cpuinit
as well as memexit and cpuexit sections (as CPU and memory
hotplug are independently selectable features)

Signed-off-by: Jan Beulich <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
include/asm-generic/vmlinux.lds.h | 5 ++-
include/linux/init.h | 3 +-
scripts/mod/modpost.c | 48 +++++++++++++++++++++++++++++-------
3 files changed, 43 insertions(+), 13 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 89853bc..3edb114 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -336,10 +336,11 @@
#define INIT_DATA \
*(.init.data) \
DEV_DISCARD(init.data) \
- DEV_DISCARD(init.rodata) \
CPU_DISCARD(init.data) \
- CPU_DISCARD(init.rodata) \
MEM_DISCARD(init.data) \
+ *(.init.rodata) \
+ DEV_DISCARD(init.rodata) \
+ CPU_DISCARD(init.rodata) \
MEM_DISCARD(init.rodata)

#define INIT_TEXT \
diff --git a/include/linux/init.h b/include/linux/init.h
index 0e06c17..9f70c9f 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -225,7 +225,8 @@ struct obs_kernel_param {
* obs_kernel_param "array" too far apart in .init.setup.
*/
#define __setup_param(str, unique_id, fn, early) \
- static char __setup_str_##unique_id[] __initdata __aligned(1) = str; \
+ static const char __setup_str_##unique_id[] __initconst \
+ __aligned(1) = str; \
static struct obs_kernel_param __setup_##unique_id \
__used __section(.init.setup) \
__attribute__((aligned((sizeof(long))))) \
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 161b784..94e71ef 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -763,6 +763,8 @@ static void check_section(const char *modname, struct elf_info *elf,


#define ALL_INIT_DATA_SECTIONS \
+ ".init.setup$", ".init.rodata$", \
+ ".devinit.rodata$", ".cpuinit.rodata$", ".meminit.rodata$" \
".init.data$", ".devinit.data$", ".cpuinit.data$", ".meminit.data$"
#define ALL_EXIT_DATA_SECTIONS \
".exit.data$", ".devexit.data$", ".cpuexit.data$", ".memexit.data$"
@@ -772,21 +774,23 @@ static void check_section(const char *modname, struct elf_info *elf,
#define ALL_EXIT_TEXT_SECTIONS \
".exit.text$", ".devexit.text$", ".cpuexit.text$", ".memexit.text$"

-#define ALL_INIT_SECTIONS ALL_INIT_DATA_SECTIONS, ALL_INIT_TEXT_SECTIONS
-#define ALL_EXIT_SECTIONS ALL_EXIT_DATA_SECTIONS, ALL_EXIT_TEXT_SECTIONS
+#define ALL_INIT_SECTIONS INIT_SECTIONS, DEV_INIT_SECTIONS, \
+ CPU_INIT_SECTIONS, MEM_INIT_SECTIONS
+#define ALL_EXIT_SECTIONS EXIT_SECTIONS, DEV_EXIT_SECTIONS, \
+ CPU_EXIT_SECTIONS, MEM_EXIT_SECTIONS

#define DATA_SECTIONS ".data$", ".data.rel$"
#define TEXT_SECTIONS ".text$"

-#define INIT_SECTIONS ".init.data$", ".init.text$"
-#define DEV_INIT_SECTIONS ".devinit.data$", ".devinit.text$"
-#define CPU_INIT_SECTIONS ".cpuinit.data$", ".cpuinit.text$"
-#define MEM_INIT_SECTIONS ".meminit.data$", ".meminit.text$"
+#define INIT_SECTIONS ".init.*"
+#define DEV_INIT_SECTIONS ".devinit.*"
+#define CPU_INIT_SECTIONS ".cpuinit.*"
+#define MEM_INIT_SECTIONS ".meminit.*"

-#define EXIT_SECTIONS ".exit.data$", ".exit.text$"
-#define DEV_EXIT_SECTIONS ".devexit.data$", ".devexit.text$"
-#define CPU_EXIT_SECTIONS ".cpuexit.data$", ".cpuexit.text$"
-#define MEM_EXIT_SECTIONS ".memexit.data$", ".memexit.text$"
+#define EXIT_SECTIONS ".exit.*"
+#define DEV_EXIT_SECTIONS ".devexit.*"
+#define CPU_EXIT_SECTIONS ".cpuexit.*"
+#define MEM_EXIT_SECTIONS ".memexit.*"

/* init data sections */
static const char *init_data_sections[] = { ALL_INIT_DATA_SECTIONS, NULL };
@@ -869,12 +873,36 @@ const struct sectioncheck sectioncheck[] = {
.tosec = { INIT_SECTIONS, NULL },
.mismatch = XXXINIT_TO_INIT,
},
+/* Do not reference cpuinit code/data from meminit code/data */
+{
+ .fromsec = { MEM_INIT_SECTIONS, NULL },
+ .tosec = { CPU_INIT_SECTIONS, NULL },
+ .mismatch = XXXINIT_TO_INIT,
+},
+/* Do not reference meminit code/data from cpuinit code/data */
+{
+ .fromsec = { CPU_INIT_SECTIONS, NULL },
+ .tosec = { MEM_INIT_SECTIONS, NULL },
+ .mismatch = XXXINIT_TO_INIT,
+},
/* Do not reference exit code/data from devexit/cpuexit/memexit code/data */
{
.fromsec = { DEV_EXIT_SECTIONS, CPU_EXIT_SECTIONS, MEM_EXIT_SECTIONS, NULL },
.tosec = { EXIT_SECTIONS, NULL },
.mismatch = XXXEXIT_TO_EXIT,
},
+/* Do not reference cpuexit code/data from memexit code/data */
+{
+ .fromsec = { MEM_EXIT_SECTIONS, NULL },
+ .tosec = { CPU_EXIT_SECTIONS, NULL },
+ .mismatch = XXXEXIT_TO_EXIT,
+},
+/* Do not reference memexit code/data from cpuexit code/data */
+{
+ .fromsec = { CPU_EXIT_SECTIONS, NULL },
+ .tosec = { MEM_EXIT_SECTIONS, NULL },
+ .mismatch = XXXEXIT_TO_EXIT,
+},
/* Do not use exit code/data from init code */
{
.fromsec = { ALL_INIT_SECTIONS, NULL },
--
1.6.3.rc3.40.g75b44

2009-06-05 23:43:46

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 17/39] kbuild: fix header export when __ASSEMBLY__ is used

unifdef got confused by:

Because it does not know __ASSEMBLY__ it does not
detect that htis is not for userspace.
This caused too much code to be exported, and headers_check barfed
over this code.

For arm this fixes following "make headers_check" warning:
/usr/include/asm/hwcap.h:29: extern's make no sense in userspace

Russell King suggested to undefine __ASSEMBLY__ to fix this warning.

Cc: Russell King <[email protected]>
Cc: Jaswinder Singh Rajput <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/headers_install.pl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl
index c6ae405..bc70ea6 100644
--- a/scripts/headers_install.pl
+++ b/scripts/headers_install.pl
@@ -20,7 +20,7 @@ use strict;

my ($readdir, $installdir, $arch, @files) = @ARGV;

-my $unifdef = "scripts/unifdef -U__KERNEL__";
+my $unifdef = "scripts/unifdef -U__KERNEL__ -U__ASSEMBLY__";

foreach my $file (@files) {
local *INFILE;
--
1.6.3.rc3.40.g75b44

2009-06-05 23:44:19

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 23/39] kconfig: fix typo "mconfig" to "menuconfig" in a comment

From: Markus Heidelberg <[email protected]>

Signed-off-by: Markus Heidelberg <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/kconfig/Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index fa8c2dd..47e3f2e 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -104,7 +104,7 @@ HOST_EXTRACFLAGS += -DLOCALE
# ===========================================================================
# Shared Makefile for the various kconfig executables:
# conf: Used for defconfig, oldconfig and related targets
-# mconf: Used for the mconfig target.
+# mconf: Used for the menuconfig target
# Utilizes the lxdialog package
# qconf: Used for the xconfig target
# Based on QT which needs to be installed to compile it
--
1.6.3.rc3.40.g75b44

2009-06-05 23:44:29

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 09/39] kbuild, deb-pkg: generate debian/copyright file

From: Frans Pop <[email protected]>

On Thursday 23 April 2009, Frans Pop wrote:
Add a basic debian/copyright to the binary packages.

Based on an earlier patch from Maximilian Attems.

Signed-off-by: Frans Pop <[email protected]>
Acked-by: maximilian attems <[email protected]>
Cc: Andres Salomon <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/package/builddeb | 28 +++++++++++++++++++++++++---
1 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 0449147..122becc 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -15,6 +15,8 @@ set -e
create_package() {
local pname="$1" pdir="$2"

+ cp debian/copyright "$pdir/usr/share/doc/$pname/"
+
# Fix ownership and permissions
chown -R root:root "$pdir"
chmod -R go-w "$pdir"
@@ -43,10 +45,10 @@ fi

# Setup the directory structure
rm -rf "$tmpdir" "$fwdir"
-mkdir -p "$tmpdir/DEBIAN" "$tmpdir/lib" "$tmpdir/boot"
-mkdir -p "$fwdir/DEBIAN" "$fwdir/lib"
+mkdir -p "$tmpdir/DEBIAN" "$tmpdir/lib" "$tmpdir/boot" "$tmpdir/usr/share/doc/$packagename"
+mkdir -p "$fwdir/DEBIAN" "$fwdir/lib" "$fwdir/usr/share/doc/$fwpackagename"
if [ "$ARCH" = "um" ] ; then
- mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/share/doc/$packagename" "$tmpdir/usr/bin"
+ mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/bin"
fi

# Build and install the kernel
@@ -103,6 +105,26 @@ linux ($packageversion) unstable; urgency=low
-- $name $(date -R)
EOF

+# Generate copyright file
+cat <<EOF > debian/copyright
+This is a packacked upstream version of the Linux kernel.
+
+The sources may be found at most Linux ftp sites, including:
+ftp://ftp.kernel.org/pub/linux/kernel
+
+Copyright: 1991 - 2009 Linus Torvalds and others.
+
+The git repository for mainline kernel development is at:
+git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 dated June, 1991.
+
+On Debian GNU/Linux systems, the complete text of the GNU General Public
+License version 2 can be found in \`/usr/share/common-licenses/GPL-2'.
+EOF
+
# Generate a control file
cat <<EOF > debian/control
Source: linux
--
1.6.3.rc3.40.g75b44

2009-06-05 23:44:41

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 28/39] kconfig qconf: fix namespace for Horizontal and Vertical enum values

From: Markus Heidelberg <[email protected]>

They were used as QSplitter::Horizontal resp. QSplitter::Vertical, but
are defined in the 'Qt' namespace.

Fixes the following compiler errors after a quick conversion with 'qt3to4',
which occured with g++ 3.4.6 and 4.1.2, but not anymore with 4.3.2.

scripts/kconfig/qconf.cc: In constructor 'ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow*, const char*)':
scripts/kconfig/qconf.cc:1213: error: 'Vertical' is not a member of 'QSplitter'

scripts/kconfig/qconf.cc: In constructor 'ConfigMainWindow::ConfigMainWindow()':
scripts/kconfig/qconf.cc:1304: error: 'Horizontal' is not a member of 'QSplitter'
scripts/kconfig/qconf.cc:1311: error: 'Vertical' is not a member of 'QSplitter'

Signed-off-by: Markus Heidelberg <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/kconfig/qconf.cc | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 2bd6ed0..7433dac 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -1199,7 +1199,7 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam
layout1->addLayout(layout2);

split = new QSplitter(this);
- split->setOrientation(QSplitter::Vertical);
+ split->setOrientation(Qt::Vertical);
list = new ConfigView(split, name);
list->list->mode = listMode;
info = new ConfigInfoView(split, name);
@@ -1290,14 +1290,14 @@ ConfigMainWindow::ConfigMainWindow(void)
move(x, y);

split1 = new QSplitter(this);
- split1->setOrientation(QSplitter::Horizontal);
+ split1->setOrientation(Qt::Horizontal);
setCentralWidget(split1);

menuView = new ConfigView(split1, "menu");
menuList = menuView->list;

split2 = new QSplitter(split1);
- split2->setOrientation(QSplitter::Vertical);
+ split2->setOrientation(Qt::Vertical);

// create config tree
configView = new ConfigView(split2, "config");
--
1.6.3.rc3.40.g75b44

2009-06-05 23:44:52

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 08/39] kbuild, deb-pkg: improve changelog entry and package descriptions

From: Frans Pop <[email protected]>

Signed-off-by: Frans Pop <[email protected]>
Acked-by: maximilian attems <[email protected]>
Cc: Andres Salomon <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/package/builddeb | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index c01f812..0449147 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -98,7 +98,7 @@ name="Kernel Compiler <$(id -nu)@$(hostname -f)>"
cat <<EOF > debian/changelog
linux ($packageversion) unstable; urgency=low

- * A standard release
+ * Custom built Linux kernel.

-- $name $(date -R)
EOF
@@ -126,7 +126,7 @@ Description: User Mode Linux kernel, version $version
many other things.
.
This package contains the Linux kernel, modules and corresponding other
- files version $version
+ files, version: $version.
EOF

else
@@ -138,7 +138,7 @@ Suggests: $fwpackagename
Architecture: any
Description: Linux kernel, version $version
This package contains the Linux kernel, modules and corresponding other
- files version $version
+ files, version: $version.
EOF

fi
@@ -152,7 +152,7 @@ if [ -e "$tmpdir/lib/firmware" ]; then
Package: $fwpackagename
Architecture: all
Description: Linux kernel firmware, version $version
- This package contains firmware from the Linux kernel, version $version
+ This package contains firmware from the Linux kernel, version $version.
EOF

create_package "$fwpackagename" "$fwdir"
--
1.6.3.rc3.40.g75b44

2009-06-05 23:45:10

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 29/39] kconfig qconf: add namespace for use of Key_ enum values

From: Markus Heidelberg <[email protected]>

They are defined in the 'Qt' namespace.

Fixes the following compiler errors after a quick conversion with 'qt3to4',
which occured with g++ 3.4.6 and 4.1.2, but not anymore with 4.3.2.

scripts/kconfig/qconf.cc: In member function 'virtual void ConfigLineEdit::keyPressEvent(QKeyEvent*)':
scripts/kconfig/qconf.cc:311: error: 'Key_Escape' was not declared in this scope
scripts/kconfig/qconf.cc:313: error: 'Key_Return' was not declared in this scope
scripts/kconfig/qconf.cc:314: error: 'Key_Enter' was not declared in this scope

scripts/kconfig/qconf.cc: In member function 'virtual void ConfigList::keyPressEvent(QKeyEvent*)':
scripts/kconfig/qconf.cc:653: error: 'Key_Escape' was not declared in this scope
scripts/kconfig/qconf.cc:666: error: 'Key_Return' was not declared in this scope
scripts/kconfig/qconf.cc:667: error: 'Key_Enter' was not declared in this scope
scripts/kconfig/qconf.cc:681: error: 'Key_Space' was not declared in this scope
scripts/kconfig/qconf.cc:684: error: 'Key_N' was not declared in this scope
scripts/kconfig/qconf.cc:687: error: 'Key_M' was not declared in this scope
scripts/kconfig/qconf.cc:690: error: 'Key_Y' was not declared in this scope

scripts/kconfig/qconf.cc: In constructor 'ConfigMainWindow::ConfigMainWindow()':
scripts/kconfig/qconf.cc:1329: error: 'CTRL' was not declared in this scope
scripts/kconfig/qconf.cc:1329: error: 'Key_Q' was not declared in this scope
scripts/kconfig/qconf.cc:1331: error: 'Key_L' was not declared in this scope
scripts/kconfig/qconf.cc:1333: error: 'Key_S' was not declared in this scope
scripts/kconfig/qconf.cc:1340: error: 'Key_F' was not declared in this scope

Signed-off-by: Markus Heidelberg <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/kconfig/qconf.cc | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 7433dac..afae613 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -297,10 +297,10 @@ void ConfigLineEdit::show(ConfigItem* i)
void ConfigLineEdit::keyPressEvent(QKeyEvent* e)
{
switch (e->key()) {
- case Key_Escape:
+ case Qt::Key_Escape:
break;
- case Key_Return:
- case Key_Enter:
+ case Qt::Key_Return:
+ case Qt::Key_Enter:
sym_set_string_value(item->menu->sym, text().latin1());
parent()->updateList(item);
break;
@@ -639,7 +639,7 @@ void ConfigList::keyPressEvent(QKeyEvent* ev)
struct menu *menu;
enum prop_type type;

- if (ev->key() == Key_Escape && mode != fullMode && mode != listMode) {
+ if (ev->key() == Qt::Key_Escape && mode != fullMode && mode != listMode) {
emit parentSelected();
ev->accept();
return;
@@ -652,8 +652,8 @@ void ConfigList::keyPressEvent(QKeyEvent* ev)
item = (ConfigItem*)i;

switch (ev->key()) {
- case Key_Return:
- case Key_Enter:
+ case Qt::Key_Return:
+ case Qt::Key_Enter:
if (item->goParent) {
emit parentSelected();
break;
@@ -667,16 +667,16 @@ void ConfigList::keyPressEvent(QKeyEvent* ev)
emit menuSelected(menu);
break;
}
- case Key_Space:
+ case Qt::Key_Space:
changeValue(item);
break;
- case Key_N:
+ case Qt::Key_N:
setValue(item, no);
break;
- case Key_M:
+ case Qt::Key_M:
setValue(item, mod);
break;
- case Key_Y:
+ case Qt::Key_Y:
setValue(item, yes);
break;
default:
@@ -1315,18 +1315,18 @@ ConfigMainWindow::ConfigMainWindow(void)
backAction = new QAction("Back", QPixmap(xpm_back), _("Back"), 0, this);
connect(backAction, SIGNAL(activated()), SLOT(goBack()));
backAction->setEnabled(FALSE);
- QAction *quitAction = new QAction("Quit", _("&Quit"), CTRL+Key_Q, this);
+ QAction *quitAction = new QAction("Quit", _("&Quit"), Qt::CTRL + Qt::Key_Q, this);
connect(quitAction, SIGNAL(activated()), SLOT(close()));
- QAction *loadAction = new QAction("Load", QPixmap(xpm_load), _("&Load"), CTRL+Key_L, this);
+ QAction *loadAction = new QAction("Load", QPixmap(xpm_load), _("&Load"), Qt::CTRL + Qt::Key_L, this);
connect(loadAction, SIGNAL(activated()), SLOT(loadConfig()));
- saveAction = new QAction("Save", QPixmap(xpm_save), _("&Save"), CTRL+Key_S, this);
+ saveAction = new QAction("Save", QPixmap(xpm_save), _("&Save"), Qt::CTRL + Qt::Key_S, this);
connect(saveAction, SIGNAL(activated()), SLOT(saveConfig()));
conf_set_changed_callback(conf_changed);
// Set saveAction's initial state
conf_changed();
QAction *saveAsAction = new QAction("Save As...", _("Save &As..."), 0, this);
connect(saveAsAction, SIGNAL(activated()), SLOT(saveConfigAs()));
- QAction *searchAction = new QAction("Find", _("&Find"), CTRL+Key_F, this);
+ QAction *searchAction = new QAction("Find", _("&Find"), Qt::CTRL + Qt::Key_F, this);
connect(searchAction, SIGNAL(activated()), SLOT(searchConfig()));
QAction *singleViewAction = new QAction("Single View", QPixmap(xpm_single_view), _("Single View"), 0, this);
connect(singleViewAction, SIGNAL(activated()), SLOT(showSingleView()));
--
1.6.3.rc3.40.g75b44

2009-06-05 23:45:31

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 30/39] kconfig qconf: fix the type of the desktop widget

From: Markus Heidelberg <[email protected]>

QApplication::desktop() returns a pointer to QDesktopWidget, not to
QWidget.

Fixes the following compiler error after a quick conversion with 'qt3to4',
which occured with g++ 3.4.6 and 4.1.2, but not anymore with 4.3.2.

scripts/kconfig/qconf.cc: In constructor 'ConfigMainWindow::ConfigMainWindow()':
scripts/kconfig/qconf.cc:1289: error: cannot convert 'QDesktopWidget*' to 'QWidget*' in initialization

Signed-off-by: Markus Heidelberg <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/kconfig/qconf.cc | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index afae613..19811fc 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -5,6 +5,7 @@

#include <qapplication.h>
#include <qmainwindow.h>
+#include <qdesktopwidget.h>
#include <qtoolbar.h>
#include <qlayout.h>
#include <qvbox.h>
@@ -1275,7 +1276,7 @@ ConfigMainWindow::ConfigMainWindow(void)
int x, y, width, height;
char title[256];

- QWidget *d = configApp->desktop();
+ QDesktopWidget *d = configApp->desktop();
snprintf(title, sizeof(title), _("Linux Kernel v%s Configuration"),
getenv("KERNELVERSION"));
setCaption(title);
--
1.6.3.rc3.40.g75b44

2009-06-05 23:46:31

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 37/39] Remove bashisms from scripts

From: dann frazier <[email protected]>

The '-e' option to echo and brace expansion are not guaranteed to be supported
by a POSIX-compliant /bin/sh (e.g. dash)

Signed-off-by: dann frazier <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/gcc-version.sh | 2 +-
scripts/ver_linux | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/gcc-version.sh b/scripts/gcc-version.sh
index cc767b3..debecb5 100644
--- a/scripts/gcc-version.sh
+++ b/scripts/gcc-version.sh
@@ -18,7 +18,7 @@ compiler="$*"

if [ ${#compiler} -eq 0 ]; then
echo "Error: No compiler specified."
- echo -e "Usage:\n\t$0 <gcc-command>"
+ printf "Usage:\n\t$0 <gcc-command>\n"
exit 1
fi

diff --git a/scripts/ver_linux b/scripts/ver_linux
index dbb3037..7de36df 100755
--- a/scripts/ver_linux
+++ b/scripts/ver_linux
@@ -65,7 +65,7 @@ sed -n -e '/^.*\/libc-\([^/]*\)\.so$/{s//\1/;p;q}' < /proc/self/maps
ldd -v > /dev/null 2>&1 && ldd -v || ldd --version |head -n 1 | awk \
'NR==1{print "Dynamic linker (ldd) ", $NF}'

-ls -l /usr/lib/lib{g,stdc}++.so 2>/dev/null | awk -F. \
+ls -l /usr/lib/libg++.so /usr/lib/libstdc++.so 2>/dev/null | awk -F. \
'{print "Linux C++ Library " $4"."$5"."$6}'

ps --version 2>&1 | grep version | awk \
--
1.6.3.rc3.40.g75b44

2009-06-05 23:45:46

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 38/39] ignore *.patch files

From: Mike Frysinger <[email protected]>

Signed-off-by: Mike Frysinger <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
.gitignore | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore
index 51bd99d..3433d7c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,6 +25,7 @@
*.elf
*.bin
*.gz
+*.patch

#
# Top-level generic files
--
1.6.3.rc3.40.g75b44

2009-06-05 23:46:19

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 39/39] kbuild: fix "Argument list too long" error for "make headers_check",

From: Sergei Poselenov <[email protected]>

I'm trying to install kernel headers to build a cross-toolchain, but got
the following:

make ARCH=arm
INSTALL_HDR_PATH=/work/psl/eldk-builds/arm-2009-04-21/work/var/tmp/crosstool-0.43-3-root/usr/crosstool/gcc-4.2.2-glibc-20070515T2025-eldk/
+arm-linux-gnueabi/arm-linux-gnueabi/
headers_check
...
CHECK include/linux/raid (2 files)
CHECK include/linux/spi (1 files)
CHECK include/linux/sunrpc (1 files)
CHECK include/linux/tc_act (6 files)
CHECK include/linux/tc_ematch (4 files)
CHECK include/linux/usb (8 files)
make[2]: execvp: /bin/sh: Argument list too long
make[2]: ***
[/work/psl/eldk-builds/arm-2009-04-21/work/var/tmp/crosstool-0.43-3-root/usr/crosstool/gcc-4.2.2-glibc-20070515T2025-eldk/arm-linux-gnueab
+i/arm-linux-gnueabi//include/linux/.check]
Error 127
make[1]: *** [linux] Error 2
make: *** [headers_check] Error 2
->

Introduce use of xargs to fix this.

Signed-off-by: Sergei Poselenov <[email protected]>
Cc: Wolfgang Denk <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/Makefile.headersinst | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index 095cfc8..0fcd838 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -54,8 +54,12 @@ quiet_cmd_remove = REMOVE $(unwanted)
cmd_remove = rm -f $(unwanted-file)

quiet_cmd_check = CHECK $(printdir) ($(words $(all-files)) files)
- cmd_check = $(PERL) $< $(INSTALL_HDR_PATH)/include $(SRCARCH) \
- $(addprefix $(install)/, $(all-files)); \
+# Headers list can be pretty long, xargs helps to avoid
+# the "Argument list too long" error.
+ cmd_check = for f in $(all-files); do \
+ echo "$(install)/$${f}"; done \
+ | xargs \
+ $(PERL) $< $(INSTALL_HDR_PATH)/include $(SRCARCH); \
touch $@

PHONY += __headersinst __headerscheck
--
1.6.3.rc3.40.g75b44

2009-06-05 23:46:43

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 31/39] kconfig: do not hardcode ".config" filename

From: Markus Heidelberg <[email protected]>

Rather than hardcoding ".config" use conf_get_configname(), which also
respects the environment variable KCONFIG_CONFIG.

This fixes "make silentoldconfig" when KCONFIG_CONFIG is used and also
suggests the given filename for "Load" and "Save as" in qconf.

Signed-off-by: Markus Heidelberg <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/kconfig/conf.c | 7 ++++---
scripts/kconfig/qconf.cc | 4 ++--
2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index d190092..3baaaec 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -498,14 +498,15 @@ int main(int ac, char **av)
conf_parse(name);
//zconfdump(stdout);
if (sync_kconfig) {
- if (stat(".config", &tmpstat)) {
+ name = conf_get_configname();
+ if (stat(name, &tmpstat)) {
fprintf(stderr, _("***\n"
"*** You have not yet configured your kernel!\n"
- "*** (missing kernel .config file)\n"
+ "*** (missing kernel config file \"%s\")\n"
"***\n"
"*** Please run some configurator (e.g. \"make oldconfig\" or\n"
"*** \"make menuconfig\" or \"make xconfig\").\n"
- "***\n"));
+ "***\n"), name);
exit(1);
}
}
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 19811fc..ce7d508 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -1448,7 +1448,7 @@ ConfigMainWindow::ConfigMainWindow(void)

void ConfigMainWindow::loadConfig(void)
{
- QString s = QFileDialog::getOpenFileName(".config", NULL, this);
+ QString s = QFileDialog::getOpenFileName(conf_get_configname(), NULL, this);
if (s.isNull())
return;
if (conf_read(QFile::encodeName(s)))
@@ -1464,7 +1464,7 @@ void ConfigMainWindow::saveConfig(void)

void ConfigMainWindow::saveConfigAs(void)
{
- QString s = QFileDialog::getSaveFileName(".config", NULL, this);
+ QString s = QFileDialog::getSaveFileName(conf_get_configname(), NULL, this);
if (s.isNull())
return;
if (conf_write(QFile::encodeName(s)))
--
1.6.3.rc3.40.g75b44

2009-06-05 23:45:58

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 33/39] kernel/kallsyms.c: replace deprecated __initcall with device_initcall and fix whitespace

From: Manish Katiyar <[email protected]>

Fix coding style whitespace issues and replace __initcall with
device_initcall. Fixed multi-line comments as per coding style.

Errors as reported by checkpatch.pl :-
Before:
total: 14 errors, 14 warnings, 487 lines checked
After :
total: 0 errors, 8 warnings, 507 lines checked

Compile tested binary verified as :-
Before:
text data bss dec hex filename
2405 4 0 2409 969 kernel/kallsyms.o
After :
text data bss dec hex filename
2405 4 0 2409 969 kernel/kallsyms.o

Signed-off-by: Manish Katiyar <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
kernel/kallsyms.c | 134 +++++++++++++++++++++++++++++++----------------------
1 files changed, 78 insertions(+), 56 deletions(-)

diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
index 374faf9..3a29dbe 100644
--- a/kernel/kallsyms.c
+++ b/kernel/kallsyms.c
@@ -30,12 +30,16 @@
#define all_var 0
#endif

-/* These will be re-linked against their real values during the second link stage */
+/*
+ * These will be re-linked against their real values
+ * during the second link stage.
+ */
extern const unsigned long kallsyms_addresses[] __attribute__((weak));
extern const u8 kallsyms_names[] __attribute__((weak));

-/* tell the compiler that the count isn't in the small data section if the arch
- * has one (eg: FRV)
+/*
+ * Tell the compiler that the count isn't in the small data section if the arch
+ * has one (eg: FRV).
*/
extern const unsigned long kallsyms_num_syms
__attribute__((weak, section(".rodata")));
@@ -75,31 +79,37 @@ static int is_ksym_addr(unsigned long addr)
return is_kernel_text(addr) || is_kernel_inittext(addr);
}

-/* expand a compressed symbol data into the resulting uncompressed string,
- given the offset to where the symbol is in the compressed stream */
+/*
+ * Expand a compressed symbol data into the resulting uncompressed string,
+ * given the offset to where the symbol is in the compressed stream.
+ */
static unsigned int kallsyms_expand_symbol(unsigned int off, char *result)
{
int len, skipped_first = 0;
const u8 *tptr, *data;

- /* get the compressed symbol length from the first symbol byte */
+ /* Get the compressed symbol length from the first symbol byte. */
data = &kallsyms_names[off];
len = *data;
data++;

- /* update the offset to return the offset for the next symbol on
- * the compressed stream */
+ /*
+ * Update the offset to return the offset for the next symbol on
+ * the compressed stream.
+ */
off += len + 1;

- /* for every byte on the compressed symbol data, copy the table
- entry for that byte */
- while(len) {
- tptr = &kallsyms_token_table[ kallsyms_token_index[*data] ];
+ /*
+ * For every byte on the compressed symbol data, copy the table
+ * entry for that byte.
+ */
+ while (len) {
+ tptr = &kallsyms_token_table[kallsyms_token_index[*data]];
data++;
len--;

while (*tptr) {
- if(skipped_first) {
+ if (skipped_first) {
*result = *tptr;
result++;
} else
@@ -110,36 +120,46 @@ static unsigned int kallsyms_expand_symbol(unsigned int off, char *result)

*result = '\0';

- /* return to offset to the next symbol */
+ /* Return to offset to the next symbol. */
return off;
}

-/* get symbol type information. This is encoded as a single char at the
- * begining of the symbol name */
+/*
+ * Get symbol type information. This is encoded as a single char at the
+ * beginning of the symbol name.
+ */
static char kallsyms_get_symbol_type(unsigned int off)
{
- /* get just the first code, look it up in the token table, and return the
- * first char from this token */
- return kallsyms_token_table[ kallsyms_token_index[ kallsyms_names[off+1] ] ];
+ /*
+ * Get just the first code, look it up in the token table,
+ * and return the first char from this token.
+ */
+ return kallsyms_token_table[kallsyms_token_index[kallsyms_names[off + 1]]];
}


-/* find the offset on the compressed stream given and index in the
- * kallsyms array */
+/*
+ * Find the offset on the compressed stream given and index in the
+ * kallsyms array.
+ */
static unsigned int get_symbol_offset(unsigned long pos)
{
const u8 *name;
int i;

- /* use the closest marker we have. We have markers every 256 positions,
- * so that should be close enough */
- name = &kallsyms_names[ kallsyms_markers[pos>>8] ];
+ /*
+ * Use the closest marker we have. We have markers every 256 positions,
+ * so that should be close enough.
+ */
+ name = &kallsyms_names[kallsyms_markers[pos >> 8]];

- /* sequentially scan all the symbols up to the point we're searching for.
- * Every symbol is stored in a [<len>][<len> bytes of data] format, so we
- * just need to add the len to the current pointer for every symbol we
- * wish to skip */
- for(i = 0; i < (pos&0xFF); i++)
+ /*
+ * Sequentially scan all the symbols up to the point we're searching
+ * for. Every symbol is stored in a [<len>][<len> bytes of data] format,
+ * so we just need to add the len to the current pointer for every
+ * symbol we wish to skip.
+ */
+ for (i = 0; i < (pos & 0xFF); i++)
name = name + (*name) + 1;

return name - kallsyms_names;
@@ -190,7 +210,7 @@ static unsigned long get_symbol_pos(unsigned long addr,
/* This kernel should never had been booted. */
BUG_ON(!kallsyms_addresses);

- /* do a binary search on the sorted kallsyms_addresses array */
+ /* Do a binary search on the sorted kallsyms_addresses array. */
low = 0;
high = kallsyms_num_syms;

@@ -203,15 +223,15 @@ static unsigned long get_symbol_pos(unsigned long addr,
}

/*
- * search for the first aliased symbol. Aliased
- * symbols are symbols with the same address
+ * Search for the first aliased symbol. Aliased
+ * symbols are symbols with the same address.
*/
while (low && kallsyms_addresses[low-1] == kallsyms_addresses[low])
--low;

symbol_start = kallsyms_addresses[low];

- /* Search for next non-aliased symbol */
+ /* Search for next non-aliased symbol. */
for (i = low + 1; i < kallsyms_num_syms; i++) {
if (kallsyms_addresses[i] > symbol_start) {
symbol_end = kallsyms_addresses[i];
@@ -219,7 +239,7 @@ static unsigned long get_symbol_pos(unsigned long addr,
}
}

- /* if we found no next symbol, we use the end of the section */
+ /* If we found no next symbol, we use the end of the section. */
if (!symbol_end) {
if (is_kernel_inittext(addr))
symbol_end = (unsigned long)_einittext;
@@ -252,10 +272,10 @@ int kallsyms_lookup_size_offset(unsigned long addr, unsigned long *symbolsize,

/*
* Lookup an address
- * - modname is set to NULL if it's in the kernel
- * - we guarantee that the returned name is valid until we reschedule even if
- * it resides in a module
- * - we also guarantee that modname will be valid until rescheduled
+ * - modname is set to NULL if it's in the kernel.
+ * - We guarantee that the returned name is valid until we reschedule even if.
+ * It resides in a module.
+ * - We also guarantee that modname will be valid until rescheduled.
*/
const char *kallsyms_lookup(unsigned long addr,
unsigned long *symbolsize,
@@ -276,7 +296,7 @@ const char *kallsyms_lookup(unsigned long addr,
return namebuf;
}

- /* see if it's in a module */
+ /* See if it's in a module. */
return module_address_lookup(addr, symbolsize, offset, modname,
namebuf);
}
@@ -294,7 +314,7 @@ int lookup_symbol_name(unsigned long addr, char *symname)
kallsyms_expand_symbol(get_symbol_offset(pos), symname);
return 0;
}
- /* see if it's in a module */
+ /* See if it's in a module. */
return lookup_module_symbol_name(addr, symname);
}

@@ -313,7 +333,7 @@ int lookup_symbol_attrs(unsigned long addr, unsigned long *size,
modname[0] = '\0';
return 0;
}
- /* see if it's in a module */
+ /* See if it's in a module. */
return lookup_module_symbol_attrs(addr, size, offset, modname, name);
}

@@ -342,6 +362,7 @@ int sprint_symbol(char *buffer, unsigned long address)

return len;
}
+EXPORT_SYMBOL_GPL(sprint_symbol);

/* Look up a kernel symbol and print it to the kernel messages. */
void __print_symbol(const char *fmt, unsigned long address)
@@ -352,13 +373,13 @@ void __print_symbol(const char *fmt, unsigned long address)

printk(fmt, buffer);
}
+EXPORT_SYMBOL(__print_symbol);

/* To avoid using get_symbol_offset for every symbol, we carry prefix along. */
-struct kallsym_iter
-{
+struct kallsym_iter {
loff_t pos;
unsigned long value;
- unsigned int nameoff; /* If iterating in core kernel symbols */
+ unsigned int nameoff; /* If iterating in core kernel symbols. */
char type;
char name[KSYM_NAME_LEN];
char module_name[MODULE_NAME_LEN];
@@ -404,7 +425,7 @@ static int update_iter(struct kallsym_iter *iter, loff_t pos)
iter->pos = pos;
return get_ksymbol_mod(iter);
}
-
+
/* If we're not on the desired position, reset to new position. */
if (pos != iter->pos)
reset_iter(iter, pos);
@@ -439,23 +460,25 @@ static int s_show(struct seq_file *m, void *p)
{
struct kallsym_iter *iter = m->private;

- /* Some debugging symbols have no name. Ignore them. */
+ /* Some debugging symbols have no name. Ignore them. */
if (!iter->name[0])
return 0;

if (iter->module_name[0]) {
char type;

- /* Label it "global" if it is exported,
- * "local" if not exported. */
+ /*
+ * Label it "global" if it is exported,
+ * "local" if not exported.
+ */
type = iter->exported ? toupper(iter->type) :
tolower(iter->type);
seq_printf(m, "%0*lx %c %s\t[%s]\n",
- (int)(2*sizeof(void*)),
+ (int)(2 * sizeof(void *)),
iter->value, type, iter->name, iter->module_name);
} else
seq_printf(m, "%0*lx %c %s\n",
- (int)(2*sizeof(void*)),
+ (int)(2 * sizeof(void *)),
iter->value, iter->type, iter->name);
return 0;
}
@@ -469,9 +492,11 @@ static const struct seq_operations kallsyms_op = {

static int kallsyms_open(struct inode *inode, struct file *file)
{
- /* We keep iterator in m->private, since normal case is to
+ /*
+ * We keep iterator in m->private, since normal case is to
* s_start from where we left off, so we avoid doing
- * using get_symbol_offset for every symbol */
+ * using get_symbol_offset for every symbol.
+ */
struct kallsym_iter *iter;
int ret;

@@ -500,7 +525,4 @@ static int __init kallsyms_init(void)
proc_create("kallsyms", 0444, NULL, &kallsyms_operations);
return 0;
}
-__initcall(kallsyms_init);
-
-EXPORT_SYMBOL(__print_symbol);
-EXPORT_SYMBOL_GPL(sprint_symbol);
+device_initcall(kallsyms_init);
--
1.6.3.rc3.40.g75b44

2009-06-05 23:46:55

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 36/39] menu: fix embedded menu presentation

From: Randy Dunlap <[email protected]>

The STRIP_ASM_SYMS kconfig symbol mucks up the embedded menu because
STRIP_ASM_SYMS is in the middle of the embedded menu items but it does not
depend on EMBEDDED. Move it to beyond the end of the embedded menu so
that the menu is presented correctly.

Or if STRIP_ASM_SYMS should depend on EMBEDDED, that can also be fixed.

Signed-off-by: Randy Dunlap <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
init/Kconfig | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/init/Kconfig b/init/Kconfig
index 7be4d38..4389cee 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -808,14 +808,6 @@ config KALLSYMS_EXTRA_PASS
you wait for kallsyms to be fixed.


-config STRIP_ASM_SYMS
- bool "Strip assembler-generated symbols during link"
- default n
- help
- Strip internal assembler-generated symbols during a link (symbols
- that look like '.Lxxx') so they don't pollute the output of
- get_wchan() and suchlike.
-
config HOTPLUG
bool "Support for hot-pluggable devices" if EMBEDDED
default y
@@ -961,6 +953,14 @@ config SLUB_DEBUG
SLUB sysfs support. /sys/slab will not exist and there will be
no support for cache validation etc.

+config STRIP_ASM_SYMS
+ bool "Strip assembler-generated symbols during link"
+ default n
+ help
+ Strip internal assembler-generated symbols during a link (symbols
+ that look like '.Lxxx') so they don't pollute the output of
+ get_wchan() and suchlike.
+
config COMPAT_BRK
bool "Disable heap randomization"
default y
--
1.6.3.rc3.40.g75b44

2009-06-05 23:47:52

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 35/39] kbuild: add hint about __refdata to modpost

As requested by Guennadi Liakhovetski

Cc: Guennadi Liakhovetski <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/mod/modpost.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 94e71ef..4522948 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1196,7 +1196,7 @@ static void report_sec_mismatch(const char *modname, enum mismatch mismatch,
"The variable %s references\n"
"the %s %s%s%s\n"
"If the reference is valid then annotate the\n"
- "variable with __init* (see linux/init.h) "
+ "variable with __init* or __refdata (see linux/init.h) "
"or name the variable:\n",
fromsym, to, sec2annotation(tosec), tosym, to_p);
while (*s)
--
1.6.3.rc3.40.g75b44

2009-06-05 23:47:17

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 34/39] scripts/headers_check.pl: correct RE in header CONFIG leak check

From: Robert P. J. Day <[email protected]>

Correct the regular expression in scripts/headers_check.pl to include '_'
as a valid character in the class; otherwise, the check will report a
"leaked" symbol of CONFIG_A_B_C as merely CONFIG_A.

This patch will make no difference whatsoever in the current kernel tree
as the call to the perl routine that does that check is currently
commented out:

&check_include();
&check_asm_types();
&check_sizetypes();
&check_prototypes();
# Dropped for now. Too much noise &check_config();

However, I noticed that problem when I was building the yum downloadable
kernel source rpm for fedora 11 (beta), which *does* run that check, and
that's where the problem became obvious.

Signed-off-by: Robert P. J. Day <[email protected]>
Cc: David Woodhouse <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/headers_check.pl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/headers_check.pl b/scripts/headers_check.pl
index 3923888..e3fb949 100644
--- a/scripts/headers_check.pl
+++ b/scripts/headers_check.pl
@@ -74,7 +74,7 @@ sub check_declarations

sub check_config
{
- if ($line =~ m/[^a-zA-Z0-9_]+CONFIG_([a-zA-Z0-9]+)[^a-zA-Z0-9]/) {
+ if ($line =~ m/[^a-zA-Z0-9_]+CONFIG_([a-zA-Z0-9_]+)[^a-zA-Z0-9_]/) {
printf STDERR "$filename:$lineno: leaks CONFIG_$1 to userspace where it is not valid\n";
}
}
--
1.6.3.rc3.40.g75b44

2009-06-05 23:48:24

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 27/39] kconfig qconf: fix -Wall compiler warnings

From: Markus Heidelberg <[email protected]>

These compiler warnings occure when adding -Wall to HOSTCXXFLAGS in
/Makefile

scripts/kconfig/qconf.h: In constructor ‘ConfigInfoView::ConfigInfoView(QWidget*, const char*)’:
scripts/kconfig/qconf.h:274: warning: ‘ConfigInfoView::menu’ will be initialized after
scripts/kconfig/qconf.h:273: warning: ‘symbol* ConfigInfoView::sym’
scripts/kconfig/qconf.cc:922: warning: when initialized here

scripts/kconfig/qconf.cc: In member function ‘void ConfigMainWindow::setMenuLink(menu*)’:
scripts/kconfig/qconf.cc:1498: warning: enumeration value ‘menuMode’ not handled in switch
scripts/kconfig/qconf.cc:1498: warning: enumeration value ‘listMode’ not handled in switch

scripts/kconfig/qconf.cc: In member function ‘void ConfigMainWindow::saveSettings()’:
scripts/kconfig/qconf.cc:1664: warning: enumeration value ‘menuMode’ not handled in switch
scripts/kconfig/qconf.cc:1664: warning: enumeration value ‘listMode’ not handled in switch

Signed-off-by: Markus Heidelberg <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/kconfig/qconf.cc | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 5d0fd38..2bd6ed0 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -920,7 +920,7 @@ void ConfigView::updateListAll(void)
}

ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name)
- : Parent(parent, name), menu(0), sym(0)
+ : Parent(parent, name), sym(0), menu(0)
{
if (name) {
configSettings->beginGroup(name);
@@ -1524,6 +1524,8 @@ void ConfigMainWindow::setMenuLink(struct menu *menu)
case fullMode:
list = configList;
break;
+ default:
+ break;
}

if (list) {
@@ -1673,6 +1675,9 @@ void ConfigMainWindow::saveSettings(void)
case fullMode :
entry = "full";
break;
+
+ default:
+ break;
}
configSettings->writeEntry("/listMode", entry);

--
1.6.3.rc3.40.g75b44

2009-06-05 23:47:41

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 26/39] gitignore: ignore Kconfig i18n files

From: Markus Heidelberg <[email protected]>

Signed-off-by: Markus Heidelberg <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/kconfig/.gitignore | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/scripts/kconfig/.gitignore b/scripts/kconfig/.gitignore
index b49584c..6a36a76 100644
--- a/scripts/kconfig/.gitignore
+++ b/scripts/kconfig/.gitignore
@@ -8,6 +8,9 @@ lex.*.c
zconf.hash.c
*.moc
lkc_defs.h
+gconf.glade.h
+*.pot
+*.mo

#
# configuration programs
--
1.6.3.rc3.40.g75b44

2009-06-05 23:47:30

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 32/39] kconfig: do not hardcode "include/config/auto.conf" filename

From: Markus Heidelberg <[email protected]>

Regardless of KCONFIG_AUTOCONFIG, the filename written as a Make target
into "include/config/auto.conf.cmd" was always the default one.

Of course this doesn't make it work for the Kernel kbuild system, since
there the filename is hardcoded at several places in the Makefiles.

Signed-off-by: Markus Heidelberg <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/kconfig/confdata.c | 20 ++++++++++++--------
scripts/kconfig/lkc.h | 1 +
scripts/kconfig/util.c | 6 +++---
3 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 273d738..a04da34 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -41,6 +41,13 @@ const char *conf_get_configname(void)
return name ? name : ".config";
}

+const char *conf_get_autoconfig_name(void)
+{
+ char *name = getenv("KCONFIG_AUTOCONFIG");
+
+ return name ? name : "include/config/auto.conf";
+}
+
static char *conf_expand_value(const char *in)
{
struct symbol *sym;
@@ -555,15 +562,14 @@ int conf_write(const char *name)

int conf_split_config(void)
{
- char *name, path[128];
+ const char *name;
+ char path[128];
char *s, *d, c;
struct symbol *sym;
struct stat sb;
int res, i, fd;

- name = getenv("KCONFIG_AUTOCONFIG");
- if (!name)
- name = "include/config/auto.conf";
+ name = conf_get_autoconfig_name();
conf_read_simple(name, S_DEF_AUTO);

if (chdir("include/config"))
@@ -670,7 +676,7 @@ int conf_write_autoconf(void)
{
struct symbol *sym;
const char *str;
- char *name;
+ const char *name;
FILE *out, *out_h;
time_t now;
int i, l;
@@ -773,9 +779,7 @@ int conf_write_autoconf(void)
name = "include/linux/autoconf.h";
if (rename(".tmpconfig.h", name))
return 1;
- name = getenv("KCONFIG_AUTOCONFIG");
- if (!name)
- name = "include/config/auto.conf";
+ name = conf_get_autoconfig_name();
/*
* This must be the last step, kbuild has a dependency on auto.conf
* and this marks the successful completion of the previous steps.
diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
index 4a9af6f..f379b0b 100644
--- a/scripts/kconfig/lkc.h
+++ b/scripts/kconfig/lkc.h
@@ -74,6 +74,7 @@ char *zconf_curname(void);

/* confdata.c */
const char *conf_get_configname(void);
+const char *conf_get_autoconfig_name(void);
char *conf_get_default_confname(void);
void sym_set_change_count(int count);
void sym_add_change_count(int count);
diff --git a/scripts/kconfig/util.c b/scripts/kconfig/util.c
index 3cc9f93..b6b2a46 100644
--- a/scripts/kconfig/util.c
+++ b/scripts/kconfig/util.c
@@ -46,8 +46,8 @@ int file_write_dep(const char *name)
else
fprintf(out, "\t%s\n", file->name);
}
- fprintf(out, "\ninclude/config/auto.conf: \\\n"
- "\t$(deps_config)\n\n");
+ fprintf(out, "\n%s: \\\n"
+ "\t$(deps_config)\n\n", conf_get_autoconfig_name());

expr_list_for_each_sym(sym_env_list, e, sym) {
struct property *prop;
@@ -61,7 +61,7 @@ int file_write_dep(const char *name)
if (!value)
value = "";
fprintf(out, "ifneq \"$(%s)\" \"%s\"\n", env_sym->name, value);
- fprintf(out, "include/config/auto.conf: FORCE\n");
+ fprintf(out, "%s: FORCE\n", conf_get_autoconfig_name());
fprintf(out, "endif\n");
}

--
1.6.3.rc3.40.g75b44

2009-06-05 23:48:07

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 25/39] kconfig: resort the documentation of the environment variables

From: Markus Heidelberg <[email protected]>

All the KCONFIG_ environment variables were previously located in a
section "Environment variables in 'menuconfig'", but neither are they
restricted to 'menuconfig' nor are they all used by 'menuconfig'.

Introduce the following three sections for these variables:
* Environment variables for '*config'
* Environment variables for '{allyes/allmod/allno/rand}config'
* Environment variables for 'silentoldconfig'

Furthermore this puts MENUCONFIG_MODE next to MENUCONFIG_COLOR into a
common section "User interface options for 'menuconfig'".

Signed-off-by: Markus Heidelberg <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
Documentation/kbuild/kconfig.txt | 116 +++++++++++++++++++------------------
1 files changed, 60 insertions(+), 56 deletions(-)

diff --git a/Documentation/kbuild/kconfig.txt b/Documentation/kbuild/kconfig.txt
index 26a7c0a..849b5e5 100644
--- a/Documentation/kbuild/kconfig.txt
+++ b/Documentation/kbuild/kconfig.txt
@@ -35,48 +35,26 @@ new .config files to see the differences:

(Yes, we need something better here.)

-
-======================================================================
-menuconfig
---------------------------------------------------
-
-SEARCHING for CONFIG symbols
-
-Searching in menuconfig:
-
- The Search function searches for kernel configuration symbol
- names, so you have to know something close to what you are
- looking for.
-
- Example:
- /hotplug
- This lists all config symbols that contain "hotplug",
- e.g., HOTPLUG, HOTPLUG_CPU, MEMORY_HOTPLUG.
-
- For search help, enter / followed TAB-TAB-TAB (to highlight
- <Help>) and Enter. This will tell you that you can also use
- regular expressions (regexes) in the search string, so if you
- are not interested in MEMORY_HOTPLUG, you could try
-
- /^hotplug
-
-
______________________________________________________________________
-Color Themes for 'menuconfig'
+Environment variables for '*config'

-It is possible to select different color themes using the variable
-MENUCONFIG_COLOR. To select a theme use:
+KCONFIG_CONFIG
+--------------------------------------------------
+This environment variable can be used to specify a default kernel config
+file name to override the default name of ".config".

- make MENUCONFIG_COLOR=<theme> menuconfig
+KCONFIG_OVERWRITECONFIG
+--------------------------------------------------
+If you set KCONFIG_OVERWRITECONFIG in the environment, Kconfig will not
+break symlinks when .config is a symlink to somewhere else.

-Available themes are:
- mono => selects colors suitable for monochrome displays
- blackbg => selects a color scheme with black background
- classic => theme with blue background. The classic look
- bluetitle => a LCD friendly version of classic. (default)
+KCONFIG_NOTIMESTAMP
+--------------------------------------------------
+If this environment variable exists and is non-null, the timestamp line
+in generated .config files is omitted.

______________________________________________________________________
-Environment variables in 'menuconfig'
+Environment variables for '{allyes/allmod/allno/rand}config'

KCONFIG_ALLCONFIG
--------------------------------------------------
@@ -95,8 +73,7 @@ values.
This enables you to create "miniature" config (miniconfig) or custom
config files containing just the config symbols that you are interested
in. Then the kernel config system generates the full .config file,
-including dependencies of your miniconfig file, based on the miniconfig
-file.
+including symbols of your miniconfig file.

This 'KCONFIG_ALLCONFIG' file is a config file which contains
(usually a subset of all) preset config symbols. These variable
@@ -113,26 +90,14 @@ These examples will disable most options (allnoconfig) but enable or
disable the options that are explicitly listed in the specified
mini-config files.

+______________________________________________________________________
+Environment variables for 'silentoldconfig'
+
KCONFIG_NOSILENTUPDATE
--------------------------------------------------
If this variable has a non-blank value, it prevents silent kernel
config udpates (requires explicit updates).

-KCONFIG_CONFIG
---------------------------------------------------
-This environment variable can be used to specify a default kernel config
-file name to override the default name of ".config".
-
-KCONFIG_OVERWRITECONFIG
---------------------------------------------------
-If you set KCONFIG_OVERWRITECONFIG in the environment, Kconfig will not
-break symlinks when .config is a symlink to somewhere else.
-
-KCONFIG_NOTIMESTAMP
---------------------------------------------------
-If this environment variable exists and is non-null, the timestamp line
-in generated .config files is omitted.
-
KCONFIG_AUTOCONFIG
--------------------------------------------------
This environment variable can be set to specify the path & name of the
@@ -143,15 +108,54 @@ KCONFIG_AUTOHEADER
This environment variable can be set to specify the path & name of the
"autoconf.h" (header) file. Its default value is "include/linux/autoconf.h".

+
+======================================================================
+menuconfig
+--------------------------------------------------
+
+SEARCHING for CONFIG symbols
+
+Searching in menuconfig:
+
+ The Search function searches for kernel configuration symbol
+ names, so you have to know something close to what you are
+ looking for.
+
+ Example:
+ /hotplug
+ This lists all config symbols that contain "hotplug",
+ e.g., HOTPLUG, HOTPLUG_CPU, MEMORY_HOTPLUG.
+
+ For search help, enter / followed TAB-TAB-TAB (to highlight
+ <Help>) and Enter. This will tell you that you can also use
+ regular expressions (regexes) in the search string, so if you
+ are not interested in MEMORY_HOTPLUG, you could try
+
+ /^hotplug
+
______________________________________________________________________
-menuconfig User Interface Options
-----------------------------------------------------------------------
+User interface options for 'menuconfig'
+
+MENUCONFIG_COLOR
+--------------------------------------------------
+It is possible to select different color themes using the variable
+MENUCONFIG_COLOR. To select a theme use:
+
+ make MENUCONFIG_COLOR=<theme> menuconfig
+
+Available themes are:
+ mono => selects colors suitable for monochrome displays
+ blackbg => selects a color scheme with black background
+ classic => theme with blue background. The classic look
+ bluetitle => a LCD friendly version of classic. (default)
+
MENUCONFIG_MODE
--------------------------------------------------
This mode shows all sub-menus in one large tree.

Example:
- MENUCONFIG_MODE=single_menu make menuconfig
+ make MENUCONFIG_MODE=single_menu menuconfig
+

======================================================================
xconfig
--
1.6.3.rc3.40.g75b44

2009-06-05 23:48:36

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 21/39] kbuild/Documentation: Incorrect makefile syntax in example

From: David VomLehn <[email protected]>

There is an error in the make syntax for one of the kbuild examples

Signed-off-by: David VomLehn <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
Documentation/kbuild/modules.txt | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Documentation/kbuild/modules.txt b/Documentation/kbuild/modules.txt
index b1096da..0767cf6 100644
--- a/Documentation/kbuild/modules.txt
+++ b/Documentation/kbuild/modules.txt
@@ -275,7 +275,7 @@ following files:

KERNELDIR := /lib/modules/`uname -r`/build
all::
- $(MAKE) -C $KERNELDIR M=`pwd` $@
+ $(MAKE) -C $(KERNELDIR) M=`pwd` $@

# Module specific targets
genbin:
--
1.6.3.rc3.40.g75b44

2009-06-05 23:49:46

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 15/39] kbuild, deb-pkg: bump standards version

From: maximilian attems <[email protected]>

Latest Debian policy is 3.8.1.
Even if we are not yet compliant to it strive for the latest.

Signed-off-by: maximilian attems <[email protected]>
Signed-off-by: Frans Pop <[email protected]>
Acked-by: Andres Salomon <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/package/builddeb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 9708d26..01c2d13 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -147,7 +147,7 @@ Source: linux-upstream
Section: admin
Priority: optional
Maintainer: $maintainer
-Standards-Version: 3.6.1
+Standards-Version: 3.8.1
EOF

if [ "$ARCH" = "um" ]; then
--
1.6.3.rc3.40.g75b44

2009-06-05 23:48:58

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 20/39] kbuild: allow docproc invocation from external

From: Jiri Slaby <[email protected]>

- getcwd returns path without a slash at the end, add the slash
- add KBUILD_SRC env support, so that we can specify path for
kernel (to know where scripts/kernel-doc resides) and SRCTREE
(for searching files referenced in .tmpl) separately

[v2]
- use KBUILD_SRC instead of a newly introduced environment variable

Signed-off-by: Jiri Slaby <[email protected]>
Acked-by: Randy Dunlap <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/basic/docproc.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/scripts/basic/docproc.c b/scripts/basic/docproc.c
index 35bdc68..4c9523e 100644
--- a/scripts/basic/docproc.c
+++ b/scripts/basic/docproc.c
@@ -69,7 +69,7 @@ FILELINE * docsection;
#define NOFUNCTION "-nofunction"
#define NODOCSECTIONS "-no-doc-sections"

-char *srctree;
+static char *srctree, *kernsrctree;

void usage (void)
{
@@ -77,7 +77,8 @@ void usage (void)
fprintf(stderr, "Input is read from file.tmpl. Output is sent to stdout\n");
fprintf(stderr, "doc: frontend when generating kernel documentation\n");
fprintf(stderr, "depend: generate list of files referenced within file\n");
- fprintf(stderr, "Environment variable SRCTREE: absolute path to kernel source tree.\n");
+ fprintf(stderr, "Environment variable SRCTREE: absolute path to sources.\n");
+ fprintf(stderr, " KBUILD_SRC: absolute path to kernel source tree.\n");
}

/*
@@ -96,8 +97,8 @@ void exec_kernel_doc(char **svec)
exit(1);
case 0:
memset(real_filename, 0, sizeof(real_filename));
- strncat(real_filename, srctree, PATH_MAX);
- strncat(real_filename, KERNELDOCPATH KERNELDOC,
+ strncat(real_filename, kernsrctree, PATH_MAX);
+ strncat(real_filename, "/" KERNELDOCPATH KERNELDOC,
PATH_MAX - strlen(real_filename));
execvp(real_filename, svec);
fprintf(stderr, "exec ");
@@ -178,6 +179,7 @@ void find_export_symbols(char * filename)
char real_filename[PATH_MAX + 1];
memset(real_filename, 0, sizeof(real_filename));
strncat(real_filename, srctree, PATH_MAX);
+ strncat(real_filename, "/", PATH_MAX - strlen(real_filename));
strncat(real_filename, filename,
PATH_MAX - strlen(real_filename));
sym = add_new_file(filename);
@@ -382,6 +384,9 @@ int main(int argc, char *argv[])
srctree = getenv("SRCTREE");
if (!srctree)
srctree = getcwd(NULL, 0);
+ kernsrctree = getenv("KBUILD_SRC");
+ if (!kernsrctree)
+ kernsrctree = srctree;
if (argc != 3) {
usage();
exit(1);
--
1.6.3.rc3.40.g75b44

2009-06-05 23:50:17

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 12/39] kbuild, deb-pkg: fix generated package name

From: maximilian attems <[email protected]>

The binary package that make deb-pkg creates is a linux-image.
To be fixed may also be the addition of $DEB_ARCH.

Signed-off-by: maximilian attems <[email protected]>
Signed-off-by: Frans Pop <[email protected]>
Cc: Andres Salomon <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/package/builddeb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 6d3b7e5..1ade570 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -36,7 +36,7 @@ else
fi
tmpdir="$objtree/debian/tmp"
fwdir="$objtree/debian/fwtmp"
-packagename=linux-$version
+packagename=linux-image-$version
fwpackagename=linux-firmware-image

if [ "$ARCH" = "um" ] ; then
--
1.6.3.rc3.40.g75b44

2009-06-05 23:49:58

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 14/39] kbuild, deb-pkg: fix Section field

From: maximilian attems <[email protected]>

Section "base" has been removed, the base is defined by Priority field.

For Squeeze the section should be "kernel", but as that's not yet
supported for Sarge and Etch we stay with admin for now.

Signed-off-by: maximilian attems <[email protected]>
Signed-off-by: Frans Pop <[email protected]>
Cc: Andres Salomon <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/package/builddeb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index e1dd189..9708d26 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -144,7 +144,7 @@ EOF
# Generate a control file
cat <<EOF > debian/control
Source: linux-upstream
-Section: base
+Section: admin
Priority: optional
Maintainer: $maintainer
Standards-Version: 3.6.1
--
1.6.3.rc3.40.g75b44

2009-06-05 23:49:21

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 24/39] kconfig: add a note about the deps to the 'silentoldconfig' help

From: Markus Heidelberg <[email protected]>

Signed-off-by: Markus Heidelberg <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
README | 1 +
scripts/kconfig/Makefile | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/README b/README
index d6c6c74..7a078ff 100644
--- a/README
+++ b/README
@@ -174,6 +174,7 @@ CONFIGURING the kernel:
"make silentoldconfig"
Like above, but avoids cluttering the screen
with questions already answered.
+ Additionally updates the dependencies.
"make defconfig" Create a ./.config file by using the default
symbol values from arch/$ARCH/defconfig.
"make allyesconfig"
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 47e3f2e..5ddf8be 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -83,7 +83,7 @@ help:
@echo ' xconfig - Update current config utilising a QT based front-end'
@echo ' gconfig - Update current config utilising a GTK based front-end'
@echo ' oldconfig - Update current config utilising a provided .config as base'
- @echo ' silentoldconfig - Same as oldconfig, but quietly'
+ @echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps'
@echo ' randconfig - New config with random answer to all options'
@echo ' defconfig - New config with default answer to all options'
@echo ' allmodconfig - New config selecting modules when possible'
--
1.6.3.rc3.40.g75b44

2009-06-05 23:48:48

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 19/39] kbuild: clean up scripts/headers.sh

From: Amerigo Wang <[email protected]>

'drop' variable is unused.

'ppc' and 'sparc64' directories don't exist in arch/,
and I think their headers can be well exported now, so
just remove them.

Signed-off-by: WANG Cong <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/headers.sh | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/scripts/headers.sh b/scripts/headers.sh
index d33426f..0308ecc 100755
--- a/scripts/headers.sh
+++ b/scripts/headers.sh
@@ -15,19 +15,12 @@ do_command()
fi
}

-# Do not try this architecture
-drop="generic um ppc sparc64 cris"
-
archs=$(ls ${srctree}/arch)

for arch in ${archs}; do
case ${arch} in
um) # no userspace export
;;
- ppc) # headers exported by powerpc
- ;;
- sparc64) # headers exported by sparc
- ;;
cris) # headers export are known broken
;;
*)
--
1.6.3.rc3.40.g75b44

2009-06-05 23:49:34

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 18/39] kbuild/headers_check: refine extern check

From: Amerigo Wang <[email protected]>

'extern' checking information is not clear, refine it.
Plus, fix a comment.

Signed-off-by: WANG Cong <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/headers_check.pl | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/scripts/headers_check.pl b/scripts/headers_check.pl
index 56f90a4..3923888 100644
--- a/scripts/headers_check.pl
+++ b/scripts/headers_check.pl
@@ -2,7 +2,7 @@
#
# headers_check.pl execute a number of trivial consistency checks
#
-# Usage: headers_check.pl dir [files...]
+# Usage: headers_check.pl dir arch [files...]
# dir: dir to look for included files
# arch: architecture
# files: list of files to check
@@ -37,7 +37,7 @@ foreach my $file (@files) {
&check_include();
&check_asm_types();
&check_sizetypes();
- &check_prototypes();
+ &check_declarations();
# Dropped for now. Too much noise &check_config();
}
close FH;
@@ -61,10 +61,14 @@ sub check_include
}
}

-sub check_prototypes
+sub check_declarations
{
- if ($line =~ m/^\s*extern\b/) {
- printf STDERR "$filename:$lineno: extern's make no sense in userspace\n";
+ if ($line =~m/^\s*extern\b/) {
+ if ($line =~ m/^\s*extern\b.*\(.*\)/) {
+ printf STDERR "$filename:$lineno: extern's make no sense in userspace\n";
+ } else {
+ printf STDERR "$filename:$lineno: exporting global variable to userspace is suspicious\n";
+ }
}
}

--
1.6.3.rc3.40.g75b44

2009-06-05 23:50:37

by Sam Ravnborg

[permalink] [raw]
Subject: [PATCH 11/39] kbuild, deb-pkg: improve Source field

From: Frans Pop <[email protected]>

The Source: field is defined as the source package in the package
archive from which a binary packages are built. As deb-pkg does not
generate a source package, we should avoid to use any existing source
packages here.

Signed-off-by: Frans Pop <[email protected]>
Acked-by: maximilian attems <[email protected]>
Cc: Andres Salomon <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---
scripts/package/builddeb | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 9d464fd..6d3b7e5 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -114,7 +114,7 @@ maintainer="$name <$email>"

# Generate a simple changelog template
cat <<EOF > debian/changelog
-linux ($packageversion) unstable; urgency=low
+linux-upstream ($packageversion) unstable; urgency=low

* Custom built Linux kernel.

@@ -143,7 +143,7 @@ EOF

# Generate a control file
cat <<EOF > debian/control
-Source: linux
+Source: linux-upstream
Section: base
Priority: optional
Maintainer: $maintainer
--
1.6.3.rc3.40.g75b44

2009-06-06 00:41:23

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 17/39] kbuild: fix header export when __ASSEMBLY__ is used

On Friday 05 June 2009 11:42:35 pm Sam Ravnborg wrote:
> Because it does not know __ASSEMBLY__ it does not
> detect that htis is not for userspace.
> This caused too much code to be exported, and headers_check barfed
> over this code.
>
> For arm this fixes following "make headers_check" warning:
> /usr/include/asm/hwcap.h:29: extern's make no sense in userspace

Are you sure that this is safe for all user space? If a user application
for instance includes asm/signal.h or asm/types.h from assembly (for
whatever reason), it now breaks.

I can't think of a good reason why anyone would do such a thing,
but it used to be possible.

Arnd <><

2009-06-06 00:46:30

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 18/39] kbuild/headers_check: refine extern check

On Friday 05 June 2009 11:42:36 pm Sam Ravnborg wrote:
> From: Amerigo Wang <[email protected]>
>
> 'extern' checking information is not clear, refine it.
> Plus, fix a comment.
>
> Signed-off-by: WANG Cong <[email protected]>
> Signed-off-by: Sam Ravnborg <[email protected]>

I still think this is pointless and should just be removed
(or replaced with a patch to kill the apostrophe in there).

Arnd <><

2009-06-06 05:44:38

by Jaswinder Singh Rajput

[permalink] [raw]
Subject: Re: [PATCH 17/39] kbuild: fix header export when __ASSEMBLY__ is used

Hello Sam, Russell,

On Sat, 2009-06-06 at 00:41 +0000, Arnd Bergmann wrote:
> On Friday 05 June 2009 11:42:35 pm Sam Ravnborg wrote:
> > Because it does not know __ASSEMBLY__ it does not
> > detect that htis is not for userspace.
> > This caused too much code to be exported, and headers_check barfed
> > over this code.
> >
> > For arm this fixes following "make headers_check" warning:
> > /usr/include/asm/hwcap.h:29: extern's make no sense in userspace
>
> Are you sure that this is safe for all user space? If a user application
> for instance includes asm/signal.h or asm/types.h from assembly (for
> whatever reason), it now breaks.
>
> I can't think of a good reason why anyone would do such a thing,
> but it used to be possible.
>

I also want to add :

__KERNEL__ and __ASSEMBLY__ is used for specific purpose, please do not
mix them otherwise it leads to confusion and people will start using
interchangeably. It seems to me that you are introducing Pink traffic
light for stoppage so my request is to respect the protocols.

I do not think it is safe and this will screw some user-space apps and
then later on kernel.

Thanks,
--
JSR

2009-06-06 06:03:44

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH 17/39] kbuild: fix header export when __ASSEMBLY__ is used

On Sat, Jun 06, 2009 at 12:41:07AM +0000, Arnd Bergmann wrote:
> On Friday 05 June 2009 11:42:35 pm Sam Ravnborg wrote:
> > Because it does not know __ASSEMBLY__ it does not
> > detect that htis is not for userspace.
> > This caused too much code to be exported, and headers_check barfed
> > over this code.
> >
> > For arm this fixes following "make headers_check" warning:
> > /usr/include/asm/hwcap.h:29: extern's make no sense in userspace
>
> Are you sure that this is safe for all user space? If a user application
> for instance includes asm/signal.h or asm/types.h from assembly (for
> whatever reason), it now breaks.

I had not thought about this implication.
I will drop the patch as this most likely
will break some userspace.

Sam

2009-06-06 08:15:26

by Russell King

[permalink] [raw]
Subject: Re: [PATCH 17/39] kbuild: fix header export when __ASSEMBLY__ is used

On Sat, Jun 06, 2009 at 08:05:52AM +0200, Sam Ravnborg wrote:
> On Sat, Jun 06, 2009 at 12:41:07AM +0000, Arnd Bergmann wrote:
> > On Friday 05 June 2009 11:42:35 pm Sam Ravnborg wrote:
> > > Because it does not know __ASSEMBLY__ it does not
> > > detect that htis is not for userspace.
> > > This caused too much code to be exported, and headers_check barfed
> > > over this code.
> > >
> > > For arm this fixes following "make headers_check" warning:
> > > /usr/include/asm/hwcap.h:29: extern's make no sense in userspace
> >
> > Are you sure that this is safe for all user space? If a user application
> > for instance includes asm/signal.h or asm/types.h from assembly (for
> > whatever reason), it now breaks.
>
> I had not thought about this implication.
> I will drop the patch as this most likely
> will break some userspace.

So now go back and re-read my original email. I was not suggesting to
undefine __ASSEMBLY__ - I was more detailed in my _question_ which I
was making, and there were _two_ possibilities.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:

2009-06-06 08:36:38

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH 18/39] kbuild/headers_check: refine extern check

On Sat, Jun 06, 2009 at 12:46:07AM +0000, Arnd Bergmann wrote:
> On Friday 05 June 2009 11:42:36 pm Sam Ravnborg wrote:
> > From: Amerigo Wang <[email protected]>
> >
> > 'extern' checking information is not clear, refine it.
> > Plus, fix a comment.
> >
> > Signed-off-by: WANG Cong <[email protected]>
> > Signed-off-by: Sam Ravnborg <[email protected]>
>
> I still think this is pointless and should just be removed
> (or replaced with a patch to kill the apostrophe in there).

So you wanted me to visit that link...
I redid it like this:

Subject: kbuild/headers_check: refine extern check

'extern' checking information is not clear, refine it.
Plus, fix a comment.

Signed-off-by: WANG Cong <[email protected]>
[sam: redid the extern error message]
Signed-off-by: Sam Ravnborg <[email protected]>
---
diff --git a/scripts/headers_check.pl b/scripts/headers_check.pl
index 4414c43..db1dd7a 100644
--- a/scripts/headers_check.pl
+++ b/scripts/headers_check.pl
@@ -2,7 +2,7 @@
#
# headers_check.pl execute a number of trivial consistency checks
#
-# Usage: headers_check.pl dir [files...]
+# Usage: headers_check.pl dir arch [files...]
# dir: dir to look for included files
# arch: architecture
# files: list of files to check
@@ -37,7 +37,7 @@ foreach my $file (@files) {
&check_include();
&check_asm_types();
&check_sizetypes();
- &check_prototypes();
+ &check_declarations();
# Dropped for now. Too much noise &check_config();
}
close FH;
@@ -61,10 +61,12 @@ sub check_include
}
}

-sub check_prototypes
+sub check_declarations
{
- if ($line =~ m/^\s*extern\b/) {
- printf STDERR "$filename:$lineno: extern's make no sense in userspace\n";
+ if ($line =~m/^\s*extern\b/) {
+ printf STDERR "$filename:$lineno: " .
+ "userspace cannot call function or variable " .
+ "defined in the kernel\n";
}
}

2009-06-06 15:25:30

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 18/39] kbuild/headers_check: refine extern check

On Saturday 06 June 2009 08:38:44 am Sam Ravnborg wrote:

> Subject: kbuild/headers_check: refine extern check
>
> 'extern' checking information is not clear, refine it.
> Plus, fix a comment.

Thanks!

> Signed-off-by: WANG Cong <[email protected]>
> [sam: redid the extern error message]
> Signed-off-by: Sam Ravnborg <[email protected]>

Acked-by: Arnd Bergmann <[email protected]>

2009-06-08 01:29:33

by Cong Wang

[permalink] [raw]
Subject: Re: [PATCH 18/39] kbuild/headers_check: refine extern check

Sam Ravnborg wrote:
> On Sat, Jun 06, 2009 at 12:46:07AM +0000, Arnd Bergmann wrote:
>
>> On Friday 05 June 2009 11:42:36 pm Sam Ravnborg wrote:
>>
>>> From: Amerigo Wang <[email protected]>
>>>
>>> 'extern' checking information is not clear, refine it.
>>> Plus, fix a comment.
>>>
>>> Signed-off-by: WANG Cong <[email protected]>
>>> Signed-off-by: Sam Ravnborg <[email protected]>
>>>
>> I still think this is pointless and should just be removed
>> (or replaced with a patch to kill the apostrophe in there).
>>
>
> So you wanted me to visit that link...
> I redid it like this:
>
> Subject: kbuild/headers_check: refine extern check
>
> 'extern' checking information is not clear, refine it.
> Plus, fix a comment.
>
> Signed-off-by: WANG Cong <[email protected]>
> [sam: redid the extern error message]
> Signed-off-by: Sam Ravnborg <[email protected]>
>

Yeah, after reading Arnd's comments, I agree on this patch.

Thanks, Sam!

> ---
> diff --git a/scripts/headers_check.pl b/scripts/headers_check.pl
> index 4414c43..db1dd7a 100644
> --- a/scripts/headers_check.pl
> +++ b/scripts/headers_check.pl
> @@ -2,7 +2,7 @@
> #
> # headers_check.pl execute a number of trivial consistency checks
> #
> -# Usage: headers_check.pl dir [files...]
> +# Usage: headers_check.pl dir arch [files...]
> # dir: dir to look for included files
> # arch: architecture
> # files: list of files to check
> @@ -37,7 +37,7 @@ foreach my $file (@files) {
> &check_include();
> &check_asm_types();
> &check_sizetypes();
> - &check_prototypes();
> + &check_declarations();
> # Dropped for now. Too much noise &check_config();
> }
> close FH;
> @@ -61,10 +61,12 @@ sub check_include
> }
> }
>
> -sub check_prototypes
> +sub check_declarations
> {
> - if ($line =~ m/^\s*extern\b/) {
> - printf STDERR "$filename:$lineno: extern's make no sense in userspace\n";
> + if ($line =~m/^\s*extern\b/) {
> + printf STDERR "$filename:$lineno: " .
> + "userspace cannot call function or variable " .
> + "defined in the kernel\n";
> }
> }
>
>