Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 1 | // 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 { | ||||
Randolph | 9d17cdb | 2023-10-12 14:35:05 +0800 | [diff] [blame] | 16 | |
17 | #ifndef CONFIG_SPL_LOAD_FIT_OPENSBI_OS_BOOT | ||||
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 18 | filename = "u-boot.itb"; |
Randolph | 9d17cdb | 2023-10-12 14:35:05 +0800 | [diff] [blame] | 19 | #else |
20 | filename = "linux.itb"; | ||||
21 | #endif | ||||
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 22 | |
23 | fit { | ||||
24 | description = "Configuration to load OpenSBI before U-Boot"; | ||||
Mayuresh Chitale | 5a3b018 | 2023-10-11 21:00:20 +0530 | [diff] [blame] | 25 | #address-cells = <2>; |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 26 | fit,fdt-list = "of-list"; |
27 | |||||
28 | images { | ||||
Randolph | 9d17cdb | 2023-10-12 14:35:05 +0800 | [diff] [blame] | 29 | #ifndef CONFIG_SPL_LOAD_FIT_OPENSBI_OS_BOOT |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 30 | uboot { |
31 | description = "U-Boot"; | ||||
32 | type = "standalone"; | ||||
33 | os = "U-Boot"; | ||||
34 | arch = "riscv"; | ||||
35 | compression = "none"; | ||||
Randolph | 1a5a8fc | 2023-11-17 18:39:50 +0800 | [diff] [blame] | 36 | load = /bits/ 64 <CONFIG_TEXT_BASE>; |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 37 | |
38 | uboot_blob: blob-ext { | ||||
39 | filename = "u-boot-nodtb.bin"; | ||||
40 | }; | ||||
41 | }; | ||||
Randolph | 9d17cdb | 2023-10-12 14:35:05 +0800 | [diff] [blame] | 42 | #else |
43 | linux { | ||||
44 | description = "Linux"; | ||||
45 | type = "standalone"; | ||||
46 | os = "Linux"; | ||||
47 | arch = "riscv"; | ||||
48 | compression = "none"; | ||||
Randolph | 1a5a8fc | 2023-11-17 18:39:50 +0800 | [diff] [blame] | 49 | load = /bits/ 64 <CONFIG_TEXT_BASE>; |
Randolph | 9d17cdb | 2023-10-12 14:35:05 +0800 | [diff] [blame] | 50 | |
51 | linux_blob: blob-ext { | ||||
52 | filename = "Image"; | ||||
53 | }; | ||||
54 | }; | ||||
55 | #endif | ||||
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 56 | |
57 | opensbi { | ||||
58 | description = "OpenSBI fw_dynamic Firmware"; | ||||
59 | type = "firmware"; | ||||
60 | os = "opensbi"; | ||||
61 | arch = "riscv"; | ||||
62 | compression = "none"; | ||||
Randolph | 1a5a8fc | 2023-11-17 18:39:50 +0800 | [diff] [blame] | 63 | load = /bits/ 64 <CONFIG_SPL_OPENSBI_LOAD_ADDR>; |
64 | entry = /bits/ 64 <CONFIG_SPL_OPENSBI_LOAD_ADDR>; | ||||
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 65 | |
66 | opensbi_blob: opensbi { | ||||
67 | filename = "fw_dynamic.bin"; | ||||
Rick Chen | ddcdd94 | 2023-02-17 16:57:01 +0800 | [diff] [blame] | 68 | missing-msg = "opensbi"; |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 69 | }; |
70 | }; | ||||
71 | |||||
Ilias Apalodimas | dc35df4 | 2021-10-12 00:00:13 +0300 | [diff] [blame] | 72 | #ifndef CONFIG_OF_BOARD |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 73 | @fdt-SEQ { |
74 | description = "NAME"; | ||||
75 | type = "flat_dt"; | ||||
76 | compression = "none"; | ||||
77 | }; | ||||
Bin Meng | 1255ab8 | 2021-05-10 20:23:39 +0800 | [diff] [blame] | 78 | #endif |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 79 | }; |
80 | |||||
81 | configurations { | ||||
82 | default = "conf-1"; | ||||
83 | |||||
Ilias Apalodimas | dc35df4 | 2021-10-12 00:00:13 +0300 | [diff] [blame] | 84 | #ifndef CONFIG_OF_BOARD |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 85 | @conf-SEQ { |
Bin Meng | 1255ab8 | 2021-05-10 20:23:39 +0800 | [diff] [blame] | 86 | #else |
87 | conf-1 { | ||||
88 | #endif | ||||
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 89 | description = "NAME"; |
90 | firmware = "opensbi"; | ||||
Randolph | 9d17cdb | 2023-10-12 14:35:05 +0800 | [diff] [blame] | 91 | #ifndef CONFIG_SPL_LOAD_FIT_OPENSBI_OS_BOOT |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 92 | loadables = "uboot"; |
Randolph | 9d17cdb | 2023-10-12 14:35:05 +0800 | [diff] [blame] | 93 | #else |
94 | loadables = "linux"; | ||||
95 | #endif | ||||
Ilias Apalodimas | dc35df4 | 2021-10-12 00:00:13 +0300 | [diff] [blame] | 96 | #ifndef CONFIG_OF_BOARD |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 97 | fdt = "fdt-SEQ"; |
Bin Meng | 1255ab8 | 2021-05-10 20:23:39 +0800 | [diff] [blame] | 98 | #endif |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 99 | }; |
100 | }; | ||||
101 | }; | ||||
102 | }; | ||||
103 | }; |