HK1 X4S (S905X4) hangs in u-boot when trying to start kernel

  • I'm currently struggling with a HK1 X4S TV Box (Amlogic S905X4-based), maybe somebody has an idea.

    Using a serial console (speed 921600) I was able to wipe the Android on eMMC and get a u-boot prompt.

    I can load FDT and kernel image from sdcard, but using booti/bootm the system hangs after just printing "starting kernel ...".

    I tried the different typical load addresses, but nothing helped so far.

    I'm running out of ideas why I don't see at least a few lines of earlyprintk console output from the starting kernel.

    (kernel is self-compiled, works perfectly fine on a S905W-based TX3 Mini)

    It seems that the system always uses an own u-boot (don't know exactly where it's stored),

    even if I use an image with a different u-boot. Maybe it expects u-boot at different lba's.

    As reference I attach the u-boot log. Thanks.

    On a side note: Amlogic usb/flash tool doesn't work with this SoC version. With the toothpick reset it reports the expected USB device, but the reported product id is c004, and the available usb/flash tools work with product id c003 only. Even after faking the product id with a kernel hack it didn't work. Maybe the protocol changed.

  • Hello Heiner,

    There is negligible mainline kernel support for S905X4 hardware at the current time. Amlogic started to upstream the basics but the quality of initial code submissions is poor and developers are slow to grasp the etiquette standards needed so progress is slow. Bring-up is still at the power-domains and pinctrl stages (some UART driver changes were recently posted too, which might help your cause) but there's some way to go before upstream kernels have a usable level of support. We also have to hope the upstreaming effort continues.

    Khadas has VIM4 sources here https://github.com/khadas/u-boot/tree/khadas-vim4-r which might help with understanding the changes in the boot process on your board. I didn't spend long poking around, but I can see a lot more use of signed blobs and such. I'm also told OPTEE is now used for firmware loading (Amlogic ships and requires BL32) so there is clear intent to lock things down, and most of the Amlogic driver sources that I can see are subject to an Amlogic license (not a GPL license) requiring permission to disribute the code in source or binary format. That would be a challenge for a distro like LE. In fact, the more I read and poke around into what's needed for S4/SC2/T7 hardware support, the more I think Kodi support will be limited to Android or a few Linux using OEM manufacturers. It looks like Linux support will need NDAs which LE could never sign (as no legal entity) and would never sign (on principle).

    Sorry.. not much help :(

  • Hi Christian,

    it took some time to add experimental SC2 support. Patches and description you can find in this github repo.

    It's good enough to run a cheap S905X4 tv box as headless mini server. Display works as well.

    In the next time I'll check which parts of the series are good enough to be mainlined.