From 9cccc249d31d3b6a206c63eaea0f50bafbc73bc3 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 13 Aug 2014 17:45:22 +0200 Subject: first boot in qemu works now. --- target/linux/config/Config.in.ethernet | 4 +++- target/linux/patches/3.16/qemu-coldfire.patch | 24 ++++++++++++++++++++++++ target/m68k/kernel/qemu-m68k | 17 ++++++++++++----- 3 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 target/linux/patches/3.16/qemu-coldfire.patch (limited to 'target') diff --git a/target/linux/config/Config.in.ethernet b/target/linux/config/Config.in.ethernet index daf88ba44..94aa11b34 100644 --- a/target/linux/config/Config.in.ethernet +++ b/target/linux/config/Config.in.ethernet @@ -58,8 +58,10 @@ config ADK_KERNEL_FEC tristate select ADK_KERNEL_NET_VENDOR_FREESCALE select ADK_KERNEL_AT803X_PHY - depends on ADK_TARGET_SYSTEM_CUBOX_I + depends on ADK_TARGET_SYSTEM_CUBOX_I || \ + ADK_TARGET_SYSTEM_QEMU_M68K default y if ADK_TARGET_SYSTEM_CUBOX_I + default y if ADK_TARGET_SYSTEM_QEMU_M68K default n help FEC ethernet driver diff --git a/target/linux/patches/3.16/qemu-coldfire.patch b/target/linux/patches/3.16/qemu-coldfire.patch new file mode 100644 index 000000000..503fe8ef3 --- /dev/null +++ b/target/linux/patches/3.16/qemu-coldfire.patch @@ -0,0 +1,24 @@ +m68k: enabled software emulation of separate supervisor/user stack + +Recent Coldfires have separate supervisor and user stack pointers, but +since older Coldfires didn't have that, the Linux kernel has a kind of +emulation mechanism for those pointers. + +Apparently, according to the Kconfig.cpu file, the 5208 is supposed to +support such separate pointers, but Qemu doesn't implement it. So we +cheat a bit here and force the usage of emulated separate stack +pointers. + +Signed-off-by: Thomas Petazzoni + +diff -Nur linux-3.16.orig/arch/m68k/Kconfig.cpu linux-3.16/arch/m68k/Kconfig.cpu +--- linux-3.16.orig/arch/m68k/Kconfig.cpu 2014-08-04 00:25:02.000000000 +0200 ++++ linux-3.16/arch/m68k/Kconfig.cpu 2014-08-13 16:58:59.568332805 +0200 +@@ -146,6 +146,7 @@ + depends on !MMU + select GENERIC_CLOCKEVENTS + select HAVE_CACHE_SPLIT ++ select COLDFIRE_SW_A7 + help + Freescale Coldfire 5207/5208 processor support. + diff --git a/target/m68k/kernel/qemu-m68k b/target/m68k/kernel/qemu-m68k index f9fbf383e..2b0e53ad4 100644 --- a/target/m68k/kernel/qemu-m68k +++ b/target/m68k/kernel/qemu-m68k @@ -3,14 +3,21 @@ CONFIG_COLDFIRE=y CONFIG_M520x=y # CONFIG_MMU is not set CONFIG_CLOCK_SET=y -CONFIG_CLOCK_FREQ=166666666 +CONFIG_CLOCK_FREQ=66666666 +CONFIG_CLOCK_DIV=1 CONFIG_M5208EVB=y +CONFIG_FREESCALE=y +CONFIG_LARGE_ALLOCS=y +CONFIG_4KSTACKS=y CONFIG_RAMBASE=0x40000000 -CONFIG_RAMSIZE=0x2000000 +CONFIG_RAMSIZE=0x0 CONFIG_VECTORBASE=0x40000000 -CONFIG_KERNELBASE=0x40020000 +CONFIG_KERNELBASE=0x40010000 +CONFIG_RAMAUTOBIT=y CONFIG_BINFMT_FLAT=y +CONFIG_SERIAL_COLDFIRE=y CONFIG_SERIAL_MCF=y -CONFIG_SERIAL_MCF_BAUDRATE=115200 +CONFIG_SERIAL_MCF_BAUDRATE=19200 CONFIG_SERIAL_MCF_CONSOLE=y - +CONFIG_BOOTPARAM=y +CONFIG_BOOTPARAM_STRING="console=ttyS0,19200" -- cgit v1.2.3