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