
On 07.01.21 13:35, Simon Glass wrote:
Hi Heinrich,
On Wed, 30 Dec 2020 at 10:07, Heinrich Schuchardt xypron.glpk@gmx.de wrote:
The UEFI Self Certification Test (SCT) checks the SetTime() service with the following steps:
- set date
- reset
- check date matches
To be compliant the sandbox should keep the offset to the host RTC during resets. The implementation uses the environment variable UBOOT_SB_TIME_OFFSET to persist the offset.
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de
arch/sandbox/cpu/os.c | 25 +++++++++++++++++++++++++ doc/arch/sandbox.rst | 7 +++++++ drivers/rtc/i2c_rtc_emul.c | 4 +++- include/os.h | 18 ++++++++++++++++++ 4 files changed, 53 insertions(+), 1 deletion(-)
Sandbox writes driver settings to a state file that can be read on start-up. Is that suitable here?
The sandbox only reads the state from file when using the -r and only writes the state to while when using the -w option.
This should be documented in https://u-boot.readthedocs.io/en/latest/arch/sandbox.html?highlight=sandbox#...
The RTC offset needs to be kept irrespective of command line arguments during resets. I could not find a simpler way then using an environment variable.
We could additionally persist the offset in the state file. Is this what you ask for? For my testing purposes I don't need it.
Best regards
Heinrich