Michal Marek | 1 Feb 13:52 2010
Picon

Re: [PATCH] scripts: use %_tmppath in "make rpm-pkg"

On 1.2.2010 01:18, John Saalwaechter wrote:
> The mkspec script hardcodes "/var/tmp" into the generated rpm spec file's
> BuildRoot. The user, however, may have a custom setting for %_tmppath,
> which should be used in BuildRoot.  This patch changes mkspec's
> BuildRoot output to appropriately use %_tmppath.

Thanks, applied. Please CC linux-kbuild <at>  on changes like this.

Michal

> Signed-off-by: John Saalwaechter <saalwaechter <at> gmail.com>
> ---
> diff -uprN a/scripts/package/mkspec b/scripts/package/mkspec
> --- a/scripts/package/mkspec    2010-01-28 15:06:20.000000000 -0800
> +++ b/scripts/package/mkspec    2010-01-31 15:46:23.815300460 -0800
>  <at>  <at>  -39,7 +39,7  <at>  <at>  if ! $PREBUILT; then
>  echo "Source: kernel-$__KERNELRELEASE.tar.gz"
>  fi
> 
> -echo "BuildRoot: /var/tmp/%{name}-%{PACKAGE_VERSION}-root"
> +echo "BuildRoot: %{_tmppath}/%{name}-%{PACKAGE_VERSION}-root"
>  echo "Provides: $PROVIDES"
>  echo "%define __spec_install_post /usr/lib/rpm/brp-compress || :"
>  echo "%define debug_package %{nil}"

Steven Rostedt | 2 Feb 22:25 2010

Re: 2.6.3(2|3): scripts/kconfig/streamline_config.pl :Malfunction

On Tue, 2010-02-02 at 09:47 +0100, patrick_ <at> freenet.de wrote:
> Hello Steven,
> 
> I havnt heard from you since I first encountered severe functionality issues with your
streamline_config.pl script in December. and 2.6.32. According to the changelog you haven't touched it
since either.
> 
> I just retried it with 2.6.33-rc6 (before I have rechecked the changelog and seen you didn't touch it at
all) but it's even worse (on THIS machine) .. it will not recognize any standard modules at all:
> 
> (just pasting an excerpt)
> 
> scsi_mod config not found!!
> binfmt_misc config not found!!
> i2c_core config not found!!
> button config not found!!
> raid10 config not found!!
> 
> .. I am using debian lenny's config ... the bug I encountered last time (on another machine, with different
hardware) still persists though.
> 
> (see http://markmail.org/message/lmvzqjyzx6qongwc )
> 
> I attached the output of lsmod as well as the config in question.
> 
> 
> PS: if you need a helping hand with this, let me know (I havnt looked into your script yet, but as I explained
before I sort of wrote something similar with a lot of tracking and bash magic and it works, but its mainly
dirty hacks).
> 
(Continue reading)

Steven Rostedt | 3 Feb 16:46 2010

[PATCH 2/4] kconfig: Check for if conditions in Kconfig for localmodconfig

From: Steven Rostedt <srostedt <at> redhat.com>

The streamline_config.pl misses the if conditions for checking
dependencies. For Kconfigs with the following construct:

 if MEDIA_SUPPORT

 config VIDEO_DEV

 [...]

If VIDEO_DEV was enabled, the script will miss the fact that MEDIA_SUPPORT
is also needed.

This patch changes streamline_config.pl to include if conditions into
the dependencies of configs.

Reported-by: Anton Blanchard <anton <at> sambo.org>
Tested-by: Anton Blanchard <anton <at> sambo.org>
Signed-off-by: Steven Rostedt <rostedt <at> goodmis.org>
---
 scripts/kconfig/streamline_config.pl |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index 0d80082..9e66fa8 100644
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
 <at>  <at>  -121,6 +121,8  <at>  <at>  my %prompts;
 my %objects;
(Continue reading)

Steven Rostedt | 3 Feb 16:46 2010

[PATCH 0/4][linux-next] kconfig: Updates to localmodconfig

I'm posting the following patches for review. I've added these
to go into linux-next. They can be found in the git repo shown
below:

  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-kconfig.git
for-linus-2

Steven Rostedt (4):
      kconfig: Create include/generated for localmodconfig
      kconfig: Check for if conditions in Kconfig for localmodconfig
      kconfig: Look in both /bin and /sbin for lsmod in streamline_config.pl
      kconfig: Add LSMOD=file to override the lsmod for localmodconfig

----
 scripts/kconfig/Makefile             |   15 +++++++-
 scripts/kconfig/streamline_config.pl |   59 ++++++++++++++++++++++++++++++++-
 2 files changed, 70 insertions(+), 4 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Steven Rostedt | 3 Feb 16:46 2010

[PATCH 1/4] kconfig: Create include/generated for localmodconfig

From: Steven Rostedt <srostedt <at> redhat.com>

If someone downloads a brand new kernel and runs localmodconfig or
localyesconfig, the ending result will report:

 *** Error during update of the kernel configuration.

This is because localmodconfig and localyesconfig must create the
include/generated directory to place the autoconf.h file.

Signed-off-by: Steven Rostedt <rostedt <at> goodmis.org>
---
 scripts/kconfig/Makefile |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 999e8a7..006c96f 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
 <at>  <at>  -31,6 +31,7  <at>  <at>  silentoldconfig: $(obj)/conf
 	$< -s $(Kconfig)

 localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
+	$(Q)mkdir -p include/generated
 	$(Q)perl $< $(srctree) $(Kconfig) > .tmp.config
 	$(Q)if [ -f .config ]; then 				\
 			cmp -s .tmp.config .config ||		\
 <at>  <at>  -45,6 +46,7  <at>  <at>  localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
 	$(Q)rm -f .tmp.config

(Continue reading)

Steven Rostedt | 3 Feb 16:46 2010

[PATCH 3/4] kconfig: Look in both /bin and /sbin for lsmod in streamline_config.pl

From: Steven Rostedt <srostedt <at> redhat.com>

Distributions now have lsmod in /bin instead of /sbin. But to handle
both cases, we look for it in /sbin /bin /usr/bin and /usr/sbin.
If lsmod is not found in any of those paths, it defaults to use
just lsmod and hopes that it lies in the path of the user.

Tested-by: Xavier Chantry <shiningxc <at> gmail.com>
Signed-off-by: Steven Rostedt <rostedt <at> goodmis.org>
---
 scripts/kconfig/streamline_config.pl |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index 9e66fa8..d7f7db7 100644
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
 <at>  <at>  -264,7 +264,20  <at>  <at>  foreach my $makefile ( <at> makefiles) {
 my %modules;

 # see what modules are loaded on this system
-open(LIN,"/sbin/lsmod|") || die "Cant lsmod";
+my $lsmod;
+
+foreach $dir ( ("/sbin", "/bin", "/usr/sbin", "/usr/bin") ) {
+    if ( -x "$dir/lsmod" ) {
+	$lsmod = "$dir/lsmod";
+	last;
+    }
+}
(Continue reading)

Steven Rostedt | 3 Feb 16:46 2010

[PATCH 4/4] kconfig: Add LSMOD=file to override the lsmod for localmodconfig

From: Steven Rostedt <srostedt <at> redhat.com>

Doing the following:

	make LSMOD=file localmodconfig

Will make the streamline-config code use the given file instead of
lsmod. If the file is an executable, it will execute it, otherwise
it will read it as text.

	make LSMOD=/my/local/path/lsmod localmodconfig

The above will execute the lsmod in /my/local/path instead of the
lsmods that may be located elsewhere.

	make LSMOD=embedded_board_lsmod localmodconfig

The above will read the "embedded_board_lsmod" as a text file. This
is useful if you are doing a cross compile and need to run the
config against modules that exist on an embedded device.

Note, if the LSMOD= file does is not a path, it will add the
path to the object directory. That is, the above example will look
for "embedded_board_lsmod" in the directory that the binary will
be built in (the O=dir directory).

Signed-off-by: Steven Rostedt <rostedt <at> goodmis.org>

 On branch config/linus
---
(Continue reading)

Michal Marek | 3 Feb 17:07 2010
Picon

Re: [PATCH 4/4] kconfig: Add LSMOD=file to override the lsmod for localmodconfig

On Wed, Feb 03, 2010 at 10:46:09AM -0500, Steven Rostedt wrote:
> +# if no path is given, then use src directory to find file
> +ifdef LSMOD
> +LSMOD_F = $(shell if [ `basename $(LSMOD)` == $(LSMOD) ]; then \
> +		echo $(objtree)/$(LSMOD);			\
> +	else							\
> +		echo $(LSMOD);					\
> +	fi)
> +endif

You can do this within make like:

ifdef LSMOD
LSMOD_F := $(LSMOD)
ifeq ($(findstring /,$(LSMOD)),)
  LSMOD_F := $(objtree)/$(LSMOD)
endif
endif

Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Steven Rostedt | 3 Feb 17:12 2010

Re: [PATCH 4/4] kconfig: Add LSMOD=file to override the lsmod for localmodconfig

On Wed, 2010-02-03 at 17:07 +0100, Michal Marek wrote:
> On Wed, Feb 03, 2010 at 10:46:09AM -0500, Steven Rostedt wrote:
> > +# if no path is given, then use src directory to find file
> > +ifdef LSMOD
> > +LSMOD_F = $(shell if [ `basename $(LSMOD)` == $(LSMOD) ]; then \
> > +		echo $(objtree)/$(LSMOD);			\
> > +	else							\
> > +		echo $(LSMOD);					\
> > +	fi)
> > +endif
> 
> You can do this within make like:
> 
> ifdef LSMOD
> LSMOD_F := $(LSMOD)
> ifeq ($(findstring /,$(LSMOD)),)
>   LSMOD_F := $(objtree)/$(LSMOD)
> endif
> endif

You can send me a patch and I'll apply it on top.

Thanks,

-- Steve

Michal Marek | 3 Feb 17:20 2010
Picon

[PATCH] kconfig: simplify LSMOD= handling

Signed-off-by: Michal Marek <mmarek <at> suse.cz>
---
 scripts/kconfig/Makefile |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 85b9065..186c466 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
 <at>  <at>  -32,11 +32,10  <at>  <at>  silentoldconfig: $(obj)/conf

 # if no path is given, then use src directory to find file
 ifdef LSMOD
-LSMOD_F = $(shell if [ `basename $(LSMOD)` == $(LSMOD) ]; then \
-		echo $(objtree)/$(LSMOD);			\
-	else							\
-		echo $(LSMOD);					\
-	fi)
+LSMOD_F := $(LSMOD)
+ifeq ($(findstring /,$(LSMOD)),)
+  LSMOD_F := $(objtree)/$(LSMOD)
+endif
 endif

 localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
--

-- 
1.6.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
(Continue reading)


Gmane