(Victron Energy) Venus OS

Aus TippvomTibb
Zur Navigation springen Zur Suche springen

Allgemeines

Images

Die Images (CerboGX, RasPi u.a.) findet man unter https://updates.victronenergy.com/feeds/venus/release/images/

oder hier https://professional.victronenergy.com/downloads/firmware/


Die 'swu'-Varianten beziehen sich vermutlich auf SWUpdate https://updates.victronenergy.com/feeds/venus/release/images/

Die 'large'-Varianten beinhalten zusaetzlich den Node-RED- und SignalK-Support.


Hinweise: https://stackoverflow.com/questions/68895797/swupdate-error-no-suitable-swu-image-found


VenusOS mit QEMU

Das waere zum Testen eine Erleichterung. So richtig gefunden habe ich zu dem Thema nichts verwertbares. Ein Versuch ist hier dokumentiert.

Erste Schritte mit Buster

Zum Einlesen. https://www.raspberry-pi-geek.de/ausgaben/rpg/2014/04/raspberry-pi-emulieren/

Mein aktueller QEMU ist die Version 5.2.0.

qemu-system-arm --help
QEMU emulator version 5.2.0 (SUSE Linux Enterprise 15)
Copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers
usage: qemu-system-arm [options] [disk_image]

'disk_image' is a raw hard disk image for IDE hard disk 0

Mit

qemu-system-arm -machine help

erhaelt man eine Uebersicht ueber die unterstuetzten Hardwareplatformen. Mit raspi2(b) koennte es klappen, raspi3 und raspi4 werden (noch) nicht unterstuertzt.

Die einfachste Startvariante (ohne Optionen) waere neben der Maschine einfach noch ein Diskimage anzugeben.

Mal mit 2020-02-13-raspbian-buster in /opt/QEMU/Buster probieren.

4/8/16 GB SDCard erzeugen;-)

dd if=/dev/irgendein.img bs=1024 count=16777216

oder

qemu-img create noobliteqemu.img 16G 

Die beiden Ergebnisse von 'dd' und 'qemu-img' habe ich noch nicht verglichen. qemu-img ist viel maechtiger. dd und andere Befehle wie compare, convert, check, ... sind in qemu-img als subcommand integriert. Die unterstuetzten Formate lassen erahnen was mit qemu-img noch alles moeglich ist (Stichwort: VirtualBox, vmware).

Supported formats: blkdebug blklogwrites blkverify bochs cloop compress copy-on-read dmg file ftp ftps gluster host_cdrom host_device http https iscsi iser luks nbd nfs null-aio null-co nvme qcow qcow2 qed quorum raw rbd replication sheepdog ssh throttle vdi vhdx vmdk vpc vvfat

Ich war zu voreilig. Das Anlegen einer virtuellen SD-Karte benoetigt man nur wenn man das "Image" in Form einer Dateisammlung vorliegen hat. Im Falle 'buster' steckt in dem zip das img drin. Diese z.B. 2020-02-13-raspbian-buster.img beinhaltet alles was man braucht. In ihm stecken 2 Partitionen (boot und root), die man nach dem Erstellen des LOOP-Devices auch beide mounten kann/muss.

Zuerst mal nur losetup eingeben um eine freie Loop-Device-Nummer zu finden.

losetup -P /dev/loopX 2020-02-13-raspbian-buster.img   (X = Nummer eines freies LOOP-Device)
fdisk /dev/loopX

zeigt die 2 Partitionen.

mount /dev/loopXp1 /mnt/sdcard_boot
mount /dev/loopXp2 /mnt/sdcard_root
losetup -d /dev/loopX

Anmerkungen:

Beim Anlegen des Loop-Device gibt man am besten die Option -P mit an. Damit werden vom Kernel dann auch moegliche Partitionen loopXp1, loopXp2, ... gleich mit angeboten.

Die passende DTB-Datei ist entweder bcm2709-rpi-2-b.dtb oder bcm2710-rpi-2-b.dtb. Das urspruengliche DTS-Datei koennte u.a. von hier stammen. Um aber zum Beispiel den Inhalt von zwei dtb Dateien zu vergleichen ist es einfacher sie erst in den Quellcode umzuwandeln. Dazu dient der DeviceTreeCompiler (dtc). Mit z.B. dem Kommando

dtc -I dtb -O dts bcm2710-rpi-2-b.dtb > bcm2710-rpi-2-b.dts

laesst sich der DeviceTree lesbar machen. Z.B. hat mich gewundert, dass es 2 raspi2 dtbs gibt aber kein Hinweis auf den Unterschied. Hier die Aufloesung.

diff bcm2709-rpi-2-b.dts bcm2710-rpi-2-b.dts 
5,6c5,6
<       compatible = "raspberrypi,2-model-b\0brcm,bcm2836";
<       model = "Raspberry Pi 2 Model B";
---
>       compatible = "raspberrypi,2-model-b-rev2\0brcm,bcm2837";
>       model = "Raspberry Pi 2 Model B rev 1.2";
55c55
<                       coefficients = <0xfffffde6 0x635d8>;
---
>                       coefficients = <0xfffffde6 0x64960>;
67c67
<               ranges = <0x7e000000 0x3f000000 0x1000000 0x40000000 0x40000000 0x40000>;
---
>               ranges = <0x7e000000 0x3f000000 0x1000000 0x40000000 0x40000000 0x1000>;
800c800
<                       compatible = "brcm,bcm2836-thermal";
---
>                       compatible = "brcm,bcm2837-thermal";
989,991c989,992
<                       compatible = "arm,cortex-a7";
<                       reg = <0xf00>;
<                       clock-frequency = <0x2faf0800>;
---
>                       compatible = "arm,cortex-a53";
>                       reg = <0x00>;
>                       enable-method = "spin-table";
>                       cpu-release-addr = <0x00 0xd8>;
997,999c998,1001
<                       compatible = "arm,cortex-a7";
<                       reg = <0xf01>;
<                       clock-frequency = <0x2faf0800>;
---
>                       compatible = "arm,cortex-a53";
>                       reg = <0x01>;
>                       enable-method = "spin-table";
>                       cpu-release-addr = <0x00 0xe0>;
1005,1007c1007,1010
<                       compatible = "arm,cortex-a7";
<                       reg = <0xf02>;
<                       clock-frequency = <0x2faf0800>;
---
>                       compatible = "arm,cortex-a53";
>                       reg = <0x02>;
>                       enable-method = "spin-table";
>                       cpu-release-addr = <0x00 0xe8>;
1013,1015c1016,1019
<                       compatible = "arm,cortex-a7";
<                       reg = <0xf03>;
<                       clock-frequency = <0x2faf0800>;
---
>                       compatible = "arm,cortex-a53";
>                       reg = <0x03>;
>                       enable-method = "spin-table";
>                       cpu-release-addr = <0x00 0xf0>;
1213,1216c1217,1220
<               v7_cpu0 = "/cpus/cpu@0";
<               v7_cpu1 = "/cpus/cpu@1";
<               v7_cpu2 = "/cpus/cpu@2";
<               v7_cpu3 = "/cpus/cpu@3";
---
>               cpu0 = "/cpus/cpu@0";
>               cpu1 = "/cpus/cpu@1";
>               cpu2 = "/cpus/cpu@2";
>               cpu3 = "/cpus/cpu@3";

Die bcm2710-rpi-2-b.dtb ist fuer die Rev1.2 mit Cortex A53 CPU wie sie auch im Raspi3 verwendet wird.

qemu-system-aarch64     -M raspi3     -append "rw earlyprintk=ttyAMA0,115200 loglevel=8 console=ttyAMA0,115200 root=PARTUUID=ea7d04d6-02 rootfstype=ext4 rootwait"     -cpu cortex-a53     -dtb boot/bcm2710-rpi-3-b.dtb     -drive id=hd-root,file=2020-02-13-raspbian-buster.img,format=raw     -kernel boot/kernel8.img     -m 1024     -serial mon:stdio

Eine kleine Huerde gabe es noch. In der Append Option war noch die UUID der Rootpartition anzugeben. Die habe ich mit

grep UUID * 

in der Boot-Partition ausgelesen.

Yahoo!

QEMU Raspi Buster Startup.png

Jetzt noch schnell mit 'pi' und 'raspberry' auf der Konsole anmelden und los geht's.

Mist. Maus und Tastatur im GUI gehen nicht. Der Hinweis hier brachte keinen Erfolg. Der Bootvorgang blieb haengen ebenso bei den Optionen:

-device usb-mouse -device usb-kbd -show-cursor

Sobald irgendwas mit USB aktiviert wird gibt's eine CPU Exception.

Mal schauen was die Hilfsskripte unter [1] anders machen.

worker:/opt/QEMU/Buster # extract_kernel.sh 2020-02-13-raspbian-buster.img 
info: setting up loop-device for 2020-02-13-raspbian-buster.img
info: mounting /dev/loop9p1
info: copying files from boot-partition
info: cleanup of loop-mount
id: ‘’: no such user: No such file or directory
info: please change ownership of kernel-files manually

extract_kernel.sh legt die dtb und img Dateien im aktuellen Verzeichnis ab. Der Fehler des Befehl id ruehrt aus der Tatsache, dass ich das extract-Kommando als root (nicht sudo) ausgefuehrt habe.

Der Junge der die Helper-Skripte geschrieben hat ist gut. Vor der zweiten Anwendung von extract_kernel.sh, um die geanderte cmdline.txt auszulesen, habe ich vorsichtshalber eine Kopie cmdline.txt.first angelegt und siehe da, nach der Skript-Ausfuehrung gibt es da eine cmdline.1st. Die Kopie haette ich mir sparen koennen.

Nach dem Umwandeln der img in eine qcow2 und starten mit raspi2.sh gehen auch Maus und Tastatur. Nach diesem Erfolg nun auf zur Venus;-)

VenusOS fuer Raspi2

Erst mal alle aktuellen Versionen 2.92 herunterladen.

  • 2 x swu (SoftWareUpdate)
  • 2 x wic (wic Extension ???)

Jeweils 'Large' und 'Normal'.

Das Skript extract_kernel.sh bricht mit einem Fehler ab und extrahiert aus der wic-Datei nur 2 von 4 dtb -Dateien.

Das Kernel legt im wic nicht in der Boot-Partition, sondern im root/boot.

/boot/zImage-5.10.110-rpi-venus-3

Der Start mit raspi2.sh bringt zwar den blauen victron energy Startbildschirm bleibt aber haengen.

Was mich irritiert ist die Tatsache, dass der Cerbo 2 Partitionen rootfs vorhaelt. Damit ist es moeglich nach einem Update auf die alte Installation zuruekzugreifen und dass es einen Datenpartition (data) gibt, die sich aber nicht auf der SD-Karte befinden und somit auch nicht gemountet werden kann.

Ein Blick in Cerbo:

root@einstein:~# ls -l /dev/mmc*
brw-rw----    1 root     disk      179,   0 Oct 23 07:47 /dev/mmcblk1
brw-rw----    1 root     disk      179,   8 Oct 23 07:47 /dev/mmcblk1boot0
brw-rw----    1 root     disk      179,  16 Oct 23 07:47 /dev/mmcblk1boot1
brw-rw----    1 root     disk      179,   1 Oct 23 07:47 /dev/mmcblk1p1
brw-rw----    1 root     disk      179,   2 Oct 23 07:47 /dev/mmcblk1p2
brw-rw----    1 root     disk      179,   3 Oct 23 07:47 /dev/mmcblk1p3
brw-rw----    1 root     disk      179,   4 Oct 23 07:47 /dev/mmcblk1p4
brw-rw----    1 root     disk      179,   5 Oct 23 07:47 /dev/mmcblk1p5

root@einstein:~# mount | grep mmcblk
/dev/mmcblk1p2 on / type ext4 (rw,relatime)
/dev/mmcblk1p5 on /data type ext4 (rw,noatime)

root@einstein:~# ls -l /data
drwxr-xr-x    3 root     root          4096 Nov  1 13:00 conf
drwxr-xr-x    2 www-data root          4096 Oct 29 06:51 db
drwxr-xr-x    2 root     root          4096 Jan  1  2010 etc
drwxr-xr-x    4 root     root          4096 Jan  1  1970 home
drwx------    2 root     root          4096 Apr  9  2022 keys
drwxr-xr-x   53 root     root          4096 Oct 29 09:56 log
drwx------    2 root     root         16384 Jan  1  1970 lost+found
drwxr-xr-x    3 root     root          4096 Jan  1  1970 themes
drwxr-xr-x    3 root     root          4096 Jan  1  1970 var
drwxr-xr-x    2 root     root          4096 Oct 23 07:48 venus
drwxr-xr-x    2 root     root          4096 Apr  9  2022 vrmfilescache


An der Stelle muss ich erst mal aufgeben, da ich keine Moeglichkeit sehe wie ich den Grund des 'haengenden' Bootvorgangs erkennen kann. Da die normalen Methoden des Bootens () ab dem Splash-Screen nicht erkennbar sind versuche ich einen Umweg ueber den Selbstbau eines Images.

VenusOS Github

Venus OpenSource ist von Github zu klonen. Die Anleitung findet sich hier.

git clone https://github.com/victronenergy/venus.git

Aber spaetestens bei

make prereq 

muss man die Entscheidung treffen, alles auf einem Debian-System zu bewerkstelligen oder recht muehsam das apt-get durch zypper oder yast zu ersetzen.

Es werden folgende Pakete benoetigt:

  • sed
  • wget
  • cvs
  • subversion
  • git-core
  • coreutils
  • unzip
  • texi2html
  • texinfo
  • docbook-utils
  • gawk
  • python-pysqlite2
  • diffstat
  • help2man
  • make
  • gcc
  • build-essential
  • g++
  • desktop-file-utils
  • chrpath
  • u-boot-tools
  • imagemagick
  • zip
  • python-gobject
  • python-gtk2
  • python-dev

Zum Bauen der Images benutzt Victron Energy scheinbar 'Yocto'('OpenEmbedded'). Da auf der Github-Seite im Readme der Befehl 'bitbake' benutzt wird und sich im Image ein Verzeichnis dunfell befindet was auf die Yocto_version 3.1 hinweist.

Die Installation von Yocto ist hier sehr gut beschrieben und schnell ausgefuehrt. Auch das erste TestImage ist recht schnell erstellt. Einzig die Emulation ist bei einer Prozessor-Auslastung von >100% doch recht langsam. Ich haette wahrscheinlich noch mehrere Kerne zuordnen muessen. Das soll mich jetzt nicht weiter stoeren, sondern mal schauen wie man aus den Quellen von VenusOS ein eigenes Image hinbekommt.

Openembedded(-core) muss nicht eigens installiert werden, sondern dies wird mit dem Befehl 'make fetch' gleich mit erledigt.

Beim erste Starten ist 'make fetch' mit Fehlermeldung abgebrochen.

--------------- sources/meta-noto - git@github.com:victronenergy/meta-noto.git -------------
Cloning into 'sources/meta-noto'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Ich hatte bei meinem Github-Account noch keinen ssh-Schluessel hinterlegt. Das ist aber einfach zu loesen.

Mit

ssh-keygen (Alle defaults mit Enter bestaetigen)

eine Schluesselpaar erzeugen und den Inhalt des Publickey in home/<user>/.ssh/id_rsa.pub beim eigenen Github-Konto unter 'Setting' und 'SSH and GPG Keys' als neuen SSH-Key einkopieren. Mit

ssh -vT git@github.com

laest sich testen, ob alles fuer einen SSH-GitClone in Ordnung ist.

make fetch
(base) chris@worker:/opt/venus> make fetch
ln -s configs/dunfell conf

--------------- sources/bitbake - https://github.com/victronenergy/bitbake.git -------------
Cloning into 'sources/bitbake'...
remote: Enumerating objects: 56839, done.
remote: Total 56839 (delta 0), reused 0 (delta 0), pack-reused 56839
Receiving objects: 100% (56839/56839), 20.49 MiB | 6.69 MiB/s, done.
Resolving deltas: 100% (40059/40059), done.
Already on 'dunfell_venus'
Your branch is up to date with 'origin/dunfell_venus'.
branch 'dunfell_venus' set up to track 'origin/dunfell_venus'.
Set git config log.follow=true, to handle all the recipe renames

--------------- sources/meta-noto - git@github.com:victronenergy/meta-noto.git -------------
Cloning into 'sources/meta-noto'...
Warning: Permanently added the ECDSA host key for IP address '140.82.121.3' to the list of known hosts.
remote: Enumerating objects: 199, done.
remote: Counting objects: 100% (33/33), done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 199 (delta 19), reused 17 (delta 17), pack-reused 166
Receiving objects: 100% (199/199), 33.82 KiB | 364.00 KiB/s, done.
Resolving deltas: 100% (94/94), done.
branch 'master_venus' set up to track 'origin/master_venus'.
Switched to a new branch 'master_venus'
branch 'master_venus' set up to track 'origin/master_venus'.
Set git config log.follow=true, to handle all the recipe renames

--------------- sources/meta-openembedded - git@github.com:victronenergy/meta-openembedded.git -------------
Cloning into 'sources/meta-openembedded'...
remote: Enumerating objects: 174625, done.
remote: Counting objects: 100% (2/2), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 174625 (delta 0), reused 0 (delta 0), pack-reused 174623
Receiving objects: 100% (174625/174625), 55.79 MiB | 6.50 MiB/s, done.
Resolving deltas: 100% (102240/102240), done.
Already on 'dunfell_venus'
Your branch is up to date with 'origin/dunfell_venus'.
branch 'dunfell_venus' set up to track 'origin/dunfell_venus'.
Set git config log.follow=true, to handle all the recipe renames

--------------- sources/meta-qt4 - https://github.com/victronenergy/meta-qt4.git -------------
Cloning into 'sources/meta-qt4'...
remote: Enumerating objects: 440, done.
remote: Counting objects: 100% (71/71), done.
remote: Compressing objects: 100% (53/53), done.
remote: Total 440 (delta 23), reused 41 (delta 16), pack-reused 369
Receiving objects: 100% (440/440), 138.87 KiB | 5.79 MiB/s, done.
Resolving deltas: 100% (207/207), done.
Already on 'dunfell'
Your branch is up to date with 'origin/dunfell'.
branch 'dunfell' set up to track 'origin/dunfell'.
Set git config log.follow=true, to handle all the recipe renames

--------------- sources/meta-qt6 - git@github.com:victronenergy/meta-qt6.git -------------
Cloning into 'sources/meta-qt6'...
remote: Enumerating objects: 3658, done.
remote: Counting objects: 100% (166/166), done.
remote: Compressing objects: 100% (109/109), done.
remote: Total 3658 (delta 98), reused 108 (delta 57), pack-reused 3492
Receiving objects: 100% (3658/3658), 625.36 KiB | 1.52 MiB/s, done.
Resolving deltas: 100% (2846/2846), done.
Already on '6.2_venus'
Your branch is up to date with 'origin/6.2_venus'.
branch '6.2_venus' set up to track 'origin/6.2_venus'.
Set git config log.follow=true, to handle all the recipe renames

--------------- sources/meta-swupdate - git@github.com:victronenergy/meta-swupdate.git -------------
Cloning into 'sources/meta-swupdate'...
remote: Enumerating objects: 768, done.
remote: Counting objects: 100% (84/84), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 768 (delta 77), reused 75 (delta 75), pack-reused 684
Receiving objects: 100% (768/768), 117.28 KiB | 659.00 KiB/s, done.
Resolving deltas: 100% (298/298), done.
Already on 'dunfell_venus'
Your branch is up to date with 'origin/dunfell_venus'.
branch 'dunfell_venus' set up to track 'origin/dunfell_venus'.
Set git config log.follow=true, to handle all the recipe renames

--------------- sources/meta-victronenergy - https://github.com/victronenergy/meta-victronenergy.git -------------
Cloning into 'sources/meta-victronenergy'...
remote: Enumerating objects: 23040, done.
remote: Counting objects: 100% (5960/5960), done.
remote: Compressing objects: 100% (2295/2295), done.
remote: Total 23040 (delta 3510), reused 5698 (delta 3348), pack-reused 17080
Receiving objects: 100% (23040/23040), 3.60 MiB | 6.48 MiB/s, done.
Resolving deltas: 100% (13038/13038), done.
Already on 'master'
Your branch is up to date with 'origin/master'.
branch 'master' set up to track 'origin/master'.
Set git config log.follow=true, to handle all the recipe renames

--------------- sources/openembedded-core - https://github.com/victronenergy/openembedded-core.git -------------
Cloning into 'sources/openembedded-core'...
remote: Enumerating objects: 453431, done.
remote: Counting objects: 100% (22/22), done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 453431 (delta 4), reused 3 (delta 3), pack-reused 453409
Receiving objects: 100% (453431/453431), 167.13 MiB | 6.68 MiB/s, done.
Resolving deltas: 100% (311480/311480), done.
Already on 'dunfell_venus'
Your branch is up to date with 'origin/dunfell_venus'.
branch 'dunfell_venus' set up to track 'origin/dunfell_venus'.
Set git config log.follow=true, to handle all the recipe renames

Die Aufforderung nach 'git config log.follow=true' ergab allerdings eine Fehlermeldung. Der Befehl muss lauten:

git config --add log.follow true

An dieser Stelle ist man wohl soweit Images zu erzeugen. Das Readme gibt dazu folgendes an.

# build all, this will take a while though... it builds for all MACHINES as found
# in conf/machines.
make venus-images

# build for a specific machine
make ccgx-venus-image
make beaglebone-venus-image

# build the swu file only
make ccgx-swu

# build from within the bitbake shell.
# this will have the same end result as make ccgx-swu
make ccgx-bb
bitbake venus-swu

Da sind bei weitem nicht alle im Makefile hinterlegten Routinen.

make

(base) chris@worker:/opt/venus> make usage:

Setup

 make prereq
  - Installs required host packages for Debian based distro's.

Checking out:

 make CONFIG='jethro' fetch
  - Downloads public available repositories needed to build for jethro.
 make CONFIG='jethro' fetch-all
  - Downloads all repositories needed to build for jethro, needs victron git access.
 note: It is assumed you only checkout once, iow switching between CONFIGs is not
       supported on purpose, since it would require resetting git branches forcefully
       and that might throw away any pending, not yet pushed work.
       After a 'rm -rf sources && make clean' fetching should work again

Building:

 Venus uses swupdate (https://github.com/sbabic/swupdate) for reliable firmware updates
   make beaglebone-swu
     - Builds a swu file for the beaglebone, which can be installed by sd / usb / or remotely
   make beaglebone-swu-large
     - Builds the large variant of the same
   make swus
     - Builds swu files for all MACHINES
   make swus-large
     - Builds swu files for all MACHINES_LARGE
 Building (bootable) images is also supported, but it depends on the machine
   make beaglebone-venus-image
     - Build an image for the beaglebone. beaglebone can be substituted by another supported MACHINE.
   make venus-images
     - Build images for all MACHINES supported for this CONFIG.
 Optional packages
   make beaglebone-machine
     - Builds everything for a given machine. This includes the image / optional packages
       etc. Hence this make take some time (building java, nodejs etc). I doesn't build a sdk
   make machines
     - like above, but for all MACHINES
 Software development kits
   make sdks
      Builds a SDK per architecture. This takes time!
 Venus
   make venus
     - builds everything supported, all MACHINES and optional things.

Problem resolving:

 make beaglebone-bb
   - Drops you to a shell with oe script being sourced and MACHINE set.
 make clean-keep-sstate
   - Throw away the tmp / deploy dir but keep sstate (the cached build output) to quickly
     repopulate them. If you run out of disk space / want to cleanup deploy this can help you..
 make clean
   - Throw away the tmp / deploy dir, including sstate.

Checking in:

 make update-repos.conf
   - Updates repos.conf to the checked out git branches. It still needs to be committed to git though.

Internals / needed when modifying whitelist etc:

 make build/conf/bblayers.conf
   - Creates the bblayers.conf by looking at the repositories being checkout in sources
     and being in metas.whitelist, if it doesn't exist. Just remove the mentioned file if
     you want to update it forcefully, it will be regenerated.

multiconfig targets exists, which contain mc-, which is mainly useful for big builds on a machine which can run many threads in parallel. For common tasks it is slower since it parses more configs.

'Setup' und 'Checking out' sind vorerst erledigt, jetzt kommt Building.

Mit

cat ./configs/dunfell/machines

sieht man welche Maschinen unterstuetzt werden.

MACHINES=einstein nanopi raspberrypi2 raspberrypi4 beaglebone ccgx canvu500
MACHINES_LARGE=einstein nanopi raspberrypi2 raspberrypi4 beaglebone

Auf geht's.

make raspberrypi2-venus-image
(base) chris@worker:/opt/venus> make raspberrypi2-venus-image
export MACHINE=raspberrypi2 && . ./sources/openembedded-core/oe-init-build-env build sources/bitbake && bitbake venus-image

### Shell environment set up for builds. ###

You can now run 'bitbake <target>'

Common targets are:
    core-image-minimal
    core-image-sato
    meta-toolchain
    meta-ide-support

You can also run generated qemu images with a command like 'runqemu qemux86'.

Other commonly useful commands are:
 - 'devtool' and 'recipetool' handle common recipe tasks
 - 'bitbake-layers' handles common layer tasks
 - 'oe-pkgdata-util' handles common target package tasks
WARNING: Host distribution "opensuseleap-15.3" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Parsing recipes: 100% |###############################################################################################################| Time: 0:00:45
Parsing of 2415 .bb files complete (0 cached, 2415 parsed). 3552 targets, 411 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "1.46.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "opensuseleap-15.3"
TARGET_SYS           = "arm-ve-linux-gnueabi"
MACHINE              = "raspberrypi2"
DISTRO               = "venus"
DISTRO_VERSION       = "v3.00~6"
TUNE_FEATURES        = "arm vfp cortexa7 neon vfpv4 callconvention-hard"
TARGET_FPU           = "hard"
meta-noto            = "master_venus:768f69385083228845a28744fdd9c8f0fcf2a3e8"
meta-multimedia      
meta-networking      
meta-oe              
meta-python          
meta-webserver       = "dunfell_venus:ad916e910a790a1cc7c43bdc654c2da81b8cb17f"
meta-qt4             = "dunfell:a0ad970456578710cf665296262e9f90bac1ccfd"
meta-qt6             = "6.2_venus:8927654c3e57e8240bb59faf16a60b6f0293a8e7"
meta-swupdate        = "dunfell_venus:27bd67dacb29bddb1758f4fd34f37c1e8ffeb257"
meta-alternatives    
meta-bsp             
meta-third-party     
meta-ve-software     
meta-venus           = "master:25d0e4732df87eae88a7b913ad5126511fc49b0a"
meta                 = "dunfell_venus:b3be78d80c0c788147758714580695bfa9df0e8f"

Gut 1 Stunde spaeter mit 16 Kernen, ~3 GHz (5852 BogoMips) und thermischer Belastung :-)

[333296.607648] mce: CPU8: Core temperature above threshold, cpu clock throttled (total events = 2200869)
[333296.607649] mce: CPU0: Core temperature above threshold, cpu clock throttled (total events = 2200871)

dann ein Ergebnis. Wow, sogar V3.00!

Nach einem

qemu-img resize venus-image-raspberrypi2-20221104065618-v3.00~6.rootfs.wic 512M

dann

QEMU Start
worker:/opt/venus/deploy/venus/images/raspberrypi2 # qemu-system-arm     -M raspi2     -append "rw earlyprintk=ttyAMA0,115200 loglevel=8 console=ttyAMA0,115200 rootfstype=ext4 rootwait"     -cpu cortex-a7     -dtb bcm2709-rpi-2-b.dtb     -drive id=hd-root,file=venus-image-raspberrypi2-20221104065618-v3.00~6.rootfs.wic,format=raw     -kernel zImage     -m 1024     -serial mon:stdio  
[    0.000000] Booting Linux on physical CPU 0xf00
[    0.000000] Linux version 5.10.110-rpi-venus-3 (oe-user@oe-host) (arm-ve-linux-gnueabi-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP Fri Nov 4 07:22:22 UTC 2022
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Raspberry Pi 2 Model B
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Reserved memory: created CMA memory pool at 0x38000000, size 64 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000000000-0x000000003bffffff]
[    0.000000]   Normal   empty
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000003bffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000003bffffff]
[    0.000000] On node 0 totalpages: 245760
[    0.000000]   DMA zone: 2160 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 245760 pages, LIFO batch:63
[    0.000000] percpu: Embedded 20 pages/cpu s51916 r8192 d21812 u81920
[    0.000000] pcpu-alloc: s51916 r8192 d21812 u81920 alloc=20*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 243600
[    0.000000] Kernel command line: rw earlyprintk=ttyAMA0,115200 loglevel=8 console=ttyAMA0,115200 rootfstype=ext4 rootwait
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 889872K/983040K available (10240K kernel code, 1333K rwdata, 3100K rodata, 1024K init, 885K bss, 27632K reserved, 65536K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 33798 entries in 100 pages
[    0.000000] ftrace: allocated 100 pages with 3 groups
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000]  Rude variant of Tasks RCU enabled.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] random: get_random_bytes called from start_kernel+0x3b4/0x588 with crng_init=0
[    0.000000] arch_timer: cp15 timer(s) running at 62.50MHz (virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1cd42e208c, max_idle_ns: 881590405314 ns
[    0.000259] sched_clock: 56 bits at 62MHz, resolution 16ns, wraps every 4398046511096ns
[    0.000694] Switching to timer-based delay loop, resolution 16ns
[    0.016354] Console: colour dummy device 80x30
[    0.019399] Calibrating delay loop (skipped), value calculated using timer frequency.. 125.00 BogoMIPS (lpj=625000)
[    0.019821] pid_max: default: 32768 minimum: 301
[    0.021736] LSM: Security Framework initializing
[    0.027081] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.027219] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.066399] cgroup: Disabling memory control group subsystem
[    0.072695] CPU: Testing write buffer coherency: ok
[    0.097538] CPU0: update cpu_capacity 1024
[    0.097696] CPU0: thread -1, cpu 0, socket 15, mpidr 80000f00
[    0.114512] Setting up static identity map for 0x100000 - 0x10003c
[    0.116299] rcu: Hierarchical SRCU implementation.
[    0.134555] smp: Bringing up secondary CPUs ...
[    0.141271] CPU1: update cpu_capacity 1024
[    0.141319] CPU1: thread -1, cpu 1, socket 15, mpidr 80000f01
[    0.151991] CPU2: update cpu_capacity 1024
[    0.152026] CPU2: thread -1, cpu 2, socket 15, mpidr 80000f02
[    0.156658] CPU3: update cpu_capacity 1024
[    0.156687] CPU3: thread -1, cpu 3, socket 15, mpidr 80000f03
[    0.157584] smp: Brought up 1 node, 4 CPUs
[    0.157820] SMP: Total of 4 processors activated (500.00 BogoMIPS).
[    0.157933] CPU: All CPU(s) started in SVC mode.
[    0.183073] devtmpfs: initialized
[    0.233301] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.258641] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.260681] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.284755] pinctrl core: initialized pinctrl subsystem
[    0.317485] NET: Registered protocol family 16
[    0.363274] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.377696] audit: initializing netlink subsys (disabled)
[    0.382753] audit: type=2000 audit(0.350:1): state=initialized audit_enabled=0 res=1
[    0.388382] thermal_sys: Registered thermal governor 'step_wise'
[    0.394264] cpuidle: using governor menu
[    0.396323] hw-breakpoint: CPU 0 debug is powered down!
[    0.400632] Serial: AMBA PL011 UART driver
[    0.465755] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[    0.486606] raspberrypi-firmware soc:firmware: Attached to firmware from 1970-01-05T00:12:17, variant unknown
[    0.496100] raspberrypi-firmware soc:firmware: Firmware hash is 815eb810815eb81081543d5481543d408074cf9c
[    0.605819] Kprobes globally optimized
[    0.630384] cryptd: max_cpu_qlen set to 1000
[    0.653882] bcm2835-dma 3f007000.dma: DMA legacy API manager, dmachans=0x1
[    0.662884] SCSI subsystem initialized
[    0.665599] usbcore: registered new interface driver usbfs
[    0.666283] usbcore: registered new interface driver hub
[    0.666649] usbcore: registered new device driver usb
[    0.692765] clocksource: Switched to clocksource arch_sys_counter
[    3.612138] VFS: Disk quotas dquot_6.6.0
[    3.612878] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    3.615855] FS-Cache: Loaded
[    3.624398] CacheFiles: Loaded
[    3.683198] NET: Registered protocol family 2
[    3.687576] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    3.708991] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    3.709303] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    3.709633] TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    3.710031] TCP: Hash tables configured (established 8192 bind 8192)
[    3.713816] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    3.714477] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    3.721196] NET: Registered protocol family 1
[    3.729561] RPC: Registered named UNIX socket transport module.
[    3.729673] RPC: Registered udp transport module.
[    3.729727] RPC: Registered tcp transport module.
[    3.729780] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    3.748601] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
[    3.772616] Initialise system trusted keyrings
[    3.775935] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[    3.802712] zbud: loaded
[    3.817072] FS-Cache: Netfs 'nfs' registered for caching
[    3.821145] NFS: Registering the id_resolver key type
[    3.821951] Key type id_resolver registered
[    3.822045] Key type id_legacy registered
[    3.822830] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    3.823042] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    3.830173] Key type asymmetric registered
[    3.830388] Asymmetric key parser 'x509' registered
[    3.830803] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    3.831065] io scheduler mq-deadline registered
[    3.831246] io scheduler kyber registered
[    3.847193] bcm2708_fb soc:fb: More displays reported from firmware than supported in driver (3258437191 vs 3)
[    3.847331] bcm2708_fb soc:fb: FB found 3 display(s)
[    3.908498] Console: switching to colour frame buffer device 100x30
[    3.928622] bcm2708_fb soc:fb: Registered framebuffer for display 0, size 800x480
[    3.932603] bcm2708_fb soc:fb: Registered framebuffer for display 1, size 800x480
[    3.934460] bcm2708_fb soc:fb: Registered framebuffer for display 2, size 800x480
[    3.959047] bcm2835-rng 3f104000.rng: hwrng registered
[    3.960079] vc-mem: phys_addr:0x00000000 mem_base=0x00000000 mem_size:0x00000000(0 MiB)
[    3.965256] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
[    4.033046] brd: module loaded
[    4.077713] loop: module loaded
[    4.080787] bcm2835-power bcm2835-power: ASB register ID returned 0x00000000
[    4.086168] Loading iSCSI transport class v2.0-870.
[    4.097696] usbcore: registered new interface driver lan78xx
[    4.097923] usbcore: registered new interface driver smsc95xx
[    4.098096] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    4.308521] Core Release: 2.94a
[    4.308815] Setting default values for core params
[    4.311197] Finished setting default values for core params
[    4.515060] Using Buffer DMA mode
[    4.515217] Periodic Transfer Interrupt Enhancement - disabled
[    4.515277] Multiprocessor Interrupt Enhancement - disabled
[    4.515390] OTG VER PARAM: 0, OTG VER FLAG: 0
[    4.516072] Shared Tx FIFO mode
[    4.520260] 
[    4.520558] WARN::dwc_otg_hcd_init:1072: FIQ DMA bounce buffers: virt = b8054000 dma = 0xf8054000 len=9024
[    4.520834] FIQ FSM acceleration enabled for :
[    4.520834] Non-periodic Split Transactions
[    4.520834] Periodic Split Transactions
[    4.520834] High-Speed Isochronous Endpoints
[    4.520834] Interrupt/Control Split Transaction hack enabled
[    4.521073] dwc_otg: Microframe scheduler enabled
[    4.521819] 
[    4.521858] WARN::hcd_init_fiq:457: FIQ on core 1
[    4.521921] 
[    4.521951] WARN::hcd_init_fiq:458: FIQ ASM at 807f720c length 36
[    4.522231] 
[    4.522260] WARN::hcd_init_fiq:496: MPHI regs_base at bc810000
[    4.523358] dwc_otg 3f980000.usb: DWC OTG Controller
[    4.524221] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
[    4.525681] dwc_otg 3f980000.usb: irq 89, io mem 0x00000000
[    4.526685] Init: Port Power? op_state=1
[    4.526759] Init: Power Port (1)
[    4.535227] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
[    4.535315] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.535388] usb usb1: Product: DWC OTG Controller
[    4.535526] usb usb1: Manufacturer: Linux 5.10.110-rpi-venus-3 dwc_otg_hcd
[    4.535601] usb usb1: SerialNumber: 3f980000.usb
[    4.543062] hub 1-0:1.0: USB hub found
[    4.543975] hub 1-0:1.0: 1 port detected
[    4.555119] dwc_otg: FIQ enabled
[    4.555221] dwc_otg: NAK holdoff enabled
[    4.555281] dwc_otg: FIQ split-transaction FSM enabled
[    4.555458] Module dwc_common_port init
[    4.560301] usbcore: registered new interface driver usb-storage
[    4.564255] mousedev: PS/2 mouse device common for all mice
[    4.579846] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[    4.580730] cpu cpu0: Cannot get clock for CPU0
[    4.580916] raspberrypi-cpufreq: probe of raspberrypi-cpufreq failed with error -2
[    4.583300] sdhci: Secure Digital Host Controller Interface driver
[    4.583355] sdhci: Copyright(c) Pierre Ossman
[    4.589538] sdhost-bcm2835 3f202000.mmc: could not get clk, deferring probe
[    4.594039] sdhci-pltfm: SDHCI platform and OF driver helper
[    4.604356] ledtrig-cpu: registered to indicate activity on CPUs
[    4.606433] hid: raw HID events driver (C) Jiri Kosina
[    4.607655] usbcore: registered new interface driver usbhid
[    4.607718] usbhid: USB HID core driver
[    4.617691] bcm2835_vchiq 3f00b840.mailbox: failed to set channelbase
[    4.617896] vchiq: could not load vchiq
[    4.621659] Initializing XFRM netlink socket
[    4.624204] NET: Registered protocol family 10
[    4.640023] Segment Routing with IPv6
[    4.640894] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    4.647220] NET: Registered protocol family 17
[    4.648726] Key type dns_resolver registered
[    4.649426] Registering SWP/SWPB emulation handler
[    4.712401] registered taskstats version 1
[    4.712867] Loading compiled-in X.509 certificates
[    4.718266] Key type ._fscrypt registered
[    4.718348] Key type .fscrypt registered
[    4.718411] Key type fscrypt-provisioning registered
[    4.756006] uart-pl011 3f201000.serial: cts_event_workaround enabled
[    4.757643] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 114, base_baud = 0) is a PL011 rev2
[    4.827986] printk: console [ttyAMA0] enabled
[    4.839011] bcm2835_thermal 3f212000.thermal: Not able to read trip_temp: -33
[    4.939894] bcm2835-clk 3f101000.cprman: tsens: couldn't lock PLL
[    4.940694] bcm2835_thermal: probe of 3f212000.thermal failed with error -33
[    4.947256] sdhost: log_buf @ (ptrval) (f8053000)
[    5.001318] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[    5.006224] of_cfs_init
[    5.009567] of_cfs_init: OK
[    5.019528] uart-pl011 3f201000.serial: no DMA platform data
[    5.025795] Waiting for root device ...
[    5.050426] mmc0: host does not support reading read-only switch, assuming write-enable
[    5.052724] mmc0: new high speed SD card at address 4567
[    5.059031] mmcblk0: mmc0:4567 QEMU! 512 MiB
[    5.085691]  mmcblk0: p1 p2

Beim Einbinden des Rootfs bleibt er haengen. Ich versuchs mal mit der Angabe der UUIDs.

losetup -P /dev/loop22 venus-image-raspberrypi2-20221104065618-v3.00~6.rootfs.wic
fdisk /dev/loop22

Welcome to fdisk (util-linux 2.36.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/loop22: 512 MiB, 536870912 bytes, 1048576 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x022b2b1f

Device        Boot Start    End Sectors   Size Id Type
/dev/loop22p1 *     8192  92809   84618  41.3M  c W95 FAT32 (LBA)
/dev/loop22p2      98304 895493  797190 389.3M 83 Linux

Command (m for help): q
blkid /dev/loop22
/dev/loop22: PTUUID="022b2b1f" PTTYPE="dos"

blkid /dev/loop22p1
/dev/loop22p1: SEC_TYPE="msdos" LABEL_FATBOOT="boot" LABEL="boot" UUID="7E51-4EB6" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="022b2b1f-01"

blkid /dev/loop22p2
/dev/loop22p2: LABEL="root" UUID="7ebe8071-cb7e-4ae6-939a-ea5b0600a864" BLOCK_SIZE="1024" TYPE="ext4" PARTUUID="022b2b1f-02"

Auf ein Neues.

 qemu-system-arm     -M raspi2     -append "rw earlyprintk=ttyAMA0,115200 loglevel=8 console=ttyAMA0,115200 root=PARTUUID=022b2b1f-02 rootfstype=ext4 rootwait"     -cpu cortex-a7     -dtb bcm2709-rpi-2-b.dtb     -drive id=hd-root,file=venus-image-raspberrypi2-20221104065618-v3.00~6.rootfs.wic,format=raw     -kernel zImage     -m 1024     -serial mon:stdio

ERFOLG!

QEMU Raspi Venus Startup.png


VenusOS Boot
[    0.000000] Booting Linux on physical CPU 0xf00
[    0.000000] Linux version 5.10.110-rpi-venus-3 (oe-user@oe-host) (arm-ve-linux-gnueabi-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP Fri Nov 4 07:22:22 UTC 2022
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Raspberry Pi 2 Model B
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Reserved memory: created CMA memory pool at 0x38000000, size 64 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000000000-0x000000003bffffff]
[    0.000000]   Normal   empty
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000003bffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000003bffffff]
[    0.000000] On node 0 totalpages: 245760
[    0.000000]   DMA zone: 2160 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 245760 pages, LIFO batch:63
[    0.000000] percpu: Embedded 20 pages/cpu s51916 r8192 d21812 u81920
[    0.000000] pcpu-alloc: s51916 r8192 d21812 u81920 alloc=20*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 243600
[    0.000000] Kernel command line: rw earlyprintk=ttyAMA0,115200 loglevel=8 console=ttyAMA0,115200 root=PARTUUID=022b2b1f-02 rootfstype=ext4 rootwait
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 889872K/983040K available (10240K kernel code, 1333K rwdata, 3100K rodata, 1024K init, 885K bss, 27632K reserved, 65536K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 33798 entries in 100 pages
[    0.000000] ftrace: allocated 100 pages with 3 groups
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000]  Rude variant of Tasks RCU enabled.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] random: get_random_bytes called from start_kernel+0x3b4/0x588 with crng_init=0
[    0.000000] arch_timer: cp15 timer(s) running at 62.50MHz (virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1cd42e208c, max_idle_ns: 881590405314 ns
[    0.000252] sched_clock: 56 bits at 62MHz, resolution 16ns, wraps every 4398046511096ns
[    0.000625] Switching to timer-based delay loop, resolution 16ns
[    0.014194] Console: colour dummy device 80x30
[    0.016962] Calibrating delay loop (skipped), value calculated using timer frequency.. 125.00 BogoMIPS (lpj=625000)
[    0.017390] pid_max: default: 32768 minimum: 301
[    0.019142] LSM: Security Framework initializing
[    0.024237] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.024366] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.069464] cgroup: Disabling memory control group subsystem
[    0.075550] CPU: Testing write buffer coherency: ok
[    0.100563] CPU0: update cpu_capacity 1024
[    0.100756] CPU0: thread -1, cpu 0, socket 15, mpidr 80000f00
[    0.116337] Setting up static identity map for 0x100000 - 0x10003c
[    0.118108] rcu: Hierarchical SRCU implementation.
[    0.134217] smp: Bringing up secondary CPUs ...
[    0.141959] CPU1: update cpu_capacity 1024
[    0.142004] CPU1: thread -1, cpu 1, socket 15, mpidr 80000f01
[    0.151489] CPU2: update cpu_capacity 1024
[    0.151521] CPU2: thread -1, cpu 2, socket 15, mpidr 80000f02
[    0.158114] CPU3: update cpu_capacity 1024
[    0.158147] CPU3: thread -1, cpu 3, socket 15, mpidr 80000f03
[    0.158972] smp: Brought up 1 node, 4 CPUs
[    0.159251] SMP: Total of 4 processors activated (500.00 BogoMIPS).
[    0.159359] CPU: All CPU(s) started in SVC mode.
[    0.181303] devtmpfs: initialized
[    0.231869] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.258625] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.260725] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.285015] pinctrl core: initialized pinctrl subsystem
[    0.318674] NET: Registered protocol family 16
[    0.363935] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.379506] audit: initializing netlink subsys (disabled)
[    0.384441] audit: type=2000 audit(0.360:1): state=initialized audit_enabled=0 res=1
[    0.390352] thermal_sys: Registered thermal governor 'step_wise'
[    0.394997] cpuidle: using governor menu
[    0.397511] hw-breakpoint: CPU 0 debug is powered down!
[    0.402176] Serial: AMBA PL011 UART driver
[    0.469832] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[    0.495914] raspberrypi-firmware soc:firmware: Attached to firmware from 1970-01-05T00:12:17, variant unknown
[    0.504551] raspberrypi-firmware soc:firmware: Firmware hash is 815eb810815eb81081543d5481543d408074cf9c
[    0.611510] Kprobes globally optimized
[    0.643921] cryptd: max_cpu_qlen set to 1000
[    0.666485] bcm2835-dma 3f007000.dma: DMA legacy API manager, dmachans=0x1
[    0.675384] SCSI subsystem initialized
[    0.678515] usbcore: registered new interface driver usbfs
[    0.679107] usbcore: registered new interface driver hub
[    0.679479] usbcore: registered new device driver usb
[    0.707211] clocksource: Switched to clocksource arch_sys_counter
[    3.787825] VFS: Disk quotas dquot_6.6.0
[    3.788348] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    3.791578] FS-Cache: Loaded
[    3.811024] CacheFiles: Loaded
[    3.881657] NET: Registered protocol family 2
[    3.883966] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    3.910250] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    3.910521] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    3.910845] TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    3.911253] TCP: Hash tables configured (established 8192 bind 8192)
[    3.913627] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    3.913991] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    3.918454] NET: Registered protocol family 1
[    3.927675] RPC: Registered named UNIX socket transport module.
[    3.927807] RPC: Registered udp transport module.
[    3.927865] RPC: Registered tcp transport module.
[    3.927920] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    3.960263] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
[    3.984288] Initialise system trusted keyrings
[    3.989711] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[    4.018655] zbud: loaded
[    4.029367] FS-Cache: Netfs 'nfs' registered for caching
[    4.035602] NFS: Registering the id_resolver key type
[    4.036620] Key type id_resolver registered
[    4.036734] Key type id_legacy registered
[    4.037940] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    4.038174] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    4.046921] Key type asymmetric registered
[    4.047185] Asymmetric key parser 'x509' registered
[    4.047690] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    4.048003] io scheduler mq-deadline registered
[    4.048215] io scheduler kyber registered
[    4.065568] bcm2708_fb soc:fb: More displays reported from firmware than supported in driver (3627055448 vs 3)
[    4.065709] bcm2708_fb soc:fb: FB found 3 display(s)
[    4.132039] Console: switching to colour frame buffer device 100x30
[    4.149887] bcm2708_fb soc:fb: Registered framebuffer for display 0, size 800x480
[    4.159967] bcm2708_fb soc:fb: Registered framebuffer for display 1, size 800x480
[    4.162194] bcm2708_fb soc:fb: Registered framebuffer for display 2, size 800x480
[    4.186672] bcm2835-rng 3f104000.rng: hwrng registered
[    4.187804] vc-mem: phys_addr:0x00000000 mem_base=0x00000000 mem_size:0x00000000(0 MiB)
[    4.192352] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
[    4.273423] brd: module loaded
[    4.337045] loop: module loaded
[    4.340230] bcm2835-power bcm2835-power: ASB register ID returned 0x00000000
[    4.346156] Loading iSCSI transport class v2.0-870.
[    4.359650] usbcore: registered new interface driver lan78xx
[    4.359928] usbcore: registered new interface driver smsc95xx
[    4.360156] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    4.567325] Core Release: 2.94a
[    4.567675] Setting default values for core params
[    4.569891] Finished setting default values for core params
[    4.772950] Using Buffer DMA mode
[    4.773109] Periodic Transfer Interrupt Enhancement - disabled
[    4.773170] Multiprocessor Interrupt Enhancement - disabled
[    4.773328] OTG VER PARAM: 0, OTG VER FLAG: 0
[    4.774412] Shared Tx FIFO mode
[    4.780433] 
[    4.780830] WARN::dwc_otg_hcd_init:1072: FIQ DMA bounce buffers: virt = b8054000 dma = 0xf8054000 len=9024
[    4.781131] FIQ FSM acceleration enabled for :
[    4.781131] Non-periodic Split Transactions
[    4.781131] Periodic Split Transactions
[    4.781131] High-Speed Isochronous Endpoints
[    4.781131] Interrupt/Control Split Transaction hack enabled
[    4.781397] dwc_otg: Microframe scheduler enabled
[    4.782710] 
[    4.782896] WARN::hcd_init_fiq:457: FIQ on core 1
[    4.783078] 
[    4.783133] WARN::hcd_init_fiq:458: FIQ ASM at 807f720c length 36
[    4.783961] 
[    4.784074] WARN::hcd_init_fiq:496: MPHI regs_base at bc810000
[    4.785570] dwc_otg 3f980000.usb: DWC OTG Controller
[    4.786662] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
[    4.788153] dwc_otg 3f980000.usb: irq 89, io mem 0x00000000
[    4.789223] Init: Port Power? op_state=1
[    4.789312] Init: Power Port (1)
[    4.797512] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
[    4.797611] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.797699] usb usb1: Product: DWC OTG Controller
[    4.797842] usb usb1: Manufacturer: Linux 5.10.110-rpi-venus-3 dwc_otg_hcd
[    4.797918] usb usb1: SerialNumber: 3f980000.usb
[    4.805428] hub 1-0:1.0: USB hub found
[    4.806662] hub 1-0:1.0: 1 port detected
[    4.815508] dwc_otg: FIQ enabled
[    4.815589] dwc_otg: NAK holdoff enabled
[    4.815650] dwc_otg: FIQ split-transaction FSM enabled
[    4.816042] Module dwc_common_port init
[    4.821710] usbcore: registered new interface driver usb-storage
[    4.823465] mousedev: PS/2 mouse device common for all mice
[    4.836322] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[    4.837344] cpu cpu0: Cannot get clock for CPU0
[    4.837553] raspberrypi-cpufreq: probe of raspberrypi-cpufreq failed with error -2
[    4.839444] sdhci: Secure Digital Host Controller Interface driver
[    4.839505] sdhci: Copyright(c) Pierre Ossman
[    4.846838] sdhost-bcm2835 3f202000.mmc: could not get clk, deferring probe
[    4.853974] sdhci-pltfm: SDHCI platform and OF driver helper
[    4.868173] ledtrig-cpu: registered to indicate activity on CPUs
[    4.872071] hid: raw HID events driver (C) Jiri Kosina
[    4.873462] usbcore: registered new interface driver usbhid
[    4.873535] usbhid: USB HID core driver
[    4.884333] bcm2835_vchiq 3f00b840.mailbox: failed to set channelbase
[    4.884474] vchiq: could not load vchiq
[    4.888227] Initializing XFRM netlink socket
[    4.890476] NET: Registered protocol family 10
[    4.906434] Segment Routing with IPv6
[    4.907266] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    4.912923] NET: Registered protocol family 17
[    4.914327] Key type dns_resolver registered
[    4.914999] Registering SWP/SWPB emulation handler
[    4.970385] registered taskstats version 1
[    4.970823] Loading compiled-in X.509 certificates
[    4.977088] Key type ._fscrypt registered
[    4.977168] Key type .fscrypt registered
[    4.977244] Key type fscrypt-provisioning registered
[    5.014706] uart-pl011 3f201000.serial: cts_event_workaround enabled
[    5.016610] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 114, base_baud = 0) is a PL011 rev2
[    5.071911] printk: console [ttyAMA0] enabled
[    5.082269] bcm2835_thermal 3f212000.thermal: Not able to read trip_temp: -33
[    5.183049] bcm2835-clk 3f101000.cprman: tsens: couldn't lock PLL
[    5.183933] bcm2835_thermal: probe of 3f212000.thermal failed with error -33
[    5.190886] sdhost: log_buf @ (ptrval) (f8053000)
[    5.244406] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[    5.250584] of_cfs_init
[    5.254701] of_cfs_init: OK
[    5.264609] uart-pl011 3f201000.serial: no DMA platform data
[    5.275096] Waiting for root device PARTUUID=022b2b1f-02...
[    5.293854] mmc0: host does not support reading read-only switch, assuming write-enable
[    5.296037] mmc0: new high speed SD card at address 4567
[    5.302364] mmcblk0: mmc0:4567 QEMU! 512 MiB
[    5.326623]  mmcblk0: p1 p2
[    5.421087] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    5.424062] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    5.431244] devtmpfs: mounted
[    5.599281] Freeing unused kernel memory: 1024K
[    5.811385] Run /sbin/init as init process
[    5.811781]   with arguments:
[    5.812060]     /sbin/init
[    5.812306]   with environment:
[    5.812527]     HOME=/
[    5.812731]     TERM=linux
[    5.812908]     earlyprintk=ttyAMA0,115200
INIT: version 2.96 booting
[    8.094047] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    8.557684] random: fast init done
sd card is too small
data partition is not mounted!
Starting udev
[    9.981435] udevd[153]: starting version 3.2.9
[   10.144027] random: udevd: uninitialized urandom read (16 bytes read)
[   10.151840] random: udevd: uninitialized urandom read (16 bytes read)
[   10.155879] random: udevd: uninitialized urandom read (16 bytes read)
[   10.341465] udevd[154]: starting eudev-3.2.9
[   12.194003] urandom_read: 1 callbacks suppressed
[   12.195104] random: udevd: uninitialized urandom read (16 bytes read)
[   25.403057] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
urandom start: failed.
[   35.934402] cam-dummy-reg: disabling
Starting watchdog
[   57.863040] watchdog: watchdog0: watchdog did not stop!
mkdir: can't create directory '/data/venus': Read-only file system
/etc/rcS.d/S90machine-conf.sh: line 6: /data/venus/unique-id: No such file or directory
INIT: Entering runlevel: 5
Configuring network interfaces... done.
[   64.200742] random: dbus-uuidgen: uninitialized urandom read (12 bytes read)
[   64.202996] random: dbus-uuidgen: uninitialized urandom read (8 bytes read)
Starting system message bus: Setting up watches.
Watches established.
[   64.459932] random: dbus-daemon: uninitialized urandom read (12 bytes read)
/var/run/dbus/ CREATE system_bus_socket
Starting haveged: haveged: command socket is listening at fd 3
haveged: haveged starting up
[  OK  ]
Starting advanced power management daemon: No APM support in kernel
(failed.)
Starting bluetooth: bluetoothd.
starting DNS forwarder and DHCP server: dnsmasq... done.
Starting syslogd/klogd: [   68.709260] Bluetooth: Core ver 2.22
[   68.715304] NET: Registered protocol family 31
[   68.718522] Bluetooth: HCI device and connection manager initialized
[   68.722928] Bluetooth: HCI socket layer initialized
[   68.727619] Bluetooth: L2CAP socket layer initialized
[   68.732422] Bluetooth: SCO socket layer initialized done
Starting php-fpm [   79.682054] random: crng init done
[   79.682690] random: 2 urandom warning(s) missed due to ratelimiting done
Starting Connection Manager
ls: /data/var/lib/connman: No such file or directory
starting IPv4LL configuration daemon: avahi-autoipd... Cannot find device "eth0"
done.
starting resolv.conf manager: resolv-watch... done.
touch: /service/vrmlogger/down: No such file or directory
Starting crond: OK
sed: /sys/class/net/eth0/address: No such file or directory
Checking available software versions...
dbus-daemon[569]: [system] Activating service name='fi.w1.wpa_supplicant1' requested by ':1.1' (uid=0 pid=617 comm="connmand --nodnsproxy --nodaemon ") (using servicehelper)
Active rootfs: 1
Active version: 20221104065618 v3.00~6
dbus-daemon[569]: [system] Successfully activated service 'fi.w1.wpa_supplicant1'
Filesystem errors detected on backup rootfs

