Siew Chin Lim | 9fe3a01 | 2020-12-24 18:21:11 +0800 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
2 | /* | ||||
3 | * U-Boot additions | ||||
4 | * | ||||
Jit Loon Lim | 977071e | 2024-03-12 22:01:03 +0800 | [diff] [blame] | 5 | * Copyright (C) 2020-2024 Intel Corporation <www.intel.com> |
Siew Chin Lim | 9fe3a01 | 2020-12-24 18:21:11 +0800 | [diff] [blame] | 6 | */ |
7 | |||||
8 | #if defined(CONFIG_FIT) | ||||
9 | |||||
10 | / { | ||||
11 | binman: binman { | ||||
12 | multiple-images; | ||||
13 | }; | ||||
14 | }; | ||||
15 | |||||
16 | &binman { | ||||
17 | u-boot { | ||||
18 | filename = "u-boot.itb"; | ||||
19 | fit { | ||||
20 | fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>; | ||||
21 | description = "FIT with firmware and bootloader"; | ||||
22 | #address-cells = <1>; | ||||
23 | |||||
Jit Loon Lim | 977071e | 2024-03-12 22:01:03 +0800 | [diff] [blame] | 24 | images: images { |
Siew Chin Lim | 9fe3a01 | 2020-12-24 18:21:11 +0800 | [diff] [blame] | 25 | uboot { |
26 | description = "U-Boot SoC64"; | ||||
27 | type = "standalone"; | ||||
28 | os = "U-Boot"; | ||||
29 | arch = "arm64"; | ||||
30 | compression = "none"; | ||||
Jit Loon Lim | 977071e | 2024-03-12 22:01:03 +0800 | [diff] [blame] | 31 | #if IS_ENABLED(CONFIG_TARGET_SOCFPGA_AGILEX5) |
32 | load = <0x80200000>; | ||||
33 | #else | ||||
Siew Chin Lim | 9fe3a01 | 2020-12-24 18:21:11 +0800 | [diff] [blame] | 34 | load = <0x00200000>; |
Jit Loon Lim | 977071e | 2024-03-12 22:01:03 +0800 | [diff] [blame] | 35 | #endif |
Siew Chin Lim | 9fe3a01 | 2020-12-24 18:21:11 +0800 | [diff] [blame] | 36 | uboot_blob: blob-ext { |
37 | filename = "u-boot-nodtb.bin"; | ||||
38 | }; | ||||
Siew Chin Lim | b130efa | 2021-03-24 23:56:37 +0800 | [diff] [blame] | 39 | hash { |
40 | algo = "crc32"; | ||||
41 | }; | ||||
Siew Chin Lim | 9fe3a01 | 2020-12-24 18:21:11 +0800 | [diff] [blame] | 42 | }; |
43 | |||||
44 | atf { | ||||
45 | description = "ARM Trusted Firmware"; | ||||
46 | type = "firmware"; | ||||
47 | os = "arm-trusted-firmware"; | ||||
48 | arch = "arm64"; | ||||
49 | compression = "none"; | ||||
Jit Loon Lim | 977071e | 2024-03-12 22:01:03 +0800 | [diff] [blame] | 50 | #if IS_ENABLED(CONFIG_TARGET_SOCFPGA_AGILEX5) |
51 | load = <0x80000000>; | ||||
52 | entry = <0x80000000>; | ||||
53 | #else | ||||
Siew Chin Lim | 9fe3a01 | 2020-12-24 18:21:11 +0800 | [diff] [blame] | 54 | load = <0x00001000>; |
55 | entry = <0x00001000>; | ||||
Jit Loon Lim | 977071e | 2024-03-12 22:01:03 +0800 | [diff] [blame] | 56 | #endif |
Siew Chin Lim | 9fe3a01 | 2020-12-24 18:21:11 +0800 | [diff] [blame] | 57 | atf_blob: blob-ext { |
58 | filename = "bl31.bin"; | ||||
59 | }; | ||||
Siew Chin Lim | b130efa | 2021-03-24 23:56:37 +0800 | [diff] [blame] | 60 | hash { |
61 | algo = "crc32"; | ||||
62 | }; | ||||
Siew Chin Lim | 9fe3a01 | 2020-12-24 18:21:11 +0800 | [diff] [blame] | 63 | }; |
64 | |||||
Jit Loon Lim | 977071e | 2024-03-12 22:01:03 +0800 | [diff] [blame] | 65 | fdt-0 { |
66 | description = "socfpga_socdk"; | ||||
Siew Chin Lim | 9fe3a01 | 2020-12-24 18:21:11 +0800 | [diff] [blame] | 67 | type = "flat_dt"; |
68 | compression = "none"; | ||||
Jit Loon Lim | 977071e | 2024-03-12 22:01:03 +0800 | [diff] [blame] | 69 | fdt_0_blob: blob-ext { |
Siew Chin Lim | 9fe3a01 | 2020-12-24 18:21:11 +0800 | [diff] [blame] | 70 | filename = "u-boot.dtb"; |
71 | }; | ||||
Siew Chin Lim | b130efa | 2021-03-24 23:56:37 +0800 | [diff] [blame] | 72 | hash { |
73 | algo = "crc32"; | ||||
74 | }; | ||||
Siew Chin Lim | 9fe3a01 | 2020-12-24 18:21:11 +0800 | [diff] [blame] | 75 | }; |
76 | }; | ||||
77 | |||||
Jit Loon Lim | 977071e | 2024-03-12 22:01:03 +0800 | [diff] [blame] | 78 | board_config: configurations { |
79 | default = "board-0"; | ||||
80 | |||||
81 | board-0 { | ||||
82 | description = "board_0"; | ||||
Siew Chin Lim | 9fe3a01 | 2020-12-24 18:21:11 +0800 | [diff] [blame] | 83 | firmware = "atf"; |
84 | loadables = "uboot"; | ||||
Jit Loon Lim | 977071e | 2024-03-12 22:01:03 +0800 | [diff] [blame] | 85 | fdt = "fdt-0"; |
Siew Chin Lim | b130efa | 2021-03-24 23:56:37 +0800 | [diff] [blame] | 86 | signature { |
87 | algo = "crc32"; | ||||
88 | key-name-hint = "dev"; | ||||
Jit Loon Lim | 977071e | 2024-03-12 22:01:03 +0800 | [diff] [blame] | 89 | sign-images = "atf", "uboot", "fdt-0"; |
Siew Chin Lim | b130efa | 2021-03-24 23:56:37 +0800 | [diff] [blame] | 90 | }; |
Siew Chin Lim | 9fe3a01 | 2020-12-24 18:21:11 +0800 | [diff] [blame] | 91 | }; |
92 | }; | ||||
93 | }; | ||||
94 | }; | ||||
95 | |||||
96 | kernel { | ||||
97 | filename = "kernel.itb"; | ||||
98 | fit { | ||||
99 | description = "FIT with Linux kernel image and FDT blob"; | ||||
100 | #address-cells = <1>; | ||||
101 | |||||
102 | images { | ||||
103 | kernel { | ||||
104 | description = "Linux Kernel"; | ||||
105 | type = "kernel"; | ||||
106 | arch = "arm64"; | ||||
107 | os = "linux"; | ||||
108 | compression = "none"; | ||||
Jit Loon Lim | 977071e | 2024-03-12 22:01:03 +0800 | [diff] [blame] | 109 | load = <0x6000000>; |
110 | entry = <0x6000000>; | ||||
Siew Chin Lim | 9fe3a01 | 2020-12-24 18:21:11 +0800 | [diff] [blame] | 111 | kernel_blob: blob-ext { |
112 | filename = "Image"; | ||||
113 | }; | ||||
Siew Chin Lim | b130efa | 2021-03-24 23:56:37 +0800 | [diff] [blame] | 114 | hash { |
115 | algo = "crc32"; | ||||
116 | }; | ||||
Siew Chin Lim | 9fe3a01 | 2020-12-24 18:21:11 +0800 | [diff] [blame] | 117 | }; |
118 | |||||
119 | fdt { | ||||
120 | description = "Linux DTB"; | ||||
121 | type = "flat_dt"; | ||||
122 | arch = "arm64"; | ||||
123 | compression = "none"; | ||||
Siew Chin Lim | 9fe3a01 | 2020-12-24 18:21:11 +0800 | [diff] [blame] | 124 | kernel_fdt_blob: blob-ext { |
125 | filename = "linux.dtb"; | ||||
126 | }; | ||||
Siew Chin Lim | b130efa | 2021-03-24 23:56:37 +0800 | [diff] [blame] | 127 | hash { |
128 | algo = "crc32"; | ||||
129 | }; | ||||
Siew Chin Lim | 9fe3a01 | 2020-12-24 18:21:11 +0800 | [diff] [blame] | 130 | }; |
131 | }; | ||||
132 | |||||
133 | configurations { | ||||
134 | default = "conf"; | ||||
135 | conf { | ||||
136 | description = "Intel SoC64 FPGA"; | ||||
137 | kernel = "kernel"; | ||||
138 | fdt = "fdt"; | ||||
Siew Chin Lim | b130efa | 2021-03-24 23:56:37 +0800 | [diff] [blame] | 139 | signature { |
140 | algo = "crc32"; | ||||
141 | key-name-hint = "dev"; | ||||
142 | sign-images = "fdt", "kernel"; | ||||
143 | }; | ||||
Siew Chin Lim | 9fe3a01 | 2020-12-24 18:21:11 +0800 | [diff] [blame] | 144 | }; |
145 | }; | ||||
146 | }; | ||||
147 | }; | ||||
148 | }; | ||||
149 | |||||
Siew Chin Lim | 851083e | 2021-03-01 20:04:13 +0800 | [diff] [blame] | 150 | #if defined(CONFIG_SOCFPGA_SECURE_VAB_AUTH) |
151 | &uboot_blob { | ||||
152 | filename = "signed-u-boot-nodtb.bin"; | ||||
153 | }; | ||||
154 | |||||
155 | &atf_blob { | ||||
156 | filename = "signed-bl31.bin"; | ||||
157 | }; | ||||
158 | |||||
Jit Loon Lim | 977071e | 2024-03-12 22:01:03 +0800 | [diff] [blame] | 159 | &fdt_0_blob { |
Siew Chin Lim | 851083e | 2021-03-01 20:04:13 +0800 | [diff] [blame] | 160 | filename = "signed-u-boot.dtb"; |
161 | }; | ||||
162 | |||||
163 | &kernel_blob { | ||||
164 | filename = "signed-Image"; | ||||
165 | }; | ||||
166 | |||||
167 | &kernel_fdt_blob { | ||||
168 | filename = "signed-linux.dtb"; | ||||
169 | }; | ||||
170 | #endif | ||||
171 | |||||
Siew Chin Lim | 9fe3a01 | 2020-12-24 18:21:11 +0800 | [diff] [blame] | 172 | #endif |