H96 Pro+ S912 Standby mode

Hi,
ddr_size 0xc0000000 and loc_name gxm_q201_3g are undefined, look in v4_v6.c.
That is the reason.

Regards

@bumerc Right, this is missing. I will add it.
@TheChief79 Just set the aml_dt manual to ā€œgxm_q201_3gā€:

fw_setenv aml_dt gxm_q201_3g

Verify with:

fw_printenv aml_dt

And rebootā€¦

@TheChief79 In this binary 3G RAM and multi DTB should work!

Thank you, will check that later in the evening or after the weekend. But i think it will still crash, because i had never success with that alternative u-boots. Maybe there is a bug somewhere or maybe my device is broken. But with stock u-boot it works. Can something in u-boot crash the kernel?

Normaly u-boot loads the kernel. After this the crashes are kernel related. Because u-boot is doing nothing (suspended). When you power off or going to suspend you will leave the kernel and enter u-boot again.

Hello Portisch,

I am not familiar with embedded suspend and my U-Boot knowledge is outdated, but do you mean that some U-Boot code is running during suspend?

Then it may be possible to simulate something like RTC/ACPI WakeUp and resume when a recording is scheduled.

I know this is completely useless for this class of devices, but sound like fun =:-)

I will have a look at your fine patches in GitHub on weekend.

@Portisch

But i never touch the kernel, so i thought it could something RAM or CPU related. For Kodi i do nothing. It runs from SD card.
I just take the image from Freaktab (runs smooth without u-boot update) and replace u-boot in that image with the AMLogic Customization Tool and use the Burning Tool to upload that image.

Sure, u-boot is running when in suspend and/or power off state. Itā€™s running in an endless loop to check if a wakeup call is happen.
u-boot is including a wakeup timer already. A maximum of 4294967296ms should be possible. This is around 49 daysā€¦ But this feature is right now unused in the CoreELEC linux kernel.

I have done this also this way. I used the image: aml_7.1.2_s912_q9377-S912_mac-20180409.img
Exchanged the u-boot.bin from the image with the customization tool and burned it.
The methode with the second SD card is just fasterā€¦ :wink:

	unsigned int time_out = readl(AO_DEBUG_REG2);

It seems kernel should just put seconds to wakeup to AO_DEBUG_REG2 before suspend?

desired miliseconds / 100 == value of AO_DEBUG_REG2

I talked to @Ray and he may will implement this feature in future.
There have to be a an extra ā€œPower Down/Suspendā€ option in the Kodi power menu.

Thanks. iā€™ve tested you last u-boot from sdcard and it works.
MINIX bootlogo didnā€™t show, so i suposed that it works. But any of feature added to u-boot works.

Realy? Can you make a UART log of the u-boot booting? I thought this wonā€™t work because of the missing BL32 (signed image). You use Netflix and/or Amazon with the Widevine-DRM?

I had no time to test it again.
Iā€™m trying to build last version but my linux level is limited. Please, can u build new version from sources? i will tes t in sd card mode. Thanks.

Thanks a lot for your patches. Wake Up seem to work fine. Set 100 to AO_DEBUG_REG2 by

devmem 0xc81000a8 32 100

seems to sleep for 10s.

But at sleep time LED is off. How I can control LED status during suspend?

Thanks a lot

These patches sound promising, but links are not working and I cannot find corresponding commits in the U-Boot repo https://github.com/CoreELEC/u-boot/commits/khadas-vims-nougat

Thanks for any help

derknut

Both LEDs are off when you power down the box. On suspend the red led is on.

And your wake-up is correct with 100 = 100 * 100ms == 10000ms == 10s.

1 Like

iā€™m trying to build uboot following your wiki instrucctions, but always fail. Please, can u build new version with all new commits? i want to test in minix. iā€™m very frustated with hdmi cec (make invisible all others HDMI CEC Systems )

If you using a newer build than the last release use this config: cecconfig = cec3f,
Not anymore cec1f.

I donā€™t have time before end of next week to upload a new release.

Post your output when build fails.

Here is the log:. I dont undertsand the error because i can build coreelec without problems.

Regards

david@david:~/CoreELEC/build.CoreELEC-S912.arm-9.0-devel/u-boot$ make h96proplus_v2_2_defconfig
  HOSTCC  scripts/basic/fixdep
  GEN     ./Makefile
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
david@david:~/CoreELEC/build.CoreELEC-S912.arm-9.0-devel/u-boot$ make CROSS_COMPILE=aarch64-linux-gnu-
make[1]: aarch64-linux-gnu-gcc: Command not found
/bin/sh: 1: aarch64-linux-gnu-gcc: not found
dirname: missing operand
Try 'dirname --help' for more information.
  GEN     ./Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
  CHK     include/config.h
  UPD     include/config.h
  GEN     include/autoconf.mk
/bin/sh: 1: aarch64-linux-gnu-gcc: not found
../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

aarch64-linux-gnu-gcc: Command not found

Check your environment!