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

platform: add support for the rpi4b #48

Closed
17 tasks done
stapelberg opened this issue Jun 24, 2019 · 6 comments
Closed
17 tasks done

platform: add support for the rpi4b #48

stapelberg opened this issue Jun 24, 2019 · 6 comments
Assignees
Labels
enhancement good-for-stream https://www.twitch.tv/stapelberg

Comments

@stapelberg
Copy link
Contributor

stapelberg commented Jun 24, 2019

The Raspberry Pi 4 was just released: https://www.raspberrypi.org/blog/raspberry-pi-4-on-sale-now-from-35/

I have ordered one to make sure gokrazy works on it.

Update: tracking issues that I have encountered on the Raspberry Pi 4 Model B (rpi4b):

  • the UART swap dtb patch needs to be rebased onto the rpi4 dtb file
  • the broadcom genet driver needs to be enabled for the eth0 network interface to show up
  • The SD card reader currently ends up at /dev/mmcblk1*, but should be /dev/mmcblk0* for consistency with earlier models.
    • The Raspberry Pi kernel uses a kernel patch for mmc numbering based on devicetree aliases, but the patch has been declined for upstream inclusion.
    • Side note: this wouldn’t be a problem if we would use UUID= to specify the root device, but those require booting with an initrd, which is something I’d like to avoid for as long as possible.
    • We’re now using PARTUUID=, which is understood by the kernel and does not require an initrd: see issue Use PARTUUID= for identifying root device #52
  • network interface: interface detected and link status shown as up, but device does not respond to IPv6 link-local pings or fetch an IP address via DHCPv4
    • EEPROM version “2019-09-10 - Git f626c772” contains the only ethernet change, but it might be relevant: “Configure ethernet RGMII pins at power on. This is a minor change which which may improve reliability of ethernet for some users.”.
    • In my tests, updating to the latest rpi-eeprom (git commit a5be2ff8b15dd36cb3bb83a3f864514cd9cfcf3e) helped a bit (the device picks an IPv6 address based on router advertisements), but I still can’t get ethernet to work.
    • posted Raspberry Pi 4: bcmgenet ethernet does not send packets with Linux 5.6.2 lategoodbye/rpi-zero#47
    • fixed by setting phy-mode to rgmii
  • include Raspberry Pi 4 firmware files (start4*, fixup4*)
  • USB ports don’t work
    • the xhci_hcd driver is enabled (CONFIG_USB_XHCI_HCD=y), but doesn’t enumerate any devices at boot
  • set up an rpi4 in continuous integration
  • include eeprom updates (gokrazy/rpi-eeprom for consistency? or just include in firmware?)
  • update issue template
  • update website
  • update README.md
  • update gokr-packer message
  • repo descriptions
@stapelberg
Copy link
Contributor Author

We’re currently blocked on raspberrypi/linux#3032 (arm64 kernel support for the Pi 4 being in early stages).

Not sure which patches are required to make this work.

@stapelberg
Copy link
Contributor Author

stapelberg commented Jul 4, 2019

To summarize progress on the referenced issue: when manually placing the dtb file, armstub and raspberrypi/linux kernel image on the SD card, and limiting the memory to 1G, I can get some output on the serial console.

I can’t get an upstream kernel to print anything on the serial console, though.

I suppose it’ll be a while before the necessary changes are upstreamed.

Edit: Fedora is also waiting for upstream changes: https://lists.fedoraproject.org/archives/list/arm@lists.fedoraproject.org/thread/OFIGDPUDFOA3BB33GVCDHTSGZ2Q77APK/ (so is Debian)

@vianpl
Copy link

vianpl commented Jul 8, 2019

To summarize progress on the referenced issue: when manually placing the dtb file, armstub and raspberrypi/linux kernel image on the SD card, and limiting the memory to 1G, I can get some output on the serial console.

I can’t get an upstream kernel to print anything on the serial console, though.

I suppose it’ll be a while before the necessary changes are upstreamed.

Can you try adding gpu_freq=500 to config.txt? AFAIK the VPU clock and UART are derived from the same PLL and I suspect the firmware may be altering the frequencies behind your back.

@stapelberg
Copy link
Contributor Author

Side note: dividuum described how to do firmware updates at https://news.ycombinator.com/item?id=21674550, which is important for better thermals and power usage: https://www.raspberrypi.org/blog/thermal-testing-raspberry-pi-4/

@stapelberg
Copy link
Contributor Author

lategoodbye/rpi-zero#43 has a good overview of the current status. Looks like Linux 5.6 can be the earliest we could possibly see good-enough support.

stapelberg added a commit to gokrazy/kernel that referenced this issue Apr 4, 2020
stapelberg added a commit to gokrazy/kernel that referenced this issue Apr 4, 2020
stapelberg added a commit to gokrazy/firmware that referenced this issue Apr 7, 2020
stapelberg added a commit to gokrazy/kernel that referenced this issue Apr 8, 2020
stapelberg added a commit to gokrazy/tools that referenced this issue Apr 9, 2020
stapelberg added a commit to gokrazy/kernel that referenced this issue Apr 9, 2020
@stapelberg stapelberg self-assigned this May 21, 2020
stapelberg added a commit to gokrazy/bakery that referenced this issue May 21, 2020
@stapelberg stapelberg added the good-for-stream https://www.twitch.tv/stapelberg label May 29, 2020
stapelberg added a commit to gokrazy/tools that referenced this issue Jun 18, 2020
Specify an empty -eeprom_package= flag to not include any EEPROM updates.

related to gokrazy/gokrazy#48
stapelberg added a commit that referenced this issue Jun 19, 2020
stapelberg added a commit that referenced this issue Jun 19, 2020
stapelberg added a commit that referenced this issue Jun 19, 2020
stapelberg added a commit to gokrazy/tools that referenced this issue Jun 19, 2020
stapelberg added a commit that referenced this issue Jun 19, 2020
@stapelberg
Copy link
Contributor Author

The EEPROM updates are now in place, and I have been using a Pi 4 to develop and to run my home automation for weeks without any trouble.

Hence, the Pi 4 is now officially a target platform of https://gokrazy.org/!

bradfitz pushed a commit to bradfitz/gokrazy that referenced this issue Apr 4, 2023
…gokrazy#48)

Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.0.0-20210820121016-41cdb8703e55 to 0.1.0.
- [Release notes](https://github.com/golang/sys/releases)
- [Commits](https://github.com/golang/sys/commits/v0.1.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement good-for-stream https://www.twitch.tv/stapelberg
Projects
None yet
Development

No branches or pull requests

2 participants