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

Refactor raspberryPi board configuration #228

Draft
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

oneingan
Copy link

@oneingan oneingan commented Mar 12, 2023

I mix and match previous community attempts to update raspberrypi-aarch64 board stack. To summarize:

  • I have created a hardware freeform module to configure global options and filters in config.txt.
  • Make module options for important options (by the moment upstreamKernel).
  • It creates the fw filesystem with both rpi and mainline kernel files.
  • Use new unified U-Boot kernel for all arm64 raspberries.

I, obviously, have been inspired by @colemickens and @mupuf, as in:
#192
https://github.com/colemickens/Tow-Boot/tree/rpi/boards/raspberryPi-aarch64

Also, the @colemickens setup was the only one that works flawlessly for me using mainline kernel in both RPi 3 and RPi 3B+. But was hard to use their modifications directly. That was the main reason I had to try to apply their improvements upstream.

Eventually superseed also #156 and #61

@mupuf
Copy link

mupuf commented Mar 13, 2023

Oh oh, that looks very interesting!

I like the fact that you sidestepped the issue of not knowing if the kernel was going to be an upstream one or not by just... putting it on the user to select via an option menu! I mean, this is not fully what we aspire for here, but this is a nice workaround until we do achieve (which would require reimplementing part of what the firmware is doing)! No need to rebuild/reflash the bootloader because of needlessly-opiniated defaults :)

I will give it a try during the week, and close my pull request. Thanks a lot!

@oneingan oneingan marked this pull request as draft March 13, 2023 10:43
mkdir -p "$target/upstream"
cp -vt "$target/upstream/" \
"${config.Tow-Boot.outputs.firmware}/binaries/Tow-Boot.noenv.bin" \
${cfg_rpi.mainlineKernel}/dtbs/broadcom/bcm*rpi*.dtb
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to compile the whole kernel to generate the dtb? I mean, we definitely could pick a kernel, download all the device trees and compile them ourselves.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I didn't have this problem because my build hit cache (native compile). Just check that you are right and crosscompiling implies build whole kernel.

@mupuf
Copy link

mupuf commented Mar 18, 2023

Can you update the firmware version too? My CM4 doesn't want to boot with the image I generated using your MR.

Feel free to use my code for it!

@oneingan
Copy link
Author

Can you update the firmware version too? My CM4 doesn't want to boot with the image I generated using your MR.

Feel free to use my code for it!

Checking your code, I am wondering if use an additional updated nixpkgs ref (only for this) could be best for ease of maintenance.

@samueldr samueldr added this to the [blocked or WIP] milestone Jul 2, 2023
@samueldr
Copy link
Contributor

samueldr commented Jul 2, 2023

(This milestone is not a judgement of the PR; I will take a look later. It's only to sort things out in their proper bucket.)

@samueldr samueldr added the 9. status: WIP The PR is not ready for merge, work in progress label Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
9. status: WIP The PR is not ready for merge, work in progress
Development

Successfully merging this pull request may close these issues.

None yet

3 participants