diff options
author | Simon Glass <sjg@chromium.org> | 2023-07-15 21:38:58 -0600 |
---|---|---|
committer | Bin Meng <bmeng@tinylab.org> | 2023-07-17 17:12:26 +0800 |
commit | 5345700d2af425a8c5a36c078db5d71bf31280c7 (patch) | |
tree | 6eee64ed67989449b2e3d0a1c7dffff085926e19 /arch | |
parent | d424553675e93495f346ea7b24beb8c3dd750c67 (diff) | |
download | u-boot-5345700d2af425a8c5a36c078db5d71bf31280c7.zip u-boot-5345700d2af425a8c5a36c078db5d71bf31280c7.tar.gz u-boot-5345700d2af425a8c5a36c078db5d71bf31280c7.tar.bz2 |
x86: Allow video-BIOS code to be built for SPL
With qemu-x86_64 we need to run the video BIOS while in 32-bit mode, i.e.
SPL. Add a Kconfig option for this, adjust the Makefile rules and use
CONFIG_IS_ENABLED() where needed.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/lib/Makefile | 7 | ||||
-rw-r--r-- | arch/x86/lib/bios.c | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile index b0612ae..90a7618 100644 --- a/arch/x86/lib/Makefile +++ b/arch/x86/lib/Makefile @@ -4,16 +4,17 @@ # Wolfgang Denk, DENX Software Engineering, wd@denx.de. obj-y += bdinfo.o -ifndef CONFIG_X86_64 -ifndef CONFIG_TPL_BUILD + +ifndef CONFIG_$(SPL_TPL_)X86_64 obj-y += bios.o obj-y += bios_asm.o obj-y += bios_interrupts.o endif -endif + ifndef CONFIG_SPL_BUILD obj-$(CONFIG_X86_32BIT_INIT) += string.o endif + ifndef CONFIG_SPL_BUILD obj-$(CONFIG_CMD_BOOTM) += bootm.o endif diff --git a/arch/x86/lib/bios.c b/arch/x86/lib/bios.c index 8cc686f..e29cae7 100644 --- a/arch/x86/lib/bios.c +++ b/arch/x86/lib/bios.c @@ -23,7 +23,7 @@ static int (*int_handler[256])(void); /* to have a common register file for interrupt handlers */ -#ifndef CONFIG_BIOSEMU +#if !CONFIG_IS_ENABLED(BIOSEMU) X86EMU_sysEnv _X86EMU_env; #endif |