From 03b25b47e0f4ebf3d37ace065c3847230ebdd27d Mon Sep 17 00:00:00 2001 From: Michael Grzeschik Date: Tue, 8 Jan 2013 19:05:26 +0100 Subject: scripts/link-vmlinux.sh: source variables from KCONFIG_CONFIG Its possible to superseed the config file with KCONFIG_CONFIG and have completely no .config in the tree. The current script is sourcing .config in every case, so the kernel will never build succesfully. This patch fixes that issue by sourcing KCONFIG_CONFIG instead. Signed-off-by: Michael Grzeschik Signed-off-by: Michal Marek --- scripts/link-vmlinux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/link-vmlinux.sh') diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index b3d907eb93a9..e62f1e000a7b 100644 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -132,7 +132,7 @@ if [ "$1" = "clean" ]; then fi # We need access to CONFIG_ symbols -. ./.config +. ${KCONFIG_CONFIG} #link vmlinux.o info LD vmlinux.o -- cgit v1.2.3 From 423a8155facf23719078ff63911c1e85ba40970b Mon Sep 17 00:00:00 2001 From: Michal Marek Date: Mon, 25 Feb 2013 13:47:53 +0100 Subject: kbuild: Fix reading of .config in link-vmlinux.sh The shell '.' command is not required to search the current directory as a fallback and in fact newer versions of bash in sh-mode do not do this. Force reading the file from the current directory if $KCONFIG_CONFIG contains no '/'. Reported-by: Stephen Rothwell Signed-off-by: Michal Marek --- scripts/link-vmlinux.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'scripts/link-vmlinux.sh') diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index e62f1e000a7b..3d569d6022c2 100644 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -132,7 +132,14 @@ if [ "$1" = "clean" ]; then fi # We need access to CONFIG_ symbols -. ${KCONFIG_CONFIG} +case "${KCONFIG_CONFIG}" in +*/*) + . "${KCONFIG_CONFIG}" + ;; +*) + # Force using a file from the current directory + . "./${KCONFIG_CONFIG}" +esac #link vmlinux.o info LD vmlinux.o -- cgit v1.2.3