mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-05-05 04:36:13 +02:00
Add support for the Motorola 68040 architecture. Currently, m68k support in U-Boot is primarily focused on ColdFire variants. Introduce the necessary infrastructure to support the classic M680x0 series, specifically targeting the M68040 as emulated by QEMU. The implementation includes exception vectors, early startup code, and minimal CPU initialization and relocation stubs. It also defines the standard m68k boot information structure used for passing hardware information to the operating system. To ensure compatibility, ColdFire- specific library objects such as cache and interrupt handling are excluded from the build when M68040 is selected. Additionally, apply a specific workaround during the early memory reservation stage. Use a manual loop to clear global data instead of the standard memset() function, as utilizing memset() at this point was observed to cause a hang on the QEMU platform. Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com> Acked-by: Angelo Dureghello <angelo@kernel-space.org> Reviewed-by: Simon Glass <simon.glass@canonical.com>
32 lines
917 B
Makefile
32 lines
917 B
Makefile
# SPDX-License-Identifier: GPL-2.0+
|
|
|
|
head-y := arch/m68k/cpu/$(CPU)/start.o
|
|
|
|
libs-y += arch/m68k/cpu/$(CPU)/
|
|
libs-y += arch/m68k/lib/
|
|
|
|
cpuflags-$(CONFIG_M5208) := -mcpu=5208
|
|
cpuflags-$(CONFIG_M5235) := -mcpu=5235 -fPIC
|
|
cpuflags-$(CONFIG_M5249) := -mcpu=5249
|
|
cpuflags-$(CONFIG_M5253) := -mcpu=5253
|
|
cpuflags-$(CONFIG_M5271) := -mcpu=5271
|
|
cpuflags-$(CONFIG_M5272) := -mcpu=5272
|
|
cpuflags-$(CONFIG_M5275) := -mcpu=5275
|
|
cpuflags-$(CONFIG_M5282) := -mcpu=5282
|
|
cpuflags-$(CONFIG_M5307) := -mcpu=5307
|
|
cpuflags-$(CONFIG_MCF5301x) := -mcpu=53015 -fPIC
|
|
cpuflags-$(CONFIG_MCF532x) := -mcpu=5329 -fPIC
|
|
cpuflags-$(CONFIG_MCF5441x) := -mcpu=54418 -fPIC
|
|
cpuflags-$(CONFIG_M68040) := -mcpu=68040 -fno-pic
|
|
|
|
PLATFORM_CPPFLAGS += $(cpuflags-y)
|
|
|
|
|
|
ldflags-$(CONFIG_MCF5441x) := --got=single
|
|
|
|
ifneq (,$(findstring -linux-,$(shell $(CC) --version)))
|
|
ifneq (,$(findstring GOT,$(shell $(LD) --help)))
|
|
KBUILD_LDFLAGS += $(ldflags-y)
|
|
endif
|
|
endif
|