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>
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>
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