summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2021-10-26 14:10:10 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2021-10-28 19:10:20 +0200
commit28e1e842ddef9861fe8e848bc7ada5f9a2237393 (patch)
tree86290de3841f3656ed8ac9a6ee9eb1a99c92ce22 /target
parent1218268cd1c669fd562a5fce5e4c2f495b53a3a6 (diff)
use Linux 5.4 for qemu arm noMMU
Diffstat (limited to 'target')
-rw-r--r--target/arm/Makefile2
-rw-r--r--target/linux/Config.in.kernelversion1
-rw-r--r--target/linux/patches/4.19.213/arm-nommu.patch81
-rw-r--r--target/linux/patches/5.4.155/arm-nommu.patch81
4 files changed, 163 insertions, 2 deletions
diff --git a/target/arm/Makefile b/target/arm/Makefile
index 0522e1a85..fe3fee720 100644
--- a/target/arm/Makefile
+++ b/target/arm/Makefile
@@ -33,7 +33,7 @@ ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM_REALVIEW_EB_MPCORE),y)
QEMU_ARGS+=-M realview-eb-mpcore -net user -net nic -dtb $(FW_DIR)/arm-realview-eb-11mp-ctrevb.dtb
endif
ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB),y)
-QEMU_ARGS+=-M versatilepb -net user -net nic,model=smc91c111 -dtb $(FW_DIR)/versatile-pb.dtb
+QEMU_ARGS+=-M versatilepb -m 256 -net user -net nic,model=smc91c111 -dtb $(FW_DIR)/versatile-pb.dtb
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
diff --git a/target/linux/Config.in.kernelversion b/target/linux/Config.in.kernelversion
index 13970333c..7d54dce85 100644
--- a/target/linux/Config.in.kernelversion
+++ b/target/linux/Config.in.kernelversion
@@ -22,7 +22,6 @@ default ADK_TARGET_LINUX_KERNEL_VERSION_4_9 if ADK_TARGET_CPU_ARM_ARM11MPCORE
default ADK_TARGET_LINUX_KERNEL_VERSION_4_9 if ADK_TARGET_CPU_ARM_CORTEX_A53
default ADK_TARGET_LINUX_KERNEL_VERSION_4_9 if ADK_TARGET_SYSTEM_ST_STM32F429
default ADK_TARGET_LINUX_KERNEL_VERSION_4_9 if ADK_TARGET_SYSTEM_ST_STM32F769
-default ADK_TARGET_LINUX_KERNEL_VERSION_4_14 if ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB
default ADK_TARGET_LINUX_KERNEL_VERSION_4_19 if ADK_TARGET_ARCH_ARC
default ADK_TARGET_LINUX_KERNEL_VERSION_5_4
diff --git a/target/linux/patches/4.19.213/arm-nommu.patch b/target/linux/patches/4.19.213/arm-nommu.patch
new file mode 100644
index 000000000..d23d3f4eb
--- /dev/null
+++ b/target/linux/patches/4.19.213/arm-nommu.patch
@@ -0,0 +1,81 @@
+diff -Nur linux-4.19.213.orig/arch/arm/include/asm/mach/map.h linux-4.19.213/arch/arm/include/asm/mach/map.h
+--- linux-4.19.213.orig/arch/arm/include/asm/mach/map.h 2021-10-20 11:23:05.000000000 +0200
++++ linux-4.19.213/arch/arm/include/asm/mach/map.h 2021-10-26 09:16:01.660445624 +0200
+@@ -62,6 +62,7 @@
+ #else
+ #define iotable_init(map,num) do { } while (0)
+ #define vm_reserve_area_early(a,s,c) do { } while (0)
++#define debug_ll_io_init() do { } while (0)
+ #endif
+
+ #endif
+diff -Nur linux-4.19.213.orig/arch/arm/Kconfig linux-4.19.213/arch/arm/Kconfig
+--- linux-4.19.213.orig/arch/arm/Kconfig 2021-10-20 11:23:05.000000000 +0200
++++ linux-4.19.213/arch/arm/Kconfig 2021-10-26 09:16:01.656445624 +0200
+@@ -353,6 +353,17 @@
+ select SPARSE_IRQ
+ select USE_OF
+
++config ARM_SINGLE_ARCH_VERSATILE
++ bool "ARM Ltd. Versatile family"
++ depends on !MMU
++ select AUTO_ZRELADDR
++ select CLKSRC_OF
++ select COMMON_CLK
++ select GENERIC_CLOCKEVENTS
++ select GPIOLIB
++ select SPARSE_IRQ
++ select USE_OF
++
+ config ARCH_EBSA110
+ bool "EBSA-110"
+ select ARCH_USES_GETTIMEOFFSET
+diff -Nur linux-4.19.213.orig/arch/arm/Kconfig.debug linux-4.19.213/arch/arm/Kconfig.debug
+--- linux-4.19.213.orig/arch/arm/Kconfig.debug 2021-10-20 11:23:05.000000000 +0200
++++ linux-4.19.213/arch/arm/Kconfig.debug 2021-10-26 09:16:01.660445624 +0200
+@@ -1852,7 +1852,8 @@
+ config UNCOMPRESS_INCLUDE
+ string
+ default "debug/uncompress.h" if ARCH_MULTIPLATFORM || ARCH_MSM || \
+- PLAT_SAMSUNG || ARM_SINGLE_ARMV7M
++ PLAT_SAMSUNG || ARM_SINGLE_ARMV7M || \
++ ARM_SINGLE_ARCH_VERSATILE
+ default "mach/uncompress.h"
+
+ config EARLY_PRINTK
+diff -Nur linux-4.19.213.orig/arch/arm/mach-versatile/Kconfig linux-4.19.213/arch/arm/mach-versatile/Kconfig
+--- linux-4.19.213.orig/arch/arm/mach-versatile/Kconfig 2021-10-20 11:23:05.000000000 +0200
++++ linux-4.19.213/arch/arm/mach-versatile/Kconfig 2021-10-26 09:16:01.660445624 +0200
+@@ -1,7 +1,8 @@
+ # SPDX-License-Identifier: GPL-2.0
+ config ARCH_VERSATILE
+- bool "ARM Ltd. Versatile family"
+- depends on ARCH_MULTI_V5
++ bool "ARM Ltd. Versatile family" if ARCH_MULTI_V5
++ depends on ARCH_MULTI_V5 || ARM_SINGLE_ARCH_VERSATILE
++ default y if ARM_SINGLE_ARCH_VERSATILE
+ select ARM_AMBA
+ select ARM_TIMER_SP804
+ select ARM_VIC
+diff -Nur linux-4.19.213.orig/arch/arm/mach-versatile/Makefile.boot linux-4.19.213/arch/arm/mach-versatile/Makefile.boot
+--- linux-4.19.213.orig/arch/arm/mach-versatile/Makefile.boot 1970-01-01 01:00:00.000000000 +0100
++++ linux-4.19.213/arch/arm/mach-versatile/Makefile.boot 2021-10-26 09:16:01.660445624 +0200
+@@ -0,0 +1,3 @@
++# Empty file waiting for deletion once Makefile.boot isn't needed any more.
++# Patch waits for application at
++# http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7889/1 .
+diff -Nur linux-4.19.213.orig/arch/arm/mach-versatile/versatile_dt.c linux-4.19.213/arch/arm/mach-versatile/versatile_dt.c
+--- linux-4.19.213.orig/arch/arm/mach-versatile/versatile_dt.c 2021-10-20 11:23:05.000000000 +0200
++++ linux-4.19.213/arch/arm/mach-versatile/versatile_dt.c 2021-10-26 09:16:01.660445624 +0200
+@@ -37,7 +37,11 @@
+ #include <asm/mach/map.h>
+
+ /* macro to get at MMIO space when running virtually */
++#ifdef CONFIG_MMU
+ #define IO_ADDRESS(x) (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000)
++#else
++#define IO_ADDRESS(x) (x)
++#endif
+ #define __io_address(n) ((void __iomem __force *)IO_ADDRESS(n))
+
+ /*
diff --git a/target/linux/patches/5.4.155/arm-nommu.patch b/target/linux/patches/5.4.155/arm-nommu.patch
new file mode 100644
index 000000000..fdcec3f09
--- /dev/null
+++ b/target/linux/patches/5.4.155/arm-nommu.patch
@@ -0,0 +1,81 @@
+diff -Nur linux-5.4.155.orig/arch/arm/include/asm/mach/map.h linux-5.4.155/arch/arm/include/asm/mach/map.h
+--- linux-5.4.155.orig/arch/arm/include/asm/mach/map.h 2021-10-20 11:40:18.000000000 +0200
++++ linux-5.4.155/arch/arm/include/asm/mach/map.h 2021-10-26 11:20:50.164712192 +0200
+@@ -59,6 +59,7 @@
+ #else
+ #define iotable_init(map,num) do { } while (0)
+ #define vm_reserve_area_early(a,s,c) do { } while (0)
++#define debug_ll_io_init() do { } while (0)
+ #endif
+
+ #endif
+diff -Nur linux-5.4.155.orig/arch/arm/Kconfig linux-5.4.155/arch/arm/Kconfig
+--- linux-5.4.155.orig/arch/arm/Kconfig 2021-10-20 11:40:18.000000000 +0200
++++ linux-5.4.155/arch/arm/Kconfig 2021-10-26 11:20:50.164712192 +0200
+@@ -340,6 +340,17 @@
+ select SPARSE_IRQ
+ select USE_OF
+
++config ARM_SINGLE_ARCH_VERSATILE
++ bool "ARM Ltd. Versatile family"
++ depends on !MMU
++ select AUTO_ZRELADDR
++ select CLKSRC_OF
++ select COMMON_CLK
++ select GENERIC_CLOCKEVENTS
++ select GPIOLIB
++ select SPARSE_IRQ
++ select USE_OF
++
+ config ARCH_EBSA110
+ bool "EBSA-110"
+ select ARCH_USES_GETTIMEOFFSET
+diff -Nur linux-5.4.155.orig/arch/arm/Kconfig.debug linux-5.4.155/arch/arm/Kconfig.debug
+--- linux-5.4.155.orig/arch/arm/Kconfig.debug 2021-10-20 11:40:18.000000000 +0200
++++ linux-5.4.155/arch/arm/Kconfig.debug 2021-10-26 11:20:50.168712192 +0200
+@@ -1878,7 +1878,8 @@
+ config UNCOMPRESS_INCLUDE
+ string
+ default "debug/uncompress.h" if ARCH_MULTIPLATFORM || ARCH_MSM || \
+- PLAT_SAMSUNG || ARM_SINGLE_ARMV7M
++ PLAT_SAMSUNG || ARM_SINGLE_ARMV7M || \
++ ARM_SINGLE_ARCH_VERSATILE
+ default "mach/uncompress.h"
+
+ config EARLY_PRINTK
+diff -Nur linux-5.4.155.orig/arch/arm/mach-versatile/Kconfig linux-5.4.155/arch/arm/mach-versatile/Kconfig
+--- linux-5.4.155.orig/arch/arm/mach-versatile/Kconfig 2021-10-20 11:40:18.000000000 +0200
++++ linux-5.4.155/arch/arm/mach-versatile/Kconfig 2021-10-26 11:20:50.168712192 +0200
+@@ -1,7 +1,8 @@
+ # SPDX-License-Identifier: GPL-2.0
+ config ARCH_VERSATILE
+- bool "ARM Ltd. Versatile family"
+- depends on ARCH_MULTI_V5
++ bool "ARM Ltd. Versatile family" if ARCH_MULTI_V5
++ depends on ARCH_MULTI_V5 || ARM_SINGLE_ARCH_VERSATILE
++ default y if ARM_SINGLE_ARCH_VERSATILE
+ select ARM_AMBA
+ select ARM_TIMER_SP804
+ select ARM_VIC
+diff -Nur linux-5.4.155.orig/arch/arm/mach-versatile/Makefile.boot linux-5.4.155/arch/arm/mach-versatile/Makefile.boot
+--- linux-5.4.155.orig/arch/arm/mach-versatile/Makefile.boot 1970-01-01 01:00:00.000000000 +0100
++++ linux-5.4.155/arch/arm/mach-versatile/Makefile.boot 2021-10-26 11:20:50.168712192 +0200
+@@ -0,0 +1,3 @@
++# Empty file waiting for deletion once Makefile.boot isn't needed any more.
++# Patch waits for application at
++# http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7889/1 .
+diff -Nur linux-5.4.155.orig/arch/arm/mach-versatile/versatile_dt.c linux-5.4.155/arch/arm/mach-versatile/versatile_dt.c
+--- linux-5.4.155.orig/arch/arm/mach-versatile/versatile_dt.c 2021-10-20 11:40:18.000000000 +0200
++++ linux-5.4.155/arch/arm/mach-versatile/versatile_dt.c 2021-10-26 11:20:50.168712192 +0200
+@@ -22,7 +22,11 @@
+ #include <asm/mach/map.h>
+
+ /* macro to get at MMIO space when running virtually */
++#ifdef CONFIG_MMU
+ #define IO_ADDRESS(x) (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000)
++#else
++#define IO_ADDRESS(x) (x)
++#endif
+ #define __io_address(n) ((void __iomem __force *)IO_ADDRESS(n))
+
+ /*