Browse Source

allow to build older kernel for qemu-arm-versatilepb without device-tree

Waldemar Brodkorb 7 years ago
parent
commit
bcd4b1859d

+ 4 - 0
target/arm/Makefile

@@ -30,7 +30,11 @@ ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM_REALVIEW_EB_MPCORE),y)
 QEMU_ARGS+=-M realview-eb-mpcore -net user -net nic
 endif
 ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB),y)
+ifeq ($(ADK_TARGET_WITH_DEVICETREE),y)
 QEMU_ARGS+=-M versatilepb -net user -net nic,model=smc91c111 -dtb $(FW_DIR)/versatile-pb.dtb
+else
+QEMU_ARGS+=-M versatilepb -net user -net nic,model=smc91c111
+endif
 endif
 ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM_VEXPRESS_A9),y)
 QEMU_ARGS+=-M vexpress-a9 -cpu cortex-a9 -m 256 -net user -net nic,model=lan9118 -dtb $(FW_DIR)/vexpress-v2p-ca9.dtb

+ 1 - 1
target/arm/kernel/qemu-arm-versatilepb

@@ -1,6 +1,6 @@
 CONFIG_ARM=y
-# CONFIG_ARCH_MULTI_V7 is not set
 CONFIG_ARCH_VERSATILE=y
 CONFIG_PCI_VERSATILE=y
 CONFIG_KUSER_HELPERS=y
 CONFIG_ATAGS=y
+CONFIG_USE_OF=y

+ 6 - 0
target/config/Config.in.archopts

@@ -21,3 +21,9 @@ config ADK_TARGET_INSTRUCTION_SET
 	string
 	default "arm" if ADK_TARGET_ARCH_ARM_WITH_ARM
 	default "thumb" if ADK_TARGET_ARCH_ARM_WITH_THUMB
+
+config ADK_TARGET_WITH_DEVICETREE
+	bool
+	depends on ADK_TARGET_ARCH_ARM
+	default y if ADK_TARGET_KERNEL_VERSION_4_6
+	default n

+ 1 - 0
target/linux/Config.in

@@ -19,6 +19,7 @@ source target/linux/config/Config.in.audio
 source target/linux/config/Config.in.multimedia
 source target/linux/config/Config.in.crypto
 source target/linux/config/Config.in.misc
+source target/linux/config/Config.in.arm
 source target/linux/config/Config.in.mips
 source target/linux/config/Config.in.xtensa
 source target/linux/config/Config.in.pm

+ 11 - 0
target/linux/config/Config.in.arm

@@ -0,0 +1,11 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+config ADK_KERNEL_ARM_PATCH_PHYS_VIRT
+	bool
+
+config ADK_KERNEL_ARCH_VERSATILE_PB
+	bool
+	select ADK_KERNEL_ARM_PATCH_PHYS_VIRT
+	default y if !ADK_TARGET_WITH_DEVICETREE
+