As reported in https://github.com/openwrt/openwrt/issues/15834 using the PWR
LED for indicating diag status is confusing since this is usually used for
power supply failures on RPi devices.
This commit uses ACT LED for diag status and restores it to mmc activity.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
At some point RPi LEDs were renamed from led0/led1 to PWR/ACT.
This patch fixes this and also automatically detects the status_led without
relying on board_name.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Only bcm2708 and bcm2709 use "kernel.img" file name.
bcm2710 and bcm2711 use "kernel8.img" and bcm2712 uses "kernel_2712.img".
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Automatically detect boot partition instead of forcing /dev/mmcblk0p1.
This way users can still get /boot mounted when booting from USB.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Add missing Rasoberry Pi 5 board_name to set_preinit_iface in order to get
ethernet working on failsafe mode.
Fixes: 8b63d9a ("bcm27xx: add new bcm2712 subtarget")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This patch adds support for Raspberry Pi 5.
Instead of using 16K pages like Raspberry Pi OS, OpenWrt uses 4K pages due to
incompatibilities with F2FS and other applications.
There are multiple RPi forum posts with different cases and users are forcing
kernel8.img to workaround them, which is the 64 bit kernel of the RPi 4.
However, this isn't possible in OpenWrt because we only ship one kernel and we
would have to add RPi 5 support to bcm2711 subtarget (RPi 4) for that
workaround to work in OpenWrt.
Specification:
- Processor Broadcom BCM2712 2.4GHz quad-core 64-bit Arm Cortex-A76 CPU,
with cryptographic extension, 512KB L2 caches per core, 2048KB L3 cache
Features:
- VideoCore VII GPU, supports OpenGL ES 3.1, Vulkan 1.2
- Dual 4Kp60 HDMI display output with HDR support 4Kp60 HEVC decoder
- LPDDR4X-4267 SDRAM 4GB and 8GB
- Dual-band 802.11ac Wi-Fi
- Bluetooth 5.0 / Bluetooth Low Energy
- microSD card slot, with support for SDR104 high-speed mode
- 2 x USB 3.0 ports
- 2 x USB 2.0 ports
- Gigabit Ethernet
- 2 x 4 lane MIPI camera/display
- PCIe 2.0 x1
- 5V/5A power via USB-C
- Raspberry Pi standard 40-pin header
- Real-time clock RTC
- Power button
Build system: x86_64
Build-tested: bcm2712
Run-tested: bcm2712/RPi5
Signed-off-by: Marty Jones <mj8263788@gmail.com>
[Remove device variant, improve description]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Due to licensing uncertainty, we do not include the firmwares for the
wireless chips used in the Raspberry Pi Zero 2 W. To have working
wireless, follow the instructions below.
For people building their own images:
mkdir -p files/lib/firmware/brcm
wget -P files/lib/firmware/brcm/ https://github.com/RPi-Distro/firmware-nonfree/raw/bullseye/debian/config/brcm80211/brcm/brcmfmac43436-sdio.bin
wget -P files/lib/firmware/brcm/ https://github.com/RPi-Distro/firmware-nonfree/raw/bullseye/debian/config/brcm80211/brcm/brcmfmac43436-sdio.txt
wget -P files/lib/firmware/brcm/ https://github.com/RPi-Distro/firmware-nonfree/raw/bullseye/debian/config/brcm80211/brcm/brcmfmac43436s-sdio.bin
wget -P files/lib/firmware/brcm/ https://github.com/RPi-Distro/firmware-nonfree/raw/bullseye/debian/config/brcm80211/brcm/brcmfmac43436s-sdio.txt
Now build the OpenWrt image as usual, and it will include the firmware
files in the correct location.
For people using ext4 images:
Write the ext4 image to the sdcard, then mount the 2nd partition and put
the firmware files from the links above in /lib/firmware/brcm relative
from the mount point where the partition is mounted.
For people using squashfs images:
Write the squashfs image to the sdcard, place it in the Raspberry Pi
Zero 2 W, boot it and wait for the overlay filesystem to be created.
Find the offset of the overlay filesystem in sysfs:
# cat /sys/devices/virtual/block/loop0/loop/offset
25755648
Shut down the device, unplug the power and move the SD card to a Linux
computer. Mount the 2nd partition of the sdcard as a loop device with
the offset found earlier.
sudo mount /dev/sdh2 -o loop,offset=25755648 /mnt/temp
Put the firmware files from the links above in /upper/lib/firmware/brcm
relative to the mount point where the loop device is mounted.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Tested-by: Peter van Dijk <peter@7bits.nl>
- Use the same order for /etc/board.d/02_network and
/lib/preinit/05_set_preinit_iface_brcm2708.
- Add missing RPi 400 and CM4 to /lib/preinit/05_set_preinit_iface_brcm2708.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
So far, board.d files were having execute bit set and contained a
shebang. However, they are just sourced in board_detect, with an
apparantly unnecessary check for execute permission beforehand.
Replace this check by one for existance and make the board.d files
"normal" files, as would be expected in /etc anyway.
Note:
This removes an apparantly unused '#!/bin/sh /etc/rc.common' in
target/linux/bcm47xx/base-files/etc/board.d/01_network
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
We can now use the power LED for diag in more devices thanks to the latest
patches from the RPi foundation.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This drops the shebang from all target files for /lib and
/etc/uci-defaults folders, as these are sourced and the shebang
is useless.
While at it, fix the executable flag on a few of these files.
This does not touch ar71xx, as this target is just used for
backporting now and applying cosmetic changes would just complicate
things.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Due to a typo, /boot is not properly unmounted after copying the backup
file to it. Fix the typo to solve this.
Fixes: 246916ddf4 ("brcm2708: use x86's upgrade scripts for all rpi targets")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
If you want to use the Raspberry Pi UART, "console=serial0,115200" needs
to be removed from the kernel cmdline. This is done by editing
/boot/cmdline.txt. However, this file is not currently backed up during
sysupgrade, so this effectively breaks HATs that require the use of the
UART every sysupgrade.
Backup this file during sysupgrade, and restore it before rebooting.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
This change makes the names of Broadcom targets consistent by using
the common notation based on SoC/CPU ID (which is used internally
anyway), bcmXXXX instead of brcmXXXX.
This is even used for target TITLE in make menuconfig already,
only the short target name used brcm so far.
Despite, since subtargets range from bcm2708 to bcm2711, it seems
appropriate to use bcm27xx instead of bcm2708 (again, as already done
for BOARDNAME).
This also renames the packages brcm2708-userland and brcm2708-gpu-fw.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Álvaro Fernández Rojas <noltari@gmail.com>