Welp, my foray into linux kernel hacking is going awful so far.

Picked up an old project trying to get a Synology DS118 booting mainline, and basically importing drivers from a 4.4 vendor tree into current stable 6.19.

But all of the devicetree lookups for gpio and reset lines are failing, despite the controller drivers having started.

And for whatever reason, enabling the pr_debug calls in the syno code makes the kernel completely unbootable.

And for whatever reason, remote debugging with gdb just hangs immediately at `target remote`, with no useful output even with `set debug remote 1`. (Wonder if this has to do with macOS as client / the homebrew gdb build I'm using, but ugh, have to setup a VM if I want to iron that out.)

So yeah, lots of dead ends. :(

Some success getting my Synology DS118 up on mainline Linux now!

I have working network, and the SATA driver seems to load, but reports 'link down' and the disk never powers on.

There's a lot of power management code in the vendor tree I'm not sure I need. I imagine the firmware inits the board in a decent enough state?

I do think cpufreq support would be sensible, but that requires driving a voltage regulator connected over i2c (if I understand correctly), but the i2c driver reports all sorts of transfer errors that are still alien to me.

#Synology #Realtek