]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: make default platform work for NOMMU
authorArnd Bergmann <arnd@arndb.de>
Thu, 17 Dec 2015 16:45:47 +0000 (17:45 +0100)
committerArnd Bergmann <arnd@arndb.de>
Thu, 17 Dec 2015 16:45:47 +0000 (17:45 +0100)
Moving ARCH_VERSATILE into ARCH_MULTIPLATFORM means that it no longer
works as the default target for MMU-less kernels. While we might
want to get that working again in the future, it's also a rather
bad default, and it makes sense to make ARM_SINGLE_V7M the default
because that is what realistically all NOMMU users on ARM are using,
and it actually is what gets selected by default in the absence of
versatile in the choice statement.

Related to this, 'allnoconfig' kernels fail to link with the new
default, as they do not include a machine record:

arm-linux-gnueabi-ld: no machine record defined

For ARCH_MULTIPLATFORM kernels, we avoid this error by using a
default machine descriptor that works for all trivial platforms,
like ARCH_VIRT. The same reasoning applies for ARM_SINGLE_V7M,
as that can also boot with empty machine descriptors both on
qemu and on real hardware, as long as all the drivers are present.

We could also follow up with a patch to remove the existing
machine descriptors for the ARMv7M platforms, the only callback
pointer the four platforms contain today is the armv7m_restart
handler and we can simply make that the default for v7M with an
add-on patch.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/Kconfig
arch/arm/kernel/devtree.c

index 72c1df041ae89c9a6eb42f883e9a6693232a8e6f..a0fda44551ecd7bd08037281020e025cc102dd11 100644 (file)
@@ -313,7 +313,7 @@ config MMU
 #
 choice
        prompt "ARM system type"
-       default ARCH_VERSATILE if !MMU
+       default ARM_SINGLE_ARMV7M if !MMU
        default ARCH_MULTIPLATFORM if MMU
 
 config ARCH_MULTIPLATFORM
index 65addcbf5b308acf5dc584419b90f6c65b28d343..2e26016a91a57116b9956973a19bb4aba723fc04 100644 (file)
@@ -211,7 +211,7 @@ const struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys)
 {
        const struct machine_desc *mdesc, *mdesc_best = NULL;
 
-#ifdef CONFIG_ARCH_MULTIPLATFORM
+#if defined(CONFIG_ARCH_MULTIPLATFORM) || defined(CONFIG_ARM_SINGLE_ARMV7M)
        DT_MACHINE_START(GENERIC_DT, "Generic DT based system")
        MACHINE_END