marcan changed the topic of #asahi to: Asahi Linux: porting Linux to Apple Silicon macs | Not ready for end users / self contained install yet. Soon. | General project discussion | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Topics: #asahi-dev #asahi-re #asahi-gpu #asahi-stream #asahi-offtopic | Keep things on topic | Logs: https://alx.sh/l/asahi
DarkShadow44 has quit [Quit: ZNC - https://znc.in]
DarkShadow44 has joined #asahi
balrog has quit [Quit: Bye]
balrog has joined #asahi
Dcow has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<marcan> j`ey: there is some APFS compression thing in use, but I don't know how to turn it on when copying the file out in the installer
<tpw_rules> is the dmg signed or something? they support compression internally
Dcow has joined #asahi
<marcan> it's APFS and signed at that level I think?
<marcan> not entirely sure at what layer their hash tree stuff works
<marcan> landscape15[m]: s/1TR/system recovery/
<marcan> 1TR is not "the fallback recovery"
<marcan> 1TR is "any signed recovery you booted asserting physical presence"
<marcan> I conflated these two in the past since 11.x always used the global one, and now everyone is confused :<
yuyichao has quit [Ping timeout: 480 seconds]
riker77_ has joined #asahi
snek has joined #asahi
riker77 has quit [Ping timeout: 480 seconds]
riker77_ is now known as riker77
Dcow has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Dcow has joined #asahi
yuyichao has joined #asahi
<amw> Booted wifi/take5 on my MBA - everything working including wifi - but I get a USB WARN msg when I unplug the USB cable I boot the mba over - see https://paste.debian.net/1224994/
chadmed has joined #asahi
<amw> I think it is do with the kernel trying to use the USB cable as a gadget for a serial or something?
<amw> It seems harmless so I'm happy with my set up on the MBA - just waiting for the battery + u-boot NVME booting now
<tpw_rules> u-boot nvme booting works fine
<tpw_rules> well i haven't tested it with the wifi linux branch
<tpw_rules> or on a not macbook mini
<tpw_rules> air >_>. only tested it on the mac mini
Dcow has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<amw> tpw_rules: I thought it left the nvme running which linux didn't like when it started
<tpw_rules> that was fixed
<tpw_rules> i've pretty much exclusively been using it that wauy
<tpw_rules> it doesn't work with the new nvme branch for whatever reason
Dcow has joined #asahi
<amw> Wow - that's great
<tpw_rules> it is worth noting that u-boot does not have drivers for the built in keyboard yet. and you might wish to apply this patch i made: https://github.com/tpwrules/nixos-m1/blob/main/nix/u-boot/0001-fix-slow-boot.patch to stop having to wait 60 seconds to load the kernel unless you press a key
<amw> I have the default boot to m1n1 so if I bundle that with u-boot I can boot to linux.
<tpw_rules> you might also have to futz with device trees. not sure if u-boot has the necessary stuff for the wifi, or can use linux's versions
Dcow has quit [Ping timeout: 480 seconds]
<amw> Myh expeience with u-boot was that you can use it to load the dtb and kernel image into memory from the disk - so hopefully I just need to put it in the right spot (/boot) on the nvme and all should be good - what could go wrong :-)
phiologe has joined #asahi
PhilippvK has quit [Ping timeout: 480 seconds]
Dcow has joined #asahi
caef^ has quit [Remote host closed the connection]
Dcow has quit [Ping timeout: 480 seconds]
yrwm^ has joined #asahi
marvin24_ has joined #asahi
marvin24 has quit [Ping timeout: 480 seconds]
squags_ has joined #asahi
squags has quit [Ping timeout: 480 seconds]
Dcow has joined #asahi
Dcow has quit [Ping timeout: 480 seconds]
Dcow has joined #asahi
nobodynada has quit [Ping timeout: 480 seconds]
Dcow has quit [Ping timeout: 480 seconds]
squags_ has quit [Ping timeout: 480 seconds]
sailorek1234 has joined #asahi
squags has joined #asahi
squags has quit [Ping timeout: 480 seconds]
squags has joined #asahi
squags has quit [Ping timeout: 480 seconds]
bpye has quit [Quit: The Lounge - https://thelounge.chat]
squags has joined #asahi
bpye has joined #asahi
squags has quit [Ping timeout: 480 seconds]
squags has joined #asahi
squags has quit [Ping timeout: 480 seconds]
squags has joined #asahi
the_lanetly_052 has joined #asahi
Dcow has joined #asahi
babilen has joined #asahi
Dcow has quit [Ping timeout: 480 seconds]
squags has quit [Ping timeout: 480 seconds]
squags has joined #asahi
darkapex4 has joined #asahi
darkapex3 has quit [Ping timeout: 480 seconds]
Dcow has joined #asahi
the_lanetly_052 has quit [Ping timeout: 480 seconds]
the_lanetly_052 has joined #asahi
the_lanetly_052__ has joined #asahi
Dcow has quit [Ping timeout: 480 seconds]
the_lanetly_052 has quit [Ping timeout: 480 seconds]
the_lanetly_052__ has quit [Ping timeout: 480 seconds]
darkapex has joined #asahi
darkapex4 has quit [Ping timeout: 480 seconds]
squags has quit [Ping timeout: 480 seconds]
squags has joined #asahi
squags has quit [Ping timeout: 480 seconds]
squags has joined #asahi
Dcow has joined #asahi
Dcow has quit [Ping timeout: 480 seconds]
<marcan> amw: I think there's something dodgy about gadget mode, yeah; I wouldn't worry too much about it for now
<marcan> amw: loading DTBs from u-boot is not supported
<marcan> m1n1 needs to process the dtb before it can be used
<marcan> bypassing that will break a bunch of things
mps has quit [Ping timeout: 480 seconds]
squags has quit [Ping timeout: 480 seconds]
squags has joined #asahi
darkapex1 has joined #asahi
mps has joined #asahi
darkapex has quit [Ping timeout: 480 seconds]
squags has quit [Ping timeout: 480 seconds]
squags has joined #asahi
malvo has quit [Ping timeout: 480 seconds]
<amw> marcan: Ok - you process the dtb with stuff from the Apple EFI or something?
<amw> Is it possible to use the python to pre-process the .dtb so that it can be saved in the NVME partition and uboot can pick it up as normal?
<j`ey> not EFI, but from Apples device tree
squags has quit [Ping timeout: 480 seconds]
malvo has joined #asahi
squags has joined #asahi
<sven> no, the device tree will always come from m1n1
<sven> putting it into nvme separate from m1n1 will result in a lot of headaches eventually
<marcan> amw: no, the dtb has to be processed with *runtime* information from your machine
<marcan> we already make everything that can be static static
<marcan> device trees are designed to be updated by bootloaders with runtime information
<marcan> static DTs only work for very simple machines; these machines aren't simple
<marcan> there are things that change every boot
<j`ey> even then, bootloaders can update them with kernel args etc
<j`ey> kaslr seed too
<marcan> yes, kaslr changes the SEPFW address on every boot
<marcan> and the memory base potentially
<amw> Wow - nothing's ever easier...
<marcan> and the framebuffer address can change depending on what monitor you have plugged in, or could until apple broke it on the mini entirely
<marcan> I really need to start making a pile of "don't do that" patches for linux/u-boot/etc - something that gives you big "don't do that" warnings every time someone tries to do something that won't work, like load a dtb :p
squags has quit [Ping timeout: 480 seconds]
<amw> I think a u-boot page might be useful spot?
<amw> on the wiki
<marcan> nobody reads wikis :p
<marcan> better have some warnings in the actual code
<marcan> this is distro-level stuff; I don't mind maintaining some trivial downstream patches like that just to save us headaches when people come here for support
<amw> There's only one Asahi Wiki page - but many clones of u-boot...
chadmed has quit [Quit: Konversation terminated!]
squags has joined #asahi
squags has quit [Ping timeout: 480 seconds]
Dcow has joined #asahi
squags has joined #asahi
Dcow_ has joined #asahi
Dcow has quit [Remote host closed the connection]
Dcow_ has quit []
Dcow has joined #asahi
boardwalk has quit [Quit: Ping timeout (120 seconds)]
boardwalk has joined #asahi
jeffmiw has joined #asahi
<jeffmiw> amw: if you want to boot directly to linux, you can just use the m1n1 direct payload method : just cat m1n1 with dtb and kernel image (and initrd if needed) and install this with kmutil (See wiki/developer-quickstart=> Direct payload booting)
Dcow has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<landscape15[m]> is it safe to use fdisk to initialize a FAT partition created on macOS? I will install Linux on it then.
kgarrington has joined #asahi
kgarrington has quit [Remote host closed the connection]
Dcow has joined #asahi
Dcow has quit []
squags has quit [Ping timeout: 480 seconds]
aleasto has joined #asahi
aleasto has quit [Remote host closed the connection]
aleasto has joined #asahi
aleasto has quit [Remote host closed the connection]
aleasto has joined #asahi
squags has joined #asahi
squags has quit [Ping timeout: 480 seconds]
squags has joined #asahi
joske has joined #asahi
<joske> jeffmiw: how do you pass the rootfs/boot arguments in that case?
<mps> joske: https://tpaste.us/kxg9 this is my POC script to install alpine on usb, look at 'cat ....' part
<joske> mps: rhxz
DarkShadow44 has quit [Quit: ZNC - https://znc.in]
<joske> oops
<joske> mps: thx
DarkShadow44 has joined #asahi
<mps> joske: sorry, this one is cleaner https://tpaste.us/OrkV
<joske> mps: hmm, boots to m1n1 proxy :-/
<joske> no valid payload found
yuyichao has quit [Ping timeout: 480 seconds]
<jeffmiw> did you use the dtb of your model ? in this mode, m1n1 checks hw model versus dtb model
<jeffmiw> which hw are you using and which dts/b ?
<mps> joske: no, this script is intended to catenate m1n1, kernel and dtb in one file which must be installed with kmutil
<joske> air, t8103-j313.dtb
<joske> mps: yes, that's what I did (manually)
<joske> cat build/m1n1.macho <(echo $bootargs) Image.gz t8103-j313.dtb > boot-payload.macho
<joske> bootargs='root=/dev/nvme0n1p5 rootwait rootfstype=ext4'
<mps> on top of script I defined 'model' variable and put value for my machine `model='j293'` but it intended be changed for users who install to set their model there
<joske> Image.gz and dtb are working when booting from m1n1
<joske> mps: yes I understand, but I didn't run your script, I just used the cat line to create the macho binary from my m1n1 + kernel etc
<joske> I already have a working linux
<mps> joske: I remember
<joske> just want to have it boot directly
<mps> joske: what you mean by 'directly'
<joske> from reboot
<joske> not boot to m1n1 and use another PC to boot kernel
<mps> joske: this what i posted is for that, i.e. boot directly
<joske> yes, but it doesn't work (installed with kmutil)
<joske> it says no valid payload found
<j`ey> joske: if you have something that works with chainload, it should work with kmutil
<mps> aha, maybe somewhere is bug then
<joske> the boot args go directly after m1n1??
<mps> I don't have time now to check it again
<joske> that's what your script does
<mps> yes, that's ok
<mps> maybe your shell messed bootargs
<joske> I tested with a test file to see if the <$() works
<kettenis> marcan: maybe you should look into what happens with the Linux device tree; I think we want to prevent it from being installed and/or shipped by distros as part of their device tree package
<jeffmiw> joske: can you paste the output of m1n1 somewhere ? the code checking the payload is here: https://github.com/AsahiLinux/m1n1/blob/23c3617cf2b0b22fe5e22d07c3f757ba19092b25/src/payload.c#L204
<joske> [silence m1n1]# M1N1DEVICE=/dev/ttyACM0 proxyclient/tools/chainload.py boot-payload.macho
<joske> TTY> height: 1600
<joske> TTY> 2560
<joske> TTY> depth: 30bpp
<joske> TTY> density: 1
<joske> TTY> machine_type: 0
<joske> TTY> devtree: 0xfffffe000f84c000
<joske> TTY> devtree_size: 0x58000
<joske> TTY> cmdline:
<joske> TTY> boot_flags: 0x0
<joske> TTY> mem_size_act: 0x400000000
<joske> TTY>
<joske> TTY>
<joske> TTY>
<j`ey> in a paste site..
<joske> TTY> m1n1 vcde8b78-dirty
<joske> TTY> Copyright (C) 2021 The Asahi Linux Contributors
<joske> TTY> Licensed under the MIT license
<joske> TTY>
<joske> TTY> Running in EL2
<mps> j`ey: too late :)
<joske> TTY>
<joske> TTY> Device info:
<joske> TTY> Model: MacBookAir10,1
<j`ey> mps: ah well
<joske> TTY> Target: J313
<joske> TTY> Board-ID: 0x26
<joske> TTY> Chip-ID: 0x8103
<joske> TTY>
<joske> TTY> Heap base: 0x8080ec000
<joske> TTY> MCC: Initializing T8103 MCC...
<joske> TTY> MCC: Initialized T8103 MCC (8 channels)
<joske> TTY> MMU: Initializing...
<joske> TTY> MMU: Adding nGnRE mapping at 0x400000000 (0x80000000)
<joske> TTY> MMU: Adding nGnRE mapping at 0x480000000 (0x80000000)
<joske> TTY> MMU: Adding nGnRE mapping at 0x580000000 (0x80000000)
<joske> TTY> MMU: Adding nGnRE mapping at 0x600000000 (0x80000000)
<joske> TTY> MMU: Adding nGnRE mapping at 0x6a0000000 (0x20000000)
<joske> TTY> MMU: Adding nGnRE mapping at 0x6c0000000 (0x40000000)
<joske> TTY> MMU: Adding nGnRE mapping at 0x700000000 (0x100000000)
<joske> TTY> MMU: RAM base: 0x800000000
<joske> TTY> MMU: Top of normal RAM: 0xbdf070000
<joske> TTY> MMU: Unmapping TZ0 region at 0xbdf078000..0xbe0e20000
<joske> TTY> MMU: Unmapping TZ1 region at 0xbdf070000..0xbdf078000
<joske> TTY> MMU: Unmapping TZ3 region at 0xbe6e64000..0xbffe64000
<joske> TTY> MMU: SCTLR_EL1: 30100180 -> 30901085
<joske> TTY> MMU: running with MMU and caches enabled!
<joske> TTY> fb init: 2560x1600 (30) [s=2560] @(nil)
<joske> TTY> fb console: max rows 46, max cols 64
<joske> TTY> fb: display logo
<joske> TTY> AIC: Version 1 @ 0x23b100000
<joske> TTY> WDT registers @ 0x23d2b0000
<joske> TTY> WDT disabled
<joske> TTY> pmgr: Cleaning up device states...
<joske> TTY> pmgr: Enabling SIO_ADMA, parent of active device MCA1
<joske> TTY> pmgr: Enabling ANS2, parent of active device APCIE_ST
<joske> TTY> pmgr: Enabling DEBUG, parent of active device DEBUG_USB
<sven> :/
<joske> TTY> pmgr: initialized, 268 devices found.
<joske> TTY> cpufreq: Initializing clusters
<joske> TTY> cpufreq: Switching cluster PCPU to P-State 7
<joske> TTY> Initialization complete.
<joske> TTY> Checking for payloads...
<joske> TTY> Devicetree compatible value: apple,j313
<joske> TTY> Unknown payload at 0x8039c0000 (magic: 726f6f74)
<joske> TTY> No valid payload found
<joske> TTY> dart: dart /arm-io/dart-usb0 at 0x382f80000 is a t8020
<joske> TTY> USB0: initialized at 0x808118050
<joske> TTY> dart: dart /arm-io/dart-usb1 at 0x502f80000 is a t8020
<joske> TTY> USB1: initialized at 0x808118500
<joske> TTY> Running proxy...
<joske> m1n1 base: 0x803904000
<joske> LOAD: _HDR 16384 bytes from 0 to 0
<joske> LOAD: TEXT 147456 bytes from 4000 to 4000
<joske> LOAD: RODA 32768 bytes from 28000 to 28000
<joske> LOAD: DATA 393216 bytes from 30000 to 30000
<joske> ZERO: 180224 bytes from 0x90000 to 0xbc000
<joske> LOAD: PYLD 7042534 bytes from 90000 to bc000
<joske> SKIP: 60066330 bytes from 0x7735e6 to 0x40bc000
<joske> Fetching ADT (0x00058000 bytes)...
joske has quit [Quit: Leaving]
joske has joined #asahi
joske has left #asahi [#asahi]
joske has joined #asahi
<j`ey> joske: your boot args are messed up, you have (echo $bootargs)
<j`ey> but bootargs='root...'
<j`ey> so that echos 'root..', but it should be: echo bootargs='root..
<joske> j`ey: aha thx
yuyichao has joined #asahi
MajorBiscuit has joined #asahi
squags has quit [Ping timeout: 480 seconds]
sailorek1234 has quit [Quit: sailorek1234]
squags has joined #asahi
squags has quit [Ping timeout: 480 seconds]
Dcow has joined #asahi
hollister has joined #asahi
squags has joined #asahi
Dcow has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
squags has quit [Ping timeout: 480 seconds]
squags has joined #asahi
c10l has quit [Quit: The Lounge - https://thelounge.chat]
c10l has joined #asahi
c10l has quit []
c10l has joined #asahi
malvo has quit [Ping timeout: 480 seconds]
darkapex2 has joined #asahi
yrwm^ has quit [Remote host closed the connection]
Dcow has joined #asahi
darkapex1 has quit [Ping timeout: 480 seconds]
joske has quit [Ping timeout: 480 seconds]
hollister has quit [Ping timeout: 480 seconds]
joske has joined #asahi
joske has quit [Remote host closed the connection]
malvo has joined #asahi
joske has joined #asahi
squags has quit [Ping timeout: 480 seconds]
squags has joined #asahi
squags has quit [Ping timeout: 480 seconds]
malvo has quit [Read error: Connection reset by peer]
malvo has joined #asahi
squags has joined #asahi
squags has quit [Ping timeout: 480 seconds]
squags has joined #asahi
rose_ has joined #asahi
<rose_> hey im back with more problems - im trying to get some output from u-boot to prove it works since upgrading to 12.1 (turns out i shouldn't have done that so eagerly lol) and i've heard that since 12.1, iboot no longer inits the framebuffer, which is why u-boot isn't displaying anything. apparently, there are people here who know the incantations
<rose_> needed to get video output from u-boot even with this update?
<rose_> ehh i gtg for a while but i'll check the logs later
<tpw_rules> i mean you can run it under the hypervisor
<tpw_rules> and it will talk on the serial console. not sure about video
<rose_> by "the hypervisor" you mean m1n1? i already am
<tpw_rules> then what do you mean by "prove it works"?
<rose_> hmm.. it doesn't talk on serial
<rose_> we have no output from u-boot at all, and back in big sur we had video
<tpw_rules> use run_guest.py or whatever and then open /dev/ttyACM1 (before you start run_guest) and it should come up on console
<tpw_rules> yeah you won't get video output. but if you just want proof u-boot is booting
<rose_> yeah long term we're trying to boot netbsd, i dont really understand which scripts do what so we've mostly been using wrangled versions of linux.py
<tpw_rules> if you do cat m1n1.bin u-boot.dtb u-boot-nodtb.bin > blah.bin then run_guest that it should work
<tpw_rules> more or less
<rose_> btw, where do people tend to build u-boot from? from the logs earlier it seems there are a few forks, but idk which ones the most likely to work
<rose_> thanks though i'll look into run_guest, and like i said i gtg but i'll check the logs
rose_ has quit [Quit: Connection closed]
<j`ey> kettenis' is the defacto standard https://github.com/kettenis/u-boot/commits/apple-m1-m1n1-nvme
<tpw_rules> yes
squags has quit [Ping timeout: 480 seconds]
squags has joined #asahi
squags has quit [Ping timeout: 480 seconds]
squags has joined #asahi
yuyichao_ has joined #asahi
yuyichao has quit [Ping timeout: 480 seconds]
artemist has quit [Ping timeout: 480 seconds]
thickrocks has quit [Read error: Connection reset by peer]
tdmm has quit [Read error: Connection reset by peer]
thickrocks has joined #asahi
tdmm has joined #asahi
joske has quit [Quit: Quit]
joske has joined #asahi
<joske> j`ey: that way indeed it boots straight to linux. However, as the pcie_enable script didn't run, no wifi. Any way to solve that?
artemist0 has joined #asahi
<mps> joske: afaik for now only with second machine and usb cable
<jannau> joske: wait for the smc driver which is high on the todo list, probably next
<joske> ok, thx all
yuyichao has joined #asahi
yuyichao_ has quit [Ping timeout: 480 seconds]
monn has joined #asahi
joske has quit [Remote host closed the connection]
monn has quit [Quit: Quit]
MajorBiscuit has quit [Quit: WeeChat 3.3]
artemist0 has quit [Remote host closed the connection]
artemist0 has joined #asahi
artemist0 has quit [Ping timeout: 480 seconds]
<kettenis> just pushed spi keyboard support to the u-boot branch
<mps> kettenis: \o/