2023-09-09.log

josch(i cancelled the pipeline as it only makes sense to run it after reform-tools 1.25 shows up here https://mntre.com/reform-debian-repo/pool/main/r/reform-tools/ )00:05
- klardotsh (QUIT: Ping timeout: 246 seconds) (~klardotsh@c-67-170-115-80.hsd1.wa.comcast.net)00:49
- vagrantc (QUIT: Quit: leaving) (~vagrant@2600:3c01:e000:21:7:77:0:50)01:15
- stites (QUIT: Ping timeout: 248 seconds) (~stites@130.44.147.204)01:33
+ stites (~stites@2607:fb91:dc9:6ccd:6a4b:9556:1e53:57eb)01:35
- stites (QUIT: Read error: Connection reset by peer) (~stites@2607:fb91:dc9:6ccd:6a4b:9556:1e53:57eb)01:47
+ stites (~stites@130.44.147.204)01:48
- stites (QUIT: Ping timeout: 245 seconds) (~stites@130.44.147.204)01:52
+ stites (~stites@2607:fb91:dc9:6ccd:6a4b:9556:1e53:57eb)01:52
- stites (QUIT: Read error: Connection reset by peer) (~stites@2607:fb91:dc9:6ccd:6a4b:9556:1e53:57eb)01:54
+ stites (~stites@130.44.147.204)01:54
- eery (QUIT: Ping timeout: 240 seconds) (~eery@156.146.51.201)01:58
- mtm (QUIT: Ping timeout: 248 seconds) (~mtm@c-71-228-84-213.hsd1.fl.comcast.net)02:03
- jacobk (QUIT: Ping timeout: 246 seconds) (~quassel@utdpat241106.utdallas.edu)02:47
+ vagrantc (~vagrant@2600:3c01:e000:21:7:77:0:50)03:23
- mjw (QUIT: Ping timeout: 246 seconds) (~mjw@gnu.wildebeest.org)03:48
- nsc (QUIT: Ping timeout: 245 seconds) (~nicolas@50-99-142-46.pool.kielnet.net)03:59
+ nsc (~nicolas@40-99-142-46.pool.kielnet.net)04:01
joschit seems quite the night shift was pulled to queue yet another reform-system-image run to be done over-night -- nice! :D04:08
+ mtm (~mtm@c-71-228-84-213.hsd1.fl.comcast.net)04:09
- sknebel (QUIT: Server closed connection) (~quassel@v22016013254630973.happysrv.de)04:11
+ sknebel (~quassel@v22016013254630973.happysrv.de)04:11
+ jacobk (~quassel@utdpat241055.utdallas.edu)04:15
joschminute: so it seems the last big difference of reform-system-image between a311d and imx8mq is the value of LINUX_KERNEL_CMDLINE in /etc/default/flash-kernel. It would allow for an extremely nice property if this difference could be avoided. In that case, you could ship a bit-by-bit identical root filesystem for all platforms and only have /boot differ.04:59
joschyou could either do that by finding one value that fits all platforms (even if that is possible right now, this might not be possible with future boards)04:59
joschor (and i think this is better) let uboot set the correct ${bootargs} value05:00
joschwhy does the reform-boundary-uboot branch not do this?05:00
joschyet to be tested and thus marked as draft: https://source.mnt.re/reform/reform-boundary-uboot/-/merge_requests/1905:10
joschvagrantc: ah good you are still online -- what is your opinion on that topic?05:12
joschi can think of a third solution: copypaste flash-kernel's bootscr.uboot-generic to bootscr.reform2-imx8mq and only have it differ from bootscr.uboot-generic in what it does with "setenv bootargs"05:14
joschvagrantc: what is your opinion of platform-specific bootargs? Should u-boot set those? Should flash-kernel supply them via platform specific boot.scr?05:15
joschthe situation is even worse for u-boot-menu which does not allow for platform specific U_BOOT_PARAMETERS in /usr/share/u-boot-menu/conf.d/*.conf but seems to just rely on ${bootargs} set by u-boot05:17
joschso probably setting this in u-boot would be best as it would also fix u-boot-menu?05:17
joschoh my uboot patch is probably wrong. It should be CONFIG_USE_BOOTARGS=y together with CONFIG_BOOTARGS right?05:23
vagrantcoh, i am glad u-boot-menu actually uses bootargs :)05:24
vagrantci was worried it does not at all ...05:25
vagrantcbut yes, seems like the bootloader is really the main part that actually differs ... may as well set it there.05:25
joschwait... it does not?05:25
joschi didn't test whether it does05:25
vagrantcjosch: oh ... well ... test that then :)05:25
vagrantcyou are also copying all the appropriate .dtb files somehow?05:27
vagrantcwhat are the differing boot arguments needed?05:27
joschvagrantc: https://paste.debian.net/1291412/05:29
vagrantccrazy idea ... are some of them possible to tweak from /sys or /proc from initrd ?05:31
vagrantcobviously the serial console not so much ...05:31
vagrantcoh, you can probably safely specify both serial consoles ... it might complain about one not existing ... but should work05:32
vagrantcugly, ye.05:32
joschlets first try if setting ${bootargs} in u-boot works05:32
joschyes, concatenating all serial consoles should be fine05:32
vagrantcyou could also make a u-boot bootscript that checks and sets bootargs differently05:33
vagrantcand serial console too, for that matter05:34
joschvagrantc: yes, that's what i meant by copypasting bootscr.uboot-generic above05:34
vagrantcand then /etc/flash-kernel/machine to "crazy all the MNT Reforms"05:34
joschvagrantc: but such a change would need to end up in flash-kernel itself05:34
vagrantceventually ... but while you're prototyping it, you can just specify a custom bootscript05:35
vagrantcat some point, you might fall down and not be able to add new ones ... especially with the CM4 module opening many possibilities05:36
joschvagrantc: you'd really ship a reform-specific boot.scr in flash-kernel?05:36
joschevef if the problem can be solved at the uboot level properly forever?05:36
vagrantcjosch: just exploring ideas :)05:36
joschokay05:36
joschlets try ${bootargs} first, then05:37
vagrantcobviously, if you can teach u-boot to do make available the right things, that would be nicer.05:37
joschokay, it's already good to know that that is the proper way forward05:38
vagrantci seem to recall a reluctance with updating u-boot once it made it into the field, though?05:38
joschyes, there is no auto-updating yet05:38
joschbut at least new platforms like a311d would benefit from the start05:39
vagrantcjosch: in unrelated news, is metasnap.debian.net still operating? :)05:39
joschvagrantc: yes, why?05:39
vagrantcjosch: exploring some things that might need it ... at least for the moment05:39
joschvagrantc: keep me updated about them :)05:40
joschvagrantc: it is lagging behind several days because snapshot.d.o is borked :(05:40
vagrantcthat's what i was afraid of05:40
joschnothing metasnap can do about that i'm afraid05:41
joschsnapshot.d.o just returns 404 if you don't wait long enough05:41
vagrantcmore follow-up on #reproducible-builds05:42
joschback to uboot05:44
joschminute: here i built a u-boot for a311d that sets ${bootargs} with the a311d specific stuff: https://source.mnt.re/josch/reform-system-image/-/jobs/202005:45
joschminute: you could give it a test-run once you find some time05:45
+ klardotsh (~klardotsh@c-67-170-115-80.hsd1.wa.comcast.net)05:49
joschvagrantc: it also happened, that MNT got shipped a new revision (AB) of the nitrogen imx8mq som which can no longer boot from sd-card -- so flashing a new u-boot now becomes more scary because if you do something wrong you soft-brick the board...05:53
vagrantcright.05:54
- jacobk (QUIT: Ping timeout: 248 seconds) (~quassel@utdpat241055.utdallas.edu)06:26
+ jacobk (~quassel@utdpat241055.utdallas.edu)06:30
- vagrantc (QUIT: Quit: leaving) (~vagrant@2600:3c01:e000:21:7:77:0:50)06:30
- klardotsh (QUIT: Ping timeout: 250 seconds) (~klardotsh@c-67-170-115-80.hsd1.wa.comcast.net)07:28
- jacobk (QUIT: Ping timeout: 248 seconds) (~quassel@utdpat241055.utdallas.edu)07:29
+ reformer (~reformer@softboy.mntmn.com)08:08
+ jacobk (~quassel@64.189.201.150)08:25
- ggoes (QUIT: Ping timeout: 255 seconds) (~gregf@fsf/staff/ggoes)08:59
- GNUmoon (QUIT: Remote host closed the connection) (~GNUmoon@gateway/tor-sasl/gnumoon)09:05
+ GNUmoon (~GNUmoon@gateway/tor-sasl/gnumoon)09:09
- jjbliss (QUIT: Ping timeout: 250 seconds) (~jjbliss@1464766-static.elnsmiaa.metronetinc.net)09:10
+ jjbliss (~jjbliss@1464766-static.elnsmiaa.metronetinc.net)09:24
joschokay, u-boot-menu cannot currently work with the same contents on the / partition for different platforms09:36
joschso we could either:09:36
joscha) give up on common content for the root partition (but that would be sad because the kernel cmdline is the only blocker)09:37
joschb) find a common set of kernel cmdline that fits all SoMs and hope that this also works for future SoMs09:37
joschc) fix u-boot-menu09:37
joschd) never ship u-boot-menu with the system image and continue relying on the legacy boot.scr instead09:37
joschnote for vagrantc for later: the problem is, that to fill the "append" line in extlinux.conf, u-boot-update looks at /etc/default/u-boot, /usr/share/u-boot-menu/conf.d/, /etc/u-boot-menu/conf.d/ for a good value of U_BOOT_PARAMETERS09:40
joschvagrantc: if it cannot find any (i.e. U_BOOT_PARAMETERS is empty) it defaults to /etc/kernel/cmdline09:40
joschi misread that last bit thinking it would default to /proc/cmdline which would be nice because then generating extlinux.conf on an already running system would use a cmdline that already proved itself to be working09:41
joschvagrantc: i think a possible fix would be to add another fallback to /proc/cmdline if /etc/kernel/cmdline doesn't exist -- what do you think?09:42
joschmaybe accompanied by another option in /etc/default/u-boot which allows taking cmdline from /proc/cmdline as the final fallback?10:09
- mhoye (QUIT: Server closed connection) (~mhoye@li319-32.members.linode.com)10:30
+ mhoye (~mhoye@li319-32.members.linode.com)10:30
- S0rin (QUIT: Remote host closed the connection) (~S0rin@user/s0rin)11:29
- doppler (QUIT: Server closed connection) (~doppler@user/doppler)11:57
+ doppler (~doppler@user/doppler)11:57
- yankcrime (QUIT: Server closed connection) (~nick@193.16.42.83)12:19
+ yankcrime (~nick@193.16.42.83)12:20
- XYZ (QUIT: Remote host closed the connection) (~XYZ@89-24-35-94.nat.epc.tmcz.cz)13:51
+ mjw (~mjw@gnu.wildebeest.org)14:00
- mtm (QUIT: Ping timeout: 240 seconds) (~mtm@c-71-228-84-213.hsd1.fl.comcast.net)14:03
- jacobk (QUIT: Ping timeout: 240 seconds) (~quassel@64.189.201.150)14:20
+ XYZ (~XYZ@89-24-35-94.nat.epc.tmcz.cz)14:29
minutejosch: what kind of config file does u-boot-menu use for its entries etc? is it plaintext on the boot partition, or some binary format? asking because i'm thinking about how to modify it during debugging etc14:35
minutejosch: so far i used mkimage to update boot.scr manually14:35
minutepreliminary changelog for system image v4, i'm sure i forgot something, but will polish more on monday https://source.mnt.re/reform/reform-system-image/-/merge_requests/7514:37
joschminute: you have u-boot-menu installed? In that case, the auto-generated configuration that is parsed by u-boot is located at /boot/extlinux/extlinux.conf15:10
joschone advantage of using extlinux.conf over boot.scr is, that it is declarative instead of being a turing-complete shell script. Another advantage is, that you can edit extlinux.conf with a texteditor instead of requiring a pass through mkimage.15:11
joschyou can write your own manual /boot/extlinux/extlinux.conf but users usually do not edit it but use the u-boot-menu package to let it automatically generate entries for all installed kernels15:12
joschif extlinux.conf exists, u-boot will prefer it over boot.scr15:12
- robin (QUIT: Ping timeout: 246 seconds) (~robin@user/terpri)15:12
+ robin_ (~robin@user/terpri)15:12
minutejosch: ok, very nice15:13
minutethanks for the explainer. i will look into it in the coming week then15:14
joschminute: i don't think there is much to look into because of the problem that extlinux.conf ignores ${bootargs} set by u-boot :(15:15
minutejosch: :/ 15:15
joschi think more important would be looking at my ${bootargs} merge requests and merging them so that we can soon [tm] not set them anymore via something in /etc15:15
josch(as discussed with vagrantc earlier)15:15
joschoh cool a311d-v2 was merged15:17
minutejosch: yes!15:18
joschhaving the ${bootargs} stuff in u-boot for a311d might already be enough, because then reform-system-image can set imx8mq specific kernel cmdline but that can be overwritten by a311d u-boot's ${bootargs} if needed15:21
josch(as we probably never can reliably update user's u-boot...)15:21
minuteproblem: i flashed over 30 new imx8m modules yesterday with our current uboot and those can only ever boot from emmc15:25
minuteso can there be a fallback in case uboot didn't set bootargs?15:25
minute(these modules have already been built back into reforms also)15:26
joschoh :(15:29
joschwell, it is as it is15:29
joschyes, instead of using flash-kernel's provided boot.scr we can create our own15:30
joschthat was one of vagrant's ideas as well15:30
minutea boot.scr that could also then forward to extlinux.conf, or how do you mean?15:31
joschno15:31
joscha boot.scr which does different things depending on a) the reform platform and/or b) the existance of ${bootargs}15:31
joschvagrant hinted, that they see it as a possible solution to the problem to add yet another boot.scr template to the flash-kernel packaging15:32
- stites (QUIT: Ping timeout: 246 seconds) (~stites@130.44.147.204)15:34
joschbut again, this is only a fallback solution -- it can be avoided if this works: https://source.mnt.re/josch/reform-system-image/-/commit/6577e915d6bd13c18e7e4d025322b85dcb94e84215:35
+ stites (~stites@2607:fb91:dc6:4800:fbd5:4720:a3b4:a0d2)15:35
joschthen reform-system-image would set the bootargs for imx8mq and all other platforms would override them like in this commit15:35
josch(override them if needed)15:35
joschfor example, imx8mq sets pci=nomsi but u-boot for a311d overrides that with pci=pcie_bus_perf (last option wins)15:37
joschboth share the cma=512M option15:37
joschand no_console_suspend probably doesn't hurt on a311d15:37
minutejosch: i see!15:37
joschso this might just work but somebody with an a311d would have to try it out :D15:37
josch*wink* *wink*15:38
josch:)15:38
minutehehe15:39
minutewell, that will be me!15:39
- qbit (QUIT: Ping timeout: 246 seconds) (~qbit@h.suah.dev)15:41
joschyou can do so by applying this patch and building a new a311d system image: https://paste.debian.net/1291449/15:41
+ qbit (~qbit@h.suah.dev)15:42
joschand then put this flash.bin onto that image: https://source.mnt.re/josch/reform-system-image/-/jobs/2020/artifacts/browse15:42
joschi'd be interested whether that system boots and what the resulting /proc/cmdline is15:43
+ mtm (~mtm@c-71-228-84-213.hsd1.fl.comcast.net)16:09
minutejosch: ok, writing in my todo for monday16:11
joschsweet :)16:12
joschanother blocker for me is, that i would like a project in the reform namespace that builds the a311d u-boot, maybe named reform-a311d-uboot similar to reform-boundary-uboot16:13
joschonce i have that, i can unify the reform-system-image scripts into a single one16:14
+ ggoes (~gregf@fsf/staff/ggoes)16:17
- xktr (QUIT: Quit: leaving) (~xktr@2602:fe3d:c01:10ca:1050:1ace:0:b)16:40
+ xktr (~xktr@2602:fe3d:c01:10ca:1050:1ace:0:b)16:48
- stites (QUIT: Read error: Connection reset by peer) (~stites@2607:fb91:dc6:4800:fbd5:4720:a3b4:a0d2)17:01
- cwebber (QUIT: Remote host closed the connection) (~user@user/cwebber)17:01
+ stites (~stites@130.44.147.204)17:01
minutejosch: ah yes, sorry for letting you wait for that17:20
joschit's okay, you had so much other stuff to do! :)17:23
joschwhile writing the unification code for reform-system-image i also thought of yet another way to avoid hardcoding the kernel cmdline in reform-system-image: by doing the platform detection in /usr/share/flash-kernel/ubootenv.d/00reform2_ubootenv and letting that snippet modify ${bootargs} accordingly if it detects imx8mq17:24
Boostisbetterjosch: what kind of battery life do you see on your Refrom? About 4 hours?17:56
joschyup, around that17:58
joschthough it's getting less18:00
joschright now, my reform dies at around 10-12% remaining battery according to the oled18:00
Boostisbetterhmmm, I have never checked to see myself. I only let it run down once, and that was just to reset the lpc after getting the 2000 mah batteries18:35
+ jacobk (~quassel@2603-8080-b200-7b02-0000-0000-0000-0b71.res6.spectrum.com)18:39
- mtm (QUIT: Ping timeout: 255 seconds) (~mtm@c-71-228-84-213.hsd1.fl.comcast.net)19:18
+ vagrantc (~vagrant@2600:3c01:e000:21:7:77:0:50)20:34
joschvagrantc: so... we have multiple problems and some solutions :D21:23
joschvagrantc: https://mntre.com/reform-irc-logs/2023-09-09.log.html#t09:36:2921:23
+ mtm (~mtm@c-71-228-84-213.hsd1.fl.comcast.net)21:24
joschthat link goes to my thoughts for u-boot-menu21:24
joschyesterday we also talked about a custom boot.scr for the reform. I don't think that's necessary after all because i can just customize bootscr.uboot-generic using a script in /usr/share/flash-kernel/ubootenv.d/ if i want to21:25
joschthat script could then do some magic with ${bootargs} depending on the SoM if needed21:25
joschbut maybe all our problems go away (for now) because it might be possible to give flash-kernel the bootargs for the imx8mq and then let u-boot for a311d (where we can make sure we do not do the same mistake again) overwrite whatever it needs with its own ${bootargs}21:26
joschminute: i now have a proof-of-concept for a unified reform-system-image. Creating the root-partition takes 45 minutes on my reform and customizing that takes another 7 minutes for each board we want to support. So instead of O(45*N) we get O(45+7*N) which is still linear but not as steep :)21:28
minutejosch: oh cool!21:58
- _nrb_ (QUIT: Server closed connection) (~nrbnrb@2a01:4f8:172:299c:1::29)22:04
+ _nrb_ (~nrbnrb@2a01:4f8:172:299c:1::29)22:04
vagrantcjosch: sounds promising :)22:32
joschvagrantc: except for u-boot-menu :(22:34
- jacobk (QUIT: Ping timeout: 248 seconds) (~quassel@2603-8080-b200-7b02-0000-0000-0000-0b71.res6.spectrum.com)22:34
vagrantcACTION nods22:35
vagrantcwelllll....22:35
vagrantci think some platforms have some sort of pre-boot.scr ...22:36
joschvagrantc: but distroboot will by default prefer extlinux.conf over boot.cr22:36
josch*boot.scr22:36
vagrantcjosch: this happens before distroboot22:36
joschoh?22:36
joschi never heard of pre-boot.scr22:37
vagrantcanother workaround i have done on some systems is to load a boot.scr from a higher priority boot device, and but not actually use it to boot, and then it falls back to extlinux.conf on the next boot device22:37
vagrantcjosch: it might not be widely supported22:37
vagrantcand not finding any hits on that exact match in u-boot22:38
vagrantcthere is one platform that supports /u-boot-preboot.scr ... but one platform does not make for a compelling default22:39
vagrantcalso, the shiny new hotness is defaultboot ... distroboot is now the old thing :)22:40
vagrantcdefaultboot? gah. no, stdboot22:40
vagrantcor standard boot ...22:40
vagrantcit is the classic case of "sure, it is better, but now we have yet another boot path to support."22:40
joschnice, i love throwing out all the established and stable stuff to replace it with the hotness of tomorrow :D22:41
vagrantcit does have fallbacks for distroboot-like behavior ... and better option for selecting boot media22:41
joschah i found it in the u-boot git: doc/develop/bootstd.rst22:41
- stites (QUIT: Ping timeout: 248 seconds) (~stites@130.44.147.204)23:20
+ stites (~stites@2607:fb91:dcf:4896:22a5:6d79:f786:b171)23:21
+ jacobk (~quassel@2603-8080-b200-7b02-0000-0000-0000-0b71.res6.spectrum.com)23:22
- jacobk (QUIT: Ping timeout: 240 seconds) (~quassel@2603-8080-b200-7b02-0000-0000-0000-0b71.res6.spectrum.com)23:27
* robin_ -> robin23:46
- ethulhu (QUIT: Quit: connection reset by purr) (ethulhu@nora.ethulhu.co.uk)23:53
+ ethulhu (ethulhu@nora.ethulhu.co.uk)23:53
- stites (QUIT: Read error: Connection reset by peer) (~stites@2607:fb91:dcf:4896:22a5:6d79:f786:b171)23:57
+ stites (~stites@2603:3005:b69:4100:afa0:f7be:6ecd:53f2)23:57

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!