blob: 9271de0ddfcc2e30c60c8e203a302828330c64cf [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
8/ {
9 binman: binman {
10 multiple-images;
11 };
12};
13
14&binman {
15 itb {
Randolph9d17cdb2023-10-12 14:35:05 +080016
17#ifndef CONFIG_SPL_LOAD_FIT_OPENSBI_OS_BOOT
Bin Mengced20972021-05-10 20:23:35 +080018 filename = "u-boot.itb";
Randolph9d17cdb2023-10-12 14:35:05 +080019#else
20 filename = "linux.itb";
21#endif
Bin Mengced20972021-05-10 20:23:35 +080022
23 fit {
24 description = "Configuration to load OpenSBI before U-Boot";
Mayuresh Chitale5a3b0182023-10-11 21:00:20 +053025 #address-cells = <2>;
Bin Mengced20972021-05-10 20:23:35 +080026 fit,fdt-list = "of-list";
27
28 images {
Randolph9d17cdb2023-10-12 14:35:05 +080029#ifndef CONFIG_SPL_LOAD_FIT_OPENSBI_OS_BOOT
Bin Mengced20972021-05-10 20:23:35 +080030 uboot {
31 description = "U-Boot";
32 type = "standalone";
33 os = "U-Boot";
34 arch = "riscv";
35 compression = "none";
Randolph1a5a8fc2023-11-17 18:39:50 +080036 load = /bits/ 64 <CONFIG_TEXT_BASE>;
Bin Mengced20972021-05-10 20:23:35 +080037
38 uboot_blob: blob-ext {
39 filename = "u-boot-nodtb.bin";
40 };
41 };
Randolph9d17cdb2023-10-12 14:35:05 +080042#else
43 linux {
44 description = "Linux";
45 type = "standalone";
46 os = "Linux";
47 arch = "riscv";
48 compression = "none";
Randolph1a5a8fc2023-11-17 18:39:50 +080049 load = /bits/ 64 <CONFIG_TEXT_BASE>;
Randolph9d17cdb2023-10-12 14:35:05 +080050
51 linux_blob: blob-ext {
52 filename = "Image";
53 };
54 };
55#endif
Bin Mengced20972021-05-10 20:23:35 +080056
57 opensbi {
58 description = "OpenSBI fw_dynamic Firmware";
59 type = "firmware";
60 os = "opensbi";
61 arch = "riscv";
62 compression = "none";
Randolph1a5a8fc2023-11-17 18:39:50 +080063 load = /bits/ 64 <CONFIG_SPL_OPENSBI_LOAD_ADDR>;
64 entry = /bits/ 64 <CONFIG_SPL_OPENSBI_LOAD_ADDR>;
Bin Mengced20972021-05-10 20:23:35 +080065
66 opensbi_blob: opensbi {
67 filename = "fw_dynamic.bin";
Rick Chenddcdd942023-02-17 16:57:01 +080068 missing-msg = "opensbi";
Bin Mengced20972021-05-10 20:23:35 +080069 };
70 };
71
Ilias Apalodimasdc35df42021-10-12 00:00:13 +030072#ifndef CONFIG_OF_BOARD
Bin Mengced20972021-05-10 20:23:35 +080073 @fdt-SEQ {
74 description = "NAME";
75 type = "flat_dt";
76 compression = "none";
77 };
Bin Meng1255ab82021-05-10 20:23:39 +080078#endif
Bin Mengced20972021-05-10 20:23:35 +080079 };
80
81 configurations {
82 default = "conf-1";
83
Ilias Apalodimasdc35df42021-10-12 00:00:13 +030084#ifndef CONFIG_OF_BOARD
Bin Mengced20972021-05-10 20:23:35 +080085 @conf-SEQ {
Bin Meng1255ab82021-05-10 20:23:39 +080086#else
87 conf-1 {
88#endif
Bin Mengced20972021-05-10 20:23:35 +080089 description = "NAME";
90 firmware = "opensbi";
Randolph9d17cdb2023-10-12 14:35:05 +080091#ifndef CONFIG_SPL_LOAD_FIT_OPENSBI_OS_BOOT
Bin Mengced20972021-05-10 20:23:35 +080092 loadables = "uboot";
Randolph9d17cdb2023-10-12 14:35:05 +080093#else
94 loadables = "linux";
95#endif
Ilias Apalodimasdc35df42021-10-12 00:00:13 +030096#ifndef CONFIG_OF_BOARD
Bin Mengced20972021-05-10 20:23:35 +080097 fdt = "fdt-SEQ";
Bin Meng1255ab82021-05-10 20:23:39 +080098#endif
Bin Mengced20972021-05-10 20:23:35 +080099 };
100 };
101 };
102 };
103};