22 Aug 2024 |
magic_rb | And 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 upstreamed | 08:39:30 |
theelevated | 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 | How to crosscompile everything from a x86, image it and boot the chip | 08:50:08 |
theelevated | then I need a custom repo with my pc on lan as a mirror. | 08:50:21 |
ElvishJerricco | you're skipping a step | 08:50:35 |
ElvishJerricco | you need to understand how they get their own linux image to boot | 08:50:49 |
ElvishJerricco | that's the part that's not normally standardized | 08:51:16 |
K900 | It's also 256MB of RAM | 08:51:19 |
K900 | Which is going to be Not Great for a full size NixOS system | 08:51:26 |
K900 | Maybe something very minimal like openwrt or yocto would work better | 08:51:42 |
magic_rb | Oh yeah 256 is not great for nixos | 08:56:25 |
ElvishJerricco | 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 | Ive ran nixos on 512 on a pi0w | 08:59:11 |
ElvishJerricco | but, again, step one is figuring out the boot chain, and if you can even get something like u-boot working on it | 08:59:15 |
ElvishJerricco | 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 | 09:01:10 |
ElvishJerricco | it just depends. These sbc boot chains almost always suck and are a pain to figure out | 09:01:32 |
magic_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 | 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 | This 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 reason | 09:05:02 |
ElvishJerricco | s/hours/days or weeks/ | 09:08:00 |
ElvishJerricco | I 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 that | 09:08:43 |
ElvishJerricco | * 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 that | 09:10:07 |
magic_rb | Ah yeah i see it, great datasheet, so informative lmao | 09:10:44 |
magic_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 | 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 | lol | 09:31:56 |
ElvishJerricco | imagine if we were so lucky that it would do legacy PC boot or uefi | 09:32:05 |
ElvishJerricco | almost certainly it's something completely different and specific to the vendor | 09:32:16 |
ElvishJerricco | e.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 execute | 09:33:15 |
theelevated | just 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 |