[PATCH] Add fixdefconfig script to update lists of defconfig files from savedefconfig
Joel Peshkin
joel.peshkin at broadcom.com
Tue Jan 12 04:00:56 CET 2021
Cc: Simon Glass <sjg at chromium.org>
Cc: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
scripts/fixdefconfig | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
create mode 100755 scripts/fixdefconfig
diff --git a/scripts/fixdefconfig b/scripts/fixdefconfig
new file mode 100755
index 0000000..7f36762
--- /dev/null
+++ b/scripts/fixdefconfig
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+if [ -z "$*" -o "${1%_defconfig}" = "$1" ]
+then
+ echo "Usage: $0 [defconfig_file...]"
+ echo " Normalizes each listed defconfig and replaces it with the normalized"
+ echo "version. The original is renamed with an extension of .old appended"
+ exit 1
+fi
+
+tmp=tmp_build_$$
+mkdir $tmp
+for config in $*
+do
+ base=`basename $config`
+ make O=$tmp/$base $base \
+ && make O=$tmp/$base $base \
+ && make O=$tmp/$base savedefconfig \
+ && diff -q $tmp/$base/defconfig configs/$base \
+ || mv configs/$base configs/$base.old \
+ && mv $tmp/$base/defconfig configs/$base
+ rm -rf $tmp/$base
+done
+rmdir $tmp
+
--
1.8.3.1
More information about the U-Boot
mailing list