Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building for multiple kernels on the Raspberry Pi #29

Closed
Aika0 opened this issue Jan 25, 2021 · 3 comments
Closed

Building for multiple kernels on the Raspberry Pi #29

Aika0 opened this issue Jan 25, 2021 · 3 comments

Comments

@Aika0
Copy link

Aika0 commented Jan 25, 2021

Hello... this is not an issue, but I didn't know how else to offer feedback and suggestions.

I'm using your wonderful program on my Raspberry Pis, and it's great, but I have 4 Pis (a 2B, 3B, 3B+ and 4B) and I didn't want to be building the kernel driver on each one... so I made a little modification to build all available kernels on the 4B (I can then just copy the appropriate driver to each other Pi).

I thought this may be useful to other people, so I thought I'd post it as an issue and let you decide what to do with it.

First, I made a modified version of the ubuntu-packages.sh called rpi-packages.sh to specifically install the Raspberry Pi kernel headers (because it's a little different than most linux distros).

Then I made a modified version of the driver's Makefile (3rdparty/ravenna-alsa-lkm/driver/Makefile) that allows the kernel version to be passed in as a parameter.

Because I could not figure out how to patch the git stuff properly I put it in a file named "3rdparty_ravenna-alsa-lkm_driver_Makefile" and I'll replace the original Makefile with it in the "build.sh" script.

Finally, I modified the "build.sh" script by removing the "make" command for the driver, and replacing it with a for loop that figures out which kernel headers the Pi has installed and can do a make for, then it does it for each, renaming the the resulting kernel driver appropriately. Finally it builds the "MergingRavennaALSA.ko for the machine we're on so the rest of the stuff works as expected.

I then put these three files in the aes67-linux-daemon folder after cloning from git and build as normal.
When it's complete I get the MergingRavennaALSA.ko file as expected, but I also get additional files ending in _x.y.x for each of the kernel versions on the Pi. I can then look at each of my Pis with 'uname -r' and decide which one to use on which Pi.

I hope thid helps someone.
I'm attaching all three files in case anyone wants to do this as well.
build-for-rpi-multikernel.zip

Thank you again for the amazing program!

@bondagit
Copy link
Owner

bondagit commented Jan 25, 2021

Thanks for your comments and contribution. I think an issue is ok at the moment and maybe this helps someone else too.
Since you are testing the daemon on different PIs can I ask you if you can run the test on the branch "test_issue_17" on these PIs and report back to issue #17 the results and the kernel version in use.
I am interested to the results after setting the parameter "tic_frame_size_at_1fs" to 48 in the file test/daemon.conf

After switching to the branch "test_issue_17" to run the test you just have to execute the following commands:

./run_test.sh
cd test
c++ check.cc -o check
./check

If everything is ok you should get an "ok" or an error otherwise.
Thanks.

@Aika0
Copy link
Author

Aika0 commented Jan 26, 2021

Yes... I ran the tests... all 4 PIs returned OK three times in a row. I'll post the details in the Issue 17 thread.

@bondagit
Copy link
Owner

bondagit commented Jan 27, 2021

Hi, thanks again. I noticed that some of the SOCs you tested don't have Gigabit Ethernet and this is a limitation for some configurations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants