Skip to content

Conversation

@mattiaswal
Copy link
Contributor

@mattiaswal mattiaswal commented Jun 23, 2025

Add support for raspberry pi 4 in normal aarch64 image, as well as a sdcard image for initial deployment.

Supported featureset so far:

  • WiFi (builtin)
  • USB (can be controlled in ietf-hardware module, but is only seen as one usb port)
  • (graphic, may work, drivers and firmware exist but it is untested)

Description

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Test changes
    • Checked in changed Readme.adoc (make test-spec)
    • Added new test to group Readme.adoc and yaml file
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
    • ChangeLog updated (for major changes)
  • Other (please describe):

@mattiaswal mattiaswal marked this pull request as draft June 23, 2025 09:02
@mattiaswal mattiaswal force-pushed the raspberry-pi branch 3 times, most recently from 6ea15db to 6a9c5f7 Compare June 27, 2025 22:39
@mattiaswal mattiaswal added the ci:main Build default defconfig, not minimal label Jun 28, 2025
@mattiaswal mattiaswal force-pushed the raspberry-pi branch 8 times, most recently from 7f435bc to 0f15b26 Compare July 4, 2025 05:17
@mattiaswal mattiaswal requested review from troglobit and wkz July 4, 2025 06:14
@mattiaswal mattiaswal marked this pull request as ready for review July 4, 2025 06:15
@mattiaswal mattiaswal force-pushed the raspberry-pi branch 2 times, most recently from c755a6f to 3678132 Compare July 4, 2025 07:37
Also increase the timeout and kick more often (required by RPI4)
Need some special handling for RPI, since RPI does not present a phandle
for the USB in sysfs (PCI device)
Features availible on RPI4 so far is:

* WiFi
* USB
* (Graphics, untested)
Copy link
Contributor

@troglobit troglobit left a comment

Choose a reason for hiding this comment

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

It builds and boots, but I get this output from the CLI at first boot. Is this normal?

admin@rpi4:/> show interfaces 
[   54.650617] ieee80211 phy0: brcmf_cfg80211_get_station: GET STA INFO failed, -52
Error running sysrepocfg: Command '['sysrepocfg', '-f', 'json', '-X', '-d', 'operational', '-x', '/ietf-interfaces:interfaces']' returned non-zero exit status 1.
No interface data retrieved.

admin@rpi4:/> 

On the second boot (plain reboot in between) it works better:

admin@rpi4:/> show interfaces 
[   46.946022] ieee80211 phy0: brcmf_cfg80211_get_station: GET STA INFO failed, -52
INTERFACE       PROTOCOL   STATE       DATA                                     
lo              loopback   UP          
                ipv4                   127.0.0.1/8 (static)
                ipv6                   ::1/128 (static)
eth0            ethernet   DOWN        dc:a6:32:42:a6:03                        
wifi0           ethernet   DOWN        dc:a6:32:42:a6:04                        
                wifi                   ssid: ------, signal: ------

@mattiaswal
Copy link
Contributor Author

The output from the kernel i have seen (but forgotten) Should not be there. Show interfaces crashing is bad. Will have a look at that, have not seen it. What does the log say?

@mattiaswal
Copy link
Contributor Author

If i remember correctly you got the output from the kernel on wpa_cli -i wifi0 scan_results

@troglobit
Copy link
Contributor

troglobit commented Jul 12, 2025

The output from the kernel i have seen (but forgotten) Should not be there. Show interfaces crashing is bad. Will have a look at that, have not seen it. What does the log say?

Not much, this is the entire session from login to CLI to reboot:

Nov  4 10:54:37 rpi4 klishd[3313]: user "admin" starting interactive sysrepo session.
Nov  4 10:54:52 rpi4 wpa_supplicant[3219]: wifi0: Failed to initiate sched scan
Nov  4 10:54:52 rpi4 last message buffered 1 times
Nov  4 10:54:52 rpi4 kernel: ieee80211 phy0: brcmf_cfg80211_get_station: GET STA INFO failed, -52
Nov  4 10:55:08 rpi4 wpa_supplicant[3219]: wifi0: Failed to initiate sched scan
Nov  4 10:55:41 rpi4 last message buffered 4 times
Nov  4 10:57:18 rpi4 last message buffered 13 times
Nov  4 10:57:29 rpi4 klishd[3313]: user "admin" called RPC /ietf-system:system-restart

Also worth mentioning, it took a good while to get the prompt back when it crashed. I'm guessing up to 10 seconds.

@mattiaswal
Copy link
Contributor Author

mattiaswal commented Jul 12, 2025

The output from the kernel i have seen (but forgotten) Should not be there. Show interfaces crashing is bad. Will have a look at that, have not seen it. What does the log say?

Not much, this is the entire session from login to CLI to reboot:

Nov  4 10:54:37 rpi4 klishd[3313]: user "admin" starting interactive sysrepo session.
Nov  4 10:54:52 rpi4 wpa_supplicant[3219]: wifi0: Failed to initiate sched scan
Nov  4 10:54:52 rpi4 last message buffered 1 times
Nov  4 10:54:52 rpi4 kernel: ieee80211 phy0: brcmf_cfg80211_get_station: GET STA INFO failed, -52
Nov  4 10:55:08 rpi4 wpa_supplicant[3219]: wifi0: Failed to initiate sched scan
Nov  4 10:55:41 rpi4 last message buffered 4 times
Nov  4 10:57:18 rpi4 last message buffered 13 times
Nov  4 10:57:29 rpi4 klishd[3313]: user "admin" called RPC /ietf-system:system-restart

Also worth mentioning, it took a good while to get the prompt back when it crashed. I'm guessing up to 10 seconds.

Unable to reproduce, disabled scan (disabled the autoscanning from finit), but my fallback (in yanger) kicked in and started scanning.

Disabled the fallback, and still no crash. I can see the WiFi interface is in state DISCONNECTED (not scanning or anything), when scanning this should be SCANNING or INACTIVE

@mattiaswal mattiaswal requested a review from troglobit July 12, 2025 09:14
Copy link
Contributor

@troglobit troglobit left a comment

Choose a reason for hiding this comment

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

Amazing work on this, really great to have support integrated in our standard builds! 💪

I'm looking forward to learn more about these cool board packages. Makes things very clean and tidy 😎

@mattiaswal mattiaswal merged commit dadb90a into main Jul 12, 2025
5 checks passed
@mattiaswal mattiaswal deleted the raspberry-pi branch July 12, 2025 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:main Build default defconfig, not minimal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants