diff options
author | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
---|---|---|
committer | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/skiboot/hdata/test/dtdiff_wrap.sh | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/skiboot/hdata/test/dtdiff_wrap.sh')
-rwxr-xr-x | roms/skiboot/hdata/test/dtdiff_wrap.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/roms/skiboot/hdata/test/dtdiff_wrap.sh b/roms/skiboot/hdata/test/dtdiff_wrap.sh new file mode 100755 index 000000000..f92c944b6 --- /dev/null +++ b/roms/skiboot/hdata/test/dtdiff_wrap.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later +# +# 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. +# +# Copyright 2018 IBM Corp. + +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 $T.orig.dtb $T.dtb; fi +exit $R |