From e40f04d040c66d8312ecfaf6091b2da78531276c Mon Sep 17 00:00:00 2001 From: Ramkumar Ramachandra Date: Fri, 27 Sep 2013 09:44:46 +0530 Subject: arch/um: make it work with defconfig and x86_64 arch/um/defconfig only lists one default configuration, and that applies only to the i386 architecture. Replace it with two minimal configuration files generated using `make savedefconfig`: i386_defconfig and x86_64_defconfig The build scripts now require two updates: 1. um's Kconfig (arch/x86/um/Kconfig) should specify an ARCH_DEFCONFIG section explicitly pointing to these scripts if the required variables are set. Take care to remove the DEFCONFIG_LIST section defined in the included file arch/um/Kconfig.common. 2. um's Makefile (arch/um/Makefile) should set KBUILD_DEFCONFIG properly for the top-level Makefile to pick up. Copy the logic in arch/x86/Makefile to properly pick the defconfig file depending on the actual architecture; except we're working with $SUBARCH here, instead of $ARCH. Now, you can do: $ ARCH=um make defconfig $ ARCH=um make and successfully build User-Mode Linux on an x86_64 box in default configuration. Cc: Richard Weinberger Cc: Jeff Dike Signed-off-by: Ramkumar Ramachandra Signed-off-by: Richard Weinberger --- arch/um/Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'arch/um/Makefile') diff --git a/arch/um/Makefile b/arch/um/Makefile index 133f7de2a13..48d92bbe62e 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -6,6 +6,17 @@ # Licensed under the GPL # +# select defconfig based on actual architecture +ifeq ($(SUBARCH),x86) + ifeq ($(shell uname -m),x86_64) + KBUILD_DEFCONFIG := x86_64_defconfig + else + KBUILD_DEFCONFIG := i386_defconfig + endif +else + KBUILD_DEFCONFIG := $(SUBARCH)_defconfig +endif + ARCH_DIR := arch/um OS := $(shell uname -s) # We require bash because the vmlinux link and loader script cpp use bash -- cgit v1.2.3