orivej has quit [Ping timeout: 240 seconds]
acarrico has joined #nixos-aarch64
orivej has joined #nixos-aarch64
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #nixos-aarch64
orivej has quit [Ping timeout: 250 seconds]
orivej has joined #nixos-aarch64
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #nixos-aarch64
orivej has quit [Ping timeout: 245 seconds]
orivej has joined #nixos-aarch64
clr_ has quit [Remote host closed the connection]
worldofpeace has joined #nixos-aarch64
Acou_Bass has quit [Quit: byeeeeeeeeeeeeeee]
Acou_Bass has joined #nixos-aarch64
worldofpeace has quit [Remote host closed the connection]
worldofpeace has joined #nixos-aarch64
<makefu> samueldr: i've continuted a tiny bit with the rk3399. i wrote the current aarch64 sd image to the tf card, this is the output of uboot when it tries to boot from it: http://paste.krebsco.de/pR73QFAr
<samueldr> makefu: where did you take the sd image from?
<samueldr> ah, probably hydra since it's 4.18
<samueldr> oops, 4.19
<makefu> yep
<samueldr> the weird bit is "Invalid FAT entry"
<makefu> it was the latest from hydra
<makefu> i think the issue why it does not want to continue is:
<makefu> ** Unable to read file /extlinux/../nixos/cm2zkgvm52gkcvdrz5ib36mshddqvpzd-linux-4.19.14-dtbs/rockchip-evb_rk3399.dtb **
<samueldr> because as far as u-boot is concerned, it *look* like it's fine with the generic fdistro
<samueldr> does the file exist?
<samueldr> >> nix-store --realise /nix/store/cm2zkgvm52gkcvdrz5ib36mshddqvpzd-linux-4.19.14-dtbs
<samueldr> :)
<samueldr> <3 nix
<samueldr> ah, it's not part of things built by hydra oh no
<makefu> okay not much of a problem i have access to the community builder so i have an actual chance to build my own image
<makefu> i just need to add it to the paths to include into the image, right?
<samueldr> not sure
<samueldr> the dtbs are hardcoded right now
<samueldr> yeah, rockchip-evb_rk3399 isn't in the mainline linux repo
<makefu> ah
<samueldr> makefu: humour me, remove the FDTDIR line from the extlinux.conf file
<makefu> will do
<samueldr> (on the boot partition, the FAT32)
<makefu> yep
<samueldr> ideally, boards should ship with a complete and valid device tree, and never need to load one
<samueldr> but eh, that's not how it works right now
<samueldr> I find it surprising that the generic distro boot fails on missing fdt instead of continuing hoping for the best
<samueldr> but I may have some bad assumptions with how device trees work, should work, and are actually working
<makefu> looks good
<makefu> well i cannot see anything anymore
<samueldr> good
<makefu> probably wrong terminal
<samueldr> console=
<samueldr> yeah
<makefu> last line: Starting kernel ...
<samueldr> that's a "succes"
<samueldr> at least u-boot is fine
<makefu> thanks!
<makefu> now let me search the correct terminal
<samueldr> keep in mind that it's the mainline one, which could differ from the downstream OEM one
<makefu> it definitly does differ a lot
<makefu> lets see how much works
<makefu> ttyFIQ0 <- you always can find another 3-character definition after tty
<samueldr> and also: you made a manual fixup on the bootloader files, so you'll need to figure out a way to make it skip that line
<samueldr> though I think it'll be needed for more than your board specifically, I'm thinking an option for dtbs directory, defaulting to the kernel one (current situation), null skipping the FDTDIR and dtb folder generation, and another derivation, well, those dtbs
<makefu> yeah something along the lines. but at first i want to see the terminal booting
<makefu> samueldr: rockchip-evb_rk3399.dtb existed actually. only was it called rockchip/rk3399-evb.dtb
<makefu> copying it over resulted in a terminal showing up
<samueldr> ooh, exciting
<samueldr> this is something that (AFAIK) needs to be patched in your u-boot, the expected name
<samueldr> though an idea I had might be relevant, though I'd need people more experiences with DTs to confirm or shot down the idea
<samueldr> what if the device tree loading was done with the "compatible" field of the currently loaded device tree instead of a name defined at compile time...
<samueldr> ... with u-boot it won't change things much, but would help with UEFI boot for as long as device trees are expected to be loaded
<samueldr> xargs -n1 -0 < /sys/firmware/devicetree/base/compatible
<samueldr> raspberrypi,3-model-b
<samueldr> brcm,bcm2837
<samueldr> or maybe as an additional target for filename search, though FAT lacking symlinks makes this annoying
<makefu> to me this whole dbt is still part magic and other part madness :D i think i need a couple of more boots to get to understand everything
<samueldr> I'm not sure I grok it all, but I think I understand the broad strokes, so details still escape me
<makefu> managed to get beyond stage1, unfortunately root cannot get mounted. kernel cmdline i used: .... earlycon=uart8250,mmio32,0xff1a0000 console=ttyS2,1500000
<samueldr> make yourself a 4.20 image, IIRC there were a bunch of RK3399 things
<samueldr> you may need to remove or comment the zfs thing somewhere for it to build
<makefu> seems the board is unable to find the sdcard (even though it booted from it ...
<samueldr> yeah, and that's the kind of things that would happen on a kernel that doesn't have the required bits in :)
<samueldr> at boot the bootloader loads the kernel and the initrd in memory (simplified), then jumps to the kernel, at that point the kernel starts executing, has no concept of the bootloaders' drivers* though can use the initrd in memory
<samueldr> so if the driver doesn't know how to handle the hardware on the board, it won't know how to handle the hardware on the board :)
<makefu> so many stages
<samueldr> the armv8 boot has 3 stages before u-boot IIRC
<makefu> only to get to uboot is 3 stages on rockchip
<samueldr> some of that is standardized in how armv8 boot, not entirely sure the three stages are though
worldofpeace has quit [Quit: worldofpeace]
<makefu> funny that on the unstable channel linux_latest is 4.19 but 4.20 is also available
<makefu> ah i think i fucked something on my side
acarrico has quit [Ping timeout: 244 seconds]