Patchwork [7/7] scripts/sstate-diff.sh: add simple script to compare sstate checksums between MACHINEs

login
register
mail settings
Submitter Martin Jansa
Date Oct. 4, 2012, 1:23 p.m.
Message ID <cc05da7f236a0c8367c3cff3b4a0d297fe6a8dd7.1349356755.git.Martin.Jansa@gmail.com>
Download mbox | patch
Permalink /patch/37787/
State Superseded, archived
Headers show

Comments

Martin Jansa - Oct. 4, 2012, 1:23 p.m.
* it's not very universal, but works with default oe-core setup and
  shows basic HOW-TO, because many people still don't know how to detect
  machine specific sstate checksums
* someone can improve this with bitbake -e calls to detect BASE and to
  specify MACHINEs and TARGETs in parameter instead of hardcoded values
  in script..

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 scripts/sstate-diff.sh | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100755 scripts/sstate-diff.sh

Patch

diff --git a/scripts/sstate-diff.sh b/scripts/sstate-diff.sh
new file mode 100755
index 0000000..2d256e8
--- /dev/null
+++ b/scripts/sstate-diff.sh
@@ -0,0 +1,32 @@ 
+#!/bin/sh
+
+# Used to compare sstate checksums between MACHINES
+# Update MACHINES, TARGETS and BASE
+# Execute script and compare generated list.M files
+
+# $ diff stamps.1349348392/fake-cortexa8/list.M stamps.1349348392/fake-cortexa9/list.M | wc -l
+# 538
+
+# Then to compare sigdata use something like:
+# $ ls stamps.1349348392/*/armv7a-vfp-neon*/linux-libc*do_configure*
+#   stamps.1349348392/fake-cortexa8/armv7a-vfp-neon-oe-linux-gnueabi/linux-libc-headers-3.4.3-r0.do_configure.sigdata.cb73b3630a7b8191e72fc469c5137025
+#   stamps.1349348392/fake-cortexa9/armv7a-vfp-neon-oe-linux-gnueabi/linux-libc-headers-3.4.3-r0.do_configure.sigdata.f37ada177bf99ce8af85914df22b5a0b
+# $ bitbake-diffsigs stamps.1349348392/*/armv7a-vfp-neon*/linux-libc*do_configure*
+#   basehash changed from 8d0bd67bb1da6f68717760fc3ef43171 to e869fa61426e88e9c30726ba88a1216a
+#   Variable TUNE_CCARGS value changed from  -march=armv7-a     -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8 to  -march=armv7-a     -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a9
+
+MACHINES="fake-arm1136jf-s fake-arm920t fake-arm926ejs fake-arm9tdmi fake-cortexa8 fake-cortexa9 fake-cortexm1 fake-cortexm3 fake-cortexr4 fake-ep9312 fake-iwmmxt fake-strongarm1100 fake-xscale"
+TARGETS="dhcp"
+
+BASE="/OE/oe-core"
+OUTPUT=${BASE}/stamps.`date "+%s"`
+
+for M in ${MACHINES}; do
+  find ${BASE}/tmp-eglibc/stamps/ -name \*sigdata\* | xargs rm -f
+  mkdir -p ${OUTPUT}/${M}
+  export MACHINE=${M}; bitbake -S ${TARGETS} | tee -a ${OUTPUT}/${M}/log;
+  cp -ra ${BASE}/tmp-eglibc/stamps/* ${OUTPUT}/${M}
+  find ${OUTPUT}/${M} -name \*sigdata\* | sed "s#${OUTPUT}/${M}/##g" | sort > ${OUTPUT}/${M}/list
+  sed "s/om_gta0/om-gta0/g; s/${M}/MACHINE/g" ${OUTPUT}/${M}/list | sort > ${OUTPUT}/${M}/list.M
+  find ${BASE}/tmp-eglibc/stamps/ -name \*sigdata\* | xargs rm -f
+done