Use the proposed BaseTools support for device tree compilation to
build the device tree binary from source at build time. Give it its
own .inf and a build rule so the tools take care of everything.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Platform/AMD/OverdriveBoard/FdtBlob/styx-overdrive.dtb | Bin 9357 -> 0 bytes
Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 1 +
Platform/AMD/OverdriveBoard/OverdriveBoard.fdf | 9 ++++---
Platform/AMD/OverdriveBoard/{FdtBlob/styx-overdrive.dts => OverdriveBoardDeviceTree/OverdriveBoardDeviceTree.dts} | 0
Platform/AMD/OverdriveBoard/OverdriveBoardDeviceTree/OverdriveBoardDeviceTree.inf | 28 ++++++++++++++++++++
5 files changed, 34 insertions(+), 4 deletions(-)
diff --git a/Platform/AMD/OverdriveBoard/FdtBlob/styx-overdrive.dtb b/Platform/AMD/OverdriveBoard/FdtBlob/styx-overdrive.dtb
deleted file mode 100644
index c8e5fd980bce305186214aab10a7d399faa22500..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 9357
zcmdT~O>7-k6`rw)A*6q4AOZx68>b<GO!{ocZID1RX%Q5t3gK4;<jk9Q{XFu_d()Zm
zPa-6;sk%a9RRJpsbO%TjSRhc;6%q@ib_pw6iVzz_yFfw}YWco%@0oW!c~0ykU2vrP
z=A3iSJ?FdU{>{vrSMPo6pFwcq`#}(#4}ym-;d%<?Fv<fcpvee&>e>`K#U!qC<Ujq?
z6VqQYab0I-`qV|Ue)huY=_ky($%aL42KDrXVO;j6Pd&YE%3hhSo72_-+aE`niu2x?
z%C?V&Y7}_dk^Q^C5+gCNJ!Sfs@Z?!1hv}d;Ww}<=Q8FCV<uJ=kxoBo*JF}fm2Sy<J
zIEFG6m-(4~nndSNLp~Xnwb_i~*@Xydnu;y2pK?57Uv&Jfu&{m+MLcb@2SPU0+Yi3(
z<Y~EXzt4$*laKC@>FXYpJ__@2FbM7^7V1BMQld1p?MBm$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
z3sk0dAIOwFQ$^iuBk|>=R{~9Kd|mNuRIQo~Uxh5hdEsk%%O<LU6=SoEWZ7?UB!t$O
x0smK%n!=P(f{8XjZX5goo?9X}wFBOmx|v8;2BoTdm{<|k#Y&KydS%!P{s-HVZ2|xQ
diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
index bc69c586e929..081a4f3cd002 100644
--- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
+++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
@@ -600,6 +600,7 @@ DEFINE DO_FLASHER = FALSE
#
# FDT support
#
+ Platform/AMD/OverdriveBoard/OverdriveBoardDeviceTree/OverdriveBoardDeviceTree.inf
EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.inf {
<LibraryClasses>
FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf b/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
index 23e57befcdd9..aa2a1a6fa053 100644
--- a/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
+++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
@@ -145,10 +145,7 @@ READ_LOCK_STATUS = TRUE
# FDT support
#
INF EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.inf
-
- FILE FREEFORM = 25462CDA-221F-47DF-AC1D-259CFAA4E326 {
- SECTION RAW = Platform/AMD/OverdriveBoard/FdtBlob/styx-overdrive.dtb
- }
+ INF RuleOverride = DTB Platform/AMD/OverdriveBoard/OverdriveBoardDeviceTree/OverdriveBoardDeviceTree.inf
#
# PCI support
@@ -413,3 +410,7 @@ READ_LOCK_STATUS = TRUE
RAW ASL |.aml
}
+[Rule.Common.USER_DEFINED.DTB]
+ FILE FREEFORM = $(NAMED_GUID) {
+ RAW BIN |.dtb
+ }
diff --git a/Platform/AMD/OverdriveBoard/FdtBlob/styx-overdrive.dts b/Platform/AMD/OverdriveBoard/OverdriveBoardDeviceTree/OverdriveBoardDeviceTree.dts
similarity index 100%
rename from Platform/AMD/OverdriveBoard/FdtBlob/styx-overdrive.dts
rename to Platform/AMD/OverdriveBoard/OverdriveBoardDeviceTree/OverdriveBoardDeviceTree.dts
diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoardDeviceTree/OverdriveBoardDeviceTree.inf b/Platform/AMD/OverdriveBoard/OverdriveBoardDeviceTree/OverdriveBoardDeviceTree.inf
new file mode 100644
index 000000000000..9ecf993cafac
--- /dev/null
+++ b/Platform/AMD/OverdriveBoard/OverdriveBoardDeviceTree/OverdriveBoardDeviceTree.inf
@@ -0,0 +1,28 @@
+## @file
+#
+# Device tree description of the AMD Seattle Overdrive platform
+#
+# Copyright (c) 2017, Linaro Ltd. All rights reserved.
+#
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+##
+
+[Defines]
+ INF_VERSION = 0x00010019
+ BASE_NAME = OverdriveBoardDeviceTree
+ FILE_GUID = 25462CDA-221F-47DF-AC1D-259CFAA4E326 # gDtPlatformDefaultDtbFileGuid
+ MODULE_TYPE = USER_DEFINED
+ VERSION_STRING = 1.0
+
+[Sources]
+ OverdriveBoardDeviceTree.dts
+
+[Packages]
+ MdePkg/MdePkg.dec
--
2.11.0
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
© 2016 - 2024 Red Hat, Inc.