Repository navigation
apple: pick the ESP on every Apple NVMe controller - #50
Conversation
d4be6de to
f86eaa2
Compare
|
Thanks, matching on the driver instead of a compatible list is the right fix, and the J813 result shows it. Two small things before merge. The commit has no Signed-off-by line, so please add yours ( |
asahi_esp_devpart() only looks for the system ESP on controllers whose compatible is in its own list. That list has to be kept in step with apple_nvme_ids[] by hand, and it was not when the T8140/T8142 controllers were added to the driver: on a MacBook Air M5 (J813) U-Boot binds the SSD but skips it here, so it names no ESP, cannot persist EFI variables, and may boot another ESP that has a loader. Check that the controller is driven by apple_nvme instead, as rtkit_helper.c already does for its own driver. Every compatible in the old list is in apple_nvme_ids[], so nothing changes for supported Macs. The IS_ENABLED() guard keeps a configuration without CONFIG_NVME_APPLE linking; it has no Apple controller to pick. Signed-off-by: MisterY3515 <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
f86eaa2 to
b701638
Compare
|
Thanks for the review. I've added my Signed-off-by and the |
|
No-regression row on a MacBook Pro M4 Pro (J616s, T6040; its controller is
With the J813 row above, this covers a controller the old list knew (t6041) and one it didn't (t8140 fallback). The Apple builds CI run passed. Assisted-by: LLM (Claude:Opus 5.5) |
asahi_esp_devpart()only looks for the system ESP on NVMe controllers whose compatible is in its own list. That list has to be kept in step withapple_nvme_ids[]by hand. #47 addedapple,t8142-nvme-ans2andapple,t8140-nvme-ans2to the driver but not here, so on a MacBook Air M5 (J813) U-Boot binds the SSD and then skips it when picking the ESP:chosen/asahi,efi-system-partitionis ignored;This checks that the controller is driven by
apple_nvmeinstead, asrtkit_helper.calready does for its own driver, so a controller added to the driver is picked up here too. Every compatible in the old list is inapple_nvme_ids[], so nothing changes on Macs that already work.If you'd rather keep an explicit list, the alternative is to add
apple,t8140-nvme-ans2(the J813's fallback compatible) to it.An
IS_ENABLED(CONFIG_NVME_APPLE)guard keeps a configuration without the Apple NVMe driver linking; such a configuration has no Apple controller to pick.Tests
ubootefi.varon the Aurora ESP holdsBoot0001 "Fedora"pointing at\EFI\fedora\shimaa64.efion the Aurora ESP's partition UUID, plusSbatLevelfrom shim. U-Boot therefore picked the Aurora ESP, persisted variables there and started shim. The boot went past GRUB; the screen then stays black, which is a separate problem after U-Boot.apple_m1_defconfig,apple_j873_defconfig, andapple_m1_defconfigwithNVME_APPLEdisabled (NVMEandNVME_PCIenabled) build with no warnings.Disclosure: the investigation, the patch and the first draft of this text were done with an LLM coding assistant (Claude Code). I ran the hardware side and have read what is posted here.
🤖 Generated with Claude Code