question

johnny-brusevold avatar image
johnny-brusevold asked

Kernel source for last Venus-os

@mvader (Victron Energy)

Is it possible to download venus-os kernel source 4.19.81-v7l somewhere ?

modifications
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

3 Answers
mvader (Victron Energy) avatar image
mvader (Victron Energy) answered ·

Hi @Johnny Brusevold , you mean the one we use for the RaspberryPis? Yes, that source is defined here:

https://github.com/victronenergy/meta-victronenergy/blob/master/meta-bsp/recipes-kernel/linux/linux-raspberrypi_4.19.bb

And, per the SRC_URI variable in that .bb file, that refers to here:

https://github.com/victronenergy/linux/tree/rpi_4.19.81

And then adds on patch on top, see .bb file for what I mean, ie the SRC_URI += etcetera line. File to be found by clicking back and forth a bit.


The rest of the GX devices is at 5.10.something. Defined here: https://github.com/victronenergy/meta-victronenergy/blob/master/meta-bsp/recipes-kernel/linux/linux-venus.bb, where refers to here:
https://github.com/victronenergy/linux/tree/venus-5.10.42..


If I find the peace and time someday, then my approach in getting the rpis to 5.10 would be to:

a) get the 5.10 branch from raspberrypi themselves. Rather than a standard 5.10 kernel I mean.

b) check our raspberrypi-4.19.81 branch for commits that need adding.

c) check out the above linked venus-5.10.42 branch for commits that need adding.

Build that, test it on the various rpis.

And if it works, have it in a repo, and then start working on the .bb file.



51 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

johnny-brusevold avatar image johnny-brusevold commented ·

Thank you for your answer @mvader (Victron Energy)

I downloaded the desired version and added some debug

instructions and compiled kernel to find usb issue.


I think it's in the 'old pci' driver that is causing the problem. But for me it is too much work to fix this on the venus kernel. There is a lot of difference in many of the drivers that are tied together.


So for now I go for the original raspberry pi kernel tree. with some of the patches from the venus kernel. I still have not had any problems, slowdown, high energy consumption after running 3 units in test for a few weeks now. This is only in demo mode and without net.


Today I moved one of the devices to live system, so I will see how it works when I now implement some more devices.

0 Likes 0 ·
mvader (Victron Energy) avatar image mvader (Victron Energy) ♦♦ johnny-brusevold commented ·
Hi, thats exactly what I meant to say as well:

Rather than fixing 4.19 kernel, better prepare and switch to 5.10

0 Likes 0 ·
johnny-brusevold avatar image johnny-brusevold mvader (Victron Energy) ♦♦ commented ·

@mvader (Victron Energy)

I have now also compiled the kernel and tested it on pi 2 pi 3 and pi 3b + (replaced org kenel in venus os) and can only state that it works without any error messages either during compile or use of venus-os on raspberry pi.

I also found out late at night by a 'small' fault connection that a raspberry pi 4 does not handle 14.4 volts straight from a car battery ;)

0 Likes 0 ·
Show more comments
mvader (Victron Energy) avatar image mvader (Victron Energy) ♦♦ commented ·

Hi @Johnny Brusevold , which raspberrypi kernel are you using as a source?

and did you push your work somewhere?

0 Likes 0 ·
johnny-brusevold avatar image johnny-brusevold mvader (Victron Energy) ♦♦ commented ·

@mvader (Victron Energy)


I used this directly and added two patches locally


https://github.com/raspberrypi/linux

Patch 1

https://github.com/victronenergy/linux/commit/c65023cf4bbf86955c6c52bc72376e6fe32ad41c

Patch 2

https://github.com/victronenergy/linux/commit/fb01a308bf550ea244bcf2b465a01a0f19c6dd63

I have little experience with git, since the group I worked with some years ago used svn with a graphical interface.

0 Likes 0 ·
bathnm avatar image bathnm mvader (Victron Energy) ♦♦ commented ·

@mvader (Victron Energy) Hi there. I have a version compiling using the RPI branch rip-5.10.y, which is at .92. Not yet pushed to a git repository as not tested on an RPI 4, as still waiting for it to arrive. Pulled/merged with what I hope is the required additions from the Victron Venus-5.10.42 branch.

as per @Johnny Brusevold mine has been running for a few days on an RPI3 with no issues or problems.

My RPI3 boots OK. Have started modifying the recipe sources/meta-victronenergy/meta-bsp/recipes-kernel/linux/ in the hope of building a Venus image.

Happy to push it all to a repository so you can make a copy.



0 Likes 0 ·
johnny-brusevold avatar image johnny-brusevold bathnm commented ·

@Bathnm

5.10.92-v7 is the version I have tested now on pi2 pi3b + and pi4b v1.4 8GB

seems to work very well

So I hope it becomes a standard in upcoming venus-os images

Not that it is so much work to change the kernel, but there are probably many in the future who will only have access to just buy pi4 v1.4. Tried to get some pi3b +, but all are sold out. Just got a pair of pi4 4GB now

0 Likes 0 ·
Show more comments
durval avatar image durval commented ·

@mvader (Victron Energy) thanks for your reply to @Johnny Brusevold, I've been searching for the kernel source tree for the RPi and could not find it anywhere until I found the above.

One additional question: where can I find the *_defconfig files (bcmrpi_defconfig, bcm2709_defconfig, bcm2711_defconfig)?

Thanks in advance.

0 Likes 0 ·
johnny-brusevold avatar image johnny-brusevold durval commented ·

@durval

You will find them in this folder

./linux/arch/arm/configs/


For Pi 2, Pi 3, Pi 3+, or Compute Module 3:
KERNEL=kernel7
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2709_defconfig


For Raspberry Pi 4:
KERNEL=kernel7l
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2711_defconfig
1 Like 1 ·
durval avatar image durval johnny-brusevold commented ·
Thanks for the clarification, @johnny-brusevold!
0 Likes 0 ·
bathnm avatar image
bathnm answered ·

@Johnny Brusevold, did you compile using a native armv7l or the Venus SDK? I have had to change the default RPI options file to have "# CONFIG_GCC_PLUGINS is not set". Without this I get compile errors.

2 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

johnny-brusevold avatar image johnny-brusevold commented ·
native
0 Likes 0 ·
bathnm avatar image bathnm johnny-brusevold commented ·
Great. At least I know that the issue with plugins is likely the SDK.
0 Likes 0 ·
Rob Duthie avatar image
Rob Duthie answered ·

Testing your ver 2.82 on a raspi4 ver1.4 this version the lcd_rotate=x won't rotate like the old version 2.80.41 i have tested as well.

When i change the config txt file? I know the raspi4 uses a different video driver compared to the raspi3 model.

Most other things are going except for the analog ports under the IO page

not showing up. Just found out a missing iio folder in sys/bus/iio is not there like the older ver <2.41 which has the that folder for the analog tom work.

I have checked the dbus-adc.conf file is in place and which it is.

Regards

Rob D

NZ

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Related Resources

Experiments, Modifications and Adaptions. Mods (Modifications) can be made to Victron Software by the Community. Please use the modifications space for enthusiasts who want to push what is possible, without official Victron Support.