Skip to contentSkip to conversation

Add fixdefconfig script to update lists of defconfig files from savedefconfig

PATCH New Joel Peshkin 3 participants 4 messages Jan 12, 2021 – Jan 14, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add fixdefconfig script to update lists of defconfig files from savedefconfig

Cc Simon Glass <[email protected]>
Cc Heinrich Schuchardt <[email protected]>
---
 scripts/fixdefconfig | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100755 scripts/fixdefconfig
scripts/fixdefconfig new file +25 -0
new file mode 100755
index 0000000..7f36762
@@ -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
+
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 1/1 Add fixdefconfig script to update lists of defconfig files from savedefconfig

Hi Joel,

Quoted 7 lines · Joel Peshkin
Cc Simon Glass <[email protected]>
Cc Heinrich Schuchardt <[email protected]>
---
 scripts/fixdefconfig | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100755 scripts/fixdefconfig

+Tom Rini

I normally use moveconfig for this...Tom how do you do it?

Quoted 33 lines
scripts/fixdefconfig new file +25 -1
new file mode 100755
index 0000000..7f36762
@@ -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
+
--
Quoted 2 lines

1.8.3.1

Regards,
Simon

#2 lore raw

PATCH 1/1 Add fixdefconfig script to update lists of defconfig files from savedefconfig

Quoted 11 lines · Simon Glass

Hi Joel,

Quoted 7 lines · Joel Peshkin
Cc Simon Glass <[email protected]>
Cc Heinrich Schuchardt <[email protected]>
---
 scripts/fixdefconfig | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100755 scripts/fixdefconfig
Quoted 3 lines

+Tom Rini

I normally use moveconfig for this...Tom how do you do it?

Yes, this is a single-threaded version of "moveconfig.py -sC". This is useful I suppose in the case where you have to sync maybe a dozen files rather than one or two, or all of them. But I'm not sure it's worth applying, sorry.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210113/1552ffc0/attachment.sig>
#3 lore raw

PATCH 1/1 Add fixdefconfig script to update lists of defconfig files from savedefconfig

No worries. As long as there is a mechanism that will work OK.

Quoted 18 lines · Tom Rini
Quoted 3 lines · Simon Glass

Hi Joel,

On Mon, 11 Jan 2021 at 20:01, Joel Peshkin <[email protected]>

Quoted 11 lines · wrote:
Quoted 7 lines
Cc Simon Glass <[email protected]>
Cc Heinrich Schuchardt <[email protected]>
---
 scripts/fixdefconfig | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100755 scripts/fixdefconfig

+Tom Rini

I normally use moveconfig for this...Tom how do you do it?

Quoted 8 lines

Yes, this is a single-threaded version of "moveconfig.py -sC". This is useful I suppose in the case where you have to sync maybe a dozen files rather than one or two, or all of them. But I'm not sure it's worth applying, sorry.

--
Tom

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4166 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210113/0202292f/attachment.bin>