root@raspberrypi2:~# 

Ein paar Meldungen schreien nach Aufmerksamkeit.

  • sd card is too small data partition is not mounted!
  • folglich: mkdir: can't create directory '/data/venus': Read-only file system
  • urandom start: failed.
  • vchiq: could not load vchiq
  • touch: /service/vrmlogger/down: No such file or directory
  • sed: /sys/class/net/eth0/address: No such file or directory
  • ls: /data/var/lib/connman: No such file or directory
  • starting IPv4LL configuration daemon: avahi-autoipd... Cannot find device "eth0"
  • sed: /mnt//opt/victronenergy/version: No such file or directory
Hinweis zu vchiq: VCHIQ is a command interface between the running Linux kernel and peripherals (among other things) in the VideoCore silicon. /dev/vchiq provides generic userspace access to those commands for use by (at minimum) the camera and audio subsystems as well. It's a decently dangerous interface to expose to random programs, hence the somewhat restrictive permissions by default.

Nachdem der Boot geglueckt ist sollte man noch die data-Partition anlegen. In meinem CerboGX wird dazu die Partition 5 verwendet. Standard ist aber wohl die Partion 4. Das liegt wohl daran, dass die anderen Partition als Schatten-Partitionen fuer die jeweils letzte Version dienen.

root@einstein:/# mount |grep mmc
/dev/mmcblk1p2 on / type ext4 (rw,relatime)
/dev/mmcblk1p5 on /data type ext4 (rw,noatime)

Fuer da Qemu-Image lasse ich die Moeglichkeit der Schattenpartitionen auszer Acht. Die Partition 3 dient nur als Option. Vielleciht ist sie ja mal noch nuetzlich.

qemu-img resize venus-image-raspberrypi2-20221106055342-v3.00~6.rootfs.wic 4G
losetup -P loop20 venus-image-raspberrypi2-20221106055342-v3.00~6.rootfs.wic 
fdisk /dev/loop20 (n p 3 +1.5G, n p default)
mkfs.ext4 /dev/loop20p3
mkfs.ext4 /dev/loop20p4

Netzwerk in Qemu

Die Optionen -nic -net -netdev gehen in einigen Tutorials munter durcheinander. Oft sind die Angaben schon etwas alter und somit nicht immer funktional. Einen guten Aufschluss liefert folgender Artikel

Gleich mal eine Falle.

qemu-system-arm: network script /etc/qemu-ifup failed with status 256

qemu-ifup liegt bei mir nicht in /etc, sondern in /usr/share/qemu/qemu-ifup

also

cd /etc
ln -s /usr/share/qemu/qemu-ifup qemu-ifup

Der Bootlog zeigt u.a. folgende Meldung

sed: /sys/class/net/eth0/address: No such file or directory
INIT: Entering runlevel: 5
Configuring network interfaces... done.

VenusOS SDK

So richtig weiter komme ich in dem (Standard-)Image nicht, dafuer fehlen einfach zu viele Tools und die Moeglichkeit Software nachzuinstallieren, deshalb versuche ich es mal mit dem venus-sdk.

Venus-SDK benoetigt g++-Version >=8. Das Standard-Image ließ sich mit Version 7 klaglos uebersetzen. Beim SDK brach der Build-Prozess bei einem QT6-Programm ab.

Waehrend des Kompiliervorgangs mit g++-9 kam eine erfolgreiche Patchmeldung.

NOTE: Executing Tasks
WARNING: qtconnectivity-6.2.3-r0 do_patch: Fuzz detected:

Applying patch 0001-Cache-the-UUID-of-characteristics.patch
patching file src/bluetooth/qlowenergycontroller_bluezdbus.cpp
Hunk #1 succeeded at 591 (offset 11 lines).
Hunk #2 succeeded at 954 (offset 14 lines).
Hunk #3 succeeded at 983 (offset 14 lines).
Hunk #4 succeeded at 1025 (offset 14 lines).
Hunk #5 succeeded at 1069 (offset 14 lines).
patching file src/bluetooth/qlowenergycontroller_bluezdbus_p.h
Hunk #1 succeeded at 150 with fuzz 1 (offset 3 lines).

The context lines in the patches can be updated with devtool:

    devtool modify qtconnectivity
    devtool finish --force-patch-refresh qtconnectivity <layer_path>

Don't forget to review changes done by devtool!

WARNING: qtconnectivity-6.2.3-r0 do_patch: QA Issue: Patch log indicates that patches do not apply cleanly. [patch-fuzz]

Nach dem Kompilieren befindet sich in Verzeichnis deploy/venus/sdk ein Skript zum Insatallieren des SDK auf dem Rechner.

(base) chris@worker:/opt/venus/deploy/venus/sdk> ./venus-dunfell-x86_64-arm-cortexa7hf-neon-vfpv4-toolchain-v3.00~6.sh 
Victron Energy SDK installer version v3.00~6
============================================
Enter target directory for SDK (default: /opt/venus/dunfell-arm-cortexa7hf-neon-vfpv4): 
You are about to install the SDK to "/opt/venus/dunfell-arm-cortexa7hf-neon-vfpv4". Proceed [Y/n]? Y
Extracting SDK.........................................................done
Setting it up...done
SDK has been successfully set up and is ready to be used.
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
 $ . /opt/venus/dunfell-arm-cortexa7hf-neon-vfpv4/environment-setup-cortexa7hf-neon-vfpv4-ve-linux-gnueabi
(base) chris@worker:/opt/venus/deploy/venus/sdk> 

VenusOS Inspection

Process Overview

VenusOS Process Overview after first Start
root@raspberrypi2:/# ps 
  PID USER       VSZ STAT COMMAND
    1 root      1760 S    init [5]
    2 root         0 SW   [kthreadd]
    3 root         0 IW<  [rcu_gp]
    4 root         0 IW<  [rcu_par_gp]
    6 root         0 IW<  [kworker/0:0H-mm]
    8 root         0 IW<  [mm_percpu_wq]
    9 root         0 SW   [rcu_tasks_rude_]
   10 root         0 SW   [rcu_tasks_trace]
   11 root         0 SW   [ksoftirqd/0]
   12 root         0 IW   [rcu_sched]
   13 root         0 SW   [migration/0]
   14 root         0 IW   [kworker/0:1-eve]
   15 root         0 SW   [cpuhp/0]
   16 root         0 SW   [cpuhp/1]
   17 root         0 SW   [migration/1]
   18 root         0 SW   [ksoftirqd/1]
   21 root         0 SW   [cpuhp/2]
   22 root         0 SW   [migration/2]
   23 root         0 SW   [ksoftirqd/2]
   25 root         0 IW<  [kworker/2:0H-ev]
   26 root         0 SW   [cpuhp/3]
   27 root         0 SW   [migration/3]
   28 root         0 SW   [ksoftirqd/3]
   29 root         0 IW   [kworker/3:0-mm_]
   30 root         0 IW<  [kworker/3:0H-kb]
   31 root         0 SW   [kdevtmpfs]
   32 root         0 IW<  [netns]
   34 root         0 SW   [kauditd]
   35 root         0 IW   [kworker/1:2-mm_]
   36 root         0 IW   [kworker/2:1-mm_]
   37 root         0 SW   [khungtaskd]
   38 root         0 SW   [oom_reaper]
   39 root         0 IW<  [writeback]
   40 root         0 SW   [kcompactd0]
   49 root         0 IW<  [cryptd]
   59 root         0 IW<  [kblockd]
   60 root         0 IW<  [blkcg_punt_bio]
   61 root         0 SW   [watchdogd]
   62 root         0 IW<  [kworker/2:1H-kb]
   63 root         0 IW<  [rpciod]
   64 root         0 IW<  [kworker/u9:0]
   65 root         0 IW<  [xprtiod]
   73 root         0 SW   [kswapd0]
   74 root         0 IW<  [nfsiod]
   75 root         0 IW   [kworker/3:1-mm_]
   76 root         0 IW   [kworker/2:2-eve]
   77 root         0 IW<  [iscsi_eh]
   78 root         0 IW<  [iscsi_destroy]
   79 root         0 IW<  [dwc_otg]
   80 root         0 IW<  [DWC Notificatio]
   81 root         0 SW<  [vchiq-slot/0]
   82 root         0 SW<  [vchiq-recy/0]
   83 root         0 SW<  [vchiq-sync/0]
   84 root         0 IW<  [kworker/1:1H-kb]
   85 root         0 IW<  [ipv6_addrconf]
   92 root         0 IW   [kworker/u8:1-ev]
   99 root         0 IW<  [zswap-shrink]
  102 root         0 IW   [kworker/1:5-mm_]
  103 root         0 IW<  [mmc_complete]
  106 root         0 SW   [jbd2/mmcblk0p2-]
  107 root         0 IW<  [ext4-rsv-conver]
  154 root     12300 S    /sbin/udevd -d
  158 root         0 IW<  [kworker/0:2H-mm]
  166 root         0 IW<  [kworker/1:2H-kb]
  180 root         0 IW<  [kworker/3:2H-kb]
  330 root         0 IW   [kworker/u8:2-ev]
  513 root      1800 S    /usr/sbin/watchdog -c /etc/watchdog.conf
  567 root      2956 S    {dbus-daemon-wat} /bin/sh /usr/bin/dbus-daemon-watch
  569 messageb  2968 S    dbus-daemon --system --nofork
  572 root      7596 S    /usr/sbin/haveged -w 1024 -v 1
  581 root      4492 S    /usr/libexec/bluetooth/bluetoothd -E -f /etc/bluetoo
  588 root         0 IW   [kworker/0:2-mm_]
  593 nobody    2092 S    /usr/bin/dnsmasq -x /var/run/dnsmasq.pid -C /etc/dns
  597 root      2692 S    /sbin/syslogd -n -O /var/log/messages -s 100 -b 6
  600 root      2692 S    /sbin/klogd -n
  609 root     22736 S    php-fpm: master process (/etc/php-fpm.conf)
  610 www-data 22736 S    php-fpm: pool www
  611 www-data 22736 S    php-fpm: pool www
  616 root      2956 S    {connmand-watch.} /bin/sh /usr/sbin/connmand-watch.s
  617 root      4956 S    connmand --nodnsproxy --nodaemon
  638 root      2956 S    {resolv-watch} /bin/sh /usr/sbin/resolv-watch
  645 root      2956 S    {rc} /bin/sh /etc/init.d/rc 5
  658 root      2756 S    /usr/sbin/crond
  672 root      2956 S    {svscanboot} /bin/sh /usr/bin/svscanboot
  682 root      1776 S    svscan /service
  684 root      1600 S    readproctitle service errors: ......................
  685 root         0 IW   [kworker/3:2]
  687 root      1612 S    supervise venus-html5-logger
  688 root      1612 S    supervise log
  689 root      1612 S    supervise simple-upnpd
  690 root      1612 S    supervise log
  691 root      1612 S    supervise ppp
  692 root      1612 S    supervise log
  694 root      1612 S    supervise nginx
  695 root      1612 S    supervise log
  696 root      1756 S    multilog t s25000 n4 /var/log/simple-upnpd
  697 root      1612 S    supervise netmon
  698 root      1612 S    supervise log
  699 root      1612 S    supervise localsettings
  700 nobody    1764 S    gwsocket --stdout
  701 root      1612 S    supervise log
  702 root      1624 S    multilog t s25000 n4 /var/log/venus-html5-logger
  703 root      1612 S    supervise llmnrd
  704 root      1612 S    supervise log
  705 root      3048 S    {start-simple-up} /bin/sh /bin/start-simple-upnpd
  706 root      1612 S    supervise dbus-vebus-to-pvinverter
  707 root      1612 S    supervise log
  708 root      1612 S    supervise dbus-tempsensor-relay
  710 root      1612 S    supervise log
  711 root      1612 S    supervise dbus-systemcalc-py
  712 root      6508 S    nginx: master process /usr/sbin/nginx
  713 root      1756 S    multilog t s25000 n4 /var/log/netmon
  714 root      1612 S    supervise log
  715 root      1612 S    supervise dbus-pump
  716 root      1612 S    supervise log
  717 root      1624 S    multilog t s25000 n4 /var/volatile/log/llmnrd
  718 root      1612 S    supervise dbus-generator-starter
  719 nobody    1744 S    /usr/sbin/llmnrd -H venus -6
  720 root      1612 S    supervise log
  721 root      1624 S    multilog t s25000 n4 /var/log/nginx
  723 root      1756 R    multilog t s25000 n4 /var/log/localsettings
  725 root     19580 S    {dbus_vebus_to_p} /usr/bin/python3 -u /opt/victronen
  726 root      1624 S    multilog t s25000 n4 /var/log/dbus-vebus-to-pvinvert
  729 root      9076 S    /usr/sbin/wpa_supplicant -u -O /var/run/wpa_supplica
  730 root      1756 S    multilog t s25000 n4 /var/log/dbus-generator-starter
  734 root      1756 S    multilog t s25000 n4 /var/log/dbus-systemcalc-py
  742 root         0 IW<  [kworker/2:2H-kb]
  764 root      2956 S    {rc} /bin/sh /etc/init.d/rc 5
  765 root      2560 S    sleep 300
  779 root      7764 S    -sh
  780 root      7764 S    -sh
  797 www-data  6660 S    nginx: worker process
 2334 root         0 IW   [kworker/1:0-mm_]
 2362 root         0 IW   [kworker/u8:0-ev]
 2453 root      2560 S    sleep 60
 2776 root     20364 S    {dbus_generator.} /usr/bin/python3 -u /opt/victronen
 2792 root     24876 R    {localsettings.p} /usr/bin/python3 -u /opt/victronen
 2808 root      1924 S    inotifywait -qq -t 30 -e close_write /run/connman /r
 2809 root     18452 R    {dbus_systemcalc} /usr/bin/python3 -u /opt/victronen
 2814 root     10808 R    {netmon} /usr/bin/python3 -u /opt/victronenergy/netm
 2818 root      2560 S    sleep 1
 2819 root      2784 R    ps
root@raspberrypi2:/# 

Geladene Module

root@raspberrypi2:/# lsmod
Module                  Size  Used by
xt_connmark            16384  2
iptable_nat            16384  0
nf_nat                 49152  1 iptable_nat
iptable_mangle         16384  1
bluetooth             405504  4
ecdh_generic           16384  1 bluetooth
ecc                    40960  1 ecdh_generic
rfkill                 32768  3 bluetooth
ip6table_filter        16384  1
ip6_tables             28672  1 ip6table_filter
xt_conntrack           16384  2
nf_conntrack          139264  3 xt_connmark,xt_conntrack,nf_nat
nf_defrag_ipv6         20480  1 nf_conntrack
nf_defrag_ipv4         16384  1 nf_conntrack
iptable_filter         16384  1
ip_tables              28672  3 iptable_mangle,iptable_filter,iptable_nat
x_tables               32768  7 iptable_mangle,ip_tables,iptable_filter,xt_connmark,ip6table_filter,xt_conntrack,ip6_tables
raspberrypi_hwmon      16384  0
uio_pdrv_genirq        16384  0
uio                    20480  1 uio_pdrv_genirq
fixed                  16384  0
root@raspberrypi2:/#

