[oe] [PATCH] init-scripts: introduce DONTUSETIMESTAMP variable in bootmisc.sh

Petr Štetiar ynezz at true.cz
Wed Oct 6 17:54:44 UTC 2010


Koen Kooi <k.kooi at student.utwente.nl> [2010-10-06 19:30:55]:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 06-10-10 20:14, Petr Štetiar wrote:
> > This variable is useful on systems with battery backed RTC. Imagine, that the
> > board is shut down and then switched on after, for example three days.
> > Althought the value in RTC is correct, this scripts sets system time with the
> > wrong values.
> 
> So you shut it down at 20101003 and boot it at 20101006, that should
> give you roughly:
> 
> SYSTEMDATE=`date "+%Y%m%d"` -> 20101006
> TIMESTAMP=`cat /etc/timestamp | awk '{ print substr($0,9,4)
> substr($0,1,4);}'` -> 20101003
> 
> NEEDUPDATE=`expr \( $TIMESTAMP \> $SYSTEMDATE \)` -> 0
> 
> So why is your rtc having a date older than the shutdown date?

Well, who knows, now it works and I see now, that the patch is wrong
completly. Maybe it was connected to bbappend and following patches[1,2],
sometimes it happens, that the package isn't rebuild even if I -c clean it.
Thanks for the review, anyway. Removed the patch from the patchwork.

1. http://patchwork.openembedded.org/patch/3156
2. http://patchwork.openembedded.org/patch/3152

-- ynezz




More information about the Openembedded-devel mailing list