<xfim>
tpw_rules: thank you very much. I am aware of the zcat /proc/config.gz, but I am installing from an Alpine, and would like to have some sort of "comparison". BTW, would you recommend me to start with the Alpine one (the host that I am using to install Gentoo), or to start with the official Asahi config? What would you do?
lromwoo^ has quit [Ping timeout: 480 seconds]
<tpw_rules>
i don't know. i've had trouble with configs before for nixos. i would see how asahi's config compares to a default alarm install (because it is definitely different) and then go from there
lromwoo^ has joined #asahi
c10l has quit [Quit: Bye o/]
c10l has joined #asahi
GaborSOOS[m] has joined #asahi
lromwoo^ has quit [Ping timeout: 480 seconds]
lromwoo^ has joined #asahi
xfim has quit [Ping timeout: 480 seconds]
eccli[m] has joined #asahi
lromwoo^ has quit [Ping timeout: 480 seconds]
guillaume_g has joined #asahi
lromwoo^ has joined #asahi
eroux has joined #asahi
lromwoo^ has quit [Ping timeout: 480 seconds]
xfim has joined #asahi
<cmalvi[m]>
I modified the pop-os grub theme with Asahi logo and selection color with Fira Sans font, if anyone want it i can upload here for a more "user friendly" boot menu
<cmalvi[m]>
* I modified the pop-os grub theme with Asahi logo and selection color with Fira Sans font, if anyone want here is the archive
jluthra has quit [Remote host closed the connection]
jluthra has joined #asahi
w12101111 has joined #asahi
test has joined #asahi
test has quit []
___nick___ has joined #asahi
___nick___ has quit []
___nick___ has joined #asahi
<marcan>
the asahi config mostly turns off all the stuff that won't ever be needed in current Asahi systems, including ~all PCI drivers
<marcan>
(except the ones actually in use)
___nick___ has quit []
<marcan>
and then adds the Apple stuff
<marcan>
plus some core changes like setting the page size to 16K
___nick___ has joined #asahi
ChaosPrincess has quit [Quit: WeeChat 3.5]
ChaosPrincess has joined #asahi
qdot has quit [Ping timeout: 480 seconds]
<xfim>
marcan: yes, I have seen it and it seems very clean. I have taken the Asahi configuration, and used the latest 5.18.0 gentoo-sources, and done a make oldconfig.
<xfim>
I am right now installing grup, and I need time to figure our what is the vfat partition where grub is supposed to install it.
<marcan>
yeah, that's probably a safe bet. also note that the Asahi config deliberately builds a ton of stuff as modules, because I wanted to test that all that worked (and fixed a bunch of problems there)
<xfim>
Since I have so many partitions, I am ensuring that all is well.
<marcan>
I would advise you *not* to do that unless you want to play around with initramfs stuff until it works properly
<marcan>
in particular I would make NVMe and its dependencies built in
<marcan>
and the SMC reboot driver
<j`ey>
xfim: you want the asahi sources I think, not the normal 5.18 sources
<marcan>
oh yeah, that too of course
<marcan>
I thought you meant gentoo-sources patches on top
<xfim>
marcan: Oh, oh, then let me see
<chadmed>
upstream is still missing some necessary patches
<marcan>
mainline won't run on M1 Max/etc at all
<xfim>
I have taken the gentoo patched version, the 5.18.0, and used the asahi config file
<j`ey>
"some" chadmed :P
<xfim>
Is that very wrong?
<marcan>
yes
<marcan>
upstream does not support anything other than the original M1, and that is missing a ton of stuff
<chadmed>
if you want portage to deal with the kernel i have an overlay with asahi-sources-9999
<marcan>
it's only really usable on the M1 Mac Mini if you don't care about WiFi
<xfim>
Wifi certainly shouldn't be an issue
<marcan>
(and niceties like shutdown/reboot working properly)
<xfim>
(What exactly is "mainline"? sorry for asking)
<marcan>
Linux 5.18
<xfim>
Ah, OK
<xfim>
So, all in all, you would say that I don't even try to load it, right?
<chadmed>
it wont work so no
<mps>
xfim: alpine have /boot/config-asahi file
<marcan>
I guess technically mainline will boot on M1 Max/Ultra... and NVMe might even work these days?
<marcan>
but no IOMMU so no USB/PCI/etc
<j`ey>
basically.. use asahi branch :P
<marcan>
sven: I need to start prodding people about IOMMU on t6k don't I :/
<marcan>
but did we figure out if we should do it a different way for the new DART?
<xfim>
mps: but as far as I understand, the configuration file itself is not the problematic one, but the patches that Asahi has that are not yet ready in 5.18.0
<mps>
xfim: all counts
<xfim>
chadmed: thank you very much, I think that would be great, then!
<mps>
you need latest asahi kernel and proper .config
<chadmed>
yeah you can use a config from wherever, just as was said keep in mind that you _need_ to use an initramfs with the asahi config
<chadmed>
make sure your ESP is mounted then install grub with the --removable switch
<chadmed>
idk if any of the USE flags for grub in gentoo give it aarch64 efi though
<chadmed>
so you may need to acquire BOOTAA64.efi from somewhere else
<mps>
xfim: you can look at guide I posted yesterday how to setup grub
<xfim>
chadmed: as I said earlier, I am trying to figure out where is ESP, and if I can access it from the chrooted enviroment from within I am installing.
<xfim>
There is a use flag for efi-64
<chadmed>
just do lsblk and look for the fat32 500mb partition
<xfim>
Would that be enough?
<sven>
marcan: i think jannau already volunteered to take care of the t6k dart :>
<chadmed>
it might be, like i said im not sure if it gives you aarch64 efi or just amd64 since the efi images are shipped as binaries and not built by portage (theyre WinPE binaries)
<xfim>
chadmed: OK, found it. It is, however, not mounted in the chrooted environment
<marcan>
j`ey: yeah and no replies :/
<chadmed>
yeah so you can mount it
<_jannau_>
marcan: I still only crickets for the dart-t6k v2 I sent out a couple of weeks ago
<xfim>
mps: excellent, I found it in the guide. I feel I am using patches from here and there, creating a sort of Frankenstein...
<j`ey>
xfim: thats what you get for being an early adopter :P
<xfim>
chadmed, mps: so I will first work again on the kernel, with the asahi patched version, and then will move back to grub. I am terrified at grub, because I've always find it very peculiar.
<chadmed>
if you know how, you can build an efi image out of the kernel and just go from u-boot to that
<xfim>
j`ey: very early adopter, I would say. I hope the reward is also great, and I will do my best then to help as much as I can.
<chadmed>
its kind of janky though and i couldnt get it working on ALAMR
<chadmed>
ALARM
<xfim>
chadmed: that efi image is what I am using in my current laptop, and I think it is far quicker. Isn't it? Do you think that an approach like that would work here, or is it too risky?
<chadmed>
i mean u-boot ostensibly supports it, just make the efi image and put it at EFI/BOOT/BOOTAA64.efi
<chadmed>
like i said though i could not make it work on my 14" macbook pro
<mps>
xfim: yes, grub is 'peculiar' (at least :) ) but it is nowadays in use everywhere
<mps>
plain u-boot is simpler to setup but miss some featutes
<_jannau_>
not sure what to do next. I can see that reusing io-pgtable-arm becomes less appealing. I wouldn't have a problem with splitting dart of from io-pgtable-arm.c but some feedback would be appreciated
<xfim>
mps, chadmed: I simply thought about going with grub because at least in case of doing something wrong when substituting the bootaa64.efi for a newer version (something that I will have to do often as an early adopter) it is safer to still have the option to boot into the old usable kernel.
<xfim>
The problem is how to get to the first usable kernel.
<xfim>
So after I finish with the kernel I will go for u-boot / grub
pg12_ has joined #asahi
pg12 has quit [Ping timeout: 480 seconds]
qdot has joined #asahi
Ry_Darcy has joined #asahi
bps2 has joined #asahi
bps has quit [Read error: Connection reset by peer]
bps2 has quit [Read error: Connection reset by peer]
bps2 has joined #asahi
<cmalvi[m]>
does the stock main kernel work as asahi on macbook air m1?
<mps>
cmalvi[m]: no
<cmalvi[m]>
thanks, just a curiosity :)
<sami-dev[m]>
I got the MBP M1 Max today, super impressed with how far asahi has gotten. Well spent money supporting this project :) One question though, how would I go about having boot select screen by default after asahi is set up? Been some years since I owned a mac :)
<sven>
i think the mini is almost useable with 5.18 and will definitely be useable with 5.19 which should have nvme
<sven>
i feel like i say this for every kernel version but i hope 5.20 will finally have useable upstream support for the m1 macbooks as well :D
<cmalvi[m]>
you can go to boot select menu by holding the power button, if i understood correctly your question
<eccli[m]>
sami-dev[m]: hold down power while booting
<sami-dev[m]>
cmalvi[m]: Yes, this is what I currently do. I would like it to be default since before we have GPU acceleration I'm likely going to be moving a lot between OSes.
<cmalvi[m]>
oh you want to go to boot selection by default? i don't know if you can do it
<cmalvi[m]>
i'm also interested in this
<sami-dev[m]>
Aha okay. I just remember the days of old when I had a mac and had linux installed I would be presented with the boot selection on startup where it would remember the last used entry.
<sami-dev[m]>
Perhaps the m1 doesn't work like that.
<sven>
the boot selection is handled by iboot which we don't control :(
<cmalvi[m]>
maybe in future there will be a way to do it
<sven>
only if apples adds that feature
<sami-dev[m]>
Understandable, is it simple to switch defaults? I know Asahi currently set itself as default but say I'd like macOS to be default until Asahi has matured.
<sven>
pretty sure you can set the default from macOS
<sami-dev[m]>
Ok, simple then. Thanks :D
<sven>
settings -> startup disk or something like that
<cmalvi[m]>
sami-dev[m]: yes you can do it from settings in macOS
<sven>
eventually that will also be possible from linux
<sven>
it's probably just a nvram variable
<mps>
iirc there is trick to set default boot from 1TR
<ChaosPrincess>
Wouldnt it be possible to have a boot picker in m1n1? You'd lose secure boot features, but still?
<sven>
there's a wiki page somewhere explaining why we won't do that
<_jannau_>
sven: so you're saying we need to submit spi and spi HID (or usb-c) for 5.20?
<sven>
i'd certainly love that, but given that i haven't written either of those it's not really my place to force that :D
c10l has quit [Quit: Bye o/]
<_jannau_>
1tr has a startup disk selection, the boot picker changes the default if you hold the option key while selecting the partition
<cmalvi[m]>
_jannau_: nice tip, thanks
<_jannau_>
a non-networked laptop is probably not that useful, so we need wifi or usb-c as well
<sven>
ChaosPrincess: anyway, tl;dr: booting different linux systems from m1n1 (or actually uboot/grub) is possible if you don't care about SEP. booting different macOS systems would be painful since macOS requires matching firmware loaded by iBoot
<sven>
and usb-c unfortunately requires thunderbolt because it's part of that entangled ATCPHY mess :(
<sven>
but you could get away with just specifying the dwc nodes in the device tree and let the normal dwc3 driver pick them up. there's just no hotplug then
al3xtjames1 has joined #asahi
c10l has joined #asahi
<xfim>
I would like to make u-boot start from the usb drive, and not from the efi partation, to recover a MacStudio, but I don't really get exactly how u-boot manages it? I have been looking through the u-boot documantation, but with no clear paterns on what to look for. How can I tell u-boot to boot from the usb?
al3xtjames has quit [Ping timeout: 480 seconds]
al3xtjames1 is now known as al3xtjames
<cmalvi[m]>
xfim: for my experience, i suggest you to use grub to boot usb device because u-boot has glitchy text if press tab, also grub has bigger font
<_jannau_>
xfim: does your keyboard work in u-boot? you have 2 seconds to stop the autoboot. after that 'run bootcmd_usb0' should boot from usb
<cmalvi[m]>
and the commands are the same
<cmalvi[m]>
s/the same/similar/
<_jannau_>
command is from meory so might be wrong
<j`ey>
I think: run usb_boot, also works?
<cmalvi[m]>
_jannau_: sorry, i haven't specified, i meant commands to load kernel ecc
<mps>
_jannau_: yes, this, I forgot for option key
<xfim>
jannau: third time saving me. That was it. Yes, the keyboard works.
<j`ey>
xfim: what did you mess up?
<xfim>
I was already with the u-boot prompt and needed that
<_jannau_>
cmalvi[m]: depending on what's broken u-boot might not be loaded or doesn't find it's config
<j`ey>
_jannau_: did you mean grub in that sentence?
eroc1990 has joined #asahi
<_jannau_>
yes
<cmalvi[m]>
_jannau_: fair point, you're right
<xfim>
j`ey: I am quite proud that at least the boot loader was able to find the kernel that I had compiled. But as it was advised, it was a 5.18 without the asahi improvements. But since I had it, I wanted to try if it was able to boot. So now I need to enter alpine, chroot into gentoo and compile a proper asahi kernel, as advised before by chadmed
<j`ey>
xfim: did you get *any* output?
<mps>
'run bootcmd_usb0' works to boot from usb0 and in case boot usb is usb1 then 'run bootcmd_usb1'
<mps>
'run usb_boot' boots first one u-boot found
<_jannau_>
5.18 should boot but you have no storage and can't interact with the system
<j`ey>
mps: ah, good to know
<j`ey>
_jannau_: but otherwise, works great! :P
<_jannau_>
add an initrd with which displays a photo and you have an expensive picture frame with stand
<_jannau_>
s/with//
<j`ey>
:D
<sven>
:>
<_jannau_>
"works" depends just on the use case. a looping video works probably as well
<j`ey>
not hw accelerated though :(
<cmalvi[m]>
i'm trying to use chroot to install a package in a bootable usb drive, but chroot gave me no such file or directory error (sudo chroot "path-to-usb-bin")
<cmalvi[m]>
solved
<cmalvi[m]>
now the problem is i can't install package due to impossibility to determine filesystem mount points
<j`ey>
cmalvi[m]: sounds like you also need to mount proc dev etc, there's probably a guide somewhere
<cmalvi[m]>
ChaosPrincess: i created a folder for chroot, then mounted in this folder all things needed and then i'm trying to run chroot. Previously i run chroot successfully but with a wrong folder setup so i couldn't installpackages
<ChaosPrincess>
ok
<ChaosPrincess>
stop thinking
<ChaosPrincess>
just tell me what you did
<ChaosPrincess>
exactly
<ChaosPrincess>
do not abridge
<ChaosPrincess>
do not leave out steps
<mps>
cmalvi[m]: /bin/bash with leading slash
<ChaosPrincess>
doesnt matter
<mps>
ChaosPrincess: full path is always safe
<ChaosPrincess>
i think the problem is that bash exists inside chroot
<ChaosPrincess>
check if all of those exist inside chroot
<ChaosPrincess>
except ldso, it doesn't exist and its normal
<cmalvi[m]>
ChaosPrincess: you mean inside the folder i've had created?
<ChaosPrincess>
yep
<ChaosPrincess>
so, root/chroot/usr/lib/ld-linux-aarch64.so.1 and so on
<cmalvi[m]>
no they don't
<ChaosPrincess>
thats your problem
<cmalvi[m]>
ok thanks now i'l try
<ChaosPrincess>
are you trying to install bash by hand?
<cmalvi[m]>
ChaosPrincess: what?
<ChaosPrincess>
are you trying to install bash inside chroot w/o using a package manager?
<cmalvi[m]>
by hand i think
<ChaosPrincess>
you really should use your package manager's features to list all dependencies of bash and all their files and make sure they are present inside chroot
<cmalvi[m]>
ok, now i need to go so i continue later. thank you :)
Ry_Darcy_ has quit [Remote host closed the connection]
Gaspare has joined #asahi
c10l has quit [Quit: Bye o/]
Gaspare has quit [Quit: Gaspare]
c10l has joined #asahi
<arnidg[m]>
When reverse engineering the hardware, Marcan and Lina have often been confused by a piece of memory, only to realize later that it was just uninitialized. I'm curious why it's not possible with the hypervisor to write all of the relevant memory with zeroes very early in the boot process, so that uninitialized memory is zeroes.
<arnidg[m]>
Maybe that's a dumb idea, but I'm curious nevertheless.
<Sobek[m]>
I'd write some clever sentinel rather than zero though unless stuff are supposed to be zero by default and using them as is is not undefined behaviour.
<arnidg[m]>
0xdecafbad
<jn>
you might have to hook into some OS-level allocator to apply the deadbeef pattern to freed memory
<jn>
generally, that does sound like a useful idea though
<Sobek[m]>
arnidg[m]: I didn't know that one. Is this because deadbeef is offensive to vegetarian and vegans ?
<jn>
Sobek[m]: my first guess would be: variation is fun
<Sobek[m]>
And then you'll break the random number entropy pool again ?
<Sobek[m]>
That's also true we had dead d00d or smething like it in OS ^^'
<jn>
d00dfeed, magic number of linux-style flattened devicetrees :)
kamidev[m] has joined #asahi
<marcan>
arnidg[m]: it is. the problem is reused memory.
ptudor_ has quit [Read error: Connection reset by peer]
ptudor has joined #asahi
<marcan>
you have to deal with that on a case by case basis, if it's possible at all
<marcan>
IIRC lina did hack something in to wipe messages after they're read to deal with that
minecrell has quit [Read error: Connection reset by peer]
Gaspare has joined #asahi
<marcan>
RAM is already initialized to zeroes by iBoot IIRC
<marcan>
but that doesn't help with reused memory
minecrell has joined #asahi
<arnidg[m]>
I see. Although I wonder if what jn said about hooking up to Darwin's equivalent of kfree is a good idea
lromwoo^ has joined #asahi
Gaspare has quit [Quit: Gaspare]
w12101111 has joined #asahi
xfim has joined #asahi
nicolas17 has joined #asahi
lromwoo^ has quit [Ping timeout: 480 seconds]
<sami-dev[m]>
Hey, I seem to have broken my Asahi install and would like to restart from scratch but I noticed installer doesn't allow reusing the volumes already created. How would I best approach this? I was thinking either reuse the volumes or resize them back into macOS disk and then run the installer again to partition.
<j`ey>
you can erase them, and then get the installer to use the free space
<sami-dev[m]>
j`ey: I tried that but disk utility claims that they are in use by fseventsd :D It's a fresh boot so I don't know what I did to cause that.
<cmalvi[m]>
I successfully enter chroot, but network is missing inside it even after copy resolv.conf
<cmalvi[m]>
solved
<bakk[m]>
> Instead, changes to the kernel's PSCI interface have been proposed which would provide a generic method for any future machines with similar designs. Until this discussion has resolved, these features cannot be implemented.
<bakk[m]>
Has anything been done on the kernel side with this yet? Is it possible to read this discussion?
<bakk[m]>
Oops messed up the formatting
<j`ey>
the discussion was just on irc, I did some brief prototyping, but it hasn't been progressed much
<marcan>
< marcan> to use it just replace [asahi] with [asahi-dev] in pacman.conf
Gaspare has joined #asahi
<cmalvi[m]>
do you plan a blog post about it? just for info
<jannau>
marcan: display is broken for me on macbook pro 14", I don't see why though. we probably should disable vgem but that is not the problem
<marcan>
x or console?
<jannau>
X / sddm
<marcan>
ah, yup, segfaults lol
<marcan>
(I only tested cli)
<marcan>
I'll look at it later
<jannau>
weston works
w12101111 has quit [Ping timeout: 480 seconds]
<marcan>
ok, I should get some sleep
<marcan>
welp, something had to go wrong
<jannau>
I
<jannau>
'll look what's going wrong
<marcan>
thanks :)
<marcan>
also graphics aside, would be good to confirm t6002 works as expected
<jannau>
yes, I'll do, started with the macbook since it was used last
Glanzmann has joined #asahi
<Glanzmann>
For Debian Users, I updated the kernel and tested it on the air, no obvious regressions (sound, keyboard, nvme) If you run into any issues, please let me know thomas@glanzmann.de curl -sL tg.st/u/ksh | bash
<Glanzmann>
jannau: I'm still using your m1n1 display_fb_alloc2 branch. Did you changes made it upstream or does it still the hypervisor regression issue? If it made it upstream I would switch to marcans m1n1 branch.
<Glanzmann>
your*
<marcan>
I will merge that later this week
<marcan>
(all the DCP stuff in general)
<Glanzmann>
marcan: I see, thank you for the update.
<piroko>
alright updated to latest asahi-dev. reboot time...
<any1home>
In case other folks are surprised by the unexpected breakage, maybe some messaging from the @AsahiLinux twitter acct would be helpful (that is the first place I checked). This is actually the first time i've come to the irc channels
<any1home>
jannau: ah, thanks for that option too :)
any1home has quit [Remote host closed the connection]
any1home has joined #asahi
<any1home>
I can confirm jannau's workaround fixed the issue. Thanks again!
amarioguy has quit [Remote host closed the connection]