2022-02-06
00:40chadmedGlanzmann: on virtually all platforms, PCI is "turned on" by the firmware and kernel mode drivers just probe the bus for devices hanging off the root hub. neither openbsd nor the linux kernel have to have a specific system for "turning on" the bus
00:40m6wiq has quit []
00:52jeffmiwGlanzmann: rtc support over spmi is here : https://github.com/jfbortolotti/linux/tree/spmi_rtc , you need the following flags in your kernel config: CONFIG_SPMI_APPLE=y CONFIG_MFD_APPLE_SPMI_SERA_PMU=y CONFIG_RTC_DRV_APPLE_PMU_SERA=y
00:58jeffmiwthis enables to boot with current time set in rtc, and rtc is updated is system date/time is changed
01:19myon98 has joined #asahi
01:26jmr2 has joined #asahi
01:28jmr2jeffmiw: you seem to have a mix of tabs & spaces in your files. Depending on the editor, the alignments are wrong.
01:37jmr2 has quit [Quit: Page closed]
02:05tomtastic_ has joined #asahi
02:10tomtastic has quit [Ping timeout: 480 seconds]
02:40riker77_ has joined #asahi
02:43riker77 has quit [Ping timeout: 480 seconds]
02:43riker77_ is now known as riker77
02:45reillyeon has quit [Quit: The Lounge - https://thelounge.github.io]
02:46reillyeon has joined #asahi
03:04psykose has quit [Ping timeout: 480 seconds]
03:04psykose has joined #asahi
03:30bisko has quit [Server closed connection]
03:31bisko has joined #asahi
03:59PhilippvK has joined #asahi
04:00kov has quit [Quit: Coyote finally caught me]
04:01phiologe has quit [Ping timeout: 480 seconds]
04:42darkapex has quit [Ping timeout: 480 seconds]
04:46jbowen has quit [Ping timeout: 480 seconds]
04:51PthariensFlame[m]M1 does support PAuth, yeah? https://lore.kernel.org/all/06bc9314-2f23-4a0d-4ae5-8695a93778a2@linaro.org/
04:51PthariensFlame[m]Seems like there's some confusion on the mailing list.
05:03marvin24_ has joined #asahi
05:06marvin24 has quit [Ping timeout: 480 seconds]
05:20Glanzmannchadmed / marcan: If every other system turns on PCI in the firmware, why don't we turn it on in m1n1, but kettenis appears to implement in OpenBSD, as I heard we're planning on doing that in the linux kernel?
05:21marcanyou may have noticed a pattern that these systems are a bit different from "every other system" ;)
05:23marcanlinux needs an SMC driver anyway, and being able to turn off PCI devices might be important in the future, e.g. if it interacts with sleep
05:25Glanzmannmarcan: I see. Will brcmfmac/brcmutil call SMC to do the same or will SMC do it bytiself?
05:27dfip^ has quit [Remote host closed the connection]
06:01lewurm has quit [Server closed connection]
06:01lewurm has joined #asahi
06:15threerik[m] has quit [Server closed connection]
06:15threerik[m] has joined #asahi
06:25drwhax[m]1 has quit [Server closed connection]
06:25drwhax[m]1 has joined #asahi
06:32as400[m] has quit [Server closed connection]
06:32as400[m] has joined #asahi
06:33l3k[m] has quit [Server closed connection]
06:33l3k[m] has joined #asahi
06:33Sebhl[m] has quit [Server closed connection]
06:33Sebhl[m] has joined #asahi
06:36Glanzmannjeffmiw: RTC works for me on the macbook air. I tested by disabling wifi and rebooting several times, 'date' shows the real time. I did not see anything in dmesg though. dmesg: https://pbot.rmdir.de/rvz9mbw7L4rnmohnYaQ9FA
06:36Glanzmannjeffmiw: The kernel options were turned on automatically for me when doing olddefconfig. I did not need to update the device tree in u-boot.
06:37_jannau_ has quit [Server closed connection]
06:37_jannau_ has joined #asahi
06:38GlanzmannIf someone else wants to try rtc (currently probably only works on macbook air), here it is: https://tg.st/u/rtc.txt
06:38jbowen has joined #asahi
06:46RianSouzaSantos[m] has quit [Server closed connection]
06:46RianSouzaSantos[m] has joined #asahi
06:46jbowen has quit [Ping timeout: 480 seconds]
06:53al3xtjames has quit [Quit: al3xtjames]
06:55al3xtjames has joined #asahi
07:06jelly has quit [Server closed connection]
07:07jbowen has joined #asahi
07:07mini has quit [Server closed connection]
07:07mini has joined #asahi
07:09jelly has joined #asahi
07:19bradfier has quit [Server closed connection]
07:19bradfier has joined #asahi
07:19mattmurr[m] has quit [Server closed connection]
07:19mattmurr[m] has joined #asahi
07:21jbowen has quit [Ping timeout: 480 seconds]
07:38darkapex has joined #asahi
07:39ofl^ has joined #asahi
08:07jbowen has joined #asahi
08:09ciggi has joined #asahi
08:13ciggi_ has quit [Ping timeout: 480 seconds]
08:14Bicet[m] has quit [Server closed connection]
08:14Bicet[m] has joined #asahi
08:16jbowen has quit [Ping timeout: 480 seconds]
08:19BlazinWeed[m] has quit [Server closed connection]
08:19BlazinWeed[m] has joined #asahi
08:24josipknezovic[m] has quit [Server closed connection]
08:24josipknezovic[m] has joined #asahi
08:25jbowen has joined #asahi
08:30GlanzmannIf it does, I'll send you the debian live you can boot it from a usb stick and see if it works then.
08:33jbowen has quit [Ping timeout: 480 seconds]
08:35mpsok, will wait but anyway I have to revert to asahi and try to report f2fs 'issue' to upstream
08:54jeffmiwGlanzmann: thanks for the feedback. I'll see how to figure out what is missing for mbp 2020 and mini
09:01kit_ty_kate1 has quit [Quit: WeeChat 3.2.1]
09:10NotHere[m] has quit [Server closed connection]
09:10NotHere[m] has joined #asahi
09:11elosant[m] has quit [Server closed connection]
09:11elosant[m] has joined #asahi
09:11ytg has quit [Server closed connection]
09:11ytg has joined #asahi
09:12jbowen has joined #asahi
09:13lemonsus[m] has quit [Server closed connection]
09:13lemonsus[m] has joined #asahi
09:14nsklaus has joined #asahi
09:16rethematrix[m] has quit [Server closed connection]
09:16rethematrix[m] has joined #asahi
09:17yoodee[m] has quit [Server closed connection]
09:17yoodee[m] has joined #asahi
09:18GenieLotion[m] has quit [Server closed connection]
09:18GenieLotion[m] has joined #asahi
09:19ryanhrob[m] has quit [Server closed connection]
09:19ryanhrob[m] has joined #asahi
09:20roxiun[m] has quit [Server closed connection]
09:20roxiun[m] has joined #asahi
09:21jbowen has quit [Ping timeout: 480 seconds]
09:23nsklaus has quit [Quit: Textual IRC Client: www.textualapp.com]
09:23fionera[m] has quit [Server closed connection]
09:23fionera[m] has joined #asahi
09:24jeffmiwmps: may be, i'm not familiar with the u-boot flow, i'm using m1n1 to kernel flow, with u-boot, how is provided the DT built with the kernel to the kernel ?
09:25why2[m] has quit [Server closed connection]
09:25why2[m] has joined #asahi
09:26dek[m] has quit [Server closed connection]
09:26dek[m] has joined #asahi
09:27cavoirom[m] has quit [Server closed connection]
09:27cavoirom[m] has joined #asahi
09:27Rhys[m]12 has quit [Server closed connection]
09:27Rhys[m]12 has joined #asahi
09:28gladiac has quit [Server closed connection]
09:28gladiac has joined #asahi
09:34mlq_ has quit [Server closed connection]
09:34mlq_ has joined #asahi
09:35jeffmiwGlanzmann: honestly never check or used it, my internet connection should have it, but local network is not really setup for it.
09:37Glanzmannjeffmiw: So I ahve Debian testing with mini/u-boot/grub, should I prepare anything else?
09:39roxfan2 has joined #asahi
09:40yrlf has quit [Server closed connection]
09:40yrlf has joined #asahi
09:44roxfan has quit [Ping timeout: 480 seconds]
09:53jannau[ 1.170688] apple-pmu-sera-rtc 23d0d9300.spmi:pmu-sera@0:rtc@0: setting system clock to 2022-02-06T09:53:02 UTC (1644141182)
09:56malvo has quit [Ping timeout: 480 seconds]
09:58JoshuaAshton has quit [Server closed connection]
09:58JoshuaAshton has joined #asahi
10:01Glanzmannjannau: I did not modify u-boot. I just tried to boot the kernel. But I'll test it like that.
10:03jannauif that works you can proceed to testing it u-boot. if it fails there you have the wrong dtb embedded in the m1n1+u-boot binary
10:06jannauthe nvme u-boot device tree already has spmi nodes but those look incompatible with the driver
10:13kettenisjannau: already pointed that out to jeffmiw; hopefuly we can work out the dt bindings for this together
10:13jbowen has joined #asahi
10:19nsklaus has joined #asahi
10:19jato has quit [Server closed connection]
10:19jato has joined #asahi
10:21jeffmiwkettenis: just pushed a new version with compatible aligned to the one you mentioned yesterday, need to double check. as discussed, I have to move the nodes around the .dtsi
10:22jbowen has quit [Ping timeout: 480 seconds]
10:25kettenisuse both "apple,t8103-spmi" and "apple,spmi" in the compatible string (in that order) and make the driver match on "apple,spmi"
10:26kettenisif the SPMI block on t6000/t6001 is the same, that will get "apple,t6000-spmi", "apple,spmi"
10:26kettenisthat way your spmi driver will work there as well, but we can still distinguish the two if we discover some subtle difference at a later stage
10:28blasty has quit [Server closed connection]
10:28blasty has joined #asahi
10:40as400[m]Glanzmann: I've seen you tried OpenBSD. How would you compare its state to Linux ? On m1 of course.
10:41amwWhen I tried to boot that kernel with my older blessed m1n1+u-boot it can't find the nvme drive, looks like compatible's have changed apple,t8103-ans-nvme => apple,nvme-ans2
10:42amwpresumably others sigh, Might get a chance to chase down or re-do the m1n1 + u-boot bless thing next week, was hoping to get battery status
10:43GlanzmannSo OpenBSD has the following that Linux does not have: an installer, poweroff and battery readings.
10:45GlanzmannBut to be honest the OpenBSD experience was very smooth. I had my desktop running in like 30 minutes. And kettenis talked me through the partitioning and the framebuffer.
10:46gabuscus has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
10:47gabuscus has joined #asahi
10:47GlanzmannI also wrote a poor mans debian installer for 1tr. But this is pre-alpha: https://tg.st/u/pmdi.pl
10:48Major_Biscuit has joined #asahi
10:48Glanzmannas400[m]: The simple step by step, I already have: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/m1-debian/blob_plain/HEAD:/doc/OpenBSD.txt
10:50Glanzmannmarcan hooked mps and me with having pci enablement in u-boot. since then we are happy u-boot user.
10:52Glanzmannas400[m]: U-boot only works with the 2020 models. Quickstart see here. I also have some videos on the debian wiki page. https://github.com/AsahiLinux/docs/wiki/U-Boot
10:52Glanzmannas400[m]: So you use the asahi installer to get the stub. Than you install there m1n1/dtb/u-boot instead of just m1n1.
10:53Glanzmannas400[m]: I also build a debian live system and a modified debian installer which can also be booted by usb.
10:56chengsun has joined #asahi
10:56jannauthe dcp driver is not really ready though. I pushed changes which require a modified m1n1 and I expect churn in the devicetree changes so it will probably be painful to follow along
10:57chengsun_ has joined #asahi
10:59Glanzmannmps: But I hope that marcan or someone else adds the 4 lines of code that are missing to poweron wifi soon. And than we can use the 2021 models with mini. And most important we can onboard Jens Axboe.
11:00mpsGlanzmann: ah nice, some time ago I had communication with him about io_uring patching for musl
11:01Glanzmannmps: I see. I'm just a regular fio user. And I had a lot of fusion io cards in a project 12 years ago.
11:02kettenismaybe I should reach out and see if I can get some money donated to get an m1 pro machine
11:02jannauas400[m]: check first if openbsd supports m1 pro/max, not sure if the openbsd kernel supports the linux boot protocol
11:03LaurentiuCosma[m] has quit [Server closed connection]
11:03LaurentiuCosma[m] has joined #asahi
11:04chengsun has quit [Ping timeout: 480 seconds]
11:05mpstwo or three months ago I tested one of this new machines in the reseller shop, well not impressed with this money increased
11:07chadmedmps: its not justifiable if you dont plan on exercising the GPU or codec blocks. if you do though the extra power is well worth the money imo
11:08mpschadmed: right, and that could be exercised with macos and I'm not interested to use macos for any work
11:08jbowen has joined #asahi
11:14mlq_ has quit [Quit: WeeChat 2.3]
11:17jbowen has quit [Ping timeout: 480 seconds]
11:39chadmed has quit [Remote host closed the connection]
11:52chadmed has joined #asahi
11:57m6wiq has joined #asahi
11:58Major_Biscuit has quit [Ping timeout: 480 seconds]
12:09jbowen has joined #asahi
12:18jbowen has quit [Ping timeout: 480 seconds]
12:28Major_Biscuit has joined #asahi
12:45c41e3a has joined #asahi
13:10jbowen has joined #asahi
13:12GlanzmannSo I tested the smc with u-boot and linux, and I have no wifi. Now I try the untethered m1n1.
13:19jbowen has quit [Ping timeout: 480 seconds]
13:20landscape15[m]With this config https://tg.st/u/m1-config-2022-01-27 I get stuck at black screen and asahi logo after booting
13:21kit_ty_kate has joined #asahi
13:40nirgo has joined #asahi
13:44jbowen has joined #asahi
13:47Glanzmannmarcan: untethered is also not working for me. I did the following: https://pbot.rmdir.de/XsA2SL5hPt9AQQstpxKSXQ
13:48nirgo has quit [Ping timeout: 480 seconds]
13:53Glanzmannmarcan: About the u-boot, I did not update the dtb. But if it should work anyway, than let me give you the dmesg: https://pbot.rmdir.de/t3AyXlHxSDpUvNc8s60W6w
13:53jbowen has quit [Ping timeout: 480 seconds]
13:59Glanzmannmarcan: I checked my config. So I have CONFIG_GPIO_MACSMC=y CONFIG_APPLE_SMC=y CONFIG_APPLE_SMC_RTKIT=y CONFIG_ARCH_NR_GPIO=2048
14:01GlanzmannI'm not touching u-boot device tress, Everytime I tried, I failed. So now I wait until it is merged into asahi than I ping kettenis.
14:14Glanzmannmarcan: This is what I get on the hypevisor: https://pbot.rmdir.de/7mjQS7bkr5h8EzXDUTLf_w
14:15marcanyou also need to watch the secondary USB device with picocom or whatever if you want to see anything
14:16mavericks has quit [Quit: The Lounge - https://thelounge.chat]
14:17mavericks has joined #asahi
14:17GlanzmannOkay, let me do that, too. And here is the output of the hypervisor console: https://pbot.rmdir.de/hjvWNogul__stPlexRQNqg
14:17Major_Biscuit has quit [Ping timeout: 480 seconds]
14:19c41e3a has quit [Quit: c41e3a]
14:21m6wiq1 has joined #asahi
14:22Glanzmannmarcan: Serial console: https://pbot.rmdir.de/oEm3WUy0WDUm-Cp1rxrptw python output: https://pbot.rmdir.de/DycWG3ESLZTKViMEnDhZOA
14:25c41e3a has joined #asahi
14:27m6wiq has quit [Ping timeout: 480 seconds]
14:28mpsGlanzmann: a day or two ago I copied t8103.dtsi and t8103-jxxx.dtsi to u-boot tree, rebuilt u-boot and booted smc/work with it fine, except no wifi
14:29mpsand I got this in dmesg `macsmc-rtkit 23e400000.smc: RTKit: Initializing (protocol version 12)` and `macsmc-rtkit 23e400000.smc: Initialized (1495 keys #KEY (0x234b4559)..zETM (0x7a45544d))`
14:32mpsif the pcie enable is added to m1n1 maybe wifi will work if I rebuild it and add to u-boot payload
14:40m6wiq1 has quit [Ping timeout: 480 seconds]
14:45jbowen has joined #asahi
14:51m42uko has joined #asahi
14:54jbowen has quit [Ping timeout: 480 seconds]
14:55m42uko_ has quit [Ping timeout: 480 seconds]
15:01marcanGlanzmann: I found an issue on the mac mini, but it has nothing to do with the point where your logs stop
15:03marcanI'm fixing the but but I have no idea how it ended up stopping halfway through CPU bringup for you
15:06Glanzmannmarcan: Maybe I did something stupid. But this how you can reproduce: https://pbot.rmdir.de/XsA2SL5hPt9AQQstpxKSXQ
15:12landscape15[m]Glanzmann: sorry for the late response. Yeah it immediately crash. I’m using 12.1 stub partition
15:12landscape15[m]MacBook Pro 13 2020
15:13landscape15[m]It crashes also if I don’t compile modules
15:21c41e3a has quit [Quit: c41e3a]
15:26c41e3a has joined #asahi
15:29marcanyou should be if you're using the hypervisor, but I checked your versions and there shouldn't be any breaking changes there
15:30jbowen has joined #asahi
15:33landscape15[m]Glanzmann: yeah but I’m using linux-asahi branch with your config. Still no luck
15:33landscape15[m]I have to make a clean config, and then it works
15:38Glanzmannserial: https://pbot.rmdir.de/y3_HGlRGzrUd555Af9W1HA hypervisor: https://pbot.rmdir.de/MJsG3QlQPM2hVfdA7g0d5A
15:39jbowen has quit [Ping timeout: 480 seconds]
15:39Glanzmannmarcan: You have that fancy reset tool, how do I use that, so that I don't have to poweroff the mini for every test?
15:43c41e3a_ has joined #asahi
15:45c41e3a has quit [Ping timeout: 480 seconds]
15:45c41e3a_ has quit []
15:45c41e3a has joined #asahi
15:50Tuff has quit [Read error: Connection reset by peer]
15:53landscape15[m]Glanzmann: how did you make it work?
15:55landscape15[m]Glanzmann: ok then. I’m compiling
15:56marcanif you had a kernel that worked with the m1n1 smc enable stuff you can use that config, add the smc options, and try it
15:56marcannot brand new configs with brand new problems which have nothing to do with the thing at hand
15:57jeffmiwkettenis: about the spmi compatible, I got it now :), just like marcan did for spi. just fixed it.
15:57m6wiq has joined #asahi
16:13GlanzmannThan I send Jens Axboe an email that he can now have wifi without tethered boot on the m1 max/pro.
16:19jbowen has joined #asahi
16:24GlanzmannSo when I boot untethered, I get some serial consoles, but I no longer get the serial consoles from my tethered m1n1. Any workaround?
16:28jbowen has quit [Ping timeout: 480 seconds]
16:42Glanzmannmps: I stay on u-boot with a non smc kernel until smc is merged into asahi and kettenis modifies u-boot to work with the new kernel.
16:45mpshave this in klog when press power button `macsmc-rtkit 23e400000.smc: RTKit: syslog message: apComms.cpp:373: SMC HID Event: 01 06 01`
16:51m6wiq has quit [Remote host closed the connection]
16:51m6wiq has joined #asahi
17:08jeffmiwmps: do you have the RTC enables in your kernel config ? CONFIG_RTC_CLASS=y CONFIG_RTC_HCTOSYS=y CONFIG_RTC_HCTOSYS_DEVICE="rtc0" CONFIG_RTC_SYSTOHC=y CONFIG_RTC_SYSTOHC_DEVICE="rtc0" CONFIG_RTC_INTF_SYSFS=y CONFIG_RTC_INTF_PROC=y CONFIG_RTC_INTF_DEV=y
17:08Glanzmannjeffmiw: So mps use the air/pro has Laptop under Linux. U-boot makes our live easy when we need to install a new kernel. Also u-boot is the official boot chain at some point.
17:12jeffmiwI'm asking to understand the differences, I did not spend time to have u-boot config yet, focusing on getting some code uptstream :)
17:14mpsjeffmiw: `grep "^CONFIG_RTC" /boot/config-5.16.0-smc-16k-2 | tpaste` => https://tpaste.us/OrD6
17:14mlq has joined #asahi
17:18Major_Biscuit has joined #asahi
17:20jbowen has joined #asahi
17:22caleb010[m] has joined #asahi
17:27caleb010[m]Hello. I'm not well experienced with Linux kernel compiling. Correct me if i'm wrong. After cloning Linux from Asahi repo, i compile defconfig, change some options (or use makeconfig), then i do ```make Image modules dtbs```, and that's it? or i need to also install modules?
17:28jbowen has quit [Ping timeout: 480 seconds]
17:31jeffmiwmps: if you use u-boot, your DT(device tree) is coming from u-boot and from the one I modified, and my initial patches were not aligned with u-boot naming.
17:33landscape15[m]caleb010: well, that should be enough. Then you need to chainload kernel and dtbs
17:34jeffmiwyou can check this by looking at the device-tree compatible entries in the sysfs under the spmi node: /sys/firmware/devicetree/base/soc/spmi@023d0d9300
17:36caleb010[m]landscape15: ah, but i think you still have to install modules right? maybe with modules_install?
17:37jeffmiwfrom there, find . -name compatible -exec cat {} \; if the strings are not matching the ones in the patches you took, it won't work. I updated my branch with what I understood from kettenis but did not check u-boot source code yet
17:38caleb010[m]Sorry to have interrupted you :)
17:41Glanzmanncaleb010[m]: Do you want to boot an m1 machine using another Linux machine (teethered) or do you want it to build Linux by itself?
17:42caleb010[m]Glanzmann: I'd like to use tethered one. With linux.py or chainload.py
17:42caleb010[m]I'm on an m1 air
17:43Glanzmanncaleb010[m]: But to answer your question, if you compile a kernel with modules, you either have to put them in the ramdisk or transfer them to the machine.
17:43Glanzmanncaleb010[m]: For the tethered quickstart look at tg.st/u/asahi.txt or if you want more to read: https://github.com/AsahiLinux/docs/wiki/Developer-Quickstart-2.0
17:44Glanzmanncaleb010[m]: If you want to install Debian, look at https://github.com/AsahiLinux/docs/wiki/Debian
17:44GlanzmannYou can also use the Debian livesystem to install any other distro that has a rootfs archive that you can extract.
17:45caleb010[m]Glanzmann: Thanks! So you don't need to install modules to run Linux properly?
17:46Glanzmanncaleb010[m]: On the air the following works: unaccelerated but fast framebuffer with xorg in full screen resolution, wifi, nvme, usb with usb 2.0 speed and audio jack, trackpad and keyboard. See also: https://github.com/AsahiLinux/docs/wiki/Feature-Support
17:46Glanzmanncaleb010[m]: So what mps and I'm doing is we use the m1n1+dtb+u-boot chain to load grub and grub loads the kernel and the initrd.
17:46GlanzmannSo we run it like any other Linux. This is also what the final bootchain looks like more or less.
17:47Glanzmanncaleb010[m]: But most people use tethered setup because it is much more practical to run experiments, put macos or Linux in the hyeprvisor.
17:47caleb010[m]Glanzmann: Ok, so you need an EFI partitiom?
17:48Glanzmanncaleb010[m]: I'm not 100% sure if you really need it, because u-boot can read ext4, but this is what we want in the end, because that is what most distros do.
17:49jeffmiwmps: I had an issue in some of my commits, good one to take is https://github.com/AsahiLinux/linux/commit/32b2ffdb7972fb3bb867e0579ea6e7bf8dc08ae4
17:49GlanzmannIt also makes it easier for us to transfer the wifi blog from macos to Linux, because we're not allowed to redistribute it.
17:49landscape15[m]caleb010: if you run u-boot, it will first search for an EFI partition to boot from
17:49Glanzmannmps: For easy patching: https://github.com/AsahiLinux/linux/commit/32b2ffdb7972fb3bb867e0579ea6e7bf8dc08ae4.patch
17:50jeffmiwmps: if rtc still not working on your mbpro, can you send the output of the find cmd above
17:50caleb010[m]Glanzmann: Is it possible to build a full linux image containing also compiled modules?
17:52jeffmiwit is not just this patch, it is the whole series that is needed, there are changes in the drivers that are going with the dts change
17:52Glanzmanncaleb010[m]: So when you build a linux kernel you have three options: n,y,m So yes you can build a statically linked kernel.
17:54caleb010[m]Glanzmann: And then how do i build everything inside an Image.gz (that can be accepted by tethered boot)?
17:54GlanzmannIf you decide to build modules, you can either install them in the root filesystem in /lib/modules/`uname -r` (what make modules_install does) or you put it in a ramdisk.
17:55Glanzmanncaleb010[m]: Multiple options, two of them: You set every option that you want into your kernel to =y or you use a ramdisk and put the modules there.
17:55GlanzmannThe ramdisk can also contain a whole system. That is what I did when I build the Debian livesystem, It is just waht you would find in a a regular system in a 200 MB ramdisk.
17:55caleb010[m]The ramdisk is the rootfs?
17:56Glanzmanncaleb010[m]: It can be, but in most cases the ramdisk contains modules that are necessary to mount the rootfs (that would be in our case for example the nvme driver and the ext4 driver but could also involve raid or device mapper crypt).
18:00caleb010[m]Glanzmann: So if i make my mac running Linux without installing modules and then inside it i do "make modules_install" with the recompiled kernel it's the same thing right?
18:02ciggi_ has joined #asahi
18:07ciggi has quit [Ping timeout: 480 seconds]
18:09jmr has joined #asahi
18:09jmr has quit [Remote host closed the connection]
18:09jmr2 has joined #asahi
18:11jmr2caleb010[m]: go back to "make menuconfig", and in the main page, disable "Enable loadable module support". Everything defined as to be built as a module will become built-in. Less memory efficient, but much simpler to manage.
18:11mpsGlanzmann: jeffmiw: rtc again crashed kernel on boot, will post image later, now really 'must' go and prepare another coffee for me
18:12caleb010[m]jmr2: Thanks a lot. This means that it will take more space?
18:13Major_Biscuit has quit [Ping timeout: 480 seconds]
18:13Glanzmanncaleb010[m]: The kernel is not everything, you also need a root file system. This is where you binaries, libraries, configs and files live.
18:14Glanzmanncaleb010[m]: If you have never build a Linux from scratch or compiled a linux kernel. You'll have a steep learning curve.
18:15landscape15[m]jmr2: why don’t you simply install modules inside rootFS?
18:15caleb010[m]Glanzmann: Yeah i know. I made a Debian rootfs
18:15Glanzmanncaleb010[m]: Asahi is not ready for end users, but we're very close. So you can either wait, or if you can't, than this might be of help: https://github.com/AsahiLinux/docs/wiki/Debian . It still has a few sharp edges, but it might get you going.
18:16GlanzmannThere are three video, maybe you want to watch them. That is for the u-boot part but it also shows you the asahi installer which you need for m1n1.
18:16___nick___ has joined #asahi
18:16GlanzmannI'll soon improve these instructions and rerecord all videos with bigger front sizes and more straight forward. Sometimes I struggle to instlal grub for example ...
18:16___nick___ has quit []
18:16jmr2landscape15[m]; because it's one more operation, because I don't have access to the rootfs from my development machine, and because it can cause weird bugs if for some reasons, your kernel image become un-synchronized with the modules.
18:18landscape15[m]jmr2: yeah it’s not the best way
18:18___nick___ has joined #asahi
18:18caleb010[m]<jmr2> "caleb010: go back to "make..." <- Is this like making a bundle of Image.gz dtbs and modules together?
18:21jbowen has joined #asahi
18:22caleb010[m]jmr2: So what does it do exactly?
18:25jmr2With all due respect, I'd encourage you to read a bit on how to build a linux kernel. This is nothing asahi-specific.
18:26caleb010[m]jmr2: yeah i know what is menuconfig. I don't know what that option do. As you said i need to find more information online, because i'm not experienced
18:27caleb010[m]"Enable loadable module support" loads all compiled modules?
18:30jbowen has quit [Ping timeout: 480 seconds]
18:36caleb010[m]jmr2: ok, i read it. To me it seems the same as installing those modules inside the ramdisk
18:46landscape15[m]jmr2: Do you want to build a monolithic kernel then?
18:46landscape15[m]s/jmr2/caleb010/
18:47ciggi_ has quit [Ping timeout: 480 seconds]
18:48caleb010[m]landscape15: What do you mean?
18:49Glanzmanncaleb010[m]: Anyway. What I did 24 years ago is build a Linux distribution using linuxfromscratch.org. Do that and it will jumpstart you. ;-)
18:53caleb010[m]Glanzmann: I'd like to do the opposite i think. Building a kernel with modules installed in it
18:53svenoh god. I remember doing that maybe 15 years ago. After that gentoo was almost fun and simple :D
18:55jbowen has joined #asahi
18:59landscape15[m]caleb010: As jmr2 said, if you disable “Enable load able module support”, every declared module will be built in the kernel
18:59landscape15[m]s/load/loadable/, s/able//
19:00m6wiq1 has joined #asahi
19:03jbowen has quit [Ping timeout: 480 seconds]
19:04mpsjeffmiw: j`ey: I built driver as module and loaded it manually, it crashes again but machine continue to work, dmesg out is here
19:06m6wiq has quit [Ping timeout: 480 seconds]
19:09jmr2landscape15[m]: yes. To each his/her own, but I'm in-line with the topic: "Not ready for end users / self contained install yet. Soon." For me, modules will start to make sense when the DeviceTree will have stabilized. Until then, tethered boot it is. (Which is why I believe we should directly steer newcomers toward tethered boot by default for now.)
19:09ciggi has joined #asahi
19:12roxfan2 is now known as roxfan
19:14caleb010[m]jmr2: So with tethered boot i don't need to install modules?
19:14jmr2caleb010[m]: "Building a kernel with modules installed in it" <-- That kind of doesn't make sense. Either your drivers are built into the Image.gz file ("y" in menuconfig), or they're in separate files ("m" in menuconfig). If in separate file, *you* have the responsibility to make sure that the kernel finds those while booting. There's multiple ways to do that, but they all require additional steps. Save yourself the tr
19:15jmr2You need drivers for both tethered and non-tethered boot. Modules only define where those modules live.
19:19caleb010[m]jmr2: Thanks a lot. Now i get it. This means that i don't need to do "make modules" with “Enable loadable module support” disabled right?
19:21caleb010[m]Ok, i will do that
19:25jmr2 has quit [Quit: Page closed]
19:47malvo has joined #asahi
19:56m6wiq1 has quit []
19:56m6wiq has joined #asahi
20:15mlq has quit [Quit: WeeChat 2.3]
20:21mlq has joined #asahi
20:32c41e3a has quit []
20:55jbowen has joined #asahi
21:03jbowen has quit [Ping timeout: 480 seconds]
21:07Raito_Bezarius has quit [Ping timeout: 480 seconds]
21:08___nick___ has quit [Ping timeout: 480 seconds]
21:08kov has joined #asahi
21:16Raito_Bezarius has joined #asahi
21:25mixij`ey, jeffmiw: while it is allowed to sleep in *_probe, regmap_raw_read takes the regmap lock (a spin lock because apple-spmi-sera-pmu sets regmap_config.fast_io = true) -> we are in an atomic context and may not sleep anymore
21:43mixij`ey: the regmap lock will be a mutex instead, which means we will not end up in an atomic context and will be allowed to sleep
21:52akemin_dayo has quit [Ping timeout: 480 seconds]
21:52mps` apple-sera-pmu-rtc 23d0d9300.spmi:pmu-sera@f:rtc@0: setting system clock to 2022-02-06T21:50:56 UTC (1644184256)`
21:57Latrina_ has joined #asahi
21:57Latrina has quit [Remote host closed the connection]
21:57Latrina_ is now known as Latrina
22:05jeffmiwthanks mixi / mps / j'ey , I do not like this msleep, I'll see if I can come up with something else ... in the meantime I'll set fast_io to false
22:09Tuff has joined #asahi
22:09Tuff has quit []
22:24ofl^ has quit [Ping timeout: 480 seconds]
22:40akemin_dayo has joined #asahi
22:47mixiyes, the default for fields left out in designated initializers is 0 ("the same as objects that have static storage duration") -> fast_io is 0 / false if it is left out of the initializer
22:49ofl^ has joined #asahi
22:49user982492 has joined #asahi
22:55m6wiq has quit []
22:55jbowen has joined #asahi
23:00yrlf has quit [Quit: The Lounge - https://thelounge.chat]
23:01yrlf has joined #asahi
23:03jbowen has quit [Ping timeout: 480 seconds]
23:31jannauhttps://github.com/jannau/u-boot/tree/t6000 has u-boot with nvme support for m1 pro/max, USB and keyboard are not working, no SMC, needs m1n1 from main boots with the dtb from the kernel build
23:59user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]