I'm still having problems with the date being stored in the SheevaPlug after a power cycle (unplugging, waiting 10 seconds, and re-plugging it).
The Marvell U-Boot help provides:
Marvell>> ? date
date [MMDDhhmm[[CC]YY][.ss]]
date reset
- without arguments: print date & time
- with numeric argument: set the system date & time
- with 'reset' argument: reset the RTC
So, today, I did the following:
CPU : Marvell Feroceon (Rev 1)
Streaming disabled
Write allocate disabled
USB 0: host mode
PEX 0: interface detected no Link.
Net: egiga0 [PRIME], egiga1
Hit any key to stop autoboot: 0
Marvell>> date
Date: 2085-01-11 (Thursday) Time: 13:33:12
Marvell>> date
Date: 2085-01-11 (Thursday) Time: 13:34:07
Marvell>> echo This date is clearly wrong: 2095??!!
This date is clearly wrong: 2095??!!
Marvell>> ? date
date [MMDDhhmm[[CC]YY][.ss]]
date reset
- without arguments: print date & time
- with numeric argument: set the system date & time
- with 'reset' argument: reset the RTC
Marvell>> date 050518242009.00
Date: 2009-05-05 (Tuesday) Time: 18:24:00
Marvell>> date
Date: 2009-05-05 (Tuesday) Time: 18:24:05
Marvell>> date reset
Reset RTC...
Date: 2009-05-05 (Tuesday) Time: 18:24:33
Marvell>> date
Date: 2009-05-05 (Tuesday) Time: 18:24:38
Marvell>> echo let's test what happenes on a soft "reset"
lets test what happenes on a soft "reset"
Marvell>> reset
__ __ _ _
| \/ | __ _ _ ____ _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| | | | (_| | | \ V / __/ | |
|_| |_|\__,_|_| \_/ \___|_|_|
_ _ ____ _
| | | | | __ ) ___ ___ | |_
| | | |___| _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
\___/ |____/ \___/ \___/ \__|
** MARVELL BOARD: SHEEVA PLUG LE
U-Boot 1.1.4 (Mar 16 2009 - 18:03:32) Marvell version: 3.4.16
U-Boot code: 00600000 -> 0067FFF0 BSS: -> 006CEE80
Soc: 88F6281 A0 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz
DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000 size 256MB
DRAM CS[1] base 0x10000000 size 256MB
DRAM Total size 512MB 16bit width
Flash: 0 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:512 MB
CPU : Marvell Feroceon (Rev 1)
Streaming disabled
Write allocate disabled
USB 0: host mode
PEX 0: interface detected no Link.
Net: egiga0 [PRIME], egiga1
Hit any key to stop autoboot: 0
Marvell>> date
Date: 2009-05-05 (Tuesday) Time: 18:25:17
Marvell>> echo This is fine... looks like the RTC has a good date...
This is fine... looks like the RTC has a good date...
Marvell>> echo But wait, there's more... I'm going to unplug the electricity!
But wait, theres more... Im going to unplug the electricity!
Marvell>>
I don't trust "resets" on electrical equipment, and therefore I unplugged the plug, waited 10 seconds, unplugged the network cable and the USB serial cable to my laptop and waited 30 seconds and then plugged the cables back in and then plugged the power cord back in and reconnected via PuTTY in the serial port.
512 MB
CPU : Marvell Feroceon (Rev 1)
Streaming disabled
Write allocate disabled
USB 0: host mode
PEX 0: interface detected no Link.
Net: egiga0 [PRIME], egiga1
Hit any key to stop autoboot: 0
Marvell>> date
Date: 2085-01-11 (Thursday) Time: 13:33:04
Marvell>> echo Darn! the SheevaPlug's RTC is off
Darn! the SheevaPlugs RTC is off
Marvell>>
What gives?? I believe I'm using the correct data structure in the "date" command as evidenced by the display of the date values thereafter. It is the power down cycle that causes the values to go awry.