Netzwerkschnittstellen

(aus einer laufenden Installation (CerboGX V2.92))

root@einstein:/# ifconfig
ap0       Link encap:Ethernet  HWaddr 26:18:C6:2D:17:2A  
          inet addr:172.24.24.1  Bcast:172.24.24.255  Mask:255.255.255.0
          inet6 addr: fe80::2418:c6ff:fe2d:172a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1450  Metric:1
          RX packets:224548 errors:0 dropped:0 overruns:0 frame:0
          TX packets:92 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:17133 (16.7 KiB)  TX bytes:13773 (13.4 KiB)

can0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          UP RUNNING NOARP  MTU:16  Metric:1
          RX packets:2 errors:2 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:16 (16.0 B)  TX bytes:0 (0.0 B)
          Interrupt:67 

can1      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          UP RUNNING NOARP  MTU:16  Metric:1
          RX packets:8467091 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2419166 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:57455259 (54.7 MiB)  TX bytes:19353328 (18.4 MiB)

eth0      Link encap:Ethernet  HWaddr C0:61:9A:B0:39:38  
          inet addr:192.168.0.41  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::c261:9aff:feb0:3938/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1450  Metric:1
          RX packets:969412 errors:0 dropped:5 overruns:0 frame:0
          TX packets:1486862 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:72134778 (68.7 MiB)  TX bytes:1715298428 (1.5 GiB)
          Interrupt:35 Base address:0x3000 

ll-eth0   Link encap:Ethernet  HWaddr 22:21:06:C9:73:4C  
          inet addr:169.254.6.209  Bcast:0.0.0.0  Mask:255.255.0.0
          inet6 addr: fe80::2021:6ff:fec9:734c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1450  Metric:1
          RX packets:125443 errors:0 dropped:5 overruns:0 frame:0
          TX packets:139152 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:8663063 (8.2 MiB)  TX bytes:59899264 (57.1 MiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:563075 errors:0 dropped:0 overruns:0 frame:0
          TX packets:563075 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1591591492 (1.4 GiB)  TX bytes:1591591492 (1.4 GiB)

wifi0     Link encap:Ethernet  HWaddr 10:2C:6B:F7:D5:51  
          UP BROADCAST MULTICAST  MTU:1450  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


Interessante Tasks

supervise/multilog

supervise log

multilog t s25000 n4 /var/log/dbus-cgwacs.ttyUSB1

multilog t s25000 n4 /var/log/vedirect.ttyUSB0

multilog t s25000 n4 /var/log/gps-dbus.ttyUSB1

multilog - reads a sequence of lines from stdin and appends selected lines to any number of logs. 

Eine besondere Rolle spielen superviser und multilog. Sie sind Bestandteil der Daemontools (Debian only?)

daemontools is a collection of tools for managing UNIX services.
supervise monitors a service. It starts the service and restarts the service if it dies. Setting up a new service is easy: all supervise needs is a directory with a run script that runs the service.
multilog saves error messages to one or more logs. It optionally timestamps each line and, for each log, includes or excludes lines matching specified patterns. It automatically rotates logs to limit the amount of disk space used. If the disk fills up, it pauses and tries again, without losing any data. 

websockify

/opt/victronenergy/websockify-c/websockify 0.0.0.0:81 127.0.0.1:5900

At the most basic level, websockify just translates WebSockets traffic to normal socket traffic. Websockify accepts the WebSockets handshake, parses it, and then begins forwarding traffic between the client and the target in both directions.

/opt/victronenergy/mk2-dbus/mk2-dbus --log-before 25 --log-after 25 --banner -w -s /dev/ttyS4 -i -t mk3 --settings /data/var/lib/mk2-dbus/mkxport-ttyS4.settings

{start-mk2-dbus.} /bin/sh /opt/victronenergy/mk2-dbus/start-mk2-dbus.sh ttyS4 PRODUCT=builtin-mkx

inotifywait -qq -t 30 -e close_write /run/connman /run/ppp

/opt/victronenergy/gps-dbus/gps_dbus -v --banner --dbus system --timeout 2 -s /dev/ttyUSB0 -b 9600

{start-gps.sh} /bin/bash /opt/victronenergy/gps-dbus/start-gps.sh ttyUSB0

/opt/victronenergy/dbus-cgwacs/dbus-cgwacs /dev/ttyUSB1

{start-cgwacs.sh} /bin/bash /opt/victronenergy/dbus-cgwacs/start-cgwacs.sh ttyUSB1 PRODUCT=FT232R_USB_UART


{start-vedirect.} /bin/bash /opt/victronenergy/vedirect-interface/start-vedirect.sh ttyS7 PRODUCT=builtin-vedirect

/opt/victronenergy/vedirect-interface/vedirect-dbus -v --log-before 25 --log-after 25 -t 0 --banner -s /dev/ttyS7


{dbus_mqtt.py} /usr/bin/python3 -u /opt/victronenergy/dbus-mqtt/dbus_mqtt.py --init-broker

/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf

{mqtt-rpc.py} /usr/bin/python3 -u /opt/victronenergy/mqtt-rpc/mqtt-rpc.py

/opt/victronenergy/dbus-modbustcp/dbus-modbustcp

/opt/victronenergy/can-bus-bms/can-bus-bms --log-before 25 --log-after 25 -vv -c socketcan:can1 --banner

{hostapd-run} /bin/sh /usr/sbin/hostapd-run

/opt/victronenergy/vedirect-interface/vedirect-dbus -v --log-before 25 --log-after 25 -t 0 --banner -s /dev/ttyS6

{start-vedirect.} /bin/bash /opt/victronenergy/vedirect-interface/start-vedirect.sh ttyS6 PRODUCT=builtin-vedirect

/opt/victronenergy/vedirect-interface/vedirect-dbus -v --log-before 25 --log-after 25 -t 0 --banner -s /dev/ttyS5

{start-vedirect.} /bin/bash /opt/victronenergy/vedirect-interface/start-vedirect.sh ttyS5 PRODUCT=builtin-vedirect

/opt/victronenergy/dbus-fronius/dbus-fronius

{dbus_generator.} /usr/bin/python3 -u /opt/victronenergy/dbus-generator-starter/dbus_generator.py

{dbus-modbus-cli} /usr/bin/python3 -u /opt/victronenergy/dbus-modbus-client/dbus-modbus-client.py

/opt/victronenergy/dbus-qwacs/dbus-qwacs

{dbus_systemcalc} /usr/bin/python3 -u /opt/victronenergy/dbus-systemcalc-py/dbus_systemcalc.py

{dbus_vebus_to_p} /usr/bin/python3 -u /opt/victronenergy/dbus-vebus-to-pvinverter/dbus_vebus_to_pvinverter.py

/opt/victronenergy/gui/gui -nomouse -display Multi: LinuxFb: VNC:size=1920x1080:depth=32:passwordFile=/data/conf/vncpassword.txt:0

/opt/victronenergy/hub4control/hub4control

{localsettings.p} /usr/bin/python3 -u /opt/victronenergy/localsettings/localsettings.py --path=/data/conf

/usr/sbin/llmnrd -H venus -6

{vrmlogger.py} /usr/bin/python3 -u /opt/victronenergy/vrmlogger/vrmlogger.py

{serial-starter.} /bin/bash /opt/victronenergy/serial-starter/serial-starter.sh

{netmon} /usr/bin/python3 -u /opt/victronenergy/netmon/netmon

{navico-announce} /bin/sh /opt/victronenergy/service-advertiser/navico-announcement.sh 80 /app

/opt/victronenergy/venus-platform/venus-platform

/bin/simple-upnpd --xml /var/run/simple-upnpd.xml -d

/opt/victronenergy/venus-access/venus-access

{svscanboot} /bin/sh /usr/bin/svscanboot

svscan /service

{connmand-watch.} /bin/sh /usr/sbin/connmand-watch.sh --nodnsproxy

VenusOS Web Zugriff

Der Zugriff auf ein laufendes VenusOS (z.B. auf einem CerboGX oder Raspi2) erfolgt ueber IP und benutzt dann Remote Framebuffer Protokoll (RFB).

Der Hauptbildschirm ist nach Eingabe des Passwortes in zwei Bereiche geteilt, den Hauptbildschirm (div.remote-console-display-container) und die Steuerung (div.remote-console-controls-container). Auf VenusOS ist der Einstieg eine PHP-Programm (index.php in /var/www/venus/). Mit Hilfe dieses Programmes (index.php) wird der gesamte Zugriff auf den Framebuffer-Inhalt realisiert.

Neben index.php gibt es nur ein weiteres PHP-Programm namens logo.php welches dazu dient das Victron-Logo durch ein eigenes Logo zu ersetzen.

Screenshot 2022-11-06 at 08-25-09 Victron Energy - Logo Changer.png

Viel spannender als die Moeglichkeit des Zugriff auf den Framebuffer-Inhaltes durch einen Client (Browser) ist die Frage: Wie wird der Inahlt des Framebuffers auf Server-Seite erzeugt und kann man ihn anpassen und wenn ja wie?

Weiterhin gibt es noch ein paar html-Schnipsel:

./include/web-socket-js-project/sample.html
./default/app/browser-info.html
./default/app/index.html
./default/app/radiator.html

Das erste ist wohl ein Ueberbleibsel des Programmiervorgangs. Die 3 folgenden werde ich mir bei Gelegenheit mal genauer anschauen. Ein Kommentar mit einer konkreten Frage koennte diesen Vorgang beschleunigen.

TODO

Apps: KVNRV und Marine


Hilfreiche Befehle

cat /data/venus/unique-id
cat /opt/victronenergy/version

Bei Gelegenheit

[2]

Links

https://www.raspberry-pi-geek.de/ausgaben/rpg/2014/04/raspberry-pi-emulieren/

https://www.raspberry-pi-geek.de/ausgaben/rpg/2021/04/qemu-5-2-mit-verbesserter-unterstuetzung-fuer-raspberry-pi/

https://github.com/bablokb/pi-qemu-helper/blob/main/raspi_.sh

https://wiki.beyondlogic.org/index.php?title=Understanding_RaspberryPi_Boot_Process

Request for Comments


Kommentar hinzufügen
TippvomTibb freut sich über alle Kommentare. Sofern du nicht anonym bleiben möchtest, registriere dich bitte oder melde dich an.