I volunteered to try to resurrect a bricked OLPC laptop for the computer science department. The power LED would turn on, but the screen never turned on, not even the backlight. Online research led me to believe the source of the problem was an old firmware and a dead real-time clock (RTC) battery.
Apparently, this happens only with XO-1 models with very old firmware, Q2D05 or Q2D06. The RTC chip has a “coin cell” backup battery (ML1220) that powers the RTC when the AC and main battery are not present, and this battery can die if the laptop is without power for an extended period of time. When the RTC chip loses all power, the laptop bricks.
Objective 1: Resetting the RTC.
Objective 2: Updating the Firmware.
To reset the RTC on the dead XO, I had to connect to a special serial port located on the motherboard. This port was not accessible except by disassembling the laptop. While the motherboard was exposed, I also replaced the RTC battery.
I took apart the XO laptop, revealing the motherboard. The motherboard did not need to be removed, so the display remained connected.
I replaced the dead RTC battery with a new 1220 battery that I bought at a nearby pharmacy for $1.99. This battery is standard for many calculators and watches.
On the motherboard, there was a special serial port, J1, located near the wireless module. Miraculously, I was able to find a connector of the right size from some other electronics, and I connected it to J1.
The voltage levels from J1 were standard TTL levels: 0.0 V for ZERO bits and 3.3 V for ONE bits. The voltage levels on my PC serial port, however, were standard RS-232 levels: -6.0 V for ONE bits and 6.0 V for ZERO bits. I needed to build an adapter to match these signals.
I used a MAX232CPE IC to convert the signals. The MAX232 is a dual driver/reciever that includes a capacitive voltage generator to supply EIA-232 voltage levels from a single 5 V supply. The “receive” ends flip and scale down voltages from RS-232 to TTL. The “transmit” ends flip and scale up voltages from TTL to RS-232.
To power the MAX232, I used the DTR pin from the PC serial port. The final configuration is shown below.
With this adapter in place, I was able to communicate with the XO using HyperTerminal with the following serial port settings:
Setting | Value |
---|---|
Baud Rate | 115200 |
Data Bits | 8 |
Parity | None |
Stop Bit | 1 |
Flow Control | None |
When I powered on the XO, it sent the following “page fault” message via J1, followed by a “ok” prompt.
Forthmacs Type 'i' to interrupt stand-init sequence First stand-init: Exceptions CIF DHCP init memory node gpio Probing memory MMU Reclaim dictionary PCI host bridge ISA RTC CPU nodes CMOS Null-NVRAM board revision Date to EC Wireless reset PCI properties Manufacturing data USB setup Suspend/resume wp Century Init SHA-1 variables Page Fault ok
I entered the following commands to reset the date and time.
ok select /rtc ok decimal ok 00 30 18 25 06 2010 set-time
The last command indicated 6:30 pm on July 25, 2010.
After executing these commands, I restarted the XO, and the operating system booted successfully.
To prevent the possibility of an invalid RTC from bricking the XO again, its firmware needed to be updated. The XO Open-Firmware Repository provides stable releases as ZIP files, and I downloaded the latest version, Q2D14, to a USB flash drive.
I saved the downloaded file to “/boot/bootfw.zip” on the flash drive. Then I powered off the XO, ensured it was plugged in, and restarted the laptop. Loosing power during the firmware update could have caused the XO brick. The following screen appeared as its firmware was updated.
After the firmware was updated, I also updated the operating system. To do so, I first connected to the internet, opened the Terminal Activity, and executed the following commands.
su - olpc-update 802
The last command indicated a build number of 802. The lastest build number can be found on the OLPC Update page.
After the operating system was updated, the laptop restarted itself. At this point, all applications on the laptop were lost. I checked for software updates and re-installed all of the available applications.
With the updated firmware, the laptop should continue to boot even when the RTC has become invalid due to a loss of power. To verify this, I performed the following test.
I unpluged the laptop AC charger, removed the regular XO battery from the underside of the laptop, removed the RTC battery (pretending it had died), waited for a couple of minutes, repowered the laptop with the AC charger, and attempted to boot into the operating system. As expected, the following screen appeared indicating the system time and date had been lost. But after this screen, the laptop completed booting successfully.