-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ Upstream commit b547df6 ] In dtc v1.4.5 to at least v1.4.7 there have been a few bugs introduced that change the layout of what's produced in the dts. In order to be immune from them, we should use the (provided) dtdiff utility, but we also need to run the dts we're diffing against through a dtb cycle in order to ensure we get the same format as what the hdat_to_dt to dts conversion will. This fixes a bunch of unit test failures on the version of dtc shipped with recent Linux distros such as Fedora 29. Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
- Loading branch information
1 parent
1a90d59
commit cc7945c
Showing
2 changed files
with
17 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
# Takes /dev/stdin as dtb, saves to file, does dtdiff | ||
# Also runs parameter through a dts->dtb->dts conversion | ||
# in order to work around dtc bugs. | ||
|
||
T=$(mktemp) | ||
cp /dev/stdin $T.dtb | ||
dtc -I dts -O dtb $1 > $T.orig.dtb | ||
dtdiff $T.orig.dtb $T.dtb | ||
R=$? | ||
if [ $R == 0 ]; then rm -f $T.dtb; fi | ||
exit $R |