site  contact  subhomenews

More exotic cross-compile path fixing

February 02, 2022 — BarryK

I posted about this a couple of days ago:

https://bkhome.org/news/202202/hack-to-fix-oe-cross-compile-paths.html

...the limitation of that script is that it only scanned packages included in the build. I have now created a script that scans the entire repository in OE and creates a tarball. This can be expanded at /mnt/build by '3buildeasydistro' in woofQ. This is really only of interest to me as the woofQ and OE-quirky developer, but anyway, this is the script that creates the complete list:

#!/bin/sh
#20220203

if [ ! -s status/OE_SUPPORT ];then
echo "status/OE_SUPPORT does not exist, aborting"
exit
fi

. ./status/OE_SUPPORT
#ex: OEPATH='/mnt/build/oe-builds/oe-quirky' OEPROFILE='build-amd64'

case "$OEPROFILE" in
build-amd64)
SUBDIR="nocona-64-poky-linux"
;;
*)
echo "script needs fix"
exit
;;
esac

OEPRE="${OEPATH}/${OEPROFILE}/tmp/work/${SUBDIR}"

if [ ! -d $OEPRE ];then
echo 'script needs fix'
exit
fi

if [ -d status/mnt-build ];then
rm -rf status/mnt-build
fi
mkdir status/mnt-build

echo "Creating OE folder hierarchy status/mnt-build..."
#this will search all packages, looking for a text string in files...
for aPKG in `find ${OEPRE} -mindepth 3 -maxdepth 3 -type d -name image | grep -vE '\-native/|\-cross/'`
do
[ "$aPKG" == "" ] && continue
OES="$(grep -rhoa '/mnt/build/oe-builds/oe-quirky/[a-zA-Z0-9/._-]*/recipe\-sysroot' ${aPKG})"
#ex: /mnt/build/oe-builds/oe-quirky/build-amd64/tmp/work/nocona-64-poky-linux/gobject-introspection/1.62.0-r7/recipe-sysroot
for aOES in ${OES}
do
[ "$aOES" == "" ] && continue
[ "${aOES/*recipe-sysroot/}" != "" ] && continue
[ "${aOES:0:10}" != "/mnt/build" ] && continue
upOES="$(dirname ${aOES})"
if [ ! -d status/mnt-build${upOES} ];then
echo " ${upOES}"
mkdir -p status/mnt-build${upOES}
ln -sr status/mnt-build/ status/mnt-build${upOES}/recipe-sysroot
fi
done
sync
done

cd status
dir2tgz mnt-build
rm -f ../mnt-build.tar.gz
sync
mv -f mnt-build.tar.gz ../
cd ..

The end result is what matter to users. It means that a few rare cases where an app might not work properly, due to an invalid path, as per the example of 'gst-plugins-scanner' in the previous post, will likely now work. The fixes now include all packages in the repo, not just those already builtin.  

Tags: easy