libpruio - pre-installed on 5.10 kernel image

Following that proposal

I prepared an SD card image (485 MB) with pre-installed libpruio based on RCNs am335x-debian-12.2-minimal-armhf-2023-10-07-2gb.img.xz. In order to test, either download in your browser file am335x-debian-12.2-minimal-armhf-2023-10-07-2gb-libpruio.img.xz and use BelenaEtcher to burn it on SD card (>2.5 GB). Or on a LINUC-PC download and burn that image like

wget https://kdywntxwxkflh5ba.myfritz.net/nas/filelink.lua?id=b14916149572a77d
sudo sh -c "xzcat filelink.lua?id=b14916149572a77d | dd of=/dev/sd? conv=sync,noerror status=progress"

Then Boot BeagleBone from SD and log in (debian:temppwd). The example binaries are pre-installed, just execute them by pruio_XXX (replace XXX by the example name) like

    pruio_1       # print some ADC values
    pruio_analyse # print register settings
    pruio_sos     # blink user LED in SOS code
    ...

The folders example.* contain some source code:

  • examples.bas for FreeBASIC: compile by
    fbc -march=armV7-a+fp -w all XXX.bas
  • examples.c for C: compile by
    gcc -Wall -o XXX XXX.c -lpruio

(replace XXX by example name).

Find in folder libpruio.deb some related packages. Ie you can install the libpruio-doc* package at your PC in order to read the documentation off-line in an HTML-browser.

Note: only users in group pruio have full user-space access to libpruio features.

Regards

Hi @DTJF working on BeagleBoard.org / ci-freebasic · GitLab (do you have an account, i’ll add you as maintainer! )…

used your http://beagle.tuks.nl/debian/jessie/freebasic_1.05.0-4.debian.tar.xz as reference… 1.05 doesn’t like to bootstrap on Debian 11.x now playing with later versions, do you have a preference?

(1.07.0)

AR lib/freebasic/linux-arm/libfb.a
AR lib/freebasic/linux-arm/libfbpic.a
AR lib/freebasic/linux-arm/libfbmt.a
AR lib/freebasic/linux-arm/libfbmtpic.a
LINK bootstrap/fbc
/usr/bin/ld: cannot open output file bootstrap/fbc: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [makefile:1115: bootstrap/fbc] Error 1

okay, 1.07.3 is now packaged, it’s built on Debian Buster (10.x) so it should be good glibc for many base root file systems… BeagleBoard.org / ci-freebasic · GitLab

Regards,

Hi Robert!

First of all: thanks for maintaining the freebasic package in the
main-stream repo. It helped my users and me a lot. I’ll do my best to
help getting it working again.

But:
the freebasic package at tuks.nl is maintained by Arend Lammertink, the
owner of the website, who helped me a lot to understand the very basics
on package building, so I could build my first-ever debian packages (for
libpruio). I’m not sure if I’m a good maintainer and I’m not sure if I
can spend enough time to test on each new kernel version.

Anyhow, for that image with pre-installed libpruio I installed the
freebasic.deb package from the weekly builds at

Index of /stw/builds/linux-armv7a-hf-debian

which contains the latest 1.20 version, but only a stripped set of
header files. The arch-independant package

https://users.freebasic-portal.de/stw/builds/freebasic-headers.deb

contains the missing headers. A meta-package installing those two debs
will result in a full-featured FreeBASIC.

So my questions:

  • Do we have to compile from source or can we use available packages?
  • Should I ask in the FreeBASIC forum for a more experienced maintainer
    for that project?

Regards

BTW: AFAIR the libfb*.a files are run-time libraries compiled from C
source in the fbc source tree. Did you build all targets?

Should be >=1.10 at least, due to new option -nolib implemented exclusively for the libpruio-bin package.

Regards

So it looks like our old 1.05.x debian directory installed all of those into one build… When dumping https://beagleboard.beagleboard.io/ci-freebasic/pool/freebasic_1.10.0-0_armhf.deb i see both what is in freebasic.deb and freebasic-headers.deb… so we have one deb for all…

