H96 Pro+ S912 Standby mode

i’ve installed.

New log:

david@david:~/CoreELEC/build.CoreELEC-S912.arm-9.0-devel/u-boot$ make CROSS_COMPILE=aarch64-linux-gnu-
  GEN     ./Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
  CHK     include/config.h
  GEN     include/autoconf.mk
In file included from ../include/linux/compiler.h:54:0,
                 from ../include/linux/byteorder/little_endian.h:12,
                 from ../arch/arm/include/asm/byteorder.h:29,
                 from ../include/compiler.h:125,
                 from ../include/image.h:19,
                 from ../include/common.h:82:
../include/linux/compiler-gcc.h:114:1: fatal error: linux/compiler-gcc7.h: No such file or directory
 #include gcc_header(__GNUC__)
 ^~~~
compilation terminated.
../scripts/Makefile.autoconf:64: recipe for target 'include/autoconf.mk' failed
make[3]: *** [include/autoconf.mk] Error 1
../Makefile:475: recipe for target 'silentoldconfig' failed
make[2]: *** [silentoldconfig] Error 1
make[1]: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'.  Stop.
Makefile:147: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
david@david:~/CoreELEC/build.CoreELEC-S912.arm-9.0-devel/u-boot$

I use this configuration without any problems:

Maybe wrong GCC version?

I’ve followed the khadas guide and I’ve been able to build u-boot BUT only on ubuntu 14, but not in ubuntu 18 (i’ve installed the same thing) I’m tootally noob in linux and i only know to follow guidlines :stuck_out_tongue_winking_eye:

Unfortunately, the u-boot does not seem to work.
I have loaded it in the sd and when I boot it appears the minix logo.
You were right and it seems that you can not add an external u-boot to the minix.
If i try to load it in the eMMC memory of the minix, is it possible to break it? Could it be recovered?

First you will need a backup of your system. Or a original android ROM file. With the amlogic SD card recovery tool you can go back to android including uboot.

The uboot works because the minix logo has been loaded. It just needs to be put in update mode.

reboot update

or in uboot terminal

run update

Thank to all!!
I have a lot of confusion about how to update the uboot in the eMMC.
can you please explain how to update the uboot in the minix to test it?

Thank you.

Sorry. i’ve followed your guide, but after dd if=/dev/zero of=/dev/bootloader bs=4M count=1 && sync i couldn’t boot again to CoreELEC. I could boot from sd or usb. Black screen!!!

This command delete uboot from the MMC.
Put in your second SD card. Powerr off, push the reset button and keep pushing while power on. Wait until the CoreELEC logo appears. Then you are booting from SD card. Remember that the SD card needs the u-boot.bin.sd.bin on sector 0 of the SD card. Then you can write the new u-boot.bin to the emmc.

[quote] * Boot as normal your CoreELEC.

  • Start a SSH session to delete the actual used u-boot.bin at the eMMC.
    dd if=/dev/zero of=/dev/bootloader bs=4M count=1 && sync
    dd if=/flash/u-boot.bin of=/dev/bootloader bs=512 seek=1 && sync
    These will delete the current u-boot.bin.[/quote]
    @Portisch
    In this step, the eMMC bootloader is deleted and at the same time the new u-boot.bin is pushed back into the eMMC, which can basically lead to a bootloop (otherwise the use of the secondary SD card would make no sense). When booting from the secondary SD card, the reset button does not need to be pressed because the environment from the old bootloader (for booting from the SD card or USB media) is still in the partition “env”.
    The further steps would then have been no longer necessary because the upgrade process would have already been completed with this step.

Hey.
I follow the @Portisch guide, but i only did this command if=/dev/zero of=/dev/bootloader bs=4M count=1 && sync. Then i rebooted and Minix didn’t start again. I plugged the SD, but it didn’t start from SD (only a black screen). I also build custom Android ROM integrating uboot, but USB Burning Tool said me “UBOOT wrong code” after finish and it didn’t boot. I had to recover minix writting again Android ROM from windows.

I think that in MiniX is not possible to change uboot. Regards.

Did you write the u-boot.bin.sd.bin to the secondary SD card and put it in the box before deleting the old bootloader and system reboot? Can you do a boot log? One of the Freaktab users wrote that his minix box works with the custom Android ROM. (Apparently the original bootloader was used).:face_with_raised_eyebrow:

I changed the “shutdown.sh” of “TVHeadend/PVR Recording & Power Manager”:

Calculate wake up time:

startdate=$1
aktdate=date +%s
delta=$((($startdate-$aktdate)*10))

Replace all RTC device accesses with:

devmem 0xc81000a8 32 $delta

This works fine if power off with remote, but not with timer end. This I have to check with add on.

Thanks a lot to Portisch for the fine patches and very useful information.

Hello,
at U-Boot I found this code:

  if (irq[IRQ_ETH_PHY] == IRQ_ETH_PHY_NUM) {
  	irq[IRQ_ETH_PHY] = 0xFFFFFFFF;
  	exit_reason = ETH_PHY_WAKEUP;
  }

Is there any way to “Wake on LAN”?

Thanks

There is a Kodi addon called advanced wake on LAN

I use a phone app.

Obviously, WOL won’t work with wifi

I never tested it. But the feature is included…

Thanks @Portisch @bumerc. I finally could write u-boot into eMMC Minix U9-H with succes!!! and it is working perfectly! i can wake up minix with HDMI CEC and now in suspend mode all other HDMI CEC Devices are visible for TV!!
Great work!

I followed @Portisch guide in wiki (but modifiing one Command, (to delete actual u-boot this is the command * delete currently used u-boot: dd if=/dev/zero of=/dev/bootloader ) After delete u-boot, with a sd-card inserten, i rebooted the device with this command reboot update. I could boot into sdcard mode and write again u-boot into emmc following wiki guide!

Thanks again!

2 Likes

This add on seems to wake on an other machine, e.g. NAS. Is it also useful to wake up the Kodi machine itself where it is installed?

Is there a special U-Boot environment necessary? “wakeonlan” with the MAC stored in U-Boot env. shows no effect.

Thanks for any advice

probably not. I got a wake on lan app for my phone, which could wake up a device

I found this here:

     "wol_init="\
        "kbi init;"\
        "kbi powerstate;"\
        "kbi trigger wol r;"\
        "setenv bootargs ${bootargs} wol_enable=${wol_enable};"\
        "if test ${power_state} = 1; then "\
        "kbi trigger wol w 1;"\
        "gpio set GPIODV_2;"\
        "fi;"\
        "\0"\

“run wol_init;”

So try to add these commands in the board config header file like it is in kvim2.h.
I did not tested it.