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 | |
Kever Yang | e6693c3 | 2022-12-18 20:43:38 +0800 | [diff] [blame] | 14 | #ifdef CONFIG_TPL |
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 | }; |
| 53 | }; |
| 54 | |
| 55 | @atf-SEQ { |
| 56 | fit,operation = "split-elf"; |
| 57 | description = "ARM Trusted Firmware"; |
| 58 | type = "firmware"; |
| 59 | arch = "arm64"; |
| 60 | os = "arm-trusted-firmware"; |
| 61 | compression = "none"; |
| 62 | fit,load; |
| 63 | fit,entry; |
| 64 | fit,data; |
| 65 | |
| 66 | atf-bl31 { |
| 67 | }; |
| 68 | }; |
| 69 | @tee-SEQ { |
| 70 | fit,operation = "split-elf"; |
| 71 | description = "TEE"; |
| 72 | type = "tee"; |
| 73 | arch = "arm64"; |
| 74 | os = "tee"; |
| 75 | compression = "none"; |
| 76 | fit,load; |
| 77 | fit,entry; |
| 78 | fit,data; |
| 79 | |
| 80 | tee-os { |
| 81 | optional; |
| 82 | }; |
| 83 | }; |
| 84 | |
| 85 | @fdt-SEQ { |
| 86 | description = "fdt-NAME"; |
| 87 | compression = "none"; |
| 88 | type = "flat_dt"; |
| 89 | }; |
| 90 | }; |
| 91 | |
| 92 | configurations { |
| 93 | default = "@config-DEFAULT-SEQ"; |
| 94 | @config-SEQ { |
| 95 | description = "NAME.dtb"; |
| 96 | fdt = "fdt-SEQ"; |
| 97 | firmware = "u-boot"; |
| 98 | fit,loadables; |
| 99 | }; |
| 100 | }; |
| 101 | }; |
Quentin Schulz | d9ffa5e | 2022-09-02 15:10:52 +0200 | [diff] [blame] | 102 | #else |
Jagan Teki | b22da75 | 2020-01-10 00:16:21 +0530 | [diff] [blame] | 103 | u-boot-img { |
| 104 | offset = <CONFIG_SPL_PAD_TO>; |
| 105 | }; |
Simon Glass | 4de3617 | 2023-01-07 14:07:18 -0700 | [diff] [blame] | 106 | #endif |
Jagan Teki | b22da75 | 2020-01-10 00:16:21 +0530 | [diff] [blame] | 107 | }; |
Quentin Schulz | 9c5217d | 2022-09-02 15:10:55 +0200 | [diff] [blame] | 108 | |
| 109 | #ifdef CONFIG_ROCKCHIP_SPI_IMAGE |
| 110 | simple-bin-spi { |
| 111 | filename = "u-boot-rockchip-spi.bin"; |
| 112 | pad-byte = <0xff>; |
| 113 | |
| 114 | mkimage { |
| 115 | filename = "idbloader-spi.img"; |
| 116 | args = "-n", CONFIG_SYS_SOC, "-T", "rkspi"; |
| 117 | #ifdef CONFIG_TPL |
| 118 | multiple-data-files; |
| 119 | |
| 120 | u-boot-tpl { |
| 121 | }; |
| 122 | #endif |
| 123 | u-boot-spl { |
| 124 | }; |
| 125 | }; |
| 126 | |
| 127 | #ifdef CONFIG_ARM64 |
Simon Glass | 4de3617 | 2023-01-07 14:07:18 -0700 | [diff] [blame] | 128 | fit { |
| 129 | type = "blob"; |
Quentin Schulz | 9c5217d | 2022-09-02 15:10:55 +0200 | [diff] [blame] | 130 | filename = "u-boot.itb"; |
| 131 | #else |
| 132 | u-boot-img { |
| 133 | #endif |
| 134 | /* Sync with u-boot,spl-payload-offset if present */ |
| 135 | offset = <CONFIG_SYS_SPI_U_BOOT_OFFS>; |
| 136 | }; |
| 137 | }; |
Simon Glass | 4de3617 | 2023-01-07 14:07:18 -0700 | [diff] [blame] | 138 | #endif /* CONFIG_ROCKCHIP_SPI_IMAGE */ |
Jagan Teki | b22da75 | 2020-01-10 00:16:21 +0530 | [diff] [blame] | 139 | }; |
Simon Glass | 4de3617 | 2023-01-07 14:07:18 -0700 | [diff] [blame] | 140 | #endif /* CONFIG_SPL */ |