voodoo@x3-am57xx-beagle-x15-2gb:~$ tree /usr/lib/freebasic/linux-arm/
/usr/lib/freebasic/linux-arm/
├── fbextra.x
├── fbrt0.o
├── fbrt0pic.o
├── libfb.a
├── libfbgfx.a
├── libfbgfxmt.a
├── libfbgfxmtpic.a
├── libfbgfxpic.a
├── libfbmt.a
├── libfbmtpic.a
└── libfbpic.a

1 directory, 11 files
voodoo@x3-am57xx-beagle-x15-2gb:~$ tree -d /usr/include/freebasic/
/usr/include/freebasic/
├── AL
├── allegro
├── allegro5
├── atk
├── big_int
├── cairo
├── cd
├── chipmunk
├── crt
│   ├── arpa
│   ├── bits
│   ├── dos
│   ├── freebsd
│   ├── linux
│   ├── netinet
│   │   └── linux
│   ├── sys
│   │   ├── dos
│   │   ├── freebsd
│   │   ├── linux
│   │   └── win32
│   ├── unix
│   └── win32
├── CUnit
├── curses
├── disphelper
├── dos
│   ├── inlines
│   └── sys
├── fastcgi
├── fbc-int
├── flite
├── fontconfig
├── freetype2
│   └── config
├── gdk
├── gdk-pixbuf
├── gdsl
├── gio
├── GL
│   ├── mesa
│   └── windows
├── glade
├── GLFW
├── grx
├── gsl
├── gtk
├── gtkgl
├── IL
├── im
├── IUP
├── json-c
├── libart_lgpl
├── libexslt
├── libxml
├── libxslt
├── Lua
├── lzo
├── mysql
├── ode
├── ogg
├── pango
├── postgresql
├── SDL
├── SDL2
├── spidermonkey
├── tre
├── vlc
├── vorbis
├── win
│   ├── ddk
│   └── rc
├── wx-c
├── X11
│   ├── extensions
│   ├── ICE
│   ├── SM
│   ├── Xcursor
│   ├── Xft
│   ├── Xmu
│   └── Xtrans
├── xcb
└── zmq

84 directories
voodoo@x3-am57xx-beagle-x15-2gb:~$ fbc --version
FreeBASIC Compiler - Version 1.10.1 (2023-11-28), built for linux-arm (32bit)
Copyright (C) 2004-2023 The FreeBASIC development team.

I’ve setup the ci so we really only have to change 2 things for newer versions…

Right now, we are setup for “fbc-1.10” branch, anytime something important hits: https://github.com/freebasic/fbc.git just request a rebuild… once 1.11 or 1.+x comes out, we just bump:

(bootstrap): .gitlab-ci.yml · main · BeagleBoard.org / ci-freebasic · GitLab

- ./contrib/release/build.sh linux-arm 1.10.0

(build branch): .gitlab-ci.yml · main · BeagleBoard.org / ci-freebasic · GitLab

- git clone -b fbc-1.10 https://github.com/freebasic/fbc.git ./src/ --depth=1

not sure what kinda of test suite freebasic has, but the 1.07 → 1.10 seems like a jump…

So next, i want to add the ci for https://github.com/DTJF/libpruio, pretty sure i can just still run, debuild -b -us -uc in the base directory…

Regards,

Hi Robert!

You want to build from source, sounds good. I learned about the fbc tree im 2013, when I helped implementing the ARM target. I don’t know the current state.

Unfortunately, this doesn’t work in the current configuration, since by default the build of eight packages is configured. The package libpruio-doc* needs beside standard dependencies (doxygen, graphviz, …) a custom filter (called fbdoc) to run Doxygen on FreeBASIC source. (Also the python package builds the binding by that tool.)

So I see two different strategies

  1. Either I change the package building configuration so that only the basic packages get build by default (libpruio, libpruio-dev, libpruio-lkm, libpruio-src). And I add a further target for building the optional packages (-doc, -bas, -bin, python-).

  2. Or we implement a ci to build that fbdoc dependency first (and a ci for cmakefbc will help as well).

Anyhow, the users need support to get the uio_pruss driver running on all the different kernels (at least in future).

Regards

Found another issue:

The source tree needs the pasm assembler to build. How to implement that Build-Depend in the debian/control file?

Regards