#
…

2022-01-03

00:02eroux has quit [Ping timeout: 480 seconds]
00:31yrlf has joined #asahi
01:09espressocookie[m] has joined #asahi
01:34Glanzmannlandscape15[m]: In the old days also 'chvt 0' worked. Not sure, if it still works.
01:44Dcow_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
01:56eroux has joined #asahi
02:04eroux has quit [Ping timeout: 480 seconds]
02:19riker77_ has joined #asahi
02:24riker77 has quit [Ping timeout: 480 seconds]
02:24riker77_ is now known as riker77
02:57yrlflandscape15[m], Glanzmann: usually tty1 or tty7 are where the graphical desktop runs (depending on distro and/or display manager)
02:57yrlfas you said, Ctrl+Alt+F? will switch to tty? (where ? is a number)
02:58yrlf'chvt ?' also works, though I think you need to run chvt as root on some systems
02:58eroux has joined #asahi
03:06eroux has quit [Ping timeout: 480 seconds]
03:07darkapex4 has joined #asahi
03:12darkapex3 has quit [Ping timeout: 480 seconds]
03:24SamAdams[m]<espressocookie[m]> "is asahi usable yet" <- Yes and No. It's not intended for end users, but I find it very usable with Debian and if you use a window manager, it may lessen the load on the cpu. There is no SMC support, which means no power management. There is no audio or Bluetooth. Wi-Fi is working if you have a second computer and run the pcie experiment. I would wait until SMC support is finalized into the kernel, and then Wi-Fi and
03:24SamAdams[m]Power Management will be added.
03:24SamAdams[m]If you are willing to take chances and want to learn how the Linux kernel and Mac OS work under the hood, this project is great!
03:27SamAdams[m]* Yes and No. It's not intended for end users, but I find it very usable with Debian and if you use a window manager, it may lessen the load on the cpu. There is no SMC support, which means no power management. There is no audio or Bluetooth. Wi-Fi is working if you have a second computer and run the pcie experiment. I would wait until SMC support is finalized into the kernel, and then Wi-Fi and Power Management will be added.
03:27SamAdams[m]If you are willing to take chances and want to learn how the Linux kernel and Mac OS work under the hood, this project is great!
03:27SamAdams[m]In regards to YouTube. NO, don't do it. It's horrible, since there's no video acceleration at all. Cinnamon DE runs great, but YouTube is a laggy mess. Even at 360p, it just can't handle it. Modern day CPUs have accelerators that can decode and encode video and that's not present in the kernel (yet).
03:28tpw_rules youtube works fine for me
03:28tpw_rulesit's pointless because there was no sound but
03:32SamAdams[m]Interesting, maybe just an issue with Firefox? I tried Debian and Ubuntu, and neither one works great. I probably need to move over to Arch.
03:34SamAdams[m]Wow, the Linux kernel compiles faster now! It already is fast on the M1. Probably not coming until 5.18 or later because of the scope of the changes.
03:37tpw_rulesi used firefox on nixos
03:38tpw_rulesmaybe you are using the old simplefb driver?
03:38tpw_ruleswhat machine do you have?
03:41tpw_rulesyeah my mini is playing 4k60 on a 1080p screen just fine. youtube debug says it's dropping maybe one frame a second but it looks great
03:41tpw_rulesusing maybe 60-70% of all cores
03:43phiologe has joined #asahi
03:43tpw_rulesSamAdams[m]: do you have a regular m1 machine?
03:46PhilippvK has quit [Ping timeout: 480 seconds]
03:49tpw_rules@SamAdams: ping test?
03:54duckworld has joined #asahi
04:00duckworld has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
04:00duckworld has joined #asahi
04:01duckworld has quit []
04:01duckworld has joined #asahi
04:11marvin24_ has joined #asahi
04:15marvin24 has quit [Ping timeout: 480 seconds]
04:23feb141985[m] has joined #asahi
05:00eroux has joined #asahi
05:10eroux has quit [Ping timeout: 480 seconds]
05:21eroux has joined #asahi
05:45amwSamAdams[m]: YouTube is fine on my MBA / debian bullseye + firefox, my kernel is using CONFIG_DRM_SIMPLEDRM=y and X pkg is xserver-xorg-video-fbdev
05:45amw0 frames dropped even at HD quality
06:19darkapex has joined #asahi
06:24darkapex4 has quit [Ping timeout: 480 seconds]
06:32jkcoxson[m] has joined #asahi
06:39darkapex1 has joined #asahi
06:43ewrvvvvvvvvvvvvvvvvvvvvvvvvvvd has quit [Remote host closed the connection]
06:44darkapex has quit [Ping timeout: 480 seconds]
06:56jeffmiw has quit [Ping timeout: 480 seconds]
07:06jeffmiw has joined #asahi
07:33Glanzmanntpw_rules: pong
07:34Glanzmanntpw_rules: About the video, if you watch in a window, its fine. If you watch fullscreen, the best results were with fbdev xorg driver (which slow for all other tasks like regular work) and using mpv -vo drm.
07:37jeffmiw has quit [Ping timeout: 480 seconds]
07:37GlanzmannBut any other sound card will do. But this one supports S/PDIF if you happen to have an echo cancler you want to hook it up to.
08:24Glanzmannamw: xserver-xorg-video-fbdev is fast for videoplayback, but slow for everything else (at least for me). So I'm using the modsetting xorg driver. Which is fast for everything else but not the best for videoplayback.
08:25landscape15[m]<yrlf> "as you said, Ctrl+Alt+F? will..." <- I tried with ctrl+alt+f2 and it works. I also get full resolution (icons are small).
08:25Glanzmannxserver-xorg-video-fbdev my xterm updates less fast, scrolling in firefox is not smooth, mouse curser jumps.
08:28landscape15[m]Glanzmann: with kde plasma Firefox works very well. Also ffmpeg works good, but the mouse cursor continually lags.
08:43vx has joined #asahi
08:59Glanzmannlandscape15[m]: yeah, exactly. This is why I switched to modesetting xorg driver because it feels faster for the regular tasks. KDE uses wayland. I'm using fvwm2 which is using xorg.
09:09ewryyyyyyyyyyyyyyyyyyyyyyyyyyd has joined #asahi
09:11mpskettenis: what you think about setting BOOT_TARGET_DEVICES to usb0 first and then nvme0? that way machine will boot from usb by default if usb disk is found and if not then boot from nvme
09:12mpsthis way we could 'rescue' boot in case nvme is non bootable for some reasons
09:21Glanzmannmps / tpw_rules / kettenis: Is there a write up how to do the m1n1 / uboot / grub dance, yet?
09:23mpsGlanzmann: I did it simply by install grub-efi on target partition
09:26mpsi.e. mount rootFS target partititon, mkdir /boot/efi on it, mount ESP under this dir, and do grub install
09:27mpsif I finish my $day_job on time I will create script to do this and put m1n1+u-boot+dtb for MB PRO and MB AIR somewhere
09:28mpsand maybe mini also
09:28mpsbtw, what is dtb file name for air
09:29mpsj`ey: thanks
09:30amwmps: For my 2020 M1 mba it is t8103-j313
09:31mpsnice, I will put ready made u-boot on my site later (if something didn't trigger NMI on me)
09:31amwGlanzmann: I'm very happy with laggy mouse and firefox - it's so fast anyway
09:32ketteniscat m1n1.macho *.dtb u-boot-nodtb.bin > u-boot.macho
09:32amwmps: What works in your u-boot : Wifi, keyboard ?
09:32kettenisthat results in a u-boot that works on all the M1 models
09:32mpsamw: didn't tested wifi in u-boot but keyboard works
09:33amwIs it possible to patch the pcie_enable_devices into m1n1 ?
09:33mpskettenis: ah, that is nice, thanks
09:33kettenisu-boot already enables the wifi
09:34amwkettenis: Great!
09:35Glanzmannamw: I'm pretty sure it is, but noone has done so or told us about doing so. However hopefully SMC will be ready and then we can have wifi without needing a second machine to boot.
09:35Glanzmannamw: I also though about doing it myself, but did not.
09:36Glanzmannkettenis: Really, does u-boot enable wifi? I did not know.
09:36mpsheh, also I looked at it but decide to wait some time
09:36Glanzmannkettenis: Wow u-boot enables, wifi did not know.
09:36Glanzmannkettenis: Which tree should I use to build u-boot?
09:36amwmps: How do I tell which partition is ESP? My first partition is APFS...
09:37Glanzmannmps: Thank you, I look forward to the instructions.
09:37kettenisthe dtb's end up in arch/arm/dts in the u-boot tree after you build
09:37mpsamw: with fdisk you change part type to efi system
09:38mpsamw: parted also and some other partition tools
09:38amwmps: So I create a new FAT32 partition and set it's GPT GUID to EFI
09:38amwSorry ESP I mean
09:39mpsamw: EFI System Partition is ESP (shorthand)
09:43Glanzmannmps: How big did you do the fat32 efi partition? 100 MB? 1 GB?
09:45Glanzmannkettenis: So m1n1 pigs automatically the right dtb if multiple are specified?
09:45Glanzmanns/pigs/picks/
09:46mpsGlanzmann: on usb disk I use 512M, on nvme I followed Quickstart and it is 953M
09:46mpsGlanzmann: yes
10:03sami-dev[m] has joined #asahi
10:04GlanzmannHas someone build instructions for u-boot?
10:04amwu-boot building : make apple_m1_defconfig; make : fails at DTC stage
10:05amwWants a DEVICE_TREE=<> argument? or CONFIG_DEFAULT_DEVICE_TREE
10:07kettenisthat's fine, everything that's needed has been built at that point
10:08landscape15[m]Is it possible to set default root device in the Linux config (so that you don’t need to set boot-args)?
10:09j`eylandscape15[m]: CONFIG_CMDLINE
10:10landscape15[m]j`ey: thanks. For example I can set ‘CONFIG_CMDLINE=nvme0n1p4’. How do I specify ext4 fs?
10:10amwkettenis: Yep I have a arch/arm/dts/t8103-j313.dtb but I think "make DEVICE_TREE=t8103-j313" builds that and doesn't complain
10:11landscape15[m]s/‘/`/, s/’./`./
10:11j`eylandscape15[m]: thats the entire command line, not just the root
10:11landscape15[m]s/‘/```/, s/’./```./
10:12amwSo more like CONFIG_CMDLINE="earlycon console=tty0 console=tty0 debug net.ifnames=0 rw root=/dev/nvme0n1p6 rootfstype=ext4" ?
10:13landscape15[m]But I don’t think you need console=tty0
10:13Glanzmannamw: Did you compile u-boot on the m1? Or did you crosscompile?
10:13kettenisamw: picking a specific model in the config is a bit retarded, but that's how I "fixed" it in the upstreamed bits
10:13amwGlanzmann: Yes sorry - I compiled it on the M1 - so no cross compiling for me
10:14kettenisso maybe I should fix it that way on the branch as well
10:16sami-dev[m]Hey, I realise the project is far from ready for general consumption but if you were to put it into a sentence or two. How far do you think we're off from being able to use the M1 Max macs for general web-development using linux?
10:17j`eysome months
10:18j`eyI think it's just too hard to say much beyond that. If youre ok with compiling kernels etc, probably sooner, maybe even already
10:19j`eyalthough chromium doesnt seem to work OOTB with 16K pages
10:19landscape15[m]sami-dev: for the end user, I hope by the end of the year. But you can do it yourself for now.
10:20sami-dev[m]Can't say I have done much of it manually. My experience with compiling such has been through AUR packages where I simply would edit some options. Either way that sounds promising
10:21amwOk - I think the CONFIG_CMDLINE above was for Linux as u-boot seems to just have =y in the .config
10:21j`eyamw: yes it was for linux
10:22landscape15[m]amw: also in the Linux config I can’t find it. There is a CONFIG_CMDLINE_BOOL and CONFIG_FB_CMDLINE set to yes
10:23j`eylandscape15[m]: cant find it how?
10:23landscape15[m]j`ey: manually browsing the config. Should I use menuconfig?
10:24j`eythe .config doesnt contain all options
10:24landscape15[m]j`ey: there are some more but are all boolean
10:25amwlandscape15[m]: It's in my "Boot options" section before CONFIG_EFI_STUB=y
10:25j`eymy defconfig has CONFIG_CMDLINE="", btw
10:26amwMy linux also has CONFIG_CMDLINE_FROM_BOOTLOADER=y - I assume that is harmless...
10:26jannauyou can search in menuconfig with '/', on the result screen use number keys to jump directly to a specific result
10:27landscape15[m]jannau: yeah I tried but I can’t find it. Maybe I should recompile.
10:27jannauthat might disable CONFIG_CMDLINE doesn't make sense to have an internal cmdline if the one from the bootloader is used
10:27Glanzmannkettenis: Regarding '10:32 < kettenis> cat m1n1.macho *.dtb u-boot-nodtb.bin > u-boot.macho' Can I use multiple dtb or my sepcific version? Do I use the dtb from u-boot or the one from the kernel compile? I assume I can only use one and that is the one from the kernel compile?
10:28mpsGlanzmann: from u-boot
10:28mpsthose from kernel doesn't work
10:29Glanzmannmps: I see. Thanks.
10:29mpsGlanzmann: you can use just one for your machine and then have to cat it
10:29j`eylandscape15[m]: in menuconfig, of linux, type / and then CMDLINE
10:29kettenisthere are a few tweaks in the u-boot dtbs
10:29j`eylandscape15[m]: what happens?
10:29Glanzmannmps: I see. Thank you.
10:30kettenisbut they're based on the asahi and wifi/take5 branches
10:30kettenisso they should work
10:30amwlandscape15[m]: Are you compiling for x86 ? that has the CONFIG_CMDLINE_BOOL but arm64 doesn't
10:30landscape15[m]j`ey: i send a pastelink
10:30j`eyamw: i did wonder if it was something like that
10:30j`eyyou always need ARCH=arm64 set
10:30j`eyeven when running menuconfig
10:30amwj`ey: I was burnt by that a couple times ...
10:32landscape15[m]yeah that was the problem. Now I see a CMDLINE string
10:33landscape15[m]s/paste in/pastebin/
10:35eroux has quit [Ping timeout: 480 seconds]
10:42as400[m]Did anyone test t6000 u-boot branch ?
10:43amwok - from u-boot/tools/binman/etype/u_boot_ucode.py: Contains u-boot-nodtb.bin (i.e. U-Boot without the device tree).
10:43davidcole has joined #asahi
10:43amwSo the m1n1 dtb is passed through u-boot to the linux ?
10:44davidcole has quit []
10:44David[m]12345678 has joined #asahi
10:44mpsdtb is 'applied' by bootloader
10:45mpsin 'our' case by m1n1
10:45amwDoes "applied" mean patched or just passed across?
10:46j`eyamw: patched
10:47eroux has joined #asahi
10:47jannauas400[m]: yes, the t6000 branch doesn't work yet, the change itself appears to be fine
10:48as400[m]jannau: thx.
10:48jannauI haven't spend much time looking where it breaks
10:49as400[m]jannau: asking because I'm looking at the branch at there is no t6000.dtsi.
10:49Techcable has quit [Remote host closed the connection]
10:49Techcable has joined #asahi
10:50jannauuse the dtbs from the linux asahi branch for now
10:50kettenisI didn't import the t6000 dts files yet on that branch since it doesn't work yet
10:51Techcable has quit [Remote host closed the connection]
10:51Techcable has joined #asahi
10:51psykose has left #asahi [#asahi]
10:55eroux has quit [Ping timeout: 480 seconds]
10:56as400[m]kettenis, jannau - thank you for the info.
11:00mpsjannau: in drivers/hid/hid-apple.c I see few key mapping tables. is the macbookair_fn_keys only for air or also for pro?
11:01mpsthinking to try to map number keys to Fkeys with Fn key combo
11:05j`eyi think it's 'apple_fn_keys' that is used
11:06GlanzmannI did the following: Created 1 GB efi partition, changed partition table, did a mkfs.vfat mounted it to /boot/efi. Than I isntalled grub-efi package and run the intaller. I build a debian kernel package and installed it. I have no efivars partition. Than I did the cat m1n1 uboot/dtb u-boot-nodtb.bin dance and installed it from 'options' menu. I saw m1n1 flush buy and now I'm in u-boot:
11:06eroux has joined #asahi
11:06GlanzmannWhat is missing?
11:06jannaumps: that's in flux, i currently use apple_fn_keys_spi but that's probably to change due to magic keyboard 2021 patches on the mailing list
11:07j`eyon asahi/wifi/take5 it's apple_fn_keys
11:08eroux has quit []
11:08j`eyGlanzmann: and does /boot/efi have the bootaa64.efi?
11:08mpsjannau: j`ey: thanks
11:10amwIs it ok to GPT partitions not ordered by sector? i.e. I used fdisk to add a ESP partition out of the free space just before the Mac Recovery partition and it is numbered 8 (Recovery is 7)?
11:11amwI think MacOS diskutil must re-order the partitions in the GPT?
11:14Glanzmannj`ey: Yes, I checked, its there.
11:16GlanzmannI think it has the right device which is Scanning nvme 0:6
11:16GlanzmannBut than it says unable to read file.
11:16Glanzmannj`ey: The bootaa64.efi? is not directly in /boot/efi IIRC but in EFI/bootaa64.efi?
11:17Glanzmannwithout the question mark at the end.
11:19mpsGlanzmann: yesterday I posted image with u-boot trying to boot from nvme and looks like you hit the same problem
11:20mpsGlanzmann: does it looks similar to this https://arvanta.net/2x3d1kfg/u-boot-m1.jpg
11:22kettenisGlanzmann: u-boot will print
11:22j`eymps: yours found grub, Glanzmann's didnt
11:22kettenisFound EFI removable media binary efi/boot/bootaa64.efi
11:25landscape15[m]Is grub installed on the EFI partition? Wouldn’t be the same to run Linux via u-boot (without grub)?This is what happens with embedded devices.
11:26kettenislandscape15[m]: what ahppens with embedded devices is retarded
11:29landscape15[m]kettenis: yeah I imagine :) this means that the end user booting from the USB drive doesn’t need to install grub in order to install Linux, because grub is already there.
11:33kettenisfrankly, this is all a solved problem
11:35kettenisany decent linux distro that supports "generic" arm64 will install an EFI bootloader for you and will probably even create an EFI system partition if one doesn't already exist
11:36mpskettenis: alpine does this
11:38j`eyGlanzmann: I feel like your bootaa64.efi is at the wrong path
11:39j`eymaybe it's one level too deep?
11:39amwgrub-install has --target option arm-uboot as well as arm64-efi
11:39kettenisneeds to be in efi/boot/bootaa64.efi
11:40kettenisbut that's on the efi system partition
11:40amwgrub also has --dtb=FILE option to embed a DTB - presumably don't need that?
11:40Glanzmannj`ey / kettenis: yes, than it is in the wrong path.
11:41GlanzmannI'll correct that, try again and report back.
11:41kettenisso if you're looking at it from linux it will have the path where the esp is mounted before that
11:41kettenisamw: no need for that
11:42landscape15[m]mps: there is also an image with u-boot preinstalled
11:43landscape15[m]* also an official image with
11:45mpslandscape15[m]: which image?
11:45amwI get a bunch of files - https://paste.debian.net/1225660/ including /boot/efi/debian/BOOTAA64.CSV
11:46Glanzmannkettenis: That should be enough, shouldn't it? https://pbot.rmdir.de/u/X0Hr6UcUkit87UxTZnSAAw
11:46amwgrub-install /dev/nvme0n1p8 - isn't creating a /boot/efi/bootaa64.efi under debian bullseye?
11:47Glanzmannamw: No, it is not. See above paste. But that one is with testing.
11:47kettenisGlanzmann: no the file needs to be named efi/boot/bootaa64.efi
11:48Glanzmannkettenis: I see. So when the mount point is /boot/efi it has to be /boot/efi/efi/boot/bootaa64.efi ?
11:48GlanzmannThank you.
11:48GlanzmannI'll try and report back.
11:49amwGlanzmann: Won't it also want all the other files next to it in the same directory?
11:50Glanzmannamw: Nope, if I understood kettenis correctly than the grub has everything it needs built in to get to the ext4 partition to load additional modules and config file.
11:50mpsamw: no
11:52mpsamw: https://tpaste.us/xnqJ this is content of my ESP
11:52amwok - it doesn't have those filenames in the strings of bootaa64.efi
11:53___nick___ has joined #asahi
11:53___nick___ has quit []
11:54Glanzmannmps: Yeah, this is how it looks for me, too now. Only that 'alpine' is 'debian'.
11:55___nick___ has joined #asahi
11:56GlanzmannI can chainload uboot from m1n1, can't I than I don't have to change the boot object until it works.
11:56Glanzmannmps: Did you get it working from the internal nvme already?
11:56amwSo kettenis's u-boot wants efi/boot/bootaa64.efi on the EPS partition
11:56mpsmaybe we all should use alpine for now because it is simple and small, and would be lot easier to cooperate :D
11:57mpsGlanzmann: for me it boots fine from usb but not from nvme
11:57Glanzmannmps: I have an idea, we have both 'EFI' written uppercase. On vfat it should matter, but maybe it does.
11:57amwmps: Does yours work - it doesn't look like it could have the expected path for u-boot to find grubaa64.efi ?
11:57GlanzmannSo I'm now trying to rename it to lowercase letters and try again.
11:58mpstoday I decide to make proper alpine kernel package, would be easier to make changes, install and setup
11:58Glanzmannmps: I also do that with your config. But on Debian it is easy: make -j $(( 2* `nproc`)) V=0 bindeb-pkg
11:59mpsGlanzmann: on alpine it is 'abuild -r' :)
11:59mpsgrub setup I have works fine on some other arm64 machines
12:00mpsand it works fine with upper case 'EFI' on usb disk, so this shouldn't be issue
12:01amwmps: ok - you've built you own u-boot with your EFI boot path EFI/boot/bootaa64.efi it loads, what's the grubaa64.efi used for?
12:02mpsamw: tbh I have no idea
12:02mpsI didn't used grub for more than 15 years (only syslinux and u-boot)
12:02mpsnow I need to relearn it
12:03j`eyyou don't have to? if alpine isn't going to use it!
12:03mpsj`ey: alpine uses grub-efi on all machines with efi support
12:04ketteniscase shouldn't matter (and neither does the orientation of the slashes)
12:04mpsi.e. X86, arm64 and riscv64
12:12Glanzmannkettenis: Still does not work. Do you have tried on the air? Or do you have a grub binary for me that I can try?
12:13myon98 has quit [Ping timeout: 480 seconds]
12:16amwGlanzmann: Still not loading the grub ? I also did a update-grub after installing my linux just to tweak the grub config to the kernel
12:16Glanzmannamw: I did that, too. However my problem at the moment is that grub is not loading. Same as the problem that mps has.
12:16amwI'm not planning to boot up m1n1 + u-boot until I get a 2nd m1n1 partition for experimenting
12:16GlanzmannI'll try USB now.
12:18j`eyGlanzmann: not the same, mps's setup finds and loads grub
12:18amwGlanzmann: Did you see j'ey message that your problem is different to mps's?
12:18amwHe said mps loaded grub (or at least enough to get grub-rescue) but your's is not getting the grub at all
12:19Glanzmannamw: I did. But mps loads grub from usb. It is also not working for him for nvme. Same problem that I have.
12:19GlanzmannSo I wonder if someone managed to load grub on the air or pro from the nvme?
12:20j`eyI was under the impression that mps's grub was loaded from nvme, but that grub wasnt working from that point onwards.. but maybe not
12:22amwCan probably enable more debugging on u-boot, perhaps even cmdline support via USB keyboard?
12:22Glanzmannamw: The kyeboard works fine with the built in keyboard.
12:23as400[m]Glanzmann: why don't you try extlinux path ?
12:23mpsj`ey: right, grub is loaded from nvme but it puts me in grub-rescue prompt
12:23jeffmiw has joined #asahi
12:23Glanzmannas400[m]: Because I lack the knowledge, how do I do that?
12:23Glanzmannmps: So for you grub loads?
12:24mpsas400[m]: I tried with extlinux but it didn't worked
12:24j`eymps: to be clear, the USB wasnt plugged in, when you tried?
12:24as400[m]mps: what was the error ?
12:24as400[m]It didn't find extlinux.conf ?
12:24mpsj`ey: doesn't matter, I tried without usb plugged and with it, result is same
12:25j`eymps: ok, just checking it wasnt accidentally loading it from usb as a fallback
12:25mpsas400[m]: I forgot exact text (that was more than a month ago) but iirc something like this
12:25mpsj`ey: np
12:26as400[m]mps: there was a lot of commits since then. Maybe it's worth trying again ?
12:27mpsas400[m]: sure, I plan to do this, but first want to finish other tasks to have script which would install alpine to usb in proper way
12:28as400[m]mps: just make sure u-boot is compiled with distroboot or whatever it's called (don't remember)
12:29as400[m]I mean Debian even provides u-boot-menu to update extlinux.conf automatically.
12:29amwGlanzmann: If you can get u-boot cmdline working you may be able to mount the ESP partition manually and check the path to grub is there?
12:30amwYou might even be able to manually boot the grubaa64.efi if it is in the wrong place
12:31mpsas400[m]: coincidence is that I'm u-boot maintainer for alpine ;)
12:31as400[m]Glanzmann: you just need config file - that's all ---> https://pastebin.com/eiM0GDRX
12:32as400[m]mps: oh ok :)
12:32landscape15[m]<landscape15[m]> "yeah that was the problem. Now I..." <- Is it possible to set a “rescue” boot device in Linux config (if the nvme partition is not set up)?
12:33Glanzmannas400[m]: Where do I put this config file?
12:34as400[m]Glanzmann: on your ESP partition in /boot/extlinux/extlinux.conf
12:34as400[m]obviously you don't need fdtdir as this is passed by m1n1
12:35mpslandscape15[m]: this morning I asked kettenis should we change boot_targets to use 'usb0 nvme0' instead of 'nvme0 usb0' to boot from usb first if it plugged instead of nvme, to have simple rescue option ready
12:36kettenismps: I think that's a bad idea
12:36mpskettenis: why
12:36mpsgranted, it can be changed form u-boot prompt when u-boot boots
12:37mpswould be easier for end users if they don't have to stop u-boot and set this manually
12:38mpss/form/from/
12:38dottedmag(ahem) autorun.inf (ahem)
12:38kettenisindeed, you don't want to accidentally boot from a random usb stick that somebody plugged into your machine
12:40mpsunderstand (though if someone can plug usb disk on my machine and boot I'll reformat machine)
12:46GlanzmannDoes that look good?
12:48Glanzmannas400[m]: That gives me: https://tg.st/u/IMG_20220103_134805783.jpg - invalid pxefile address
12:49GlanzmannBut it finds the extlinux thing.
12:51as400[m]Yes, apparently it does.
12:51as400[m]but "pxefile" ...
12:51as400[m]this is strange
12:55as400[m]Glanzmann: where is the kernel stored ?
12:55as400[m]afaict not on ESP partition
12:56Glanzmannas400[m]: On an ext4.
12:57as400[m]That's why u-boot can't find kernel
12:57GlanzmannI see. u-boot can't read ext4.
12:57GlanzmannSo I have to copy and the initrd over and than it should work?
12:57as400[m]And change extlinux.cong accordingly
12:57GlanzmannWill do so.
12:57mpsI got F1 on MBP by Fn+1 key, now can switch between xorg and console
12:58as400[m]*extlinux.conf
12:59mpsGlanzmann: afaik u-boot can read ext4
12:59Glanzmannas400[m]: Did I understood you correctlty that debian does support extlinux out of the box. So when I mount the esp partition as /boot and install some package it does the right thing out of the box?
12:59j`eyit can
13:00as400[m]Glanzmann: yes, you need u-boot-menu package installed
13:01GlanzmannI see, thanks.
13:01Glanzmannas400[m]: Unfortunately I get the very same error message when I copy the kernel to 'boot' on the esp partition.
13:02landscape15[m]<mps> "landscape15: this morning I..." <- It’s fair to me. But many don’t want that for security reasons. I needed this because I waste time changing the boot object every time I have to switch to USB
13:04GlanzmannI'm trying the u-boot-menu thingy
13:04mpslandscape15[m]: you don't need to quote messages on irc (looks ugly)
13:04as400[m]Glanzmann: you have a strange setup. Just mount ESP to boot
13:04GlanzmannYeah, that's what I'll do now.
13:05as400[m]So the kernel and initrd is in the root of ESP
13:05landscape15[m]mps: ok then :)
13:08as400[m]Glanzmann: and when you have kernel and initrd in the root of ESP you need to change extlinux.conf accordingly like:
13:08as400[m]KERNEL /Image
13:10Glanzmannas400[m]: Actually debian moved the kernel and the initrd for me in /boot/boot
13:10GlanzmannSo it should be fine.
13:10GlanzmannAfter installing the u-boot-menu
13:11mpsGlanzmann: https://tpaste.us/yp6l this is my unfinished try to boot m1 with extlinux.conf from usb
13:11aleasto has joined #asahi
13:11mpslook at part where I create extlinux.conf
13:12mpsline 68 and down
13:12as400[m]Glanzmann: try something like this ---> https://pastebin.com/raw/gJkbTXbK
13:13as400[m]with proper path to kernel and initramfs
13:14as400[m]I guess in your case it will be /boot/Image and initrd=/boot/initramfs.img
13:15Glanzmannas400[m]: I checked the paths in extlinux.conf using cut and paste and they point where they should be porting to.
13:15GlanzmannI think it is something else.
13:15GlanzmannSo the paths in extlinux.conf are correct if the vfat esp partition is '/'
13:17as400[m]I think so
13:18as400[m]on the last screenshot you provided, u-boot says "Device 0: unknown device" - that does not look good
13:19GlanzmannI also checked the u-boot .config and both vfat and ext4 support is compiled in and CONFIG_CMD_SYSBOOT=y which seems to be extlinux as well.
13:20Glanzmannkettenis: Did you test u-boot/nvme on the air?
13:21jeffmiw has quit [Ping timeout: 480 seconds]
13:22as400[m]Glanzmann: can you try "nvme info" after failed boot ?
13:22as400[m]or "nvme list"
13:22j`eyGlanzmann: well its reading the .conf from the nvme
13:23Glanzmannj`ey: I agree.
13:24kettenisand then it fails because something is messed up
13:24kettenisbut I doubt it is a u-boot problem
13:24kettenisand no, I didn't test it on j313
13:24kettenisbut it works just fine on j274 and j293
13:25GlanzmannI see. Strange.
13:26as400[m]Glanzmann: "fatls nvme 0:6" ?
13:29GlanzmannI have an idea, but if it is that, than you will shoot me.
13:29GlanzmannMaybe I wrote the extlinux.conf in utf
13:29GlanzmannNo, its ascii.
13:30as400[m]Glanzmann: try constructing extlinux.conf like this --> https://pastebin.com/raw/gJkbTXbK
13:31as400[m]just change the "image", "initramfs" and "root" according to your setup
13:31GlanzmannI tried. Does not work.
13:32GlanzmannI ran the u-boot- debian thingy which just did that.
13:34as400[m]wait - why is your kernel image so small ?
13:35as400[m]I mean I always get something about 20MB images
13:35GlanzmannIt's 8.1 MB.
13:35Glanzmannlet me try it to boot.
13:36mpskettenis: you wrote that you boot from nvme on j293 with u-boot. could you share your setup or short instructions how to make this to work
13:37Glanzmannas400[m]: I tried booting it, it boots.
13:37as400[m]hmmm interesting
13:37GlanzmannMy normal kernel image is even smaller 6 MB compressed.
13:37Glanzmannkettenis: Are you using grub, extlinux.conf or something completly different?
13:39kettenisI'm running OpenBSD
13:39Glanzmannkettenis: But how does u-boot boot your kernel?
13:40kettenisbut I just verified that simply copying grubaa64.efi from the Debian 11.2 install ISO to efi/boot/bootaa64.efi on the ESP works just fine
13:41kettenisand use that as your efi/boot/bootaa64.efi
13:41mpskettenis: thanks
13:43Glanzmannkettenis: I'll do that. How do you build u-boot? I did the following: https://pbot.rmdir.de/uO_IYaTISLciCsL7jUAPxA Is this supposed to work?
13:47marcanfwiw I just updated some docs wiki pages (boot, storage, glossary) to try to fix the 1TR confusion
13:47ketteniswell, that isn't grub but the OpenBSD bootloader
13:48marcantl;dr the last partition on disk is *not* 1TR, it's "System RecoveryOS". 1TR just means "recovery booted by holding the power button down" and it *used* to be system recovery on 11.x but is now the paired OS recovery, and both are called 1TR when booted in this way
13:48marcanif you see any mentions of the old confused terminology feel free to fix them
13:49kettenisGlanzmann: anyway, this proves there is nothing wrong with the your ESP and u-boot just works
13:50kettenisSo your problem must be that you didn't properly install your grub
13:50kettenisas I said, the grubaa64.efi from the debian install iso works fine
13:55GlanzmannI agree. I'll try the grub from the debian install iso.
14:01kit_ty_kate has quit [Ping timeout: 480 seconds]
14:08Glanzmannas400[m]: I also tried the put the exlinux.conf as simple as possible, with your three liner, same issue.
14:08mpsGlanzmann: please inform me where I can download this debian iso when you test it works for you
14:08j`eyGlanzmann: as400[m] the extlinux.conf isnt being read, its erroring earlier
14:09Glanzmannj`ey: I see.
14:09Glanzmannmps: Will do so.
14:09j`eyi looked into the u-boot code
14:10mpsGlanzmann: TIA
14:10as400[m]j`ey: really ?
14:11as400[m]what did you find out ?
14:11Glanzmannmaybe I can load the kernel using the u-boot commandline?
14:13as400[m]j`ey: great detective work
14:13Glanzmannj`ey: What can I do about it?
14:14j`eyscriptaddr could maybe be set in the config to some valid address. but not sure, I havent used uboot
14:18mpsFn+numeric_key translate to Fkeys diff is here https://tpaste.us/5nq0 if anyone needs this on j293
14:18kettenisthe problem with all those legacy boot mechanisms in u-boot is that they rely on fixed memory addresses
14:19kettenisthat's not going to work since we want to support both m1 and m1 pro/max
14:25as400[m]kettenis: so maybe it's better to just forget about it at all ?
14:25jeffmiw has joined #asahi
14:26as400[m]Although I truly hate grub
14:29kettenisneed to think a bit on how to make this work
14:30kettenisleaving it broken is not very helpful
14:30as400[m]kettenis: maybe don't bother. There are much more mandatory env vars needed than scriptaddr
14:30kettenisbut for now, yes, only the EFI boot path is going to be supported
14:32kettenisif you don't like grub, there is systemd-boot
14:33as400[m]kettenis: yes, and then you will make fun of me here ... heh
14:33chengsun has quit [Quit: Quit]
14:33chengsun has joined #asahi
14:36mpsGlanzmann: thanks
14:37GlanzmannNow I have grub working.
14:37GlanzmannBut it crashes while initalizing the kernel.
14:37Glanzmannmps: And the trick is the following:
14:38dwalt has joined #asahi
14:38mpsI'm 'ears' now
14:38GlanzmannWe only coppied the grub but there seems to be another thing called bootaa64.efi and this is the one we need.
14:40mpsha, that is what I thougt, to move grubaa64.efi from alpine dir to boot
14:40mpsGlanzmann: thank you, will try later and report back
14:41GlanzmannI used the bootaa64.efi from the iso.
14:41GlanzmannAnd the grub from debian testing. It is working.
14:41kov has joined #asahi
14:41GlanzmannThe kernel loads but can't find my root filesystem but that is now easy to fix.
14:42Glanzmannmps: Here is copy if you don't want to download the 330 MB ISO file: https://tg.st/u/bootaa64.efi
14:42GlanzmannIs there a key combination for sysrq on the m1?
14:43Dcow_ has joined #asahi
14:44GlanzmannIt boots up and has wifi.
14:45GlanzmannBut no usb.
14:46GlanzmannI thought usb-c is enabled by the kernel and not m1n1. But maybe I'm mistaken or the reason is another reason.
14:47kettenisbootaa64.efi on the debian installer is the shim loader that is needed to deal with secure boot
14:47kettenisyou should only need grubaa64.efi, but you need to rename it to bootaa64.efi
14:47Glanzmannkettenis: This file did the trick for me.
14:48GlanzmannI can reproduce it and i tried x times.
14:48GlanzmannIf you want I make you a video.
14:48Glanzmannkettenis: Have you tried to load the grub without bootaa64.efi?
14:49GlanzmannI assume you just used the iso image, didn't you?
14:49kettenisI tried, it works here
14:49GlanzmannSo for you when you only have the grub in it, it boots?
14:49jeffmiw has quit [Ping timeout: 480 seconds]
14:49mpsGlanzmann: thanks, but I already downloaded iso
14:50Glanzmannkettenis: Can you try with the grub of debian testing? Here it is: https://tg.st/u/grubaa64.efi
14:50GlanzmannThat is the one that fails for me if I have it alone in there.
14:50Glanzmannkettenis: Are you on latest and greatest or still on macos 11?
14:52kettenisshouldn't matter
14:54kettenisreally, at the point where you have m1n1+u-boot running any generic arm64 distro should just work
14:54GlanzmannI get it. But I'm pretty sure that at least for me on the macbook air, grub only loaded after I added the shim file to the directory.
14:55GlanzmannI write down what I did for others to reproduce.
14:55j`eybootaa64.efi is what u-boot looks for, not grubaa64.efi
14:55GlanzmannThat explains it.
14:56GlanzmannMaybe I just have to rename grub and it will work, too.
14:56Glanzmannlet me try.
15:01Glanzmannj`ey: You're right. The filename matters. Thank you.
15:01Glanzmannmps: So you just need to rename grub to bootaa64.efi and than it works.
15:02yuyichao has quit [Ping timeout: 480 seconds]
15:02Glanzmannmps: Btw. I just booted the air without a second machine using uboot, m1n1, grub and have wifi. USB-C does not work for me. Don't know why.
15:03GlanzmannOkay I shut up, usb-c works as well.
15:05GlanzmannSince u-boot can read ext4, is it necessary to use the efi partition for this? I'm the efi partition is very helpful for transfering the firmware files, but other than that?
15:09mpsGlanzmann: I think what is important is partition type (efi system) and iirc filesystem could be ext4
15:09kettenisnope, that's a stupid idea
15:09mpsmaybe even type is not important
15:10mpskettenis: it seems stupid but once I changed type to linux and uboot found bootaa64.efi
15:11mpsand I'm not advocating this
15:12yuyichao has joined #asahi
15:14Glanzmannmps: This is what I did in a nutshell: https://tg.st/u/asahi-uboot-quickstart.txt
15:18mpsGlanzmann: thanks, ready to test
15:24mpsstill doesn't get boot menu but got real grub prompt where all grub commands work
15:24mpsgood for now
15:35tpw_rulesGlanzmann: i mean my nixos tutorial has everything i did and it works great
15:35tpw_rulesalso i tested and uboot refuses to read an ext4 ESP
15:37landscape15[m]Glanzmann: when I build u-boot, can I edit apple_m1_defconfig with menuconfig (as with Linux)?
15:42tpw_rulesyou can interrupt u-boot and do something like `run usb_boot` instead of reordering the disks
15:43tpw_rulessame as a regular UEFI firmware and the boot menu
15:43tpw_rulesimo leaving nvme first is best
15:56mpsfinally got grub boot menu on nvme
15:56mpsthanks all for help
15:57mpslooks like alpine grub-efi doesn't work on nvme but debian does
15:57joske has joined #asahi
15:57joskemps: how did you get the grub menu? I have the same, boots now to grub shell and can boot manually from there, but no menu
15:58joskeGlanzmann: mps: can you post your entire grub.cfg?
15:59darkapex2 has joined #asahi
15:59mpsjoske: created /boot/grub on ESP and rsynced grub files there from rootFS /boot
16:00mpsjoske: I copied file from debian install iso
16:00joskemps: grub.cfg?
16:00mpsnow I have to tweak grub.cfg for my rootSF and files
16:03darkapex1 has quit [Ping timeout: 480 seconds]
16:08joske has quit [Ping timeout: 480 seconds]
16:14ogimgd[m] has joined #asahi
16:19mpsgot it booting machine completely from nvme with u-boot, thank you all for help
16:42tpw_rulesalso i'm pretty sure grub-install will put it in the right place if you use the --removable flag
17:10darkapex3 has joined #asahi
17:16darkapex2 has quit [Ping timeout: 480 seconds]
17:25kettenisthat seems to have the whole story
17:33yamii has quit [Ping timeout: 480 seconds]
17:37yamii has joined #asahi
17:43yuyichao_ has joined #asahi
17:47yuyichao has quit [Ping timeout: 480 seconds]
18:42Glanzmanntpw_rules: I tried, yes it does. I update my instructions.
18:42Glanzmannkettenis: Thank you for the background information. I was not aware of it.
18:45gabuscus has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
18:46gabuscus has joined #asahi
18:46Glanzmannmarcan: I have a wifi bug for you. When I open a personal hotspot on my android mobile phone and try to connect using wifi take 5 I get the following in dmesg: ieee80211 phy0: brcmf_set_sae_password: failed to set SAE password in firmware (len=8) See kern.log: https://tg.st/u/9dd13d1cccccf0cafd96267d4edc838b-kern.log
18:47GlanzmannMy personal wifi hot spot uses the same ssid and psk as my wlan I'm connected right on without any issue.
18:49jannauGlanzmann: known issue with wpa3
18:49GlanzmannOh, I did not know. I see.
18:51Glanzmannjoske: My grub.cfg not that it is something special: https://pbot.rmdir.de/YVjHOG_6bDeqJaJjqQBg1g
18:52Glanzmannmps: The palm detection with your config does not work so good for me. The mouse curser often jumps. Do you have a solution for that or the same problem. I thought I already had a configuration where it was better out of the box. Unfortunately I deleted the install so I have no way to check.
19:15landscape15[m]In order to fix my custom kernel config (with which I don’t get USB working) I’m cloning every USB option from mps’s config throw menuconfig. Could it work?
19:16Glanzmannlandscape15[m]: I sometimes also have the feeling that usb does not work.
19:16Glanzmannlandscape15[m]: I'm at the moment also using mps config because I was unable to get the debian defconfig for aarch64 adopted to boot on macbook air.
19:19GlanzmannUpdated https://tg.st/u/asahi-uboot-quickstart.txt with kettenis and tpw_rules input.
19:21tpw_rulesGlanzmann: pretty sure that's an either-or
19:21tpw_rulesi imagine what the dpkg-reconfigure option ultimately does is invoke grub-install with --removable
19:22Glanzmanntpw_rules: Yes it is either or. But if you do it with the flag.
19:22GlanzmannAnd than you update grub2 it will not update it on the alternate location.
19:24GlanzmannSo yes, dpkg-reconfigure should be enough. I agree, I deleted the other line.
19:28ewryyyyyyyyyyyyyyyyyyyyyyyyyyd has quit [Remote host closed the connection]
19:35yuyichao has joined #asahi
19:38yuyichao_ has quit [Ping timeout: 480 seconds]
19:46Dcow__ has joined #asahi
19:51Dcow_ has quit [Ping timeout: 480 seconds]
19:56mlq has joined #asahi
19:57mpsGlanzmann: palm detection never worked for me on any arm chromebook/laptop
20:01mlq_ has quit [Ping timeout: 480 seconds]
20:17Glanzmannmps: I see, good to know. :-) I solved my particular problem by telling gpg to grab the keyboard, should be the default but on Debian it doesn't seem to be.
20:18Glanzmannmps: Also for me the mouse pointer seems to jump to the borders. Sometimes when I type, does that happen for you, too?
20:18GlanzmannSo it is in the middle of the screen and than suddenly jumps all the way left side?
20:18GlanzmannWhile I'm typing.
20:19GlanzmannAnyway, have to hit the bed know. Read your answer tomorrow. :-) Macbook Air with wifi without second machine is really nice. :-)
20:20mpsGlanzmann: didn't noticed jumping of pointer, maybe because I use st term with patch which hide pointer when starting to type
20:21mpsbut I never noticed jumping of it around without touching touchpad
20:21mpsGlanzmann: yes, also mb pro, only waiting for sound card fix
20:41joske has joined #asahi
20:44joskethx all, I also got my air booting all the way into linux :-)
20:45joskegrub-install --removable was the final trick
20:45mpsjoske: which distro
20:45joskemanjaro mate edition
20:46mpsmanjaro is arch linux based?
20:52jeffmiw has joined #asahi
21:08___nick___ has quit [Ping timeout: 480 seconds]
21:14off^ has joined #asahi
21:15joske has quit [Remote host closed the connection]
21:17Dcow__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
21:34Dcow_ has joined #asahi
22:00yuyichao_ has joined #asahi
22:04yuyichao has quit [Ping timeout: 480 seconds]
22:13mpsjannau: what you think about this patch to have Fkeys on MB PRO https://tpaste.us/Bgyy is it worth to be added
22:13mpsworks fine on my machine
22:43yuyichao has joined #asahi
22:46yuyichao_ has quit [Ping timeout: 480 seconds]
23:31chengsunVinDuv: thanks for your instructions on how to get /dev/cu.debug-console on macOS 12
23:33chengsunI had to tweak it a little bit to get it working for me: /Library/KernelCollections was read-only (extended attr I think), so I dumped kc.noshim.macho into ~ instead
…