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 |
Yu-Chien Peter Lin | 1cf86c6 | 2025-01-11 09:55:27 +0800 | [diff] [blame] | 56 | #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 Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 69 | |
| 70 | opensbi { |
| 71 | description = "OpenSBI fw_dynamic Firmware"; |
| 72 | type = "firmware"; |
| 73 | os = "opensbi"; |
| 74 | arch = "riscv"; |
| 75 | compression = "none"; |
Randolph | 1a5a8fc | 2023-11-17 18:39:50 +0800 | [diff] [blame] | 76 | load = /bits/ 64 <CONFIG_SPL_OPENSBI_LOAD_ADDR>; |
| 77 | entry = /bits/ 64 <CONFIG_SPL_OPENSBI_LOAD_ADDR>; |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 78 | |
| 79 | opensbi_blob: opensbi { |
| 80 | filename = "fw_dynamic.bin"; |
Rick Chen | ddcdd94 | 2023-02-17 16:57:01 +0800 | [diff] [blame] | 81 | missing-msg = "opensbi"; |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 82 | }; |
| 83 | }; |
| 84 | |
Heinrich Schuchardt | 48a4810 | 2025-02-21 10:58:53 +0100 | [diff] [blame^] | 85 | #if !defined(CONFIG_OF_BOARD) || defined(CONFIG_MULTI_DTB_FIT) |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 86 | @fdt-SEQ { |
Heinrich Schuchardt | 48a4810 | 2025-02-21 10:58:53 +0100 | [diff] [blame^] | 87 | fit,operation = "gen-fdt-nodes"; |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 88 | description = "NAME"; |
| 89 | type = "flat_dt"; |
| 90 | compression = "none"; |
| 91 | }; |
Bin Meng | 1255ab8 | 2021-05-10 20:23:39 +0800 | [diff] [blame] | 92 | #endif |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 93 | }; |
| 94 | |
| 95 | configurations { |
| 96 | default = "conf-1"; |
| 97 | |
Heinrich Schuchardt | 48a4810 | 2025-02-21 10:58:53 +0100 | [diff] [blame^] | 98 | #if !defined(CONFIG_OF_BOARD) || defined(CONFIG_MULTI_DTB_FIT) |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 99 | @conf-SEQ { |
Bin Meng | 1255ab8 | 2021-05-10 20:23:39 +0800 | [diff] [blame] | 100 | #else |
| 101 | conf-1 { |
| 102 | #endif |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 103 | description = "NAME"; |
| 104 | firmware = "opensbi"; |
Yu-Chien Peter Lin | 1cf86c6 | 2025-01-11 09:55:27 +0800 | [diff] [blame] | 105 | #ifdef CONFIG_OPTEE |
| 106 | #ifdef CONFIG_SPL_LOAD_FIT_OPENSBI_OS_BOOT |
| 107 | loadables = "linux", "tee"; |
Randolph | 9d17cdb | 2023-10-12 14:35:05 +0800 | [diff] [blame] | 108 | #else |
Yu-Chien Peter Lin | 1cf86c6 | 2025-01-11 09:55:27 +0800 | [diff] [blame] | 109 | loadables = "uboot", "tee"; |
| 110 | #endif |
| 111 | #else /* !CONFIG_OPTEEE */ |
| 112 | #ifdef CONFIG_SPL_LOAD_FIT_OPENSBI_OS_BOOT |
Randolph | 9d17cdb | 2023-10-12 14:35:05 +0800 | [diff] [blame] | 113 | loadables = "linux"; |
Yu-Chien Peter Lin | 1cf86c6 | 2025-01-11 09:55:27 +0800 | [diff] [blame] | 114 | #else |
| 115 | loadables = "uboot"; |
Randolph | 9d17cdb | 2023-10-12 14:35:05 +0800 | [diff] [blame] | 116 | #endif |
Yu-Chien Peter Lin | 1cf86c6 | 2025-01-11 09:55:27 +0800 | [diff] [blame] | 117 | #endif /* CONFIG_OPTEE */ |
| 118 | |
Heinrich Schuchardt | 48a4810 | 2025-02-21 10:58:53 +0100 | [diff] [blame^] | 119 | #if !defined(CONFIG_OF_BOARD) || defined(CONFIG_MULTI_DTB_FIT) |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 120 | fdt = "fdt-SEQ"; |
Bin Meng | 1255ab8 | 2021-05-10 20:23:39 +0800 | [diff] [blame] | 121 | #endif |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 122 | }; |
| 123 | }; |
| 124 | }; |
| 125 | }; |
| 126 | }; |