H96 Pro+ S912 Standby mode


#41

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

Regards


#42

@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…


#43

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


#44

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?


#45

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.


#46

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.


#47

@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.


#48

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:


#49
	unsigned int time_out = readl(AO_DEBUG_REG2);

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


#50

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.


#51

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.


#52

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?


#53

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.


#54

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


#55

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


#56

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.


#57

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 )


#58

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.


#59

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

#60

aarch64-linux-gnu-gcc: Command not found

Check your environment!