How to revive an S912?

  • Seems I managed to semi brick my S912 based X92. It just starts up to a semi working stock recovery, no luck with booting anything at all. Toothpick won't help either, also weird tricks with amlogic card creators, armbian and so on.

    Then I already gave up for the moment, I tried the other elec (right kernel 3.14 yuck) and oh wonder it boots from usb, as if there wouldn't be anything else to expect from a bricked box.

    Has anyone a hint what I could try to make anything other than this boot? Android, LE, Armbian, *insert obscure rom here*?

    I never got clever from those aml_autoscript discussions, and whenever this pops up it seems the one who asks gets silenced and pointed to the usb tool, which doesn't work for me for various reasons.

    • Official Post

    If Android starts failing to boot and reflashing is also failing there are probably defects in the emmc storage, but if you're able to boot a 3.14 image from USB the factory u-boot is still intact. Before attempting anything else I would use the USB booting OS to make a backup of the first 8MB of the emmc so that you have a copy of that u-boot, because although it's fairly simple to build bootable images for GXM devices, if the box has extra-cheap emmc chips (not unheard of) the fip sources might have been tweaked with custom timings (to deal with out-of-spec chips) and then it's unlikely you'll be able to find or recreate a bootable image. If the emmc deteriorates further it's then possible to erase emmc (short pins to boot from an SD card with factory u-boot installed). Worst case you might end up in a scenario where you need to boot from u-boot on a SD card but run an OS on a USB stick.

    NB: Once you start fiddling with boot firmware and u-boot it becomes important to have a USB > UART cable to see the boot/console output. If we can see that output we can literally see where things break and what happens when we experiment. If we can't see that output, we're reduced to guessing where the issue lies.

  • chewitt thanks that makes sense, and I will definitely do that now.

    In fact it seems it was not the EMMC but my failed attempt on creating a proper recovery SD card. The second attempt worked and the box is now again running Android on EMMC turns out the image used was "fully loaded" now have to clean it, then can try experimenting with booting LE from stick or card.

    Do you by accident happen to know where in the EMMC the factory uboot is located? Compared to Allwinner this is just complicated and risky and the odroid seems to completely do away with all that stuff, by having the EMMC removable for flashing.

    Whatever its a chance to learn more...

    • Official Post

    C2 (GXBB) has a different u-boot signing process to an S912 (GXM) device, but in terms of how the signed u-boot is written to a bootable SD card (or emmc module) it's the same. See:

    LibreELEC.tv/mkimage at master · LibreELEC/LibreELEC.tv · GitHub

    and

    LibreELEC.tv/install at master · LibreELEC/LibreELEC.tv · GitHub (C2)

    LibreELEC.tv/install at master · LibreELEC/LibreELEC.tv · GitHub (GXM)

  • C2 (GXBB) has a different u-boot signing process to an S912 (GXM) device, but in terms of how the signed u-boot is written to a bootable SD card (or emmc module) it's the same

    thanks will check this out, would be sad loosing this box just now as panfrost eliminates the main reason for its uselessness ;)

  • chewitt just one more question regarding the dtb for the x92.

    I tried to research which one works, as so far I wasn't able to boot any mainline kernel, at least I was not able to verify its running without a serial connection...

    I checked DTS in linus' tree of q200, q201 and tronsmart vega s96, where I stumbled over your name.

    If I see it correctly both eval boards are identical except for ethernet phy and buttons. Although the X92 is often considered a q201 also the factory image and the build.prop indicate in this direction, CE uses a q200 2g dtb, and as the box has a GETH port it seems more like a q200 or a vega (with most likely wrong IR hints in dts).

    Just confused how I could make it output anything non black on hdmi and repurpose it as a dvb-c recorder in the medium term...

    • Official Post

    I've had more success using the VIM2 dts with random boxes than the Q200/Q201 ones. That's also true of boot firmware - the 'vim2' suffix image on our test server is for emmc installs and has mainline u-boot in the imaage, but to test that you'll need to erase emmc first else the box will always find BL2 in emmc and use it.

  • I've had more success using the VIM2 dts with random boxes than the Q200/Q201 ones. That's also true of boot firmware - the 'vim2' suffix image on our test server is for emmc installs and has mainline u-boot in the imaage, but to test that you'll need to erase emmc first else the box will always find BL2 in emmc and use it.

    Giving up for the moment trying again with the next kernel version, if I can spare some time :)

  • It really seems s912 is quite abandoned everywhere. Tried building meta-meson for gxm-q200 and after a couple of hours of boiling my ancient i7 it failed on compiling u-boot.

    • Official Post

    The Android box market moved onto newer/shinier things so S912 is long-forgotten as the top device in Amlogic's line-up, but there is still commercial interest in S912 from industrial users. LibreComputer is about to release a new board (tartiflette) and because GXM is only a minor evolution from GXL it's a solid/stable platform, which is key for that audience. I've been passed some S912 devices recently and even without an Android dtb or schematics it's been fairly trivial to get all the core hardware working.

    However, the tricky bit is always the boot firmware. You either need to self-compile a recent mainline u-boot and experiment with fip sources. The only public ones are for VIM2 and Tartiflette so that shouldn't be a lengthy exercise. Or you extract something from an Android image. Until you solve that piece of the puzzle building higher-level distro's (meta-meson, LE, Armbian, etc.) isn't going to be fruitful.

  • chewitt now you assigned me a new task ;) finding out about fip sources...

    Btw. Did you find any info wrt tartiflette? Maybe I should once try from desktop rather than from my mobile, the page looked quite deserted...

    I'm currently playing with meta-meson, still fighting, but eventually getting there as a starting point. My goal is to get the S912 up at least with a proper net enabled command line, to hook it up to a hdd and maybe a dvb-c dongle for my H3 box.

    I miss jernej reversing that crap on AML, as it's done on AW so that a proper mainline u-boot is all you would ever need, but he is more than busy with AW, that's why for me (=my current use case) the H3 is still the better SOC than the S912 :D

    Thanks to both of you for supporting us noobs besides all the other stuff :)

  • No x92 devices here but i do have a bunch of Sunvell T95 U and K pro's that I use for S912 development and they work ok using the q200 based dtb's and give me all the right peripherals. Currently i am building against a slightly modded LE Master as well as Chewitts Amlogic-master and other then some issues with playback loosing its position when jumping around in the video its watchable and wifi and bluetooth both work. I am sure it will get better in time.

    A few of us decided to commit our time to hevc so the S912 and the S812's now working on mainstream kernel have taken a back seat for the time being.

    As far as what Androids on the boxes i couldn't say as i never boot Android on anything so as a Developer i am kinda off the beaten track as i work under constraints that never care about Android as i always remove it and commit Linux or LE straight to internal storage.

    I still see the S912's a totally viable device if you not really looking for a SBC and want to cheap out so once all this crossover to mainstream and moving up in python stuff gets worked out i think it will still have decent place in the market based on its falling price.

    • Official Post

    lumpi I can't say much about Tartiflette until LibreComputer publish more themselves, but it's packaged for industrial use-cases and will also ship as an S905D device so it probably won't appeal to LE users. It's relevance will be that it's a device LibreComputer will want broad "out of box" upstream Linux and distro support for, and since they're one of the few entities that supports (funds) upstream work, that's ultimately good for anyone else with an S912 device.

    GitHub - chewitt/amlogic-boot-fip: Firmware Image Pacakge (FIP) sources used to sign Amlogic u-boot binaries in LibreELEC images <= has all the FIP sources that I've found, and the VIM2 sources seem to work on a number of the other S912 boards and box devices I have. Focus on learning how to build mainline u-boot from sources and then run through the Amlogic signing process to make a bootable firmware. The signing recipe is documented in u-boot sources, see u-boot/board/amlogic/q200 at master · u-boot/u-boot · GitHub