!coeAONBrWyDJnYMbMi:nixos.org

NixOS System Operations

311 Members
About system administration for running NixOS systems in production. Declaratively manage your operations. | Room recommendations: #networking:nixos.org88 Servers

Load older messages


SenderMessageTime
22 Aug 2024
@magic_rb:matrix.redalder.orgmagic_rbAnd ideal kernel would be 6.0+ which is called something like main or mainline which generally means its a very close fork of mainline linux that is hopefully in the process of being upstreamed08:39:30
@theelevated:matrix.orgtheelevated
In reply to @elvishjerricco:matrix.org
theelevated: the big problem with most non-x86 devices is just getting them to start a boot loader, which is rarely standardized unless you're dealing with server hardware. Once you have that working, it's just normal nixos stuff mostly.
I have some https://milkv.io/duo and they can boot their own 1st party linux.
08:49:46
@theelevated:matrix.orgtheelevatedHow to crosscompile everything from a x86, image it and boot the chip08:50:08
@theelevated:matrix.orgtheelevatedthen I need a custom repo with my pc on lan as a mirror.08:50:21
@elvishjerricco:matrix.orgElvishJerriccoyou're skipping a step08:50:35
@elvishjerricco:matrix.orgElvishJerricco you need to understand how they get their own linux image to boot 08:50:49
@elvishjerricco:matrix.orgElvishJerriccothat's the part that's not normally standardized08:51:16
@k900:0upti.meK900It's also 256MB of RAM08:51:19
@k900:0upti.meK900Which is going to be Not Great for a full size NixOS system08:51:26
@k900:0upti.meK900Maybe something very minimal like openwrt or yocto would work better08:51:42
@magic_rb:matrix.redalder.orgmagic_rbOh yeah 256 is not great for nixos08:56:25
@elvishjerricco:matrix.orgElvishJerricco I wouldn't be surprised if you can get a minimal nixos install to boot on 256M, but you're definitely not going to be running nixos-rebuild or anything on it. You're almost certainly not even going to be able to target it from another machine with nixos-rebuild --target-host given how much memory copying NARs takes. So you'd be stuck with building images on another machine and flashing them to a drive, and then hoping 256M is still enough for nixos and your actual application 08:58:20
@magic_rb:matrix.redalder.orgmagic_rbIve ran nixos on 512 on a pi0w08:59:11
@elvishjerricco:matrix.orgElvishJerriccobut, again, step one is figuring out the boot chain, and if you can even get something like u-boot working on it08:59:15
@elvishjerricco:matrix.orgElvishJerriccothough I guess if you're just flashing images and not using nixos generations, having a boot loader isn't so important, and the firmware might make it easier to direct-boot their kernel fork09:01:10
@elvishjerricco:matrix.orgElvishJerriccoit just depends. These sbc boot chains almost always suck and are a pain to figure out09:01:32
@magic_rb:matrix.redalder.orgmagic_rb
In reply to @elvishjerricco:matrix.org
though I guess if you're just flashing images and not using nixos generations, having a boot loader isn't so important, and the firmware might make it easier to direct-boot their kernel fork
If youre booting their kernel fork, youd still have to compile it, so if the firmware can boot it directly, youd need to somehow match the format they expect. Ah, fun times with embedded hardware
09:02:22
@elvishjerricco:matrix.orgElvishJerricco Yea. If they don't document how the firmware boots the system, then it's going to be a reverse engineering effort and I do not envy having to do that :P 09:03:30
@magic_rb:matrix.redalder.orgmagic_rbThis is the kind of thing where you need to ask yourself, "how much is my time worth" sure the milkv duo costs 5 euros, but youll spend hours trying to get it to boot. At which point buying something that costs 20 euros might be more economical. Unless you need the milkv duo for some very specific reason09:05:02
@elvishjerricco:matrix.orgElvishJerricco s/hours/days or weeks/ 09:08:00
@elvishjerricco:matrix.orgElvishJerriccoI looked at one of their documents and it just says it supports booting SPI, SD card, and it supports a form of secure boot. Didn't provide any details on any of that09:08:43
@elvishjerricco:matrix.orgElvishJerricco * I looked at one of their documents and it just says it supports booting SPI or SD card, and it supports a form of secure boot. Didn't provide any details on any of that09:10:07
@magic_rb:matrix.redalder.orgmagic_rbAh yeah i see it, great datasheet, so informative lmao09:10:44
@magic_rb:matrix.redalder.orgmagic_rb @theelevated if it looks like were being needlessly pessimistic, were not being needlessly pessimistic, only pessimistic based on prior experience. It can be done, anything can be ported to anything, but the question whether you have the time and expertise to figure it out. I myself am doubtful i could figure it out in a reasonable amount of time. And sadly reverse engineering their prebuilt images might be easier than looking for nonexistent documentation 09:12:25
@theelevated:matrix.orgtheelevated magic_rb: ElvishJerricco as a former gentoo crackhead who have squished kernel boot times to their absolute limits in the name of de-bloating. It could work if you strip all of the blaot from the kernel and the boot is either uefi or legacy. uefi it's reverse engineer time if legacy we are golden. I just need a system to boot the milkv duo and ship software to it with custom compilled software with only necessary use flags etc. nixos could be a perfect substitute for gentoo since its bloated on python 09:31:29
@elvishjerricco:matrix.orgElvishJerriccolol09:31:56
@elvishjerricco:matrix.orgElvishJerriccoimagine if we were so lucky that it would do legacy PC boot or uefi09:32:05
@elvishjerricco:matrix.orgElvishJerriccoalmost certainly it's something completely different and specific to the vendor09:32:16
@elvishjerricco:matrix.orgElvishJerriccoe.g. the rpi ships a firmware partition, and the board knows to boot a start4.elf file from there, and that file knows how to look at config files on the firmware partition to find a raw binary image to load and execute09:33:15
@theelevated:matrix.orgtheelevatedjust download the image and load nix to it. if the vendor is nice the config file is in the kernel and the firmware and device drivers are on github (thank god)09:34:14

Show newer messages


Back to Room ListRoom Version: 10