Is there a way to set the date to RTC value when debian is booted?
On Android, time is maintained, but not on debian.
Should I use fake-hwclock?
file : pm8916.dtsi
&spmi_bus {
pm8916_0: pm8916@0 {
compatible = “qcom,pm8916”, “qcom,spmi-pmic”;
reg = <0x0 SPMI_USID>;
#address-cells = <1>;
#size-cells = <0>;rtc@6000 { compatible = "qcom,pm8941-rtc"; reg = <0x6000>; reg-names = "rtc", "alarm"; interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>; };
file : .config
CONFIG_RTC_DRV_PM8XXX=y
CONFIG_RTC_HCTOSYS=y
CONFIG_RTC_HCTOSYS_DEVICE=“rtc0”
CONFIG_RTC_SYSTOHC=y
CONFIG_RTC_SYSTOHC_DEVICE=“rtc0”
terminal :
root@linaro-alip:~# hwclock
1970-01-01 10:10:10.345815+09:00
root@linaro-alip:~# hwclock -w
hwclock: ioctl(RTC_SET_TIME) to /dev/rtc0 to set the time failed: Permission denied
root@linaro-alip:~#