Conversation
mattiaswal
reviewed
Mar 9, 2026
.../rootfs/usr/share/product/bananapi,bpi-r64/etc/udev/rules.d/90-bpi-r64-rename-ethernet.rules
Outdated
Show resolved
Hide resolved
Calling tune2fs for ext4 partitions at boot costs more than one second boot time on 32-bit Arm systems, with very little gain. Dropping this restores the default periodic fsck *and* saves boot time. Instead of calling sgdisk four times, call it only when resizing and instead use sysfs to find named paritions. Saves seconds on boards with weaker CPU and slow media. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Replace the costly read-only filter loop (awk+tr per line) with a stderr redirect, use /sys/class/net/ instead of ip+jq, and batch all sysctl writes into a single call. Reduces boot time by ~4s on 32-bit Arm systems. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Two related problems prevented devices behind an intermediate hub (e.g.
the VIA Labs hub on the RPi 400's VL805 xHCI) from being authorized
when confd unlocks a USB bus:
1. Cascade ordering: usb_authorize() ran nftw() with FTW_DEPTH, which
visits children before the root-hub entry. The hub was authorized
while authorized_default was still 2, so when the kernel probed the
hub's children it immediately denied them. Fix: write
authorized_default=1 on the bus before entering nftw.
2. Slow/async probe: hub port enumeration is asynchronous — devices
behind a hub may appear in sysfs after nftw has already finished.
Fix: add a udev rule that catches usb_device add events on buses
where authorized_default=1 is already set on any ancestor root hub
and authorizes them immediately.
The ATTRS{} matcher in udev walks the full sysfs parent chain, so
authorized_default=1 on the root hub is visible even for devices several
hubs deep. Buses still locked at authorized_default=0 are left alone.
Also expand the docstring in generic_usb_ports() to document the
design: each root hub gets its own uniquely-named entry (USB, or USB1/
USB2/... when multiple) so buses can be individually controlled, and
boards needing finer control should use DT usb-ports annotations.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Remove console=map:0 from the [pi4] section which was suppressing HDMI output and disabling the display getty. Making it really difficult to use it as a regular console. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The Raspberry Pi 400 shares hardware with the RPi 4B but differs in one important way: it has an internal keyboard and mouse connected through a VIA Labs USB hub on the VL805 xHCI controller. Break the symlink to raspberrypi,4-model-b and maintain a dedicated product directory. Factory config changes from the 4B default: - USB1/USB2/USB3 all unlocked: USB2 carries the internal keyboard hub and USB3 the superspeed companion; all are unlocked as this is a desktop device - DHCP vendor-class corrected to "Raspberry Pi 400" Also add interface-quirks.json for the eth0 PHY detach behaviour and the smsc95xx broken flow-control quirk (inherited from the 4B config but now explicit), and remove the spurious bootable flag from the primary and secondary rootfs partitions in genimage.cfg.in. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
In a hybrid MBR the conventional layout (used by gdisk and others) is: MBR[0] = 0xEE (GPT protective, covers whole disk) MBR[1..3] = user-selected GPT partitions with legacy type codes genimage currently appends the 0xEE entry after the data partitions, producing the opposite order. This is fine for most platforms, but breaks firmware that detects GPT by inspecting only MBR entry 0: seeing a non-0xEE type there it falls into pure-MBR mode and cannot look up GPT partitions by name. The TF-A partition driver (drivers/partition/partition.c) exhibits exactly this behaviour: load_mbr_header() copies entry[0] and checks type == 0xEE to select between MBR and GPT mode. The MediaTek MT7622 platform (BananaPi BPI-R64) is a concrete example where this matters. On the other hand, Raspberry Pi firmware scans all MBR slots for a bootable FAT32 partition. If slot 0 holds a 0xEE protective entry the firmware switches to GPT detection, looks for an EFI System Partition UUID, and reports "no bootable partitions" when none is found. Add an opt-in hdimage option `gpt-protective-first = true` that places the 0xEE entry at slot 0 and shifts data partitions to slots 1..3. The default (false) preserves the existing genimage behaviour so that platforms like Raspberry Pi continue to work without any changes. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Add board support for the BananaPi BPi-R64 router board, based on the MediaTek MT7622 SoC and MT7531 Gigabit Ethernet switch. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Used in BPI-MT7615 802.11ac PCIe WiFi card for the BPi-R64 router board. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
mattiaswal
reviewed
Mar 10, 2026
| dtoverlay=vc4-kms-v3d-pi4 | ||
| lcd_rotate=2 | ||
|
|
||
| # Prevent console on DSI |
Contributor
There was a problem hiding this comment.
I think i remember why this was added now, it is for uboot not clogging the splashimage.
Contributor
Author
There was a problem hiding this comment.
Aha! Well it works fine on HDMI output without this, and is also needed to make RPi usable on HDMI. So what should we do?
Contributor
There was a problem hiding this comment.
I can test this on a rpi with display at home
Contributor
Author
There was a problem hiding this comment.
I can test this on a rpi with display at home
Great, thanks! Then we'll hold off picking the first two commits (boot-time speedup) to the v26.02.x branch until you've had the time to test.
Contributor
There was a problem hiding this comment.
Move boottime speedup to a seperate pr, and we merge it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
initvizbranch)Checklist
Tick relevant boxes, this PR is-a or has-a: