1
0
mirror of https://github.com/home-assistant/operating-system.git synced 2025-12-24 20:35:31 +00:00
Files
operating-system/Documentation/boards/raspberrypi/README.md
Stefan Agner 8e1016dcaf Initial Raspberry Pi 5 support (#2914)
* Add initial Raspberry Pi 5 buildroot config

* Add machine-id support via cmdline.txt

* Add new entry if entry is missing

* Don't overwrite cmdline.txt when adding machine-id

Use sed to append the new cmdline parameter to the first line.

* Skeleton script for RAUC custom bootloader interface

* Deploy kernel/device-tree into a RAUC slot specific directory

This allows us to use the os_prefix feature to switch between slot A and
B. Compared to the boot_partition option, this option allows to use a
shared config.txt and cmdline.txt, which makes it more like how HAOS
currently works on other Raspberry Pis.

* Deploy new kernel/device-tree to correct slot on installation

* Increase boot size to 128MB

This makes sure we can store up to three kernels (slot A, B and an
temporary one while installing the OTA update).

* Initial tryboot implementation using os_prefix

* Make sure to delete the old slot completely

* Add Busybox xargs for tryboot bootloader script

* Compare tryboot bootloader file silently

* Revert "Increase boot size to 128MB"

This reverts commit 7f2c69b58f02f500d6aeee4f0a419046899b5e38.

* Use compressed kernel

* Address shellcheck

* Address shellcheck issue in rauc-hook

* Fix shellcheck for rpi-tryboot.sh

* Do not follow source - it gets checked separately

* Correctly set the slot to boot

* Apply suggestions from code review

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>

* Drop serial console from default cmdline.txt

* Resync rpi5_64_defconfig with rpi4_64_defconfig

* Improve machine-id match

Only match actual hexadecimal characters.

* Deploy firmware overlays to OS prefix directory

* Add Raspberry Pi 5 to documentation

* Bump buildroot

* buildroot fd1dc86f40...f13ad03408 (1):
  > linux: add in-tree device tree overlay support

* Install device tree overlays from Kernel sources

* Drop RPi RF modules for now

No Raspberry Pi 5 specific device tree overlays are  available, drop RPi
RF mod for now.

* Use Raspberry 5 specific identifiers for Supervisor/OS Agent

* Bump buildroot

* buildroot f13ad03408...07e08e01b2 (1):
  > linux: fix add in-tree device tree overlay support

* Revert "Drop RPi RF modules for now"

This reverts commit 46fc1701e4.

---------

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>
2023-12-12 13:19:26 +01:00

3.1 KiB

Raspberry PI

Supported Hardware

Device Release Date Support Config
Raspberry Pi B/B+/A+ 2012/2014/2014 not recommended rpi
Raspberry Pi 2 B 2015 not recommended rpi2
Raspberry Pi 3 B/B+ 2016/2018 yes rpi3 / rpi3_64
Raspberry Pi 4 B 2019 yes rpi4 / rpi4_64
Raspberry Pi 5 2023 yes (beta) rpi5_64

Serial console

For access to terminal over serial console, add console=ttyAMA0,115200 to cmdline.txt and enable_uart=1, dtoverlay=pi3-disable-bt into config.txt. GPIO pins are: 6 = GND / 8 = UART TXD / 10 = UART RXD.

I2C

Add dtparam=i2c1=on and dtparam=i2c_arm=on to config.txt. After that we create a module file on host with config usb stick or direct into /etc/modules-load.d.

rpi-i2c.conf:

i2c-dev
i2c-bcm2708

USB Boot

USB mass storage boot is available on Raspberry Pi 4 (64-bit only), 3B, 3B+, 3A+, and 2B v1.2.

For Raspberry 3B, 3A+ and 2B v1.2, to enable USB boot, add program_usb_boot_mode=1 into config.txt. Note that this permanently alters the one-time programmable memory of the device.

For Raspberry 4

  • Make sure to update the bootloader to a stable release supporting USB mass storage boot (see bcm2711_bootloader_config.md).
  • If no SD card is used add sd_poll_once=on to dtparam in config.txt (comma separated). This gets rid of mmc0: timeout waiting for hardware interrupt kernel errors.
  • If install still fails, then your SSD likely needs quirks enabled to work correctly (see Finding the VID and PID of your USB SSD). Once you find your adapter's ID, add the quirks parameter in cmdline.txt.

For more information see RaspberryPi.

Caveats

  • All bootable SD cards must be removed.
  • Boot time can be significantly longer with USB. This is due to the boot process first attempting to boot from SD card, failing, and resorting to USB.
  • Many USB drives simply do not work for boot. This is likely due to minimal driver support in uboot and will not be fixed. If you can't get it to boot on one drive, try a different brand/model. SanDisk Cruzer drives seem to have a higher rate of issues.

Tweaks

If you don't need bluetooth, disabled it with add dtoverlay=pi3-disable-bt into config.txt.