blob: 0405faca5741cc55fb37fac67bc4f118cfc0d0c4 [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
Yu-Chien Peter Lin1cf86c62025-01-11 09:55:27 +080056#ifdef CONFIG_OPTEE
57 tee {
58 description = "OP-TEE";
59 type = "tee";
60 arch = "riscv";
61 compression = "none";
62 os = "tee";
63 load = /bits/ 64 <CONFIG_SPL_OPTEE_LOAD_ADDR>;
64 tee_blob: tee-os {
65 filename = "tee.bin";
66 };
67 };
68#endif
Bin Mengced20972021-05-10 20:23:35 +080069
70 opensbi {
71 description = "OpenSBI fw_dynamic Firmware";
72 type = "firmware";
73 os = "opensbi";
74 arch = "riscv";
75 compression = "none";
Randolph1a5a8fc2023-11-17 18:39:50 +080076 load = /bits/ 64 <CONFIG_SPL_OPENSBI_LOAD_ADDR>;
77 entry = /bits/ 64 <CONFIG_SPL_OPENSBI_LOAD_ADDR>;
Bin Mengced20972021-05-10 20:23:35 +080078
79 opensbi_blob: opensbi {
80 filename = "fw_dynamic.bin";
Rick Chenddcdd942023-02-17 16:57:01 +080081 missing-msg = "opensbi";
Bin Mengced20972021-05-10 20:23:35 +080082 };
83 };
84
Ilias Apalodimasdc35df42021-10-12 00:00:13 +030085#ifndef CONFIG_OF_BOARD
Bin Mengced20972021-05-10 20:23:35 +080086 @fdt-SEQ {
87 description = "NAME";
88 type = "flat_dt";
89 compression = "none";
90 };
Bin Meng1255ab82021-05-10 20:23:39 +080091#endif
Bin Mengced20972021-05-10 20:23:35 +080092 };
93
94 configurations {
95 default = "conf-1";
96
Ilias Apalodimasdc35df42021-10-12 00:00:13 +030097#ifndef CONFIG_OF_BOARD
Bin Mengced20972021-05-10 20:23:35 +080098 @conf-SEQ {
Bin Meng1255ab82021-05-10 20:23:39 +080099#else
100 conf-1 {
101#endif
Bin Mengced20972021-05-10 20:23:35 +0800102 description = "NAME";
103 firmware = "opensbi";
Yu-Chien Peter Lin1cf86c62025-01-11 09:55:27 +0800104#ifdef CONFIG_OPTEE
105#ifdef CONFIG_SPL_LOAD_FIT_OPENSBI_OS_BOOT
106 loadables = "linux", "tee";
Randolph9d17cdb2023-10-12 14:35:05 +0800107#else
Yu-Chien Peter Lin1cf86c62025-01-11 09:55:27 +0800108 loadables = "uboot", "tee";
109#endif
110#else /* !CONFIG_OPTEEE */
111#ifdef CONFIG_SPL_LOAD_FIT_OPENSBI_OS_BOOT
Randolph9d17cdb2023-10-12 14:35:05 +0800112 loadables = "linux";
Yu-Chien Peter Lin1cf86c62025-01-11 09:55:27 +0800113#else
114 loadables = "uboot";
Randolph9d17cdb2023-10-12 14:35:05 +0800115#endif
Yu-Chien Peter Lin1cf86c62025-01-11 09:55:27 +0800116#endif /* CONFIG_OPTEE */
117
Ilias Apalodimasdc35df42021-10-12 00:00:13 +0300118#ifndef CONFIG_OF_BOARD
Bin Mengced20972021-05-10 20:23:35 +0800119 fdt = "fdt-SEQ";
Bin Meng1255ab82021-05-10 20:23:39 +0800120#endif
Bin Mengced20972021-05-10 20:23:35 +0800121 };
122 };
123 };
124 };
125};