diff options
author | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2016-08-27 13:11:40 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2016-08-27 13:13:56 +0200 |
commit | db6e6a11e601ed79a78110bf0fb9a3ac7b58e4e5 (patch) | |
tree | 505ea732fba35759f04cf0ba1bbf67b45c42888e | |
parent | 472574b9fcfb3cb64828ae1e430b1f2e0c22b201 (diff) |
add support for Qemu ARM noMMU
Greg Ungerer made me aware of this possibility.
Rather hackish implementation, we need to deduplicate later.
Update Linux Kernel to 4.4.19 while there.
Only non-Devicetree system supported right now.
23 files changed, 62 insertions, 9 deletions
diff --git a/mk/kernel-ver.mk b/mk/kernel-ver.mk index 8e5f4f422..1edc3232e 100644 --- a/mk/kernel-ver.mk +++ b/mk/kernel-ver.mk @@ -32,10 +32,10 @@ KERNEL_VERSION:= $(KERNEL_FILE_VER)-$(KERNEL_RELEASE) KERNEL_HASH:= f5ed0278c95ac75c855e52082c585af6936c606878b37a10ab5a65f08104a0d3 endif ifeq ($(ADK_TARGET_KERNEL_VERSION_4_4),y) -KERNEL_FILE_VER:= 4.4.17 +KERNEL_FILE_VER:= 4.4.19 KERNEL_RELEASE:= 1 KERNEL_VERSION:= $(KERNEL_FILE_VER)-$(KERNEL_RELEASE) -KERNEL_HASH:= 159451471c0df6bde8043b85dfacafa58e65c4a0cabb1157e83916326cd04f81 +KERNEL_HASH:= 55ad0c6f0b62346f5e4b100f0e01970e8f3a5454f7c8af1e7bba490a3a6ac694 endif ifeq ($(ADK_TARGET_KERNEL_VERSION_4_1),y) KERNEL_FILE_VER:= 4.1.30 diff --git a/target/arm/Makefile b/target/arm/Makefile index 5095d5fae..b7e5e9f98 100644 --- a/target/arm/Makefile +++ b/target/arm/Makefile @@ -32,7 +32,7 @@ endif 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_SYSTEM_QEMU_ARM_VERSATILEPB)$(ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB_NOMMU),y) ifeq ($(ADK_TARGET_WITH_DEVICETREE),y) QEMU_ARGS+=-M versatilepb -net user -net nic,model=smc91c111 -dtb $(FW_DIR)/versatile-pb.dtb else @@ -153,7 +153,7 @@ ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM_VEXPRESS_A9),y) env $(KERNEL_MAKE_ENV) $(MAKE) -C "${LINUX_DIR}" $(KERNEL_MAKE_OPTS) \ dtbs $(MAKE_TRACE) endif -ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB),y) +ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB)$(ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB_NOMMU),y) env $(KERNEL_MAKE_ENV) $(MAKE) -C "${LINUX_DIR}" $(KERNEL_MAKE_OPTS) \ dtbs $(MAKE_TRACE) endif diff --git a/target/arm/kernel/qemu-arm-versatilepb-nommu b/target/arm/kernel/qemu-arm-versatilepb-nommu new file mode 100644 index 000000000..3d7b851e4 --- /dev/null +++ b/target/arm/kernel/qemu-arm-versatilepb-nommu @@ -0,0 +1,16 @@ +CONFIG_ARM=y +CONFIG_ARCH_VERSATILE=y +CONFIG_KUSER_HELPERS=y +CONFIG_ATAGS=y +CONFIG_USE_OF=y +CONFIG_SET_MEM_PARAM=y +CONFIG_DRAM_BASE=0x00000000 +CONFIG_DRAM_SIZE=0x08000000 +CONFIG_ARCH_VERSATILE_PB=y +CONFIG_MACH_VERSATILE_AB=y +# CONFIG_MACH_VERSATILE_DT is not set +CONFIG_PLAT_VERSATILE_CLOCK=y +CONFIG_PLAT_VERSATILE_SCHED_CLOCK=y +CONFIG_PLAT_VERSATILE=y +CONFIG_VECTORS_BASE=0x00000000 +CONFIG_PHYS_OFFSET=0x00000000 diff --git a/target/arm/systems/qemu-arm-versatilepb-nommu b/target/arm/systems/qemu-arm-versatilepb-nommu new file mode 100644 index 000000000..a1aef83db --- /dev/null +++ b/target/arm/systems/qemu-arm-versatilepb-nommu @@ -0,0 +1,10 @@ +config ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB_NOMMU + bool "Qemu Emulator (Versatile/PB) no MMU" + depends on ADK_TARGET_LITTLE_ENDIAN + select ADK_TARGET_CPU_ARM_ARM926EJ_S_NOMMU + select ADK_TARGET_QEMU + select ADK_TARGET_KERNEL_ZIMAGE + select ADK_TARGET_KERNEL_WITH_COMPRESSION + help + Qemu Emulator for ARM architecture (Versatile/PB) without MMU. + diff --git a/target/config/Config.in.archopts b/target/config/Config.in.archopts index e205a7909..a5f2bc08d 100644 --- a/target/config/Config.in.archopts +++ b/target/config/Config.in.archopts @@ -7,7 +7,6 @@ depends on ADK_TARGET_ARCH_ARM config ADK_TARGET_ARCH_ARM_WITH_ARM bool "arm" - depends on ADK_TARGET_WITH_MMU config ADK_TARGET_ARCH_ARM_WITH_THUMB bool "thumb" diff --git a/target/config/Config.in.cpu b/target/config/Config.in.cpu index db1bee0c2..8375c7ee3 100644 --- a/target/config/Config.in.cpu +++ b/target/config/Config.in.cpu @@ -56,6 +56,13 @@ config ADK_TARGET_CPU_ARM_ARM926EJ_S select ADK_TARGET_WITH_MMU depends on ADK_TARGET_ARCH_ARM +config ADK_TARGET_CPU_ARM_ARM926EJ_S_NOMMU + bool "arm926ej-s" + select ADK_TARGET_WITH_LT + select ADK_TARGET_WITHOUT_MMU + select ADK_TARGET_UCLINUX + depends on ADK_TARGET_ARCH_ARM + config ADK_TARGET_CPU_ARM_ARM11MPCORE bool "arm11mpcore" select ADK_TARGET_WITH_NPTL diff --git a/target/config/Config.in.kernelversion b/target/config/Config.in.kernelversion index bfb191f3e..3ac3e055b 100644 --- a/target/config/Config.in.kernelversion +++ b/target/config/Config.in.kernelversion @@ -31,7 +31,7 @@ config ADK_TARGET_KERNEL_VERSION_4_6 depends on !ADK_TARGET_ARCH_NDS32 config ADK_TARGET_KERNEL_VERSION_4_4 - bool "4.4.17" + bool "4.4.19" depends on !ADK_TARGET_ARCH_NDS32 depends on !ADK_TARGET_ARCH_NIOS2 depends on !ADK_TARGET_CPU_MIPS_MIPS32R6 diff --git a/target/config/Config.in.runtime b/target/config/Config.in.runtime index 6657e044c..607c62d68 100644 --- a/target/config/Config.in.runtime +++ b/target/config/Config.in.runtime @@ -260,6 +260,7 @@ config ADK_RUNTIME_CONSOLE_SERIAL_DEVICE default "ttyARC0" if ADK_TARGET_SYSTEM_NSIM_ARCV1 \ || ADK_TARGET_SYSTEM_NSIM_ARCV2 default "ttyAMA0" if ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB \ + || ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB_NOMMU \ || ADK_TARGET_SYSTEM_QEMU_ARM_REALVIEW_EB_MPCORE \ || ADK_TARGET_SYSTEM_QEMU_ARM_VEXPRESS_A9 \ || ADK_TARGET_SYSTEM_ARM_FM \ @@ -284,7 +285,7 @@ config ADK_RUNTIME_CONSOLE_SERIAL_SPEED || ADK_TARGET_SIM default "9600" if ADK_TARGET_SYSTEM_FON_FON2100 default "9600" if ADK_TARGET_SYSTEM_NUMATO_MIMASV2 - default "38400" if ADK_TARGET_SYSTEM_PCENGINES_WRAP + default "38400" if ADK_TARGET_SYSTEM_PCENGINES_WRAP default "38400" if ADK_TARGET_SYSTEM_ANDES_AG101P default "115200" diff --git a/target/linux/config/Config.in.bus b/target/linux/config/Config.in.bus index 9921f5795..351b09f41 100644 --- a/target/linux/config/Config.in.bus +++ b/target/linux/config/Config.in.bus @@ -7,6 +7,7 @@ config ADK_KERNEL_PCI depends on ADK_TARGET_WITH_PCI \ || ADK_TARGET_QEMU \ || ADK_TARGET_VBOX + default n if ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB_NOMMU default y config ADK_KERNEL_PCI_QUIRKS diff --git a/target/linux/config/Config.in.ethernet b/target/linux/config/Config.in.ethernet index 8742b40c6..8f7bbc4b2 100644 --- a/target/linux/config/Config.in.ethernet +++ b/target/linux/config/Config.in.ethernet @@ -192,8 +192,10 @@ config ADK_KERNEL_SMC91X select ADK_KERNEL_GPIOLIB depends on ADK_TARGET_SYSTEM_ARM_FM || \ ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB || \ + ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB_NOMMU || \ ADK_TARGET_SYSTEM_QEMU_ARM_REALVIEW_EB_MPCORE default y if ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB + default y if ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB_NOMMU default y if ADK_TARGET_SYSTEM_QEMU_ARM_REALVIEW_EB_MPCORE default y if ADK_TARGET_SYSTEM_ARM_FM default n diff --git a/target/linux/config/Config.in.kernel b/target/linux/config/Config.in.kernel index 7761ced3c..843929376 100644 --- a/target/linux/config/Config.in.kernel +++ b/target/linux/config/Config.in.kernel @@ -88,8 +88,7 @@ config ADK_KERNEL_BINFMT_ELF_FDPIC config ADK_KERNEL_BINFMT_FLAT bool - default y if ADK_TARGET_BINFMT_FLAT_ONE - default y if ADK_TARGET_BINFMT_FLAT_SEP_DATA + default y if ADK_TARGET_BINFMT_FLAT config ADK_KERNEL_BINFMT_SHARED_FLAT bool diff --git a/target/linux/config/Config.in.serial b/target/linux/config/Config.in.serial index 82d745271..af8fed395 100644 --- a/target/linux/config/Config.in.serial +++ b/target/linux/config/Config.in.serial @@ -199,10 +199,12 @@ config ADK_KERNEL_SERIAL_AMBA_PL011 depends on ADK_TARGET_BOARD_BCM28XX \ || ADK_TARGET_SYSTEM_QEMU_ARM_REALVIEW_EB_MPCORE \ || ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB \ + || ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB_NOMMU \ || ADK_TARGET_SYSTEM_QEMU_ARM_VEXPRESS_A9 default y if ADK_TARGET_BOARD_BCM28XX default y if ADK_TARGET_SYSTEM_QEMU_ARM_REALVIEW_EB_MPCORE default y if ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB + default y if ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB_NOMMU default y if ADK_TARGET_SYSTEM_QEMU_ARM_VEXPRESS_A9 default n help diff --git a/target/linux/patches/4.4.17/coldfire-sighandler.patch b/target/linux/patches/4.4.19/coldfire-sighandler.patch index c52a4e228..c52a4e228 100644 --- a/target/linux/patches/4.4.17/coldfire-sighandler.patch +++ b/target/linux/patches/4.4.19/coldfire-sighandler.patch diff --git a/target/linux/patches/4.4.17/crisv32.patch b/target/linux/patches/4.4.19/crisv32.patch index cb9b0d028..cb9b0d028 100644 --- a/target/linux/patches/4.4.17/crisv32.patch +++ b/target/linux/patches/4.4.19/crisv32.patch diff --git a/target/linux/patches/4.4.17/initramfs-nosizelimit.patch b/target/linux/patches/4.4.19/initramfs-nosizelimit.patch index 40d2f6bd8..40d2f6bd8 100644 --- a/target/linux/patches/4.4.17/initramfs-nosizelimit.patch +++ b/target/linux/patches/4.4.19/initramfs-nosizelimit.patch diff --git a/target/linux/patches/4.4.17/ld-or1k.patch b/target/linux/patches/4.4.19/ld-or1k.patch index 264f9166f..264f9166f 100644 --- a/target/linux/patches/4.4.17/ld-or1k.patch +++ b/target/linux/patches/4.4.19/ld-or1k.patch diff --git a/target/linux/patches/4.4.17/macsonic.patch b/target/linux/patches/4.4.19/macsonic.patch index 75a6fcad2..75a6fcad2 100644 --- a/target/linux/patches/4.4.17/macsonic.patch +++ b/target/linux/patches/4.4.19/macsonic.patch diff --git a/target/linux/patches/4.4.17/mips-xz.patch b/target/linux/patches/4.4.19/mips-xz.patch index 5cfac6254..5cfac6254 100644 --- a/target/linux/patches/4.4.17/mips-xz.patch +++ b/target/linux/patches/4.4.19/mips-xz.patch diff --git a/target/linux/patches/4.4.17/patch-realtime b/target/linux/patches/4.4.19/patch-realtime index c677e4098..c677e4098 100644 --- a/target/linux/patches/4.4.17/patch-realtime +++ b/target/linux/patches/4.4.19/patch-realtime diff --git a/target/linux/patches/4.4.17/revert-sparc.patch b/target/linux/patches/4.4.19/revert-sparc.patch index 296be0e4a..296be0e4a 100644 --- a/target/linux/patches/4.4.17/revert-sparc.patch +++ b/target/linux/patches/4.4.19/revert-sparc.patch diff --git a/target/linux/patches/4.4.17/startup.patch b/target/linux/patches/4.4.19/startup.patch index e54ac19a6..e54ac19a6 100644 --- a/target/linux/patches/4.4.17/startup.patch +++ b/target/linux/patches/4.4.19/startup.patch diff --git a/target/linux/patches/4.4.17/use-libgcc-for-sh.patch b/target/linux/patches/4.4.19/use-libgcc-for-sh.patch index 6420219b0..6420219b0 100644 --- a/target/linux/patches/4.4.17/use-libgcc-for-sh.patch +++ b/target/linux/patches/4.4.19/use-libgcc-for-sh.patch diff --git a/target/linux/patches/4.4.19/versatile-nommu.patch b/target/linux/patches/4.4.19/versatile-nommu.patch new file mode 100644 index 000000000..96140b30c --- /dev/null +++ b/target/linux/patches/4.4.19/versatile-nommu.patch @@ -0,0 +1,16 @@ +diff -Nur linux-4.4.17.orig/arch/arm/mach-versatile/include/mach/hardware.h linux-4.4.17/arch/arm/mach-versatile/include/mach/hardware.h +--- linux-4.4.17.orig/arch/arm/mach-versatile/include/mach/hardware.h 2016-08-10 11:49:43.000000000 +0200 ++++ linux-4.4.17/arch/arm/mach-versatile/include/mach/hardware.h 2016-08-25 23:19:03.691716292 +0200 +@@ -30,8 +30,12 @@ + #define VERSATILE_PCI_VIRT_BASE (void __iomem *)0xe8000000ul + #define VERSATILE_PCI_CFG_VIRT_BASE (void __iomem *)0xe9000000ul + ++#ifdef CONFIG_MMU + /* macro to get at MMIO space when running virtually */ + #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)) + |