Remote power trouble

  • turn on is now fixed:)

    h96pro+_remote_power_on_log.txt


    Small installation instructions directly from the Linux LE


    Download u-boot.bin and put it in the root directory ( /flasch ).

    Make an ssh connection and enter the following commands one after the other:


    1. Permission to write to this directory

    Code
    1. mount -o rw,remount /flash


    2. We make a backup copy of the android system -> recovery.img + dtb.img + bootloader (u-boot)

    Code
    1. dd if=/dev/recovery bs=64k conv=sync,noerror | gzip > /flash/recovery_orig.img.gz
    2. dd if=/dev/dtb | gzip > /flash/dtb_orig.img.gz
    3. dd if=/dev/bootloader bs=64k conv=sync,noerror | gzip > /flash/u-boot_orig.bin.gz


    3.Emptying the old bootloader from emmc and writing a new one



    4. full system reboot

    Code
    1. reboot

    enjoy


    Download

    EDIT: I ask you to wait a little while installing the bootloader, I'll write another guide to installing it.

    Edited once, last by bumerc ().

  • That sounds great!

    If I understand your installation instruction correct, than will this work only for users that boot LE from internal.

    But was is with users that boot LE from SD-card?

    Could You get please also a installation instruction to install the "uboot.bin.sd.bin"?


    Paul

    Alfawise H96pro+ with S912 and 2/16GB

    Edited once, last by Paul69 ().

  • thanks a lot, you are awesome!



  • This installation instruction applies to both methods. U-boot.bin.sd.bin is mostly used for testing purposes only, so you do not have to delete the internal bootloader.

    Also it can be used if you have broken internal emmc or nand.. етс.

    u-boot.bin.sd.bin is installed starting with a zero offset in the memory space of the SD card that is not visible in userspace.


    You do not need to install it.


    At the moment, you still use the bootloader installed by the manufacturer of your device into the internal flash. When starting from a sd card or usb, this bootloader reads aml_autoscript from the first partition (mounted as /flash) and executes it. Having received the necessary data to start the kernel + dtb, the loader starts the LE kernel and passes control to it. The kernel in turn launches the LE system.

  • At the moment, you still use the bootloader installed by the manufacturer of your device into the internal flash. When starting from a sd card or usb, this bootloader reads aml_autoscript from the first partition (mounted as /flash) and executes it. Having received the necessary data to start the kernel + dtb, the loader starts the LE kernel and passes control to it. The kernel in turn launches the LE system.

    I've seen You have updated the install description at Your Post #109.


    So I have last questions:

    1. Is pt. 2 necessary for users that only use to boot LE from SD-card?
    2. Shall I the downloaded file "u-boot_h96pro+_fixed_power_on.zip" directly unzipped copy to the root ( /flash ) on SD-card?
      Or have I to unzipped the file and only copy the "u-boot.bin.sd.bin" to root?


    Paul

    Alfawise H96pro+ with S912 and 2/16GB

  • @bumerc

    Your u-boot.bin can be used also on Alfawise H96 pro + with Green PCB (DDR4) or is compiled only for DDR3 at 800Mhz?

    Thanks for your guide!!

    No, it is configured and compiled only for devices with LPDDR3 800Mhz, DDR auto-detection is disabled. Can you an make a photo of your DDR memory? Or tell me the exact data of it

  • No, it is configured and compiled only for devices with LPDDR3 800Mhz, DDR auto-detection is disabled. Can you an make a photo of your DDR memory? Or tell me the exact data of it

    Ok, ram chip is a SpecTek "PPE09-093 DG" -> SpecTek DRAM Component Detail

    on their site is rated as

    Clock Rate 1067MHZ

    Data Rate DDR4-2133MHZ


    These are some photos of "Green" board:

  • bumerc great job, thanks! my box has miraculously come back to life so I will give it a go. Would you mind repeating the instructions as an idiot-proof step-by-step guide for those who run LE from SD card, please?


    Also is this a permanent fix or does the process need to be repeated after each LE version reinstall? Or after say an Android ROM change?

    H96 Pro+ CZ-S32-V5 BLUE

  • gulp79

    I will compile the test version, you will need to test with the SD card, connecting your device to the computer through uart and serial console


    tyrol_gangster

    It is a permanent fix.

    I updated u-boot binary, added support for gxm_q201_3g in multi_dtb format, otherwise the original Android OS firmware will not boot. I will make a special LE image for installation on a separate SD card (2), then you need to start the system from the SD card (1) or emmc, execute the command to destroy the original bootloader, pull out the SD card (1) and insert the SD card (2) , after reboot your device will automatically start from the bootloader installed on the cd card (2) (u-boot.bin.sd.bin) and you can easily install the new u-boot.bin

    (I integrate it into the LE image) to emmc. Details later.

  • gulp79

    I will compile the test version, you will need to test with the SD card, connecting your device to the computer through uart and serial console

    Ok, i think i can find correct pins for Gnd TX Rx and Vcc and connect to UART (Pins on board are not marked, but with a multimeter i can find them).

    Bwt, if something goes bad, there is a procedure to revert to backupped u-boot?

    Is not a big problem if i brick the unit, but just to know.

  • How To installing u-boot.bin to internal memory (eMMC)


    For better understanding:

    sdcard1 = external storage, contains the LE firmware that you are currently using

    sdcard2 = external storage, used to install the emergency firmware LE and write the bootloader to emmc


    PART I

    Installing the emergency system LE to sdcard2


    # Linux

    Code
    1. gunzip -c LibreELEC-S912.arm-8.90.6-h96pp-emergency-sdcard.img.tar.gz | dd of=/dev/sdX bs=4M conv=sync,noerror

    # Windows

    try this guide


    Download LibreELEC-S912.arm-8.90.6-h96pp-emergency-sdcard.img.tar.gz


    PART II


    1.

    Run the system with sdcard1 or emmc.

    Connect to your Box with SSH.


    2.

    In order to run the emergency system LE (u-boot.bin.sd.bin -> kernel LE -> SYSTEM) from the SD card, you need to change the boot sequence.

    You can do this in many ways - destroy the eMMC-MBR + Bootloader, make a short circuit while holding the DAT0 <=> DAT1 pins directly on the eMMC chip, etc.

    I will consider the first option, since it is available for less experienced users.


    We execute commands one by one, please do not confuse the order of execution!


    # set default environment

    Code
    1. dd if=/dev/zero of=/dev/env bs=8M count=1 && sync

    # destruction of the original bootloader

    Code
    1. dd if=/dev/zero of=/dev/bootloader

    # At this point your box will hang, do not be afraid -> unplug the power adapter from the socket -> remove the SD card1 and insert the SD card2 -> plug the power adapter into the socket and wait until the booting process of the emergency system is completed.


    3.

    (This step is optional and only necessary for a backup) Connect To Your Box with SSH

    # Set Permission to write into /flash

    Code
    1. mount -o rw,remount /flash

    # (optional) We make a backup copy of the android system -> recovery.img + dtb.img

    Code
    1. dd if=/dev/dtb | gzip > /flash/dtb_orig.img.gz
    2. dd if=/dev/recovery bs=64k conv=sync,noerror | gzip > /flash/recovery_orig.img.gz


    4.

    # write new u-boot.bin to eMMC

    Code
    1. dd if=/flash/u-boot.bin of=/dev/bootloader bs=512 seek=1 && sync


    5.

    Turn off the box, remove sdcard2 from the card reader and insert sdcard1 again.

    Turn on and enjoy!


    EDIT:

    I have updated the u-boot binary

    -Added support for RGMII interface, since all versions of the X96Pro + boards use the H5007NL 1000BASE-T module

    -For the correct functioning of the network connection, you must use the gxm_q201_3g_gbit_phy.dtb or gxm_q200_3g.dtb file


    u-boot update guide

    1. Go through the installation instructions

    2. Before you write u-boot.bin to the emmc memory, replace the dtb.img file with gxm_q201_3g_gbit_phy.dtb or gxm_q200_3g.dtb in the / flash directory and rename it dtb.img again. Then replace existing u-boot.bin by updating version and follow the installation instructions.


    download

    updated [email protected]

    Edited 5 times, last by bumerc: updatet link ().

  • Good luck to the brave!

    It seems that a lot has been done here,

    but is there available such an u-boot component for the H96Pro+ with green v2.2 PCB?

  • Ok, i think i can find correct pins for Gnd TX Rx and Vcc and connect to UART (Pins on board are not marked, but with a multimeter i can find them).

    Numbering of the contact holes from 1 to 4, starting from GND -> the only contact with a square

    Pin-out:

    1. GND

    2. TX

    3. RX

    4. 3.3V VCC (He's not needed)

    Quote

    Bwt, if something goes bad, there is a procedure to revert to backupped u-boot?

    Backup

    Code
    1. dd if=/dev/bootloader bs=64k conv=sync,noerror | gzip > /flash/u-boot_orig.bin.gz

    Restore

    Code
    1. gunzip > /flash/u-boot_orig.bin.gz | dd of=/dev/bootloader bs=4M count=1 conv=sync,noerror
  • gulp79

    yuwT4IYj3TrgBU

    uart

    8mQwqj9s3TrgBe

    upgrade mode

    i've just done a boot recording UART log.

    DDR seems running at 792Mhz...strange....


    "DDR4 chl: Rank0+1 @ 792MHz - PASS"


    Here the boot log (Libreelec SD) captured on serial console:


    Do you think i can use your u-boot.bin compiled for ddr @1067Mhz?