Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 18 Jan 2020, 14:57
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
I need woof-CE /kernel-kit advice
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [11 Posts]  
Author Message
rockedge


Joined: 11 Apr 2012
Posts: 1449
Location: Connecticut, United States

PostPosted: Mon 25 Nov 2019, 11:54    Post subject:  I need woof-CE /kernel-kit advice  

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:
./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.
Back to top
View user's profile Send private message Visit poster's website 
peebee


Joined: 21 Sep 2008
Posts: 4152
Location: Worcestershire, UK

PostPosted: Mon 25 Nov 2019, 14:06    Post subject:  

# 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/pet_packages-common64/busybox-1.31.0-x86_64_musl_static-2.pet

_________________
LxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64
Back to top
View user's profile Send private message Visit poster's website 
rockedge


Joined: 11 Apr 2012
Posts: 1449
Location: Connecticut, United States

PostPosted: Mon 25 Nov 2019, 14:46    Post subject:  

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!
Back to top
View user's profile Send private message Visit poster's website 
sc0ttman


Joined: 16 Sep 2009
Posts: 2793
Location: UK

PostPosted: Mon 25 Nov 2019, 17:34    Post subject:  

A shell version of vercmp:

Code:

#!/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 ###

_________________
Pkg, mdsh, Woofy, Akita, VLC-GTK, Search
Back to top
View user's profile Send private message 
rockedge


Joined: 11 Apr 2012
Posts: 1449
Location: Connecticut, United States

PostPosted: Mon 25 Nov 2019, 20:44    Post subject:  

Thank you sc0ttman

works perfectly so far
Back to top
View user's profile Send private message Visit poster's website 
LateAdopter

Joined: 27 May 2011
Posts: 332
Location: Reading UK

PostPosted: Thu 02 Jan 2020, 06:56    Post subject:  

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
Back to top
View user's profile Send private message 
peebee


Joined: 21 Sep 2008
Posts: 4152
Location: Worcestershire, UK

PostPosted: Thu 02 Jan 2020, 10:26    Post subject:  

4.14 is the latest aufs_utils branch - see:
https://github.com/puppylinux-woof-CE/aufs-util/branches/stale

_________________
LxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64
Back to top
View user's profile Send private message Visit poster's website 
rockedge


Joined: 11 Apr 2012
Posts: 1449
Location: Connecticut, United States

PostPosted: Thu 02 Jan 2020, 11:54    Post subject:  

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/linux/kernel/projects/rt/5.4/patches-5.4.5-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
Back to top
View user's profile Send private message Visit poster's website 
LateAdopter

Joined: 27 May 2011
Posts: 332
Location: Reading UK

PostPosted: Thu 02 Jan 2020, 14:22    Post subject:  

peebee wrote:
4.14 is the latest aufs_utils branch - see:
https://github.com/puppylinux-woof-CE/aufs-util/branches/stale

Hello peebee could you explain a bit more please. You understand linux scripts and I don't...
https://sourceforge.net/p/aufs/aufs-util/ref/master/branches/
has 4.19 and 5.0 branches. I modified funcs.sh like this:
Code:
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.
Back to top
View user's profile Send private message 
peebee


Joined: 21 Sep 2008
Posts: 4152
Location: Worcestershire, UK

PostPosted: Thu 02 Jan 2020, 15:33    Post subject:  

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-util/ref/master/branches/
has 4.19 and 5.0 branches. I modified funcs.sh like this:
Code:
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/woof-CE/issues/1729

Thanks
peebee

_________________
LxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64
Back to top
View user's profile Send private message Visit poster's website 
rockedge


Joined: 11 Apr 2012
Posts: 1449
Location: Connecticut, United States

PostPosted: Fri 03 Jan 2020, 10:58    Post subject:  

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.
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [11 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0476s ][ Queries: 11 (0.0046s) ][ GZIP on ]