mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
x86: Allow building an SPL image for coreboot
Coreboot runs in 32-bit mode and cannot run a 64-bit U-Boot. To get around this we can build a combined image with 32-bit SPL and 64-bit U-Boot. Add a build rule and binman definition for this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
7ec0e7b635
commit
c2018cdd71
3 changed files with 25 additions and 0 deletions
6
Makefile
6
Makefile
|
@ -926,6 +926,9 @@ ALL-$(CONFIG_EFI_STUB) += u-boot-payload.efi
|
|||
ifneq ($(BUILD_ROM)$(CONFIG_BUILD_ROM),)
|
||||
ALL-$(CONFIG_X86_RESET_VECTOR) += u-boot.rom
|
||||
endif
|
||||
ifeq ($(CONFIG_SYS_COREBOOT)$(CONFIG_SPL),yy)
|
||||
ALL-$(CONFIG_BINMAN) += u-boot-x86-with-spl.bin
|
||||
endif
|
||||
|
||||
# Build a combined spl + u-boot image for sunxi
|
||||
ifeq ($(CONFIG_ARCH_SUNXI)$(CONFIG_SPL),yy)
|
||||
|
@ -1626,6 +1629,9 @@ u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.itb FORCE
|
|||
endif
|
||||
endif
|
||||
|
||||
u-boot-x86-with-spl.bin: spl/u-boot-spl.bin u-boot.bin FORCE
|
||||
$(call if_changed,binman)
|
||||
|
||||
ifneq ($(CONFIG_TEGRA),)
|
||||
ifneq ($(CONFIG_BINMAN),)
|
||||
# Makes u-boot-dtb-tegra.bin u-boot-tegra.bin u-boot-nodtb-tegra.bin
|
||||
|
|
|
@ -25,5 +25,6 @@ config SYS_COREBOOT
|
|||
imply FS_CBFS
|
||||
imply CBMEM_CONSOLE
|
||||
imply X86_TSC_READ_BASE
|
||||
select BINMAN if X86_64
|
||||
|
||||
endif
|
||||
|
|
18
arch/x86/dts/coreboot-u-boot.dtsi
Normal file
18
arch/x86/dts/coreboot-u-boot.dtsi
Normal file
|
@ -0,0 +1,18 @@
|
|||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright 2020 Google LLC
|
||||
* Written by Simon Glass <sjg@chromium.org>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/ {
|
||||
binman {
|
||||
filename = "u-boot-x86-with-spl.bin";
|
||||
u-boot-spl {
|
||||
};
|
||||
u-boot {
|
||||
offset = <0x10000>;
|
||||
};
|
||||
};
|
||||
};
|
Loading…
Reference in a new issue