mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-23 11:33:32 +00:00
d311df8b31
Add condition for OpenSBI OS boot mode, by default it is not enabled. By default, binman creates the output file u-boot.itb. If SPL_OPENSBI_OS_BOOT is enabled, linux.itb will be created after compilation instead of the default u-boot.itb. Signed-off-by: Randolph <randolph@andestech.com> Reviewed-by: Simon Glass <sjg@chromium.org>
109 lines
2.1 KiB
Text
109 lines
2.1 KiB
Text
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Copyright (C) 2021, Bin Meng <bmeng.cn@gmail.com>
|
|
*/
|
|
|
|
#include <config.h>
|
|
|
|
#define U64_TO_U32_H(addr) (((addr) >> 32) & 0xffffffff)
|
|
#define U64_TO_U32_L(addr) ((addr) & 0xffffffff)
|
|
|
|
/ {
|
|
binman: binman {
|
|
multiple-images;
|
|
};
|
|
};
|
|
|
|
&binman {
|
|
itb {
|
|
|
|
#ifndef CONFIG_SPL_LOAD_FIT_OPENSBI_OS_BOOT
|
|
filename = "u-boot.itb";
|
|
#else
|
|
filename = "linux.itb";
|
|
#endif
|
|
|
|
fit {
|
|
description = "Configuration to load OpenSBI before U-Boot";
|
|
#address-cells = <2>;
|
|
fit,fdt-list = "of-list";
|
|
|
|
images {
|
|
#ifndef CONFIG_SPL_LOAD_FIT_OPENSBI_OS_BOOT
|
|
uboot {
|
|
description = "U-Boot";
|
|
type = "standalone";
|
|
os = "U-Boot";
|
|
arch = "riscv";
|
|
compression = "none";
|
|
load = <U64_TO_U32_H(CONFIG_TEXT_BASE)
|
|
U64_TO_U32_L(CONFIG_TEXT_BASE)>;
|
|
|
|
uboot_blob: blob-ext {
|
|
filename = "u-boot-nodtb.bin";
|
|
};
|
|
};
|
|
#else
|
|
linux {
|
|
description = "Linux";
|
|
type = "standalone";
|
|
os = "Linux";
|
|
arch = "riscv";
|
|
compression = "none";
|
|
load = <CONFIG_TEXT_BASE>;
|
|
|
|
linux_blob: blob-ext {
|
|
filename = "Image";
|
|
};
|
|
};
|
|
#endif
|
|
|
|
opensbi {
|
|
description = "OpenSBI fw_dynamic Firmware";
|
|
type = "firmware";
|
|
os = "opensbi";
|
|
arch = "riscv";
|
|
compression = "none";
|
|
load = <U64_TO_U32_H(CONFIG_SPL_OPENSBI_LOAD_ADDR)
|
|
U64_TO_U32_L(CONFIG_SPL_OPENSBI_LOAD_ADDR)>;
|
|
entry = <U64_TO_U32_H(CONFIG_SPL_OPENSBI_LOAD_ADDR)
|
|
U64_TO_U32_L(CONFIG_SPL_OPENSBI_LOAD_ADDR)>;
|
|
|
|
opensbi_blob: opensbi {
|
|
filename = "fw_dynamic.bin";
|
|
missing-msg = "opensbi";
|
|
};
|
|
};
|
|
|
|
#ifndef CONFIG_OF_BOARD
|
|
@fdt-SEQ {
|
|
description = "NAME";
|
|
type = "flat_dt";
|
|
compression = "none";
|
|
};
|
|
#endif
|
|
};
|
|
|
|
configurations {
|
|
default = "conf-1";
|
|
|
|
#ifndef CONFIG_OF_BOARD
|
|
@conf-SEQ {
|
|
#else
|
|
conf-1 {
|
|
#endif
|
|
description = "NAME";
|
|
firmware = "opensbi";
|
|
#ifndef CONFIG_SPL_LOAD_FIT_OPENSBI_OS_BOOT
|
|
loadables = "uboot";
|
|
#else
|
|
loadables = "linux";
|
|
#endif
|
|
#ifndef CONFIG_OF_BOARD
|
|
fdt = "fdt-SEQ";
|
|
#endif
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|