Jagan Teki | b22da75 | 2020-01-10 00:16:21 +0530 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* |
| 3 | * Copyright (C) 2019 Jagan Teki <jagan@amarulasolutions.com> |
| 4 | */ |
| 5 | |
| 6 | #include <config.h> |
| 7 | |
| 8 | / { |
Simon Glass | 88315f7 | 2020-07-19 13:55:57 -0600 | [diff] [blame] | 9 | binman: binman { |
| 10 | multiple-images; |
| 11 | }; |
| 12 | }; |
| 13 | |
Jagan Teki | ffce0ff | 2023-01-27 12:51:33 +0530 | [diff] [blame] | 14 | #ifdef CONFIG_SPL |
Simon Glass | 88315f7 | 2020-07-19 13:55:57 -0600 | [diff] [blame] | 15 | &binman { |
| 16 | simple-bin { |
Jagan Teki | b22da75 | 2020-01-10 00:16:21 +0530 | [diff] [blame] | 17 | filename = "u-boot-rockchip.bin"; |
| 18 | pad-byte = <0xff>; |
| 19 | |
Quentin Schulz | 8c9b9fe | 2022-09-02 15:10:51 +0200 | [diff] [blame] | 20 | mkimage { |
Jagan Teki | b22da75 | 2020-01-10 00:16:21 +0530 | [diff] [blame] | 21 | filename = "idbloader.img"; |
Quentin Schulz | 8c9b9fe | 2022-09-02 15:10:51 +0200 | [diff] [blame] | 22 | args = "-n", CONFIG_SYS_SOC, "-T", "rksd"; |
Quentin Schulz | 8c9b9fe | 2022-09-02 15:10:51 +0200 | [diff] [blame] | 23 | multiple-data-files; |
| 24 | |
Jonas Karlman | 38ad6c9 | 2023-02-25 19:01:34 +0000 | [diff] [blame] | 25 | #ifdef CONFIG_ROCKCHIP_EXTERNAL_TPL |
| 26 | rockchip-tpl { |
| 27 | }; |
| 28 | #elif defined(CONFIG_TPL) |
Quentin Schulz | 8c9b9fe | 2022-09-02 15:10:51 +0200 | [diff] [blame] | 29 | u-boot-tpl { |
| 30 | }; |
| 31 | #endif |
| 32 | u-boot-spl { |
| 33 | }; |
Jagan Teki | b22da75 | 2020-01-10 00:16:21 +0530 | [diff] [blame] | 34 | }; |
| 35 | |
Simon Glass | 4de3617 | 2023-01-07 14:07:18 -0700 | [diff] [blame] | 36 | #if defined(CONFIG_SPL_FIT) && defined(CONFIG_ARM64) |
| 37 | fit: fit { |
| 38 | description = "FIT image for U-Boot with bl31 (TF-A)"; |
| 39 | #address-cells = <1>; |
| 40 | fit,fdt-list = "of-list"; |
Quentin Schulz | d9ffa5e | 2022-09-02 15:10:52 +0200 | [diff] [blame] | 41 | filename = "u-boot.itb"; |
Simon Glass | 4de3617 | 2023-01-07 14:07:18 -0700 | [diff] [blame] | 42 | fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>; |
Jonas Karlman | 42d201a | 2023-01-21 19:01:39 +0000 | [diff] [blame] | 43 | fit,align = <512>; |
Simon Glass | 4de3617 | 2023-01-07 14:07:18 -0700 | [diff] [blame] | 44 | offset = <CONFIG_SPL_PAD_TO>; |
| 45 | images { |
| 46 | u-boot { |
| 47 | description = "U-Boot (64-bit)"; |
| 48 | type = "standalone"; |
| 49 | os = "U-Boot"; |
| 50 | arch = "arm64"; |
| 51 | compression = "none"; |
| 52 | load = <CONFIG_TEXT_BASE>; |
| 53 | entry = <CONFIG_TEXT_BASE>; |
| 54 | u-boot-nodtb { |
| 55 | }; |
Jonas Karlman | d20ecb8 | 2023-01-21 19:01:59 +0000 | [diff] [blame] | 56 | #ifdef CONFIG_SPL_FIT_SIGNATURE |
| 57 | hash { |
| 58 | algo = "sha256"; |
| 59 | }; |
| 60 | #endif |
Simon Glass | 4de3617 | 2023-01-07 14:07:18 -0700 | [diff] [blame] | 61 | }; |
| 62 | |
| 63 | @atf-SEQ { |
| 64 | fit,operation = "split-elf"; |
| 65 | description = "ARM Trusted Firmware"; |
| 66 | type = "firmware"; |
| 67 | arch = "arm64"; |
| 68 | os = "arm-trusted-firmware"; |
| 69 | compression = "none"; |
| 70 | fit,load; |
| 71 | fit,entry; |
| 72 | fit,data; |
| 73 | |
| 74 | atf-bl31 { |
| 75 | }; |
Jonas Karlman | d20ecb8 | 2023-01-21 19:01:59 +0000 | [diff] [blame] | 76 | #ifdef CONFIG_SPL_FIT_SIGNATURE |
| 77 | hash { |
| 78 | algo = "sha256"; |
| 79 | }; |
| 80 | #endif |
Simon Glass | 4de3617 | 2023-01-07 14:07:18 -0700 | [diff] [blame] | 81 | }; |
| 82 | @tee-SEQ { |
| 83 | fit,operation = "split-elf"; |
| 84 | description = "TEE"; |
| 85 | type = "tee"; |
| 86 | arch = "arm64"; |
| 87 | os = "tee"; |
| 88 | compression = "none"; |
| 89 | fit,load; |
| 90 | fit,entry; |
| 91 | fit,data; |
| 92 | |
| 93 | tee-os { |
| 94 | optional; |
| 95 | }; |
Jonas Karlman | d20ecb8 | 2023-01-21 19:01:59 +0000 | [diff] [blame] | 96 | #ifdef CONFIG_SPL_FIT_SIGNATURE |
| 97 | hash { |
| 98 | algo = "sha256"; |
| 99 | }; |
| 100 | #endif |
Simon Glass | 4de3617 | 2023-01-07 14:07:18 -0700 | [diff] [blame] | 101 | }; |
| 102 | |
| 103 | @fdt-SEQ { |
| 104 | description = "fdt-NAME"; |
| 105 | compression = "none"; |
| 106 | type = "flat_dt"; |
Jonas Karlman | d20ecb8 | 2023-01-21 19:01:59 +0000 | [diff] [blame] | 107 | #ifdef CONFIG_SPL_FIT_SIGNATURE |
| 108 | hash { |
| 109 | algo = "sha256"; |
| 110 | }; |
| 111 | #endif |
Simon Glass | 4de3617 | 2023-01-07 14:07:18 -0700 | [diff] [blame] | 112 | }; |
| 113 | }; |
| 114 | |
| 115 | configurations { |
| 116 | default = "@config-DEFAULT-SEQ"; |
| 117 | @config-SEQ { |
| 118 | description = "NAME.dtb"; |
| 119 | fdt = "fdt-SEQ"; |
Jonas Karlman | 60ee192 | 2023-01-21 19:02:26 +0000 | [diff] [blame] | 120 | fit,firmware = "atf-1", "u-boot"; |
Simon Glass | 4de3617 | 2023-01-07 14:07:18 -0700 | [diff] [blame] | 121 | fit,loadables; |
| 122 | }; |
| 123 | }; |
| 124 | }; |
Quentin Schulz | d9ffa5e | 2022-09-02 15:10:52 +0200 | [diff] [blame] | 125 | #else |
Jagan Teki | b22da75 | 2020-01-10 00:16:21 +0530 | [diff] [blame] | 126 | u-boot-img { |
| 127 | offset = <CONFIG_SPL_PAD_TO>; |
| 128 | }; |
Simon Glass | 4de3617 | 2023-01-07 14:07:18 -0700 | [diff] [blame] | 129 | #endif |
Jagan Teki | b22da75 | 2020-01-10 00:16:21 +0530 | [diff] [blame] | 130 | }; |
Quentin Schulz | 9c5217d | 2022-09-02 15:10:55 +0200 | [diff] [blame] | 131 | |
| 132 | #ifdef CONFIG_ROCKCHIP_SPI_IMAGE |
| 133 | simple-bin-spi { |
| 134 | filename = "u-boot-rockchip-spi.bin"; |
| 135 | pad-byte = <0xff>; |
| 136 | |
| 137 | mkimage { |
| 138 | filename = "idbloader-spi.img"; |
| 139 | args = "-n", CONFIG_SYS_SOC, "-T", "rkspi"; |
Quentin Schulz | 9c5217d | 2022-09-02 15:10:55 +0200 | [diff] [blame] | 140 | multiple-data-files; |
| 141 | |
Jonas Karlman | 38ad6c9 | 2023-02-25 19:01:34 +0000 | [diff] [blame] | 142 | #ifdef CONFIG_ROCKCHIP_EXTERNAL_TPL |
| 143 | rockchip-tpl { |
| 144 | }; |
| 145 | #elif defined(CONFIG_TPL) |
Quentin Schulz | 9c5217d | 2022-09-02 15:10:55 +0200 | [diff] [blame] | 146 | u-boot-tpl { |
| 147 | }; |
| 148 | #endif |
| 149 | u-boot-spl { |
| 150 | }; |
| 151 | }; |
| 152 | |
| 153 | #ifdef CONFIG_ARM64 |
Simon Glass | 4de3617 | 2023-01-07 14:07:18 -0700 | [diff] [blame] | 154 | fit { |
| 155 | type = "blob"; |
Quentin Schulz | 9c5217d | 2022-09-02 15:10:55 +0200 | [diff] [blame] | 156 | filename = "u-boot.itb"; |
| 157 | #else |
| 158 | u-boot-img { |
| 159 | #endif |
| 160 | /* Sync with u-boot,spl-payload-offset if present */ |
| 161 | offset = <CONFIG_SYS_SPI_U_BOOT_OFFS>; |
| 162 | }; |
| 163 | }; |
Simon Glass | 4de3617 | 2023-01-07 14:07:18 -0700 | [diff] [blame] | 164 | #endif /* CONFIG_ROCKCHIP_SPI_IMAGE */ |
Jagan Teki | b22da75 | 2020-01-10 00:16:21 +0530 | [diff] [blame] | 165 | }; |
Simon Glass | 4de3617 | 2023-01-07 14:07:18 -0700 | [diff] [blame] | 166 | #endif /* CONFIG_SPL */ |