I need woof-CE /kernel-kit advice

Under development: PCMCIA, wireless, etc.
Post Reply
Message
Author
User avatar
rockedge
Posts: 1864
Joined: Wed 11 Apr 2012, 13:32
Location: Connecticut, United States
Contact:

I need woof-CE /kernel-kit advice

#1 Post 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.

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#2 Post 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
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
rockedge
Posts: 1864
Joined: Wed 11 Apr 2012, 13:32
Location: Connecticut, United States
Contact:

#3 Post 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!

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#4 Post 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 ###
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
rockedge
Posts: 1864
Joined: Wed 11 Apr 2012, 13:32
Location: Connecticut, United States
Contact:

#5 Post by rockedge »

Thank you sc0ttman

works perfectly so far

LateAdopter
Posts: 361
Joined: Fri 27 May 2011, 17:21
Location: Reading UK

#6 Post 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

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#7 Post by peebee »

4.14 is the latest aufs_utils branch - see:
https://github.com/puppylinux-woof-CE/a ... ches/stale
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
rockedge
Posts: 1864
Joined: Wed 11 Apr 2012, 13:32
Location: Connecticut, United States
Contact:

#8 Post 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

LateAdopter
Posts: 361
Joined: Fri 27 May 2011, 17:21
Location: Reading UK

#9 Post by LateAdopter »

peebee wrote:4.14 is the latest aufs_utils branch - see:
https://github.com/puppylinux-woof-CE/a ... ches/stale
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.

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#10 Post 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
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
rockedge
Posts: 1864
Joined: Wed 11 Apr 2012, 13:32
Location: Connecticut, United States
Contact:

#11 Post 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.

Post Reply