Re: M2 Pro 2023 works, but stuck with our apple-boot firmware
On Sun, Mar 31, 2024 at 06:18:22PM +0200, Mark Kettenis wrote: > > Date: Sun, 31 Mar 2024 13:23:41 + > > From: Klemens Nanni > > > > Default snapshot install works with the intial UEFI/u-boot from macOS/Asahi. > > > > After manual fw_update(8) via urndis(4) tethering to install apple-boot-1.2 > > and cold reboot, it still boots the initial UEFI/u-boot and works. > > > > Once I run sysupgrade(8), after the upgrade the boot firmware is switched to > > our apple-boot (visible via tobhe's OpenBSD logo) which gets stuck before > > reaching our bootloader. > > > > First time using Apple silicon, so I don't have a clue yet what's going on. > > > > Loose transcription, picture attached. > > > > Chip-ID: 0x6020 > > > > OS FW version: 13.5 (iBoot-8422.141.2) > > System FW version: unknown (iBoot 10151.101.3) > > [...] > > Initialization complete. > > Cechking for payloads... > > Devicetree compatible value: apple,j416s > > Found a gzip compressed payload at 0x100041dc200 > > Uncompressing... 272386 bytes uncompressed to 562704 bytes > > Found a kernel at 0x10006a0 > > Found a variable at 0x1000421ea02: chosen.asahi,efi-system-partition=... > > No more payloads at 0x1000421ea19 > > ERROR: Kernel found but not devicetree for apple,j416s available. > > Looks like I missed hooking up the devicetree for your model to the > build. Instead I added apple,j414s twice :(. > > Looks like the last PLIST updated was botched as well. That unbreaks my machine, OK kn I nuked everyting non-macOS and installed again via urndis(4) and bsd.rd on the EFI Sys partition, which installed -current firmware. Then at the final [R]eboot I updated via # DESTDIR=/mnt /mnt/usr/sbin/fw_update -d apple-boot # mount /dev/sd0l /mnt2 # DESTDIR=/mnt /mnt/usr/sbin/fw_update /mnt2/apple-boot-firmware-1.3.tgz first boot after install showed the puffy logo, but with correct resolution, font size and it made it through to the login: prompt. Thanks for the quick fix. > Diff below should fix things. Stuart, what are the chances of > updating the firmware for the release? > > > Index: sysutils/u-boot-asahi/Makefile > === > RCS file: /cvs/ports/sysutils/u-boot-asahi/Makefile,v > retrieving revision 1.15 > diff -u -p -r1.15 Makefile > --- sysutils/u-boot-asahi/Makefile8 Jan 2024 19:59:11 - 1.15 > +++ sysutils/u-boot-asahi/Makefile31 Mar 2024 16:15:34 - > @@ -6,6 +6,7 @@ VERSION= 2024.01 > GH_ACCOUNT= AsahiLinux > GH_PROJECT= u-boot > GH_TAGNAME= openbsd-v${VERSION} > +REVISION=0 > > PKGNAME= u-boot-asahi-${VERSION:S/-/./g} > > Index: sysutils/u-boot-asahi/patches/patch-arch_arm_dts_Makefile > === > RCS file: sysutils/u-boot-asahi/patches/patch-arch_arm_dts_Makefile > diff -N sysutils/u-boot-asahi/patches/patch-arch_arm_dts_Makefile > --- /dev/null 1 Jan 1970 00:00:00 - > +++ sysutils/u-boot-asahi/patches/patch-arch_arm_dts_Makefile 31 Mar 2024 > 16:15:34 - > @@ -0,0 +1,12 @@ > +Index: arch/arm/dts/Makefile > +--- arch/arm/dts/Makefile.orig > arch/arm/dts/Makefile > +@@ -40,7 +40,7 @@ dtb-$(CONFIG_ARCH_APPLE) += \ > + t6001-j375c.dtb \ > + t6002-j375d.dtb \ > + t6020-j414s.dtb \ > +-t6020-j414s.dtb \ > ++t6020-j416s.dtb \ > + t6020-j474s.dtb \ > + t6021-j414c.dtb \ > + t6021-j416c.dtb \ > Index: sysutils/u-boot-asahi/pkg/PLIST > === > RCS file: /cvs/ports/sysutils/u-boot-asahi/pkg/PLIST,v > retrieving revision 1.4 > diff -u -p -r1.4 PLIST > --- sysutils/u-boot-asahi/pkg/PLIST 3 Dec 2023 22:55:16 - 1.4 > +++ sysutils/u-boot-asahi/pkg/PLIST 31 Mar 2024 16:15:34 - > @@ -9,10 +9,13 @@ share/u-boot/apple_m1/dts/t6001-j316c.dt > share/u-boot/apple_m1/dts/t6001-j375c.dtb > share/u-boot/apple_m1/dts/t6002-j375d.dtb > share/u-boot/apple_m1/dts/t6020-j414s.dtb > +share/u-boot/apple_m1/dts/t6020-j416s.dtb > share/u-boot/apple_m1/dts/t6020-j474s.dtb > share/u-boot/apple_m1/dts/t6021-j414c.dtb > share/u-boot/apple_m1/dts/t6021-j416c.dtb > +share/u-boot/apple_m1/dts/t6021-j475c.dtb > share/u-boot/apple_m1/dts/t6022-j180d.dtb > +share/u-boot/apple_m1/dts/t6022-j475d.dtb > share/u-boot/apple_m1/dts/t8103-j274.dtb > share/u-boot/apple_m1/dts/t8103-j293.dtb > share/u-boot/apple_m1/dts/t8103-j313.dtb > Index: sysutils/firmware/apple-boot/Makefile > === > RCS file: /cvs/ports/sysutils/firmware/apple-boot/Makefile,v > retrieving revision 1.16 > diff -u -p -r1.16 Makefile > --- sysutils/firmware/apple-boot/Makefile 8 Jan 2024 20:00:31 - > 1.16 > +++ sysutils/firmware/apple-boot/Makefile 31 Mar 2024 16:15:34 - > @@ -1,5 +1,5 @@ > FW_DRIVER= apple-boot > -FW_VER= 1.2 >
Re: M2 Pro 2023 works, but stuck with our apple-boot firmware
> Date: Sun, 31 Mar 2024 13:23:41 + > From: Klemens Nanni > > Default snapshot install works with the intial UEFI/u-boot from macOS/Asahi. > > After manual fw_update(8) via urndis(4) tethering to install apple-boot-1.2 > and cold reboot, it still boots the initial UEFI/u-boot and works. > > Once I run sysupgrade(8), after the upgrade the boot firmware is switched to > our apple-boot (visible via tobhe's OpenBSD logo) which gets stuck before > reaching our bootloader. > > First time using Apple silicon, so I don't have a clue yet what's going on. > > Loose transcription, picture attached. > > Chip-ID: 0x6020 > > OS FW version: 13.5 (iBoot-8422.141.2) > System FW version: unknown (iBoot 10151.101.3) > [...] > Initialization complete. > Cechking for payloads... > Devicetree compatible value: apple,j416s > Found a gzip compressed payload at 0x100041dc200 > Uncompressing... 272386 bytes uncompressed to 562704 bytes > Found a kernel at 0x10006a0 > Found a variable at 0x1000421ea02: chosen.asahi,efi-system-partition=... > No more payloads at 0x1000421ea19 > ERROR: Kernel found but not devicetree for apple,j416s available. Looks like I missed hooking up the devicetree for your model to the build. Instead I added apple,j414s twice :(. Looks like the last PLIST updated was botched as well. Diff below should fix things. Stuart, what are the chances of updating the firmware for the release? Index: sysutils/u-boot-asahi/Makefile === RCS file: /cvs/ports/sysutils/u-boot-asahi/Makefile,v retrieving revision 1.15 diff -u -p -r1.15 Makefile --- sysutils/u-boot-asahi/Makefile 8 Jan 2024 19:59:11 - 1.15 +++ sysutils/u-boot-asahi/Makefile 31 Mar 2024 16:15:34 - @@ -6,6 +6,7 @@ VERSION=2024.01 GH_ACCOUNT=AsahiLinux GH_PROJECT=u-boot GH_TAGNAME=openbsd-v${VERSION} +REVISION= 0 PKGNAME= u-boot-asahi-${VERSION:S/-/./g} Index: sysutils/u-boot-asahi/patches/patch-arch_arm_dts_Makefile === RCS file: sysutils/u-boot-asahi/patches/patch-arch_arm_dts_Makefile diff -N sysutils/u-boot-asahi/patches/patch-arch_arm_dts_Makefile --- /dev/null 1 Jan 1970 00:00:00 - +++ sysutils/u-boot-asahi/patches/patch-arch_arm_dts_Makefile 31 Mar 2024 16:15:34 - @@ -0,0 +1,12 @@ +Index: arch/arm/dts/Makefile +--- arch/arm/dts/Makefile.orig arch/arm/dts/Makefile +@@ -40,7 +40,7 @@ dtb-$(CONFIG_ARCH_APPLE) += \ + t6001-j375c.dtb \ + t6002-j375d.dtb \ + t6020-j414s.dtb \ +- t6020-j414s.dtb \ ++ t6020-j416s.dtb \ + t6020-j474s.dtb \ + t6021-j414c.dtb \ + t6021-j416c.dtb \ Index: sysutils/u-boot-asahi/pkg/PLIST === RCS file: /cvs/ports/sysutils/u-boot-asahi/pkg/PLIST,v retrieving revision 1.4 diff -u -p -r1.4 PLIST --- sysutils/u-boot-asahi/pkg/PLIST 3 Dec 2023 22:55:16 - 1.4 +++ sysutils/u-boot-asahi/pkg/PLIST 31 Mar 2024 16:15:34 - @@ -9,10 +9,13 @@ share/u-boot/apple_m1/dts/t6001-j316c.dt share/u-boot/apple_m1/dts/t6001-j375c.dtb share/u-boot/apple_m1/dts/t6002-j375d.dtb share/u-boot/apple_m1/dts/t6020-j414s.dtb +share/u-boot/apple_m1/dts/t6020-j416s.dtb share/u-boot/apple_m1/dts/t6020-j474s.dtb share/u-boot/apple_m1/dts/t6021-j414c.dtb share/u-boot/apple_m1/dts/t6021-j416c.dtb +share/u-boot/apple_m1/dts/t6021-j475c.dtb share/u-boot/apple_m1/dts/t6022-j180d.dtb +share/u-boot/apple_m1/dts/t6022-j475d.dtb share/u-boot/apple_m1/dts/t8103-j274.dtb share/u-boot/apple_m1/dts/t8103-j293.dtb share/u-boot/apple_m1/dts/t8103-j313.dtb Index: sysutils/firmware/apple-boot/Makefile === RCS file: /cvs/ports/sysutils/firmware/apple-boot/Makefile,v retrieving revision 1.16 diff -u -p -r1.16 Makefile --- sysutils/firmware/apple-boot/Makefile 8 Jan 2024 20:00:31 - 1.16 +++ sysutils/firmware/apple-boot/Makefile 31 Mar 2024 16:15:34 - @@ -1,5 +1,5 @@ FW_DRIVER= apple-boot -FW_VER=1.2 +FW_VER=1.3 WRKDIST= ${WRKDIR} DISTFILES= @@ -10,7 +10,7 @@ PERMIT_PACKAGE= firmware PERMIT_DISTFILES= Yes BUILD_DEPENDS= m1n1-=1.4.11:sysutils/m1n1:build \ - u-boot-asahi-=2024.01:sysutils/u-boot-asahi:build + u-boot-asahi-=2024.01p0:sysutils/u-boot-asahi:build ASAHI_BUILD= ${WRKSRC}/sysutils/u-boot-asahi/u-boot-*/build M1N1_BUILD=${WRKSRC}/sysutils/m1n1/m1n1-*/build
M2 Pro 2023 works, but stuck with our apple-boot firmware
Default snapshot install works with the intial UEFI/u-boot from macOS/Asahi. After manual fw_update(8) via urndis(4) tethering to install apple-boot-1.2 and cold reboot, it still boots the initial UEFI/u-boot and works. Once I run sysupgrade(8), after the upgrade the boot firmware is switched to our apple-boot (visible via tobhe's OpenBSD logo) which gets stuck before reaching our bootloader. First time using Apple silicon, so I don't have a clue yet what's going on. Loose transcription, picture attached. Chip-ID: 0x6020 OS FW version: 13.5 (iBoot-8422.141.2) System FW version: unknown (iBoot 10151.101.3) [...] Initialization complete. Cechking for payloads... Devicetree compatible value: apple,j416s Found a gzip compressed payload at 0x100041dc200 Uncompressing... 272386 bytes uncompressed to 562704 bytes Found a kernel at 0x10006a0 Found a variable at 0x1000421ea02: chosen.asahi,efi-system-partition=... No more payloads at 0x1000421ea19 ERROR: Kernel found but not devicetree for apple,j416s available. No valid payload found dart: dart /arm-io/dart-usb0 at 0x... is a t8110 USB0: initialized at 0x... [same for USB1/2] Runnig proxy... Below dmesg is from a previous install (with root on softraid). OpenBSD 7.5-current (GENERIC.MP) #139: Sat Mar 30 11:13:12 MDT 2024 dera...@arm64.openbsd.org:/usr/src/sys/arch/arm64/compile/GENERIC.MP real mem = 33464909824 (31914MB) avail mem = 32294658048 (30798MB) random: good seed from bootblocks mainbus0 at root: Apple MacBook Pro (16-inch, M2 Pro, 2023) efi0 at mainbus0: UEFI 2.10 efi0: Das U-Boot rev 0x20230700 cpu0 at mainbus0 mpidr 0: Apple Blizzard Pro r1p0 cpu0: 128KB 64b/line 4-way L1 PIPT I-cache, 64KB 64b/line 8-way L1 D-cache cpu0: 4096KB 128b/line 16-way L2 cache cpu0: TLBIOS+IRANGE,TS+AXFLAG,FHM,DP,SHA3,RDM,Atomic,CRC32,SHA2+SHA512,SHA1,AES+PMULL,SPECRES,SB,FRINTTS,GPI,LRCPC+LDAPUR,FCMA,JSCVT,API+PAC,DPB,SpecSEI,PAN+ATS1E1,LO,HPDS,VH,CSV3,CSV2,DIT,BT,SSBS+MSR cpu1 at mainbus0 mpidr 1: Apple Blizzard Pro r1p0 cpu1: 128KB 64b/line 4-way L1 PIPT I-cache, 64KB 64b/line 8-way L1 D-cache cpu1: 4096KB 128b/line 16-way L2 cache cpu2 at mainbus0 mpidr 2: Apple Blizzard Pro r1p0 cpu2: 128KB 64b/line 4-way L1 PIPT I-cache, 64KB 64b/line 8-way L1 D-cache cpu2: 4096KB 128b/line 16-way L2 cache cpu3 at mainbus0 mpidr 3: Apple Blizzard Pro r1p0 cpu3: 128KB 64b/line 4-way L1 PIPT I-cache, 64KB 64b/line 8-way L1 D-cache cpu3: 4096KB 128b/line 16-way L2 cache cpu4 at mainbus0 mpidr 10100: Apple Avalanche Pro r1p0 cpu4: 192KB 64b/line 6-way L1 PIPT I-cache, 128KB 64b/line 8-way L1 D-cache cpu4: 16384KB 128b/line 16-way L2 cache cpu5 at mainbus0 mpidr 10101: Apple Avalanche Pro r1p0 cpu5: 192KB 64b/line 6-way L1 PIPT I-cache, 128KB 64b/line 8-way L1 D-cache cpu5: 16384KB 128b/line 16-way L2 cache cpu6 at mainbus0 mpidr 10102: Apple Avalanche Pro r1p0 cpu6: 192KB 64b/line 6-way L1 PIPT I-cache, 128KB 64b/line 8-way L1 D-cache cpu6: 16384KB 128b/line 16-way L2 cache cpu7 at mainbus0 mpidr 10103: Apple Avalanche Pro r1p0 cpu7: 192KB 64b/line 6-way L1 PIPT I-cache, 128KB 64b/line 8-way L1 D-cache cpu7: 16384KB 128b/line 16-way L2 cache cpu8 at mainbus0 mpidr 10200: Apple Avalanche Pro r1p0 cpu8: 192KB 64b/line 6-way L1 PIPT I-cache, 128KB 64b/line 8-way L1 D-cache cpu8: 16384KB 128b/line 16-way L2 cache cpu9 at mainbus0 mpidr 10201: Apple Avalanche Pro r1p0 cpu9: 192KB 64b/line 6-way L1 PIPT I-cache, 128KB 64b/line 8-way L1 D-cache cpu9: 16384KB 128b/line 16-way L2 cache cpu10 at mainbus0 mpidr 10202: Apple Avalanche Pro r1p0 cpu10: 192KB 64b/line 6-way L1 PIPT I-cache, 128KB 64b/line 8-way L1 D-cache cpu10: 16384KB 128b/line 16-way L2 cache cpu11 at mainbus0 mpidr 10203: Apple Avalanche Pro r1p0 cpu11: 192KB 64b/line 6-way L1 PIPT I-cache, 128KB 64b/line 8-way L1 D-cache cpu11: 16384KB 128b/line 16-way L2 cache "asc-firmware" at mainbus0 not configured "asc-firmware" at mainbus0 not configured "framebuffer" at mainbus0 not configured "asc-firmware" at mainbus0 not configured "asc-firmware" at mainbus0 not configured "region157" at mainbus0 not configured "region95" at mainbus0 not configured "region94" at mainbus0 not configured "region57" at mainbus0 not configured "dcp_data" at mainbus0 not configured "asc-firmware" at mainbus0 not configured "uat-handoff" at mainbus0 not configured "uat-pagetables" at mainbus0 not configured "uat-ttbs" at mainbus0 not configured "isp-heap" at mainbus0 not configured apm0 at mainbus0 "opp-table-0" at mainbus0 not configured "opp-table-1" at mainbus0 not configured "opp-table-gpu" at mainbus0 not configured "opp-table-gpu-cs" at mainbus0 not configured "opp-table-gpu-afr" at mainbus0 not configured "pmu-e" at mainbus0 not configured "pmu-p" at mainbus0 not configured agtimer0 at mainbus0: 24000 kHz "clock-ref" at mainbus0 not configured "clock-200m" at mainbus0 not configured