lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTimt1y_QwtRpAj1F9Nvh3j2VSJGw7MvtQSzW_oG9@mail.gmail.com>
Date:	Sat, 26 Feb 2011 14:50:06 -0500
From:	Arnaud Lacombe <lacombar@...il.com>
To:	Jeff Mahoney <jeffm@...e.com>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Roman Zippel <zippel@...ux-m68k.org>,
	linux-kbuild@...r.kernel.org
Subject: Re: [PATCH] Add ``cloneconfig'' target

Hi,

On Thu, Feb 24, 2011 at 9:35 PM, Jeff Mahoney <jeffm@...e.com> wrote:
> Cloneconfig takes the first configuration it finds which appears
> to belong to the running kernel, and configures the kernel sources
> to match this configuration as closely as possible.
>
> Signed-off-by: Andreas Gruenbacher <agruen@...e.de>
> Signed-off-by: Jeff Mahoney <jeffm@...e.com>
> ---
>  scripts/kconfig/Makefile |   17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> --- a/scripts/kconfig/Makefile
> +++ b/scripts/kconfig/Makefile
> @@ -99,6 +99,23 @@ PHONY += allnoconfig allyesconfig allmod
>
>  allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf
>        $< --$@ $(Kconfig)
> +
> +UNAME_RELEASE := $(shell uname -r)
> +CLONECONFIG := $(firstword $(wildcard /proc/config.gz \
> +                                     /lib/modules/$(UNAME_RELEASE)/.config \
> +                                     /etc/kernel-config \
> +                                     /boot/config-$(UNAME_RELEASE)))
> +cloneconfig: $(obj)/conf
> +       $(Q)case "$(CLONECONFIG)" in                            \
> +       '')     echo -e "The configuration of the running"      \
> +                       "kernel could not be determined\n";     \
You do not need the '\n', nor the '-e', echo(1) appends a newline by default.

> +               false ;;                                        \
> +       *.gz)   gzip -cd $(CLONECONFIG) > .config.running ;;    \
> +       *)      cat $(CLONECONFIG) > .config.running ;;         \
> +       esac &&                                                 \
> +       echo -e "Cloning configuration file $(CLONECONFIG)\n"
see above.

> +       $(Q)$< -D .config.running arch/$(SRCARCH)/Kconfig
> +
>
>  PHONY += listnewconfig oldnoconfig savedefconfig defconfig
>
> --
> Jeff Mahoney
> SUSE Labs
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