Conversation
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>
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>
The RPi 400 has is the exact same hardware as the RPi 4B, so it needs the same interface quirks, and we can also give it the same factory config settings. Also, minor cleanup of genimage.cfg; primarty and secondary do not need the bootable flag. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
mattiaswal
reviewed
Mar 9, 2026
| @@ -0,0 +1,12 @@ | |||
| # Rename MT7531 DSA switch ports by DT node path. | |||
Contributor
There was a problem hiding this comment.
overload the devicetree instead (in board/aarch64/bananapi-bpi-r64/dts/mediatek/mt7622-bananapi-bpi-r64.dtsi), as done for other boards. This seems fragile.
Contributor
Author
There was a problem hiding this comment.
Well it's not fragile anymore, now since we've split the probe and udev. Iirc this is what @wkz recommended earlier on to use instead of naming port interfaces in the DTS.
Also, this is pretty consistent with how we do it for other boards, e.g., NanoPi R2S, BPi-R3 Mini ...
| # CONFIG_MMC_PCI is not set | ||
| CONFIG_ENV_IS_NOWHERE=y | ||
| # CONFIG_ENV_IS_IN_MMC is not set | ||
|
|
| ## Platform Notes | ||
|
|
||
| ### BL2 Offset and GPT Requirement (sector 1024) | ||
|
|
Contributor
There was a problem hiding this comment.
Isnt this section just a wall of text what does it give to a infiux user
Contributor
Author
There was a problem hiding this comment.
OK, I'll clean it up.
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: