[PATCH 0/3] x86: emulation: Tweaks to fit better with lxd

From: Simon Glass <sjg@chromium.org> This series includes some changes so that the 64-bit x86 QEMU build can be used with LXD. This includes moving to Q35 and setting up a bootstd command. Simon Glass (3): x86: emulation: Sync the defconfigs x86: emulation: Move the x86_64 build to Q35 x86: emulation: Use bootstd to boot configs/qemu-x86_64_defconfig | 5 +++-- configs/qemu-x86_defconfig | 3 +-- scripts/build-qemu | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) -- 2.43.0 base-commit: a19b43ab7215166e6941a28c3df77502fb77d54a branch: qemk

From: Simon Glass <sjg@chromium.org> Sync defconfigs for both QEMU builds. Signed-off-by: Simon Glass <sjg@chromium.org> --- configs/qemu-x86_64_defconfig | 2 +- configs/qemu-x86_defconfig | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/configs/qemu-x86_64_defconfig b/configs/qemu-x86_64_defconfig index b0922ae8008..c1ebab46ee4 100644 --- a/configs/qemu-x86_64_defconfig +++ b/configs/qemu-x86_64_defconfig @@ -12,13 +12,13 @@ CONFIG_SPL_TEXT_BASE=0xfffd0000 CONFIG_DEBUG_UART_BASE=0x3f8 CONFIG_DEBUG_UART_CLOCK=1843200 CONFIG_X86_RUN_64BIT=y -CONFIG_TARGET_QEMU_X86_64=y CONFIG_DEBUG_UART=y # CONFIG_HAVE_MICROCODE is not set CONFIG_SMP=y CONFIG_GENERATE_PIRQ_TABLE=y CONFIG_GENERATE_MP_TABLE=y CONFIG_X86_OFFSET_U_BOOT=0xffe00000 +CONFIG_TARGET_QEMU_X86_64=y CONFIG_SYS_MONITOR_BASE=0x01110000 CONFIG_FIT=y CONFIG_SPL_LOAD_FIT=y diff --git a/configs/qemu-x86_defconfig b/configs/qemu-x86_defconfig index 099d3f32d1b..c12913e94b3 100644 --- a/configs/qemu-x86_defconfig +++ b/configs/qemu-x86_defconfig @@ -24,7 +24,6 @@ CONFIG_LOG=y CONFIG_LOGF_FUNC=y CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_PCI_INIT_R=y -CONFIG_BLOBLIST=y CONFIG_BLOBLIST_FIXED=y CONFIG_BLOBLIST_ADDR=0x10000 CONFIG_CMD_CPU=y -- 2.43.0

From: Simon Glass <sjg@chromium.org> Q35 is newer and has a native PCI Express bus. Move to using this by default. Update the QEMU script to select the correct machine. Signed-off-by: Simon Glass <sjg@chromium.org> --- configs/qemu-x86_64_defconfig | 2 +- configs/qemu-x86_defconfig | 2 +- scripts/build-qemu | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/configs/qemu-x86_64_defconfig b/configs/qemu-x86_64_defconfig index c1ebab46ee4..51ce37bee35 100644 --- a/configs/qemu-x86_64_defconfig +++ b/configs/qemu-x86_64_defconfig @@ -6,7 +6,7 @@ CONFIG_NR_DRAM_BANKS=8 CONFIG_ENV_SIZE=0x40000 CONFIG_MAX_CPUS=2 CONFIG_SPL_DM_SPI=y -CONFIG_DEFAULT_DEVICE_TREE="qemu-x86_i440fx" +CONFIG_DEFAULT_DEVICE_TREE="qemu-x86_q35" CONFIG_SPL_SYS_MALLOC_F_LEN=0x4800 CONFIG_SPL_TEXT_BASE=0xfffd0000 CONFIG_DEBUG_UART_BASE=0x3f8 diff --git a/configs/qemu-x86_defconfig b/configs/qemu-x86_defconfig index c12913e94b3..b531c73426d 100644 --- a/configs/qemu-x86_defconfig +++ b/configs/qemu-x86_defconfig @@ -5,7 +5,7 @@ CONFIG_BLOBLIST_SIZE_RELOC=0x40000 CONFIG_NR_DRAM_BANKS=8 CONFIG_ENV_SIZE=0x40000 CONFIG_MAX_CPUS=2 -CONFIG_DEFAULT_DEVICE_TREE="qemu-x86_i440fx" +CONFIG_DEFAULT_DEVICE_TREE="qemu-x86_q35" CONFIG_DEBUG_UART_BASE=0x3f8 CONFIG_DEBUG_UART_CLOCK=1843200 CONFIG_DEBUG_UART=y diff --git a/scripts/build-qemu b/scripts/build-qemu index c96f65f922f..efe79561981 100755 --- a/scripts/build-qemu +++ b/scripts/build-qemu @@ -151,6 +151,7 @@ class BuildQemu: self.board = 'qemu-x86' default_bios = 'u-boot.rom' self.qemu = 'qemu-system-i386' + self.qemu_extra.extend(['-machine', 'q35']) if self.helper.bitness == 64: self.board = 'qemu-x86_64' self.qemu = 'qemu-system-x86_64' -- 2.43.0

From: Simon Glass <sjg@chromium.org> Use the normal bootflow command to boot an OS. Signed-off-by: Simon Glass <sjg@chromium.org> --- configs/qemu-x86_64_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/qemu-x86_64_defconfig b/configs/qemu-x86_64_defconfig index 51ce37bee35..15a968e00c3 100644 --- a/configs/qemu-x86_64_defconfig +++ b/configs/qemu-x86_64_defconfig @@ -28,6 +28,7 @@ CONFIG_BOOTSTAGE_REPORT=y CONFIG_SHOW_BOOT_PROGRESS=y CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="root=/dev/sdb3 init=/sbin/init rootwait ro" +CONFIG_BOOTCOMMAND="bootfl scan -lb" CONFIG_CONSOLE_RECORD=y # CONFIG_CONSOLE_RECORD_INIT_F is not set CONFIG_SYS_CONSOLE_INFO_QUIET=y -- 2.43.0
participants (1)
-
Simon Glass