Page 1 of 1
I need woof-CE /kernel-kit advice
Posted: Mon 25 Nov 2019, 15:54
by rockedge
Building a real time kernel for 5.2.21 and in the kernel-kit I run into an error in a function using
vercmp
on my Bionic64-v8 there is no vercmp command and the build script can not handle pulling the aufs-utils.
How do I correct this or the best method to bypass the function??
Code: Select all
./funcs.sh: line 7: vercmp: command not found
Verifying sources/firmware-140621-big.tar.bz2
Extracting the Aufs-util sources
aufs-util: cannot select git branch.
thanks for any help...before I start messing with the code.
Posted: Mon 25 Nov 2019, 18:06
by peebee
# vercmp --help
BusyBox v1.31.0 (2019-08-05 23:22:55 +08 ) multi-call binary.
Maybe new version of BB needed???
http://distro.ibiblio.org/puppylinux/pe ... atic-2.pet
Posted: Mon 25 Nov 2019, 18:46
by rockedge
hello peebee,
odd thing...this BB64 has 2 save folders so when I boot it I need to choose the save folder...on one no vercmp and on the other it works!
so I just am using the different save folder, where as the puppy.sfs is the same and so is the kernel it is weird that it behaves this way.
on my Bionic32-v8's vercmp is working.
So using the alternative save folder that does not eliminate vercmp, I was able to have a successful run creating a 64bit kernel 5.2.21 kernel.
Now I am sorting out the patches needed to build a true real time kernel out it!
Posted: Mon 25 Nov 2019, 21:34
by sc0ttman
A shell version of vercmp:
Code: Select all
#!/bin/bash
#set -x
# From https://stackoverflow.com/a/44660519/702738
# --
# Compares two tuple-based, dot-delimited version numbers a and b (possibly
# with arbitrary string suffixes). Returns:
# 1 if a<b
# 2 if equal
# 3 if a>b
# Everything after the first character not in [0-9.] is compared
# lexicographically using ASCII ordering if the tuple-based versions are equal.
compare_version() {
if [[ $1 == $2 ]]; then
return 2
fi
local IFS=.
local i a=(${1%%[^0-9.]*}) b=(${2%%[^0-9.]*})
local arem=${1#${1%%[^0-9.]*}} brem=${2#${2%%[^0-9.]*}}
for ((i=0; i<${#a[@]} || i<${#b[@]}; i++)); do
if ((10#${a[i]:-0} < 10#${b[i]:-0})); then
return 1
elif ((10#${a[i]:-0} > 10#${b[i]:-0})); then
return 3
fi
done
if [ "$arem" '<' "$brem" ]; then
return 1
elif [ "$arem" '>' "$brem" ]; then
return 3
fi
return 2
}
#=================================================================
# MAIN
#=================================================================
if [ ! "$1" ] || [ ! "$3" ] ; then
echo "usage: version1 lt|gt|le|ge|eq version2
return value 0 if true, else 1"
exit 2;
fi
#compare_version $1 $3
#rv=$?
case $2 in
le) #[ $rv -eq 2 -o $rv -eq 1 ] && exit 0 ;;
[ "$1" = "$3" ] && exit 0
compare_version $1 $3 ; [ $? -eq 1 ] && exit 0
;;
ge) #[ $rv -eq 2 -o $rv -eq 3 ] && exit 0 ;;
[ "$1" = "$3" ] && exit 0
compare_version $1 $3 ; [ $? -eq 3 ] && exit 0
;;
lt) #[ $rv -eq 1 ] && exit 0
compare_version $1 $3 ; [ $? -eq 1 ] && exit 0
;;
gt) #[ $rv -eq 3 ] && exit 0
compare_version $1 $3 ; [ $? -eq 3 ] && exit 0
;;
eq) #[ $rv -eq 2 ] && exit 0 ;;
[ "$1" = "$3" ] && exit 0
;;
*)
echo "unknown operator: $2"
;;
esac
exit 1
### END ###
Posted: Tue 26 Nov 2019, 00:44
by rockedge
Thank you sc0ttman
works perfectly so far
Posted: Thu 02 Jan 2020, 10:56
by LateAdopter
hello rockedge
I didn't have a problem with vercmp, but I noticed that the kernel kit fetches the wrong branch of aufs-utils (4.14).
There isn't an option in build.conf to tell it the correct branch, like you can with aufsv , so it's necessary to add the recent branches (4.19 5.0) to funcs.sh
Posted: Thu 02 Jan 2020, 14:26
by peebee
Posted: Thu 02 Jan 2020, 15:54
by rockedge
no matter if the RT patches matches exactly the kernel version the patches will fail half way through being applied.
I am trying to compile kernel 5.4.5 with the RT patches
https://mirrors.edge.kernel.org/pub/lin ... rt3.tar.xz
makes it halfway and fails stopping build.sh. I also have not been able to use the monolithic patch for any kernel version over 5+
Otherwise the build will work and create a low latency PREEMPT kernel but not fully RT
Posted: Thu 02 Jan 2020, 18:22
by LateAdopter
Hello peebee could you explain a bit more please. You understand linux scripts and I don't...
https://sourceforge.net/p/aufs/aufs-uti ... /branches/
has 4.19 and 5.0 branches. I modified funcs.sh like this:
Code: Select all
function git_aufs_util_branch() {
# aufs-util branch - must keep this updated - git://git.code.sf.net/p/aufs/aufs-util.git
for i in 5.0 4.19 4.14 4.9 4.4 4.1 4.0 3.18 3.14 3.9 3.2
Then build.sh clones and compiles the 5.0 branch for my 5.4.7 kernel. Why is that the wrong thing to do?
Thanks.
Posted: Thu 02 Jan 2020, 19:33
by peebee
LateAdopter wrote:Hello peebee could you explain a bit more please. You understand linux scripts and I don't...
https://sourceforge.net/p/aufs/aufs-uti ... /branches/
has 4.19 and 5.0 branches. I modified funcs.sh like this:
Code: Select all
function git_aufs_util_branch() {
# aufs-util branch - must keep this updated - git://git.code.sf.net/p/aufs/aufs-util.git
for i in 5.0 4.19 4.14 4.9 4.4 4.1 4.0 3.18 3.14 3.9 3.2
Then build.sh clones and compiles the 5.0 branch for my 5.4.7 kernel. Why is that the wrong thing to do?
Thanks.
Hi
There are 2 git repos for aufs_util - 1 on sourceforge and 1 a clone on woof-ce "maintained" by puppy.....except it hasn't been kept up to date and is still at 4.14.
I've changed kernel-kit funcs.sh on github woof-ce with your changes - now need to get the 2 repos in synch (not sure how to do this so will raise a woof-ce issue).
https://github.com/puppylinux-woof-CE/w ... ssues/1729
Thanks
peebee
Posted: Fri 03 Jan 2020, 14:58
by rockedge
Frustrating...../build.sh will not successfully use the RT patches but ./nubuild.sh will but has trouble applying the aufs-util and fails during compile.
All though it was good to see the fully preemptive selection available when doing the config.