m68k: Add support for QEMU virt machine
v2 cover m68k: Add support for QEMU virt machine
Add support for the QEMU 'virt' machine on the m68k architecture. The QEMU virt machine models a generic system utilizing Goldfish virtual peripherals and is capable of emulating various classic 68k CPUs.
Currently, U-Boot's m68k architecture support focuses on ColdFire variants. Expand this to include the classic M680x0 architecture, implementing the necessary exception vectors, startup code, and a bootinfo parser compatible with the QEMU interface. A driver for the Goldfish TTY is also added to enable serial console output.
The implementation has been verified on QEMU targeting the M68040 CPU, confirming successful hardware initialization and boot to the U-Boot command shell. Additionally, the CI configuration was verified locally using gitlab-ci-local "qemu_m68k_virt test.py", resulting in PASS qemu_m68k_virt test.py.
---
Changes in v2:
- Refactor Goldfish TTY driver to use priv data for the RX buffer and ensure single-byte reads.
- Rename arch/m68k/cpu/m68040 to arch/m68k/cpu/m680x0 to separate the architecture family from the specific CPU model.
- Introduce M680x0 Kconfig symbol and separate MAINTAINERS entries for the architecture and the board.
- Regenerate qemu-m68k_defconfig using make savedefconfig and add the board to the documentation index.
- Add a new patch to enable CI testing on GitLab and Azure Pipelines.
- Update SPDX identifiers to GPL-2.0-or-later.
- Sort headers alphabetically.
- Fix tabs vs spaces.
v1: https://lore.kernel.org/u-boot/[email protected]/
Kuan-Wei Chiu (4):
serial: Add Goldfish TTY driver
m68k: Add support for M68040 CPU
board: Add QEMU m68k virt board support
CI: Add test jobs for QEMU m68k virt machine
.azure-pipelines.yml | 4 + .gitlab-ci.yml | 7 ++ MAINTAINERS | 12 +++ arch/m68k/Kconfig | 24 ++++++ arch/m68k/Makefile | 1 + arch/m68k/config.mk | 10 ++- arch/m68k/cpu/m680x0/Makefile | 6 ++ arch/m68k/cpu/m680x0/cpu.c | 77 +++++++++++++++++++ arch/m68k/cpu/m680x0/start.S | 73 ++++++++++++++++++ arch/m68k/cpu/m680x0/u-boot.lds | 47 ++++++++++++ arch/m68k/include/asm/bootinfo.h | 31 ++++++++ arch/m68k/lib/Makefile | 9 +-- board/emulation/qemu-m68k/Kconfig | 12 +++ board/emulation/qemu-m68k/MAINTAINERS | 8 ++ board/emulation/qemu-m68k/Makefile | 5 ++ board/emulation/qemu-m68k/qemu-m68k.c | 84 +++++++++++++++++++++ configs/qemu-m68k_defconfig | 12 +++ doc/board/emulation/index.rst | 1 + doc/board/emulation/qemu-m68k.rst | 38 ++++++++++ drivers/serial/Kconfig | 8 ++ drivers/serial/Makefile | 1 + drivers/serial/serial_goldfish.c | 104 ++++++++++++++++++++++++++ include/configs/qemu-m68k.h | 18 +++++ include/goldfish_tty.h | 18 +++++ 24 files changed, 602 insertions(+), 8 deletions(-) create mode 100644 arch/m68k/cpu/m680x0/Makefile create mode 100644 arch/m68k/cpu/m680x0/cpu.c create mode 100644 arch/m68k/cpu/m680x0/start.S create mode 100644 arch/m68k/cpu/m680x0/u-boot.lds create mode 100644 arch/m68k/include/asm/bootinfo.h create mode 100644 board/emulation/qemu-m68k/Kconfig create mode 100644 board/emulation/qemu-m68k/MAINTAINERS create mode 100644 board/emulation/qemu-m68k/Makefile create mode 100644 board/emulation/qemu-m68k/qemu-m68k.c create mode 100644 configs/qemu-m68k_defconfig create mode 100644 doc/board/emulation/qemu-m68k.rst create mode 100644 drivers/serial/serial_goldfish.c create mode 100644 include/configs/qemu-m68k.h create mode 100644 include/goldfish_tty.h
Signature · 1 line
2.52.0.358.g0dd7633a29-goog
PATCH v2 1/4 serial: Add Goldfish TTY driver
Add support for the Google Goldfish TTY serial device. This virtual device is commonly used in QEMU virtual machines (such as the m68k virt machine) and Android emulators.
The driver implements basic console output and input polling using the Goldfish MMIO interface.
---
Changes in v2:
- Update SPDX license identifier to GPL-2.0-or-later.
- Sort header inclusions alphabetically.
- Move RX buffer into goldfish_tty_priv instead of using a static buffer.
- Make sure getc only read a single byte at a time.
MAINTAINERS | 6 ++ drivers/serial/Kconfig | 8 +++ drivers/serial/Makefile | 1 + drivers/serial/serial_goldfish.c | 104 +++++++++++++++++++++++++++++++ include/goldfish_tty.h | 18 ++++++ 5 files changed, 137 insertions(+) create mode 100644 drivers/serial/serial_goldfish.c create mode 100644 include/goldfish_tty.h
MAINTAINERS +6 -0
@@ -1259,6 +1259,12 @@ S: Maintained F: drivers/misc/gsc.c F: include/gsc.h +GOLDFISH SERIAL DRIVER +M: Kuan-Wei Chiu <[email protected]> +S: Maintained +F: drivers/serial/serial_goldfish.c +F: include/goldfish_tty.h + I2C M: Heiko Schocher <[email protected]> S: Maintained
drivers/serial/Kconfig +8 -0
@@ -1193,4 +1193,12 @@ config SYS_SDMR depends on MPC8XX_CONS default 0x0 +config SERIAL_GOLDFISH + bool "Goldfish TTY support" + depends on DM_SERIAL + help + Select this to enable support for the Goldfish TTY serial port. + This virtual device is commonly used by QEMU virtual machines + (e.g. m68k virt) for console output. + endif
drivers/serial/Makefile +1 -0
@@ -63,3 +63,4 @@ obj-$(CONFIG_XTENSA_SEMIHOSTING_SERIAL) += serial_xtensa_semihosting.o obj-$(CONFIG_S5P4418_PL011_SERIAL) += serial_s5p4418_pl011.o obj-$(CONFIG_UART4_SERIAL) += serial_adi_uart4.o +obj-$(CONFIG_SERIAL_GOLDFISH) += serial_goldfish.o
drivers/serial/serial_goldfish.c new file +104 -0
104 lines not on this page · raw message
include/goldfish_tty.h new file +18 -0
@@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* +* Copyright (C) 2025, Kuan-Wei Chiu <[email protected]> +*/ + +#ifndef _GOLDFISH_TTY_H_ +#define _GOLDFISH_TTY_H_ + +#include <linux/types.h> + +/* Platform data for the Goldfish TTY driver +* Used to pass hardware base address from Board to Driver +*/ +struct goldfish_tty_plat { +void __iomem *base; +}; + +#endif /* _GOLDFISH_TTY_H_ */
Signature · 1 line
2.52.0.358.g0dd7633a29-goog
Re: [PATCH v2 1/4] serial: Add Goldfish TTY driver
Quoted 23 lines · Kuan-Wei Chiu
Add support for the Google Goldfish TTY serial device. This virtual device is commonly used in QEMU virtual machines (such as the m68k virt machine) and Android emulators.
The driver implements basic console output and input polling using the Goldfish MMIO interface.
Signed-off-by Kuan-Wei Chiu <[email protected]>---
Changes in v2:
- Update SPDX license identifier to GPL-2.0-or-later.
- Sort header inclusions alphabetically.
- Move RX buffer intogoldfish_tty_privinstead of using a static buffer.
- Make sure getc only read a single byte at a time.MAINTAINERS | 6 ++ drivers/serial/Kconfig | 8 +++ drivers/serial/Makefile | 1 + drivers/serial/serial_goldfish.c | 104 +++++++++++++++++++++++++++++++ include/goldfish_tty.h | 18 ++++++ 5 files changed, 137 insertions(+) create mode 100644 drivers/serial/serial_goldfish.c create mode 100644 include/goldfish_tty.h
...
Quoted 34 lines
drivers/serial/serial_goldfish.c new file +28
-0@@ -0,0 +1,104 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* +* Copyright (C) 2025, Kuan-Wei Chiu <[email protected]> +* Goldfish TTY driver for U-Boot +*/ + +#include <asm/io.h> +#include <dm.h> +#include <goldfish_tty.h> +#include <linux/types.h> +#include <serial.h> + +/* Goldfish TTY Register Offsets */ +#define GOLDFISH_TTY_PUT_CHAR 0x00 +#define GOLDFISH_TTY_BYTES_READY 0x04 +#define GOLDFISH_TTY_CMD 0x08 +#define GOLDFISH_TTY_DATA_PTR 0x10 +#define GOLDFISH_TTY_DATA_LEN 0x14 +#define GOLDFISH_TTY_DATA_PTR_HIGH 0x18 +#define GOLDFISH_TTY_VERSION 0x20 + +/* Commands */ +#define CMD_WRITE_BUFFER 2 +#define CMD_READ_BUFFER 3 + +struct goldfish_tty_priv { +void __iomem *base; +u8 rx_buf;
drivers/serial/serial_goldfish.c line 38
Quoted 10 lines
drivers/serial/serial_goldfish.c new file +10
-0+}; + +static int goldfish_serial_getc (struct udevice *dev) +{ +struct goldfish_tty_priv *priv =dev_get_priv (dev); +unsigned long base = (unsigned long )priv->base; +unsigned long paddr; +u32 count; + + count =__raw_readl ((void *)(base +GOLDFISH_TTY_BYTES_READY ));
I think it's okay to do pointer arithmetic directly against priv->base in GNU C, right? In which case void * is treated like char *.
If I'm correct, variable base could be dropped, and we could avoid some casts here and below.
drivers/serial/serial_goldfish.c line 51
Quoted 13 lines
drivers/serial/serial_goldfish.c new file +13
-0+if (count ==0 ) +return -EAGAIN ; + + paddr =virt_to_phys ((void *)&priv->rx_buf); + +__raw_writel (0 , (void *)(base +GOLDFISH_TTY_DATA_PTR_HIGH )); +__raw_writel (paddr, (void *)(base +GOLDFISH_TTY_DATA_PTR )); +__raw_writel (1 , (void *)(base +GOLDFISH_TTY_DATA_LEN )); + +__raw_writel (CMD_READ_BUFFER , (void *)(base +GOLDFISH_TTY_CMD )); + +return priv->rx_buf; +}
Regards,
Yao Zi
Re: [PATCH v2 1/4] serial: Add Goldfish TTY driver
Hi Yao,
Quoted 75 lines · Yao Zi
Quoted 23 lines · Kuan-Wei Chiu
Add support for the Google Goldfish TTY serial device. This virtual device is commonly used in QEMU virtual machines (such as the m68k virt machine) and Android emulators.
The driver implements basic console output and input polling using the Goldfish MMIO interface.
Signed-off-by Kuan-Wei Chiu <[email protected]>---
Changes in v2:
- Update SPDX license identifier to GPL-2.0-or-later.
- Sort header inclusions alphabetically.
- Move RX buffer intogoldfish_tty_privinstead of using a static buffer.
- Make sure getc only read a single byte at a time.MAINTAINERS | 6 ++ drivers/serial/Kconfig | 8 +++ drivers/serial/Makefile | 1 + drivers/serial/serial_goldfish.c | 104 +++++++++++++++++++++++++++++++ include/goldfish_tty.h | 18 ++++++ 5 files changed, 137 insertions(+) create mode 100644 drivers/serial/serial_goldfish.c create mode 100644 include/goldfish_tty.h...
Quoted 34 lines
drivers/serial/serial_goldfish.c new file +28
-0@@ -0,0 +1,104 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* +* Copyright (C) 2025, Kuan-Wei Chiu <[email protected]> +* Goldfish TTY driver for U-Boot +*/ + +#include <asm/io.h> +#include <dm.h> +#include <goldfish_tty.h> +#include <linux/types.h> +#include <serial.h> + +/* Goldfish TTY Register Offsets */ +#define GOLDFISH_TTY_PUT_CHAR 0x00 +#define GOLDFISH_TTY_BYTES_READY 0x04 +#define GOLDFISH_TTY_CMD 0x08 +#define GOLDFISH_TTY_DATA_PTR 0x10 +#define GOLDFISH_TTY_DATA_LEN 0x14 +#define GOLDFISH_TTY_DATA_PTR_HIGH 0x18 +#define GOLDFISH_TTY_VERSION 0x20 + +/* Commands */ +#define CMD_WRITE_BUFFER 2 +#define CMD_READ_BUFFER 3 + +struct goldfish_tty_priv { +void __iomem *base; +u8 rx_buf;drivers/serial/serial_goldfish.c line 38
Quoted 10 lines
drivers/serial/serial_goldfish.c new file +10
-0+}; + +static int goldfish_serial_getc (struct udevice *dev) +{ +struct goldfish_tty_priv *priv =dev_get_priv (dev); +unsigned long base = (unsigned long )priv->base; +unsigned long paddr; +u32 count; + + count =__raw_readl ((void *)(base +GOLDFISH_TTY_BYTES_READY ));I think it's okay to do pointer arithmetic directly against
priv->basein GNU C, right? In which case void * is treated like char *.
Quoted 2 lines
If I'm correct, variable base could be dropped, and we could avoid some casts here and below.
Agreed.
While standard C doesn't allow it, GNU C does support arithmetic on void *. Doing this directly makes the code look much cleaner. Thanks for the feedback, I will update this in v3.
Regards,
Kuan-Wei
Quoted 17 lines
Quoted 4 lines
drivers/serial/serial_goldfish.c new file +3
-0+if (count ==0 ) +return -EAGAIN ; +drivers/serial/serial_goldfish.c line 51
Quoted 10 lines
drivers/serial/serial_goldfish.c new file +10
-0+ paddr =virt_to_phys ((void *)&priv->rx_buf); + +__raw_writel (0 , (void *)(base +GOLDFISH_TTY_DATA_PTR_HIGH )); +__raw_writel (paddr, (void *)(base +GOLDFISH_TTY_DATA_PTR )); +__raw_writel (1 , (void *)(base +GOLDFISH_TTY_DATA_LEN )); + +__raw_writel (CMD_READ_BUFFER , (void *)(base +GOLDFISH_TTY_CMD )); + +return priv->rx_buf; +}Regards,
Yao Zi
PATCH v2 2/4 m68k: Add support for M68040 CPU
In reply to Kuan-Wei ChiuAdd 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.
---
Changes in v2:
- Update SPDX license identifier to GPL-2.0-or-later.
- Sort header inclusions alphabetically.
- Separate MAINTAINERS entry for the M680x0 architecture.
- Fix tabs vs spaces in Kconfig.
- Rename arch/m68k/cpu/m68040 to arch/m68k/cpu/m680x0 to separate the architecture family from the specific CPU model.
- Introduce M680x0 Kconfig symbol for the architecture family, selected by M68040.
MAINTAINERS | 6 +++ arch/m68k/Kconfig | 16 +++++++ arch/m68k/Makefile | 1 + arch/m68k/config.mk | 10 ++++- arch/m68k/cpu/m680x0/Makefile | 6 +++ arch/m68k/cpu/m680x0/cpu.c | 77 ++++++++++++++++++++++++++++++++ arch/m68k/cpu/m680x0/start.S | 73 ++++++++++++++++++++++++++++++ arch/m68k/cpu/m680x0/u-boot.lds | 47 +++++++++++++++++++ arch/m68k/include/asm/bootinfo.h | 31 +++++++++++++ arch/m68k/lib/Makefile | 9 ++-- 10 files changed, 268 insertions(+), 8 deletions(-) create mode 100644 arch/m68k/cpu/m680x0/Makefile create mode 100644 arch/m68k/cpu/m680x0/cpu.c create mode 100644 arch/m68k/cpu/m680x0/start.S create mode 100644 arch/m68k/cpu/m680x0/u-boot.lds create mode 100644 arch/m68k/include/asm/bootinfo.h
MAINTAINERS +6 -0
@@ -1306,6 +1306,12 @@ F: lib/getopt.c F: test/log/ F: test/py/tests/test_log.py +M680X0 ARCHITECTURE +M: Kuan-Wei Chiu <[email protected]> +S: Maintained +F: arch/m68k/cpu/m680x0/ +F: arch/m68k/include/asm/bootinfo.h + MALI DISPLAY PROCESSORS M: Liviu Dudau <[email protected]> S: Supported
arch/m68k/Kconfig +16 -0
@@ -56,6 +56,9 @@ config MCF5441x select DM_SERIAL bool +config M680x0 + bool + # processor type config M5208 bool
@@ -110,6 +113,10 @@ config M54418 bool select MCF5441x +config M68040 + bool + select M680x0 + # peripherals config CF_DSPI bool
@@ -178,6 +185,15 @@ config TARGET_STMARK2 endchoice +config SYS_CPU + string + default "mcf52x2" if MCF52x2 + default "mcf523x" if MCF523x + default "mcf530x" if MCF530x + default "mcf532x" if MCF532x + default "mcf5445x" if MCF5445x + default "m680x0" if M680x0 + source "board/BuS/eb_cpu5282/Kconfig" source "board/cobra5272/Kconfig" source "board/freescale/m5208evbe/Kconfig"
arch/m68k/Makefile +1 -0
@@ -17,6 +17,7 @@ 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)
arch/m68k/config.mk +8 -2
@@ -3,8 +3,14 @@ # (C) Copyright 2000-2002 # Wolfgang Denk, DENX Software Engineering, [email protected]. -PLATFORM_CPPFLAGS += -D__M68K__ -fPIC +PLATFORM_CPPFLAGS += -D__M68K__ +ifneq ($(CONFIG_M680x0),y) +PLATFORM_CPPFLAGS += -fPIC +endif KBUILD_LDFLAGS += -n -pie PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections -PLATFORM_RELFLAGS += -ffixed-d7 -msep-data +PLATFORM_RELFLAGS += -ffixed-d7 +ifneq ($(CONFIG_M680x0),y) +PLATFORM_RELFLAGS += -msep-data +endif LDFLAGS_FINAL += --gc-sections -pie
arch/m68k/cpu/m680x0/Makefile new file +6 -0
@@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2025, Kuan-Wei Chiu <[email protected]> + +extra-y += start.o +obj-y += cpu.o
arch/m68k/cpu/m680x0/cpu.c new file +77 -0
77 lines not on this page · raw message
arch/m68k/cpu/m680x0/start.S new file +73 -0
73 lines not on this page · raw message
arch/m68k/cpu/m680x0/u-boot.lds new file +47 -0
47 lines not on this page · raw message
arch/m68k/include/asm/bootinfo.h new file +31 -0
@@ -0,0 +1,31 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* +* Copyright (C) 2025, Kuan-Wei Chiu <[email protected]> +* +* Definitions for the m68k bootinfo interface. +*/ + +#ifndef _ASM_M68K_BOOTINFO_H +#define _ASM_M68K_BOOTINFO_H + +#ifndef __ASSEMBLY__ + +struct bi_record { +unsigned short tag;/* tag ID */ +unsigned short size;/* size of record (in bytes) */ +unsigned long data[0 ];/* data */ +}; + +#endif /* __ASSEMBLY__ */ + +/* Bootinfo Tag IDs */ +#define BI_LAST 0x0000 +#define BI_MACHTYPE 0x0001 +#define BI_CPUTYPE 0x0002 +#define BI_FPUTYPE 0x0003 +#define BI_MMUTYPE 0x0004 +#define BI_MEMCHUNK 0x0005 +#define BI_RAMDISK 0x0006 +#define BI_COMMAND_LINE 0x0007 + +#endif /* _ASM_M68K_BOOTINFO_H */
arch/m68k/lib/Makefile +3 -6
@@ -7,10 +7,7 @@ ## if the user asked for it lib-$(CONFIG_USE_PRIVATE_LIBGCC) += lshrdi3.o muldi3.o ashldi3.o ashrdi3.o -obj-y += bdinfo.o obj-$(CONFIG_CMD_BOOTM) += bootm.o -obj-y += cache.o -obj-y += interrupts.o -obj-y += time.o -obj-y += traps.o -obj-y += fec.o +ifndef CONFIG_M680x0 +obj-y += cache.o interrupts.o time.o traps.o bdinfo.o fec.o +endif
Signature · 1 line
2.52.0.358.g0dd7633a29-goog
Re: [PATCH v2 2/4] m68k: Add support for M68040 CPU
Hi Kuan-Wei,
arch/m68k/cpu/m680x0/cpu.c line 25
Quoted 12 lines · Kuan-Wei Chiu
arch/m68k/cpu/m680x0/cpu.c new file +5
-0+void m68k_virt_init_reserve (ulong base) +{ +/* FIXME: usage of memset() here caused a hang on QEMU m68k virt. */ +for (i =0 ; i <sizeof (*gd_ptr); i++) + p[i] =0 ;
Connecting GDB and single stepping to work out where it is going would be helpful.
arch/m68k/cpu/m680x0/cpu.c line 57
Quoted 4 lines
arch/m68k/cpu/m680x0/cpu.c new file +4
-0+void relocate_code (ulong sp,struct global_data *new_gd,ulong relocaddr) +{ +board_init_r (new_gd, relocaddr); +}
I have this working so at a later date we can copy/paste that code and clean it up.
Quoted 1 line
+unsigned long
timer_read_counter(void){ return 0; }
Since there is now a goldfish RTC driver upstream (drivers/rtc/goldfish_rtc.c) we could take the timer part from my
version (https://github.com/fifteenhex/u-boot/blob/mc68000/drivers/rtc/goldfish_timer.c)
and supply a real timer to the board. Right now I think anything that
uses delays will get stuck constantly reading back 0?
Quoted 1 line
+void
__udelay(unsigned long usec){}
Or maybe delays just won't happen?
Cheers,
Daniel
Re: [PATCH v2 2/4] m68k: Add support for M68040 CPU
Hi Daniel,
Quoted 12 lines · Daniel Palmer
Hi Kuan-Wei,
Quoted 8 lines · Kuan-Wei Chiu
arch/m68k/cpu/m680x0/cpu.c new file +2
-0+void m68k_virt_init_reserve (ulong base) +{
Quoted 6 lines
arch/m68k/cpu/m680x0/cpu.c line 25
Quoted 3 lines
arch/m68k/cpu/m680x0/cpu.c new file +3
-0+/* FIXME: usage of memset() here caused a hang on QEMU m68k virt. */ +for (i =0 ; i <sizeof (*gd_ptr); i++) + p[i] =0 ;Connecting GDB and single stepping to work out where it is going would be helpful.
I did attempt to investigate this using gdb, but unfortunately, the root cause remains elusive. memset itself appears to execute correctly, successfully zeroing out the global data. However, using it seems to trigger a side effect where initcall_run_f() returns (which should not happen), leading to the hang.
Quoted 8 lines
arch/m68k/cpu/m680x0/cpu.c line 57
Quoted 5 lines
arch/m68k/cpu/m680x0/cpu.c new file +4
-0+void relocate_code (ulong sp,struct global_data *new_gd,ulong relocaddr) +{ +board_init_r (new_gd, relocaddr); +}I have this working so at a later date we can copy/paste that code and clean it up.
That sounds great. :)
I look forward to integrating that in the future.
Quoted 8 lines
Quoted 2 lines
+unsigned long
timer_read_counter(void){ return 0; }Since there is now a goldfish RTC driver upstream (
drivers/rtc/goldfish_rtc.c) we could take the timer part from my
version (https://github.com/fifteenhex/u-boot/blob/mc68000/drivers/rtc/goldfish_timer.c)
and supply a real timer to the board. Right now I think anything that
uses delays will get stuck constantly reading back 0?
My original plan was to focus on a minimal boot to shell support in this series and add rtc/timer support later. However, if you prefer to have them included in this series, I am fine with that.
Since the timer driver is authored by you, I assume I should add Co-developed-by and Signed-off-by tags with your name to credit you properly. I wanted to explicitly ask for your permission first.
Also, regarding the tags, would you prefer I send the integrated patch to you privately for verification before posting v3, or is posting it directly to the list fine?
Quoted 4 lines
Quoted 2 lines
+void
__udelay(unsigned long usec){}Or maybe delays just won't happen?
I confirmed that delays do not occur during the boot to shell sequence. They would only be triggered if specific commands (like sleep 5) are executed after booting to shell.
Regards,
Kuan-Wei
Re: [PATCH v2 2/4] m68k: Add support for M68040 CPU
Hi Kuan-Wei,
Quoted 8 lines · Kuan-Wei Chiu
Quoted 2 lines
Connecting GDB and single stepping to work out where it is going would be helpful.
I did attempt to investigate this using gdb, but unfortunately, the root cause remains elusive. memset itself appears to execute correctly, successfully zeroing out the global data. However, using it seems to trigger a side effect where
initcall_run_f()returns (which should not happen), leading to the hang.
Maybe a QEMU bug? If I get some time I will try to reproduce it.
Quoted 9 lines
Quoted 5 lines
Since there is now a goldfish RTC driver upstream (
drivers/rtc/goldfish_rtc.c) we could take the timer part from my
version (https://github.com/fifteenhex/u-boot/blob/mc68000/drivers/rtc/goldfish_timer.c)
and supply a real timer to the board. Right now I think anything that
uses delays will get stuck constantly reading back 0?My original plan was to focus on a minimal boot to shell support in this series and add rtc/timer support later. However, if you prefer to have them included in this series, I am fine with that.
I looked at adding the timer parts of my "goldfish rtc" driver to the upstream one and it's not very clean.
So I have removed the unfinished RTC bits from my driver and moved the whole thing to drivers/timers/.
That seems like a better way to go. I think having working delays etc would be nice even for the initial support.
I guess if you send your initial stuff and someone asks "why is there no timer?" you can tell them I'll send a driver for that in the next series?
Quoted 3 lines
Since the timer driver is authored by you, I assume I should add Co-developed-by and Signed-off-by tags with your name to credit you properly. I wanted to explicitly ask for your permission first.
If there is anything in my branch you find useful you have my permission to just copy and paste without adding any tags etc. Credit is nice but I don't really mind.
Quoted 3 lines
Also, regarding the tags, would you prefer I send the integrated patch to you privately for verification before posting v3, or is posting it directly to the list fine?
Can you put the branch on github or something for me? If you send me patches I'm going to have to import them to my local checkout to look at so if you have a branch I can access that's less steps. :D
Cheers,
Daniel
Re: [PATCH v2 2/4] m68k: Add support for M68040 CPU
Hi Daniel,
Quoted 24 lines · Daniel Palmer
Hi Kuan-Wei,
Quoted 8 lines · Kuan-Wei Chiu
Quoted 2 lines
Connecting GDB and single stepping to work out where it is going would be helpful.
I did attempt to investigate this using gdb, but unfortunately, the root cause remains elusive. memset itself appears to execute correctly, successfully zeroing out the global data. However, using it seems to trigger a side effect where
initcall_run_f()returns (which should not happen), leading to the hang.Maybe a QEMU bug? If I get some time I will try to reproduce it.
Quoted 9 lines
Quoted 5 lines
Since there is now a goldfish RTC driver upstream (
drivers/rtc/goldfish_rtc.c) we could take the timer part from my
version (https://github.com/fifteenhex/u-boot/blob/mc68000/drivers/rtc/goldfish_timer.c)
and supply a real timer to the board. Right now I think anything that
uses delays will get stuck constantly reading back 0?My original plan was to focus on a minimal boot to shell support in this series and add rtc/timer support later. However, if you prefer to have them included in this series, I am fine with that.
Quoted 9 lines
I looked at adding the timer parts of my "goldfish rtc" driver to the upstream one and it's not very clean.
So I have removed the unfinished RTC bits from my driver and moved the whole thing todrivers/timers/.
That seems like a better way to go. I think having working delays etc would be nice even for the initial support.
I guess if you send your initial stuff and someone asks "why is there no timer?" you can tell them I'll send a driver for that in the next series?
Sure, I will add rtc and timer support in the next version. Thanks!
Quoted 8 lines
Quoted 4 lines
Since the timer driver is authored by you, I assume I should add Co-developed-by and Signed-off-by tags with your name to credit you properly. I wanted to explicitly ask for your permission first.
If there is anything in my branch you find useful you have my permission to just copy and paste without adding any tags etc. Credit is nice but I don't really mind.
Got it. Thanks.
Quoted 8 lines
Quoted 4 lines
Also, regarding the tags, would you prefer I send the integrated patch to you privately for verification before posting v3, or is posting it directly to the list fine?
Can you put the branch on github or something for me? If you send me patches I'm going to have to import them to my local checkout to look at so if you have a branch I can access that's less steps. :D
Sure, I will push the series to github and share the link.
Regards,
Kuan-Wei
PATCH v2 3/4 board: Add QEMU m68k virt board support
In reply to Kuan-Wei ChiuAdd support for the QEMU 'virt' machine on the m68k architecture. This board emulates a generic machine based on the Motorola 68040 CPU equipped with Goldfish virtual peripherals.
Introduce the necessary board configuration and initialization infrastructure. The implementation includes logic to parse the QEMU bootinfo interface, enabling dynamic detection of system RAM size to adapt to the virtual machine's configuration.
Enable the Goldfish TTY driver to provide a serial console, which facilitates interaction when running QEMU with the -nographic option. Additionally, include comprehensive documentation covering build instructions and usage examples to guide users in deploying U-Boot within the virtualization environment.
---
Changes in v2:
- Update SPDX license identifier to GPL-2.0-or-later.
- Sort header inclusions alphabetically.
- Fix tabs vs spaces in MAINTAINERS.
- Add qemu-m68k entry to doc/board/emulation/index.rst.
- Regenerate defconfig using make savedefconfig.
arch/m68k/Kconfig | 8 +++ board/emulation/qemu-m68k/Kconfig | 12 ++++ board/emulation/qemu-m68k/MAINTAINERS | 8 +++ board/emulation/qemu-m68k/Makefile | 5 ++ board/emulation/qemu-m68k/qemu-m68k.c | 84 +++++++++++++++++++++++++++ configs/qemu-m68k_defconfig | 12 ++++ doc/board/emulation/index.rst | 1 + doc/board/emulation/qemu-m68k.rst | 38 ++++++++++++ include/configs/qemu-m68k.h | 18 ++++++ 9 files changed, 186 insertions(+) create mode 100644 board/emulation/qemu-m68k/Kconfig create mode 100644 board/emulation/qemu-m68k/MAINTAINERS create mode 100644 board/emulation/qemu-m68k/Makefile create mode 100644 board/emulation/qemu-m68k/qemu-m68k.c create mode 100644 configs/qemu-m68k_defconfig create mode 100644 doc/board/emulation/qemu-m68k.rst create mode 100644 include/configs/qemu-m68k.h
arch/m68k/Kconfig +8 -0
@@ -183,6 +183,13 @@ config TARGET_STMARK2 select CF_DSPI select M54418 +config TARGET_QEMU_M68K + bool "Support QEMU m68k virt" + select M68040 + help + This target supports the QEMU m68k virtual machine (-M virt). + It simulates a Motorola 68040 CPU with Goldfish peripherals. + endchoice config SYS_CPU
@@ -208,6 +215,7 @@ source "board/freescale/m5329evb/Kconfig" source "board/freescale/m5373evb/Kconfig" source "board/sysam/amcore/Kconfig" source "board/sysam/stmark2/Kconfig" +source "board/emulation/qemu-m68k/Kconfig" config M68K_QEMU bool "Build with workarounds for incomplete QEMU emulation"
board/emulation/qemu-m68k/Kconfig new file +12 -0
@@ -0,0 +1,12 @@ +if TARGET_QEMU_M68K + +config SYS_BOARD + default "qemu-m68k" + +config SYS_VENDOR + default "emulation" + +config SYS_CONFIG_NAME + default "qemu-m68k" + +endif
board/emulation/qemu-m68k/MAINTAINERS new file +8 -0
@@ -0,0 +1,8 @@ +QEMU M68K VIRT BOARD +M: Kuan-Wei Chiu <[email protected]> +S: Maintained +F: board/emulation/qemu-m68k/ +F: board/emulation/common/ +F: include/configs/qemu-m68k.h +F: configs/qemu-m68k_defconfig +F: doc/board/emulation/qemu-m68k.rst
board/emulation/qemu-m68k/Makefile new file +5 -0
@@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2025, Kuan-Wei Chiu <[email protected]> + +obj-y += qemu-m68k.o
board/emulation/qemu-m68k/qemu-m68k.c new file +84 -0
84 lines not on this page · raw message
configs/qemu-m68k_defconfig new file +12 -0
@@ -0,0 +1,12 @@ +CONFIG_M68K=y +CONFIG_TEXT_BASE=0x00000000 +CONFIG_SYS_MALLOC_LEN=0x20000 +CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_SYS_MONITOR_LEN=262144 +CONFIG_SYS_BOOTM_LEN=0x1000000 +CONFIG_SYS_LOAD_ADDR=0x00000000 +CONFIG_TARGET_QEMU_M68K=y +# CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_BOARD_EARLY_INIT_F=y +CONFIG_DM_SERIAL=y +CONFIG_SERIAL_GOLDFISH=y
doc/board/emulation/index.rst +1 -0
@@ -15,6 +15,7 @@ Emulation qemu-sbsa qemu-x86 qemu-xtensa + qemu-m68k Also see
doc/board/emulation/qemu-m68k.rst new file +38 -0
@@ -0,0 +1,38 @@ +.. SPDX-License-Identifier: GPL-2.0-or-later +.. Copyright (C) 2025, Kuan-Wei Chiu <[email protected]> + +QEMU m68k +========= + +QEMU for m68k supports a special 'virt' machine designed for emulation and +virtualization purposes. This document describes how to run U-Boot under it. + +The QEMU virt machine models a generic m68k virtual machine with Goldfish +interfaces. It supports the Motorola 68040 CPU architecture. + +Building U-Boot +--------------- +Set the CROSS_COMPILE environment variable to your m68k toolchain, and run: + +.. code-block:: bash + + export CROSS_COMPILE=m68k-linux-gnu- + make qemu-m68k_defconfig + make + +Running U-Boot +-------------- +The minimal QEMU command line to get U-Boot up and running is: + +.. code-block:: bash + + qemu-system-m68k -M virt -cpu m68040 -nographic -kernel u-boot + +Note that the `-nographic` option is used to redirect the console to stdio, +which connects to the emulated Goldfish TTY device. + +Hardware Support +---------------- +The following QEMU virt peripherals are supported in U-Boot: + +* Goldfish TTY (Serial Console)
include/configs/qemu-m68k.h new file +18 -0
@@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* +* Copyright (C) 2025, Kuan-Wei Chiu <[email protected]> +*/ + +#ifndef __QEMU_M68K_H +#define __QEMU_M68K_H + +/* Memory Configuration */ +#define CFG_SYS_SDRAM_BASE 0x00000000 + +/* +* Initial Stack Pointer: +* Place the stack at 4MB offset to avoid overwriting U-Boot code/data. +*/ +#define CFG_SYS_INIT_SP_ADDR (CFG_SYS_SDRAM_BASE + 0x400000) + +#endif /* __QEMU_M68K_H */
Signature · 1 line
2.52.0.358.g0dd7633a29-goog
Re: [PATCH v2 3/4] board: Add QEMU m68k virt board support
Hi Kuan-Wei,
board/emulation/qemu-m68k/qemu-m68k.c line 46
Quoted 9 lines · Kuan-Wei Chiu
board/emulation/qemu-m68k/qemu-m68k.c +6
-0+int dram_init (void ) +{ +/* QEMU places bootinfo after _end, aligned to 2 bytes */ + addr = (ulong)&_end; +if (addr &1 ) + addr++;
Maybe ALIGN() or round_up() could be used here instead of manually coding it?
board/emulation/qemu-m68k/qemu-m68k.c line 59
Quoted 12 lines
board/emulation/qemu-m68k/qemu-m68k.c +12
-0+ record = (struct bi_record *)addr; + +if (record->tag !=BI_MACHTYPE ) +return 0 ; + +while (record->tag !=BI_LAST ) { +if (record->tag ==BI_MEMCHUNK ) { + gd->ram_size = record->data[1 ]; +break ; + } + record = (struct bi_record *)((ulong )record + record->size); + }
One thing I found when I did the bootinfo parsing in my version is if I corrupted (during relocation etc) the bootinfo this type of loop would often get stuck forever.
I'm not sure what the technical limit of the number of bootinfo entries is but bounding this to something reasonable feels like a good idea.
Cheers,
Daniel
Re: [PATCH v2 3/4] board: Add QEMU m68k virt board support
Hi Daniel,
Quoted 8 lines · Daniel Palmer
Hi Kuan-Wei,
Quoted 4 lines · Kuan-Wei Chiu
board/emulation/qemu-m68k/qemu-m68k.c +2
-0+int dram_init (void ) +{
Quoted 6 lines
board/emulation/qemu-m68k/qemu-m68k.c line 46
Quoted 4 lines
board/emulation/qemu-m68k/qemu-m68k.c +4
-0+/* QEMU places bootinfo after _end, aligned to 2 bytes */ + addr = (ulong)&_end; +if (addr &1 ) + addr++;Maybe
ALIGN()orround_up()could be used here instead of manually coding it?
Ack. Using ALIGN() is indeed cleaner.
I will update this in the next version.
Quoted 12 lines
Quoted 12 lines
board/emulation/qemu-m68k/qemu-m68k.c +11
-0+ record = (struct bi_record *)addr; + +if (record->tag !=BI_MACHTYPE ) +return 0 ; + +while (record->tag !=BI_LAST ) { +if (record->tag ==BI_MEMCHUNK ) { + gd->ram_size = record->data[1 ]; +break ; + } + record = (struct bi_record *)((ulong )record + record->size);
Quoted 8 lines
Quoted 1 line
+ }
One thing I found when I did the bootinfo parsing in my version is if I corrupted (during relocation etc) the bootinfo this type of loop would often get stuck forever.
I'm not sure what the technical limit of the number of bootinfo entries is but bounding this to something reasonable feels like a good idea.
In that scenario, I assume the correct error handling would be to add a loop limit and trigger a panic() if exceeded?
Regards,
Kuan-Wei
Re: [PATCH v2 3/4] board: Add QEMU m68k virt board support
Hi Kuan-Wei,
Quoted 10 lines · Kuan-Wei Chiu
Quoted 7 lines
One thing I found when I did the bootinfo parsing in my version is if I corrupted (during relocation etc) the bootinfo this type of loop would often get stuck forever.
I'm not sure what the technical limit of the number of bootinfo entries is but bounding this to something reasonable feels like a good idea.In that scenario, I assume the correct error handling would be to add a loop limit and trigger a
panic()if exceeded?
Yeah I think so, if you didn't find the last bootinfo entry within some reasonable bounds everything is probably broken and you shouldn't continue.
I think for most real machines (Amiga etc) there aren't many entries but for the virt machine maybe there is an entry per virtio mmio device so there might actually be a lot of them there.
Cheers,
Daniel
Re: [PATCH v2 3/4] board: Add QEMU m68k virt board support
Hi Daniel,
Quoted 14 lines · Daniel Palmer
Hi Kuan-Wei,
Quoted 10 lines · Kuan-Wei Chiu
Quoted 7 lines
One thing I found when I did the bootinfo parsing in my version is if I corrupted (during relocation etc) the bootinfo this type of loop would often get stuck forever.
I'm not sure what the technical limit of the number of bootinfo entries is but bounding this to something reasonable feels like a good idea.In that scenario, I assume the correct error handling would be to add a loop limit and trigger a
panic()if exceeded?
Quoted 6 lines
Yeah I think so, if you didn't find the last bootinfo entry within some reasonable bounds everything is probably broken and you shouldn't continue.
I think for most real machines (Amiga etc) there aren't many entries but for the virt machine maybe there is an entry per virtio mmio device so there might actually be a lot of them there.
So the problem becomes determining a reasonable limit.
I think we can safely assume the bootinfo buffer won't exceed a 4KB page size. Since the minimum record size is 4 bytes (tag + size), setting the maximum records to 4096 / 4 =1024 should be a safe assumption?
Regards,
Kuan-Wei
Re: [PATCH v2 3/4] board: Add QEMU m68k virt board support
Hi Kuan-Wei,
Quoted 7 lines · Kuan-Wei Chiu
Quoted 6 lines
Yeah I think so, if you didn't find the last bootinfo entry within some reasonable bounds everything is probably broken and you shouldn't continue.
I think for most real machines (Amiga etc) there aren't many entries but for the virt machine maybe there is an entry per virtio mmio device so there might actually be a lot of them there.
Quoted 6 lines
So the problem becomes determining a reasonable limit.
I think we can safely assume the bootinfo buffer won't exceed a 4KB page size. Since the minimum record size is 4 bytes (tag + size), setting the maximum records to 4096 / 4 =1024 should be a safe assumption?
All of the bootinfo being on a single page makes sense to me[0] and if an error is printed if the last entry is not found within that it'll be easy to work out that there is more and adjust the limit. That is a lot better than the bootinfo being corrupted and parsing random memory until we hit something that looks like the last record. ;)
Cheers,
Daniel
0 - I feel like I saw that assumption somewhere but can't remember where, maybe in the EMILE mac bootloader..
PATCH v2 4/4 CI: Add test jobs for QEMU m68k virt machine
In reply to Kuan-Wei ChiuEnable CI testing for the newly introduced QEMU m68k 'virt' board on both GitLab CI and Azure Pipelines. This ensures the new M68040 architecture support is built and booted correctly in the emulated environment.
---
Changes in v2:
- New patch to add CI testing jobs for gitlab and azure pipelines.
Note: This patch depends on a corresponding patch to the u-boot-test-hooks repository to provide the necessary QEMU
configuration: "travis-ci: Add config for QEMU m68k virt machine"
The gitlab CI job has been verified locally using gitlab-ci-local tool with a passing result. Azure Pipelines has not been verified.
.azure-pipelines.yml | 4 ++++ .gitlab-ci.yml | 7 +++++++ 2 files changed, 11 insertions(+)
.azure-pipelines.yml +4 -0
@@ -518,6 +518,10 @@ stages: TEST_PY_ID: "--id qemu" TEST_PY_TEST_SPEC: "not sleep and not efi" OVERRIDE: "-a CONFIG_M68K_QEMU=y -a ~CONFIG_MCFTMR" + qemu_m68k_virt: + TEST_PY_BD: "qemu-m68k" + TEST_PY_ID: "--id qemu" + TEST_PY_TEST_SPEC: "not sleep" qemu_malta: TEST_PY_BD: "malta" TEST_PY_ID: "--id qemu"
.gitlab-ci.yml +7 -0
@@ -408,6 +408,13 @@ qemu_m68k test.py: OVERRIDE: "-a CONFIG_M68K_QEMU=y -a ~CONFIG_MCFTMR" <<: *buildman_and_testpy_dfn +qemu_m68k_virt test.py: + variables: + TEST_PY_BD: "qemu-m68k" + TEST_PY_ID: "--id qemu" + TEST_PY_TEST_SPEC: "not sleep" + <<: *buildman_and_testpy_dfn + qemu_malta test.py: variables: TEST_PY_BD: "malta"
Signature · 1 line
2.52.0.358.g0dd7633a29-goog
Re: [PATCH v2 4/4] CI: Add test jobs for QEMU m68k virt machine
Quoted 26 lines · Kuan-Wei Chiu
Enable CI testing for the newly introduced QEMU m68k 'virt' board on both GitLab CI and Azure Pipelines. This ensures the new M68040 architecture support is built and booted correctly in the emulated environment.
Signed-off-by Kuan-Wei Chiu <[email protected]>---
Changes in v2:
- New patch to add CI testing jobs for gitlab and azure pipelines.Note: This patch depends on a corresponding patch to the u-boot-test-hooks repository to provide the necessary QEMU
configuration: "travis-ci: Add config for QEMU m68k virt machine"The gitlab CI job has been verified locally using gitlab-ci-local tool with a passing result. Azure Pipelines has not been verified.
.azure-pipelines.yml | 4 ++++ .gitlab-ci.yml | 7 +++++++ 2 files changed, 11 insertions(+).azure-pipelines.yml +0
-0
.azure-pipelines.yml stages: · line 523
Quoted 6 lines
.azure-pipelines.yml +3
-0@@ -518,6 +518,10 @@ stages: TEST_PY_ID: "--id qemu" TEST_PY_TEST_SPEC: "not sleep and not efi" OVERRIDE: "-a CONFIG_M68K_QEMU=y -a ~CONFIG_MCFTMR" + qemu_m68k_virt: + TEST_PY_BD: "qemu-m68k" + TEST_PY_ID: "--id qemu"
I see why you set TEST_PY_ID but that's only used in this manner for platforms which can be real or virtualized, for the qemu targets we just omit that (and then name the u-boot-test-hooks files to be "_na" or can just omit that part. Thanks for adding this!
Signature · 1 line
Tom
Re: [PATCH v2 4/4] CI: Add test jobs for QEMU m68k virt machine
Hi Tom,
Quoted 22 lines · Tom Rini
Quoted 21 lines · Kuan-Wei Chiu
Enable CI testing for the newly introduced QEMU m68k 'virt' board on both GitLab CI and Azure Pipelines. This ensures the new M68040 architecture support is built and booted correctly in the emulated environment.
Signed-off-by Kuan-Wei Chiu <[email protected]>---
Changes in v2:
- New patch to add CI testing jobs for gitlab and azure pipelines.Note: This patch depends on a corresponding patch to the u-boot-test-hooks repository to provide the necessary QEMU
configuration: "travis-ci: Add config for QEMU m68k virt machine"The gitlab CI job has been verified locally using gitlab-ci-local tool with a passing result. Azure Pipelines has not been verified.
.azure-pipelines.yml | 4 ++++ .gitlab-ci.yml | 7 +++++++ 2 files changed, 11 insertions(+)
Quoted 16 lines
.azure-pipelines.yml stages: · line 523
Quoted 11 lines
.azure-pipelines.yml +3
-0@@ -518,6 +518,10 @@ stages: TEST_PY_ID: "--id qemu" TEST_PY_TEST_SPEC: "not sleep and not efi" OVERRIDE: "-a CONFIG_M68K_QEMU=y -a ~CONFIG_MCFTMR" + qemu_m68k_virt: + TEST_PY_BD: "qemu-m68k" + TEST_PY_ID: "--id qemu"I see why you set
TEST_PY_IDbut that's only used in this manner for platforms which can be real or virtualized, for the qemu targets we just omit that (and then name the u-boot-test-hooks files to be "_na" or can just omit that part. Thanks for adding this!
Thanks for the quick feedback!
I'll fix the TEST_PY_ID usage.
Is there a preferred waiting period (like the 24 hr rule in Linux netdev) before I send v3? I can send the fix immediately, but I want to make sure I'm following the proper etiquette, especially during the Christmas holidays.
Regards,
Kuan-Wei
Re: [PATCH v2 4/4] CI: Add test jobs for QEMU m68k virt machine
Quoted 42 lines · Kuan-Wei Chiu
Hi Tom,
Quoted 22 lines · Tom Rini
Quoted 21 lines · Kuan-Wei Chiu
Enable CI testing for the newly introduced QEMU m68k 'virt' board on both GitLab CI and Azure Pipelines. This ensures the new M68040 architecture support is built and booted correctly in the emulated environment.
Signed-off-by Kuan-Wei Chiu <[email protected]>---
Changes in v2:
- New patch to add CI testing jobs for gitlab and azure pipelines.Note: This patch depends on a corresponding patch to the u-boot-test-hooks repository to provide the necessary QEMU
configuration: "travis-ci: Add config for QEMU m68k virt machine"The gitlab CI job has been verified locally using gitlab-ci-local tool with a passing result. Azure Pipelines has not been verified.
.azure-pipelines.yml | 4 ++++ .gitlab-ci.yml | 7 +++++++ 2 files changed, 11 insertions(+)Quoted 16 lines
.azure-pipelines.yml stages: · line 523
Quoted 11 lines
.azure-pipelines.yml +3
-0@@ -518,6 +518,10 @@ stages: TEST_PY_ID: "--id qemu" TEST_PY_TEST_SPEC: "not sleep and not efi" OVERRIDE: "-a CONFIG_M68K_QEMU=y -a ~CONFIG_MCFTMR" + qemu_m68k_virt: + TEST_PY_BD: "qemu-m68k" + TEST_PY_ID: "--id qemu"I see why you set
TEST_PY_IDbut that's only used in this manner for platforms which can be real or virtualized, for the qemu targets we just omit that (and then name the u-boot-test-hooks files to be "_na" or can just omit that part. Thanks for adding this!
Quoted 7 lines
Thanks for the quick feedback!
I'll fix theTEST_PY_IDusage.Is there a preferred waiting period (like the 24 hr rule in Linux netdev) before I send v3? I can send the fix immediately, but I want to make sure I'm following the proper etiquette, especially during the Christmas holidays.
We don't have a specific defined waiting period, but since this isn't a critical fix, yes, you can wait a few days even for more feedback (since I recall you're collaborating with others that've been doing m68k work on their own) before posting v3.
Ideally, this will get in v2026.04, which means it should be done and merge-ready by end of January, so, plenty of time.
Signature · 1 line
Tom