blob: b448b2a712b1fd9107412a3ad54fbb021f16591b [file] [log] [blame]
Bin Mengced20972021-05-10 20:23:35 +08001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) 2021, Bin Meng <bmeng.cn@gmail.com>
4 */
5
6#include <config.h>
7
Mayuresh Chitale5a3b0182023-10-11 21:00:20 +05308#define U64_TO_U32_H(addr) (((addr) >> 32) & 0xffffffff)
9#define U64_TO_U32_L(addr) ((addr) & 0xffffffff)
10
Bin Mengced20972021-05-10 20:23:35 +080011/ {
12 binman: binman {
13 multiple-images;
14 };
15};
16
17&binman {
18 itb {
19 filename = "u-boot.itb";
20
21 fit {
22 description = "Configuration to load OpenSBI before U-Boot";
Mayuresh Chitale5a3b0182023-10-11 21:00:20 +053023 #address-cells = <2>;
Bin Mengced20972021-05-10 20:23:35 +080024 fit,fdt-list = "of-list";
25
26 images {
27 uboot {
28 description = "U-Boot";
29 type = "standalone";
30 os = "U-Boot";
31 arch = "riscv";
32 compression = "none";
Mayuresh Chitale5a3b0182023-10-11 21:00:20 +053033 load = <U64_TO_U32_H(CONFIG_TEXT_BASE)
34 U64_TO_U32_L(CONFIG_TEXT_BASE)>;
Bin Mengced20972021-05-10 20:23:35 +080035
36 uboot_blob: blob-ext {
37 filename = "u-boot-nodtb.bin";
38 };
39 };
40
41 opensbi {
42 description = "OpenSBI fw_dynamic Firmware";
43 type = "firmware";
44 os = "opensbi";
45 arch = "riscv";
46 compression = "none";
Mayuresh Chitale5a3b0182023-10-11 21:00:20 +053047 load = <U64_TO_U32_H(CONFIG_SPL_OPENSBI_LOAD_ADDR)
48 U64_TO_U32_L(CONFIG_SPL_OPENSBI_LOAD_ADDR)>;
49 entry = <U64_TO_U32_H(CONFIG_SPL_OPENSBI_LOAD_ADDR)
50 U64_TO_U32_L(CONFIG_SPL_OPENSBI_LOAD_ADDR)>;
Bin Mengced20972021-05-10 20:23:35 +080051
52 opensbi_blob: opensbi {
53 filename = "fw_dynamic.bin";
Rick Chenddcdd942023-02-17 16:57:01 +080054 missing-msg = "opensbi";
Bin Mengced20972021-05-10 20:23:35 +080055 };
56 };
57
Ilias Apalodimasdc35df42021-10-12 00:00:13 +030058#ifndef CONFIG_OF_BOARD
Bin Mengced20972021-05-10 20:23:35 +080059 @fdt-SEQ {
60 description = "NAME";
61 type = "flat_dt";
62 compression = "none";
63 };
Bin Meng1255ab82021-05-10 20:23:39 +080064#endif
Bin Mengced20972021-05-10 20:23:35 +080065 };
66
67 configurations {
68 default = "conf-1";
69
Ilias Apalodimasdc35df42021-10-12 00:00:13 +030070#ifndef CONFIG_OF_BOARD
Bin Mengced20972021-05-10 20:23:35 +080071 @conf-SEQ {
Bin Meng1255ab82021-05-10 20:23:39 +080072#else
73 conf-1 {
74#endif
Bin Mengced20972021-05-10 20:23:35 +080075 description = "NAME";
76 firmware = "opensbi";
77 loadables = "uboot";
Ilias Apalodimasdc35df42021-10-12 00:00:13 +030078#ifndef CONFIG_OF_BOARD
Bin Mengced20972021-05-10 20:23:35 +080079 fdt = "fdt-SEQ";
Bin Meng1255ab82021-05-10 20:23:39 +080080#endif
Bin Mengced20972021-05-10 20:23:35 +080081 };
82 };
83 };
84 };
85};