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 | |
Mayuresh Chitale | 5a3b018 | 2023-10-11 21:00:20 +0530 | [diff] [blame^] | 8 | #define U64_TO_U32_H(addr) (((addr) >> 32) & 0xffffffff) |
| 9 | #define U64_TO_U32_L(addr) ((addr) & 0xffffffff) |
| 10 | |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 11 | / { |
| 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 Chitale | 5a3b018 | 2023-10-11 21:00:20 +0530 | [diff] [blame^] | 23 | #address-cells = <2>; |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 24 | 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 Chitale | 5a3b018 | 2023-10-11 21:00:20 +0530 | [diff] [blame^] | 33 | load = <U64_TO_U32_H(CONFIG_TEXT_BASE) |
| 34 | U64_TO_U32_L(CONFIG_TEXT_BASE)>; |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 35 | |
| 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 Chitale | 5a3b018 | 2023-10-11 21:00:20 +0530 | [diff] [blame^] | 47 | 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 Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 51 | |
| 52 | opensbi_blob: opensbi { |
| 53 | filename = "fw_dynamic.bin"; |
Rick Chen | ddcdd94 | 2023-02-17 16:57:01 +0800 | [diff] [blame] | 54 | missing-msg = "opensbi"; |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 55 | }; |
| 56 | }; |
| 57 | |
Ilias Apalodimas | dc35df4 | 2021-10-12 00:00:13 +0300 | [diff] [blame] | 58 | #ifndef CONFIG_OF_BOARD |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 59 | @fdt-SEQ { |
| 60 | description = "NAME"; |
| 61 | type = "flat_dt"; |
| 62 | compression = "none"; |
| 63 | }; |
Bin Meng | 1255ab8 | 2021-05-10 20:23:39 +0800 | [diff] [blame] | 64 | #endif |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 65 | }; |
| 66 | |
| 67 | configurations { |
| 68 | default = "conf-1"; |
| 69 | |
Ilias Apalodimas | dc35df4 | 2021-10-12 00:00:13 +0300 | [diff] [blame] | 70 | #ifndef CONFIG_OF_BOARD |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 71 | @conf-SEQ { |
Bin Meng | 1255ab8 | 2021-05-10 20:23:39 +0800 | [diff] [blame] | 72 | #else |
| 73 | conf-1 { |
| 74 | #endif |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 75 | description = "NAME"; |
| 76 | firmware = "opensbi"; |
| 77 | loadables = "uboot"; |
Ilias Apalodimas | dc35df4 | 2021-10-12 00:00:13 +0300 | [diff] [blame] | 78 | #ifndef CONFIG_OF_BOARD |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 79 | fdt = "fdt-SEQ"; |
Bin Meng | 1255ab8 | 2021-05-10 20:23:39 +0800 | [diff] [blame] | 80 | #endif |
Bin Meng | ced2097 | 2021-05-10 20:23:35 +0800 | [diff] [blame] | 81 | }; |
| 82 | }; |
| 83 | }; |
| 84 | }; |
| 85 | }; |