New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
configs: apple: Add custom bootcmd to boot from preferred ESP #3
Closed
jannau
wants to merge
9
commits into
AsahiLinux:releng/installer-release
from
jannau:asahi-boot-UUID
Closed
configs: apple: Add custom bootcmd to boot from preferred ESP #3
jannau
wants to merge
9
commits into
AsahiLinux:releng/installer-release
from
jannau:asahi-boot-UUID
Conversation
This file contains 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
When the device tree indicates support for role switching through the "usb-role-switch" property, take the "role-switch-default-mode" property into account when deciding which role to put the controller into. This makes USB devices work on Apple M1 systems where the device tree may include a "dr_mode" property that is set to "otg", but where we need to put the controller into "host" mode to see devices connected to the type-C ports. Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
This synchronizes the device trees with those that are in the process of being upstreamed into Linux. These now match the current state of the device trees on the asahi branch of the Asahi Linux github repository. Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Device trees for the 14" and 16" MacBook Pro models. Taken from the asahi branch of the Asahi Linux github reporsitory. Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Unless you have a spare Apple Silicon machine, getting access to the serial port on Apple Silicon machines requires special hardware. Given that most machines come with a built-in screen the framebuffer is likely to be the most convenient output device for most users. While U-Boot will output to both serial and framebuffer, OSes might not. Therefore set stdout-path to point at /chosen/framebuffer when a keyboard is connected to the machine. This behaviour can be overridden by setting the "stdout" variable in the U-Boot environment. I addition to that keep the serial console as the default when running under the m1n1 hypervisor. The m1n1 hypervisor virtualizes the serial port such that it can be easily accessed from any other machine with a USB port. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Janne Grunau <j@jannau.net> Tested-by: Janne Grunau <j@jannau.net>
Enable CONFIG_NO_FB_CLEAR to preserve the Asahi logo. Since that logo is drawn on a black background also enable CONFIG_SYS_WHITE_ON_BLACK such that text printed by U-Boot is still visible. Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Fixes the display of the u-boot logo on Apple silicon devices. Signed-off-by: Janne Grunau <j@jannau.net> Reviewed-by: Simon Glass <sjg@chromium.org>
To be dropped when PCIe USB support is back such that a keyboard connected to the type-A ports on the Mac mini can be detected. Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
The brute-force controller disable method can end up racing controller initilization and causing a crash when we shut down Apple ANS2 NVMe controllers. Do a proper controlled shutdown, which does block until things are quiesced properly. Signed-off-by: Hector Martin <marcan@marcan.st>
AsahiLinux uses a distinct EFI system partition per OS installation 1). To boot the intended system u-boot has to prefer the intended partition for booting. The previous stage bootloader specifies in UUID of the partition in the device tree as "/chosen/asahi,efi-system-partition". 'apple_bootcmd' reads the UUID from the device tree and uses modified distro boot scripts to only boot from a partition with a matching UUID. If it fails it tries to boot from the first USB device. 1: https://github.com/AsahiLinux/docs/wiki/Open-OS-Ecosystem-on-Apple-Silicon-Macs Closes AsahiLinux#2. Signed-off-by: Janne Grunau <j@jannau.net>
marcan
force-pushed
the
releng/installer-release
branch
from
March 17, 2022 18:30
13a5ba0
to
1027772
Compare
marcan
force-pushed
the
releng/installer-release
branch
from
June 21, 2022 11:05
89dbe1b
to
5c46090
Compare
marcan
force-pushed
the
releng/installer-release
branch
from
July 11, 2022 17:13
756d026
to
300817d
Compare
kettenis
pushed a commit
that referenced
this pull request
Sep 6, 2022
There are three different kinds of EEPROM possibly present on boards. 1. 1byte address. For those we should avoid 2byte address in order not to rewrite the data. Second byte of the address can potentially be interpreted as the data to write. 2. 2byte address with defined behaviour. When we try to use 1byte address they just return "FF FF FF FF ... FF" 3. 2byte address with undefined behaviour (for instance, 24LC32AI). When we try to use 1byte address, then their internal read pointer is changed to some value. Subsequential reads may be broken. To gracefully handle both case #1 and case #3 we read all required data from EEPROM at once (about 80 bytes). So either all the data is valid or we fallback to 2byte address. Cc: Nishanth Menon <nm@ti.com> Fixes: a58147c ("board: ti: common: board_detect: Do 1byte address checks first.") Reference: https://lore.kernel.org/all/CAJs94Ebdd4foOjhGFu9Bop0v=B1US9neDLxfhgcY23ukgLzFOQ@mail.gmail.com/ Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com> Acked-by: Nishanth Menon <nm@ti.com>
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.
AsahiLinux uses a distinct EFI system partition per OS installation 1).
To boot the intended system u-boot has to prefer the intended partition
for booting. The previous stage bootloader specifies in UUID of the
partition in the device tree as "/chosen/asahi,efi-system-partition".
'apple_bootcmd' reads the UUID from the device tree and uses modified
distro boot scripts to only boot from a partition with a matching UUID.
If it fails it tries to boot from the first USB device.
1: https://github.com/AsahiLinux/docs/wiki/Open-OS-Ecosystem-on-Apple-Silicon-Macs
Signed-off-by: Janne Grunau j@jannau.net