Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: X5 dual boot

X5 dual boot

From: RaeNye <raenye_at_netvision.net.il>
Date: Mon, 01 May 2006 00:42:45 +0200

Hi list,

I have a non-working X5 dual-boot patch and I'm trying to figure what's
wrong.

I rebased the RB bootloader and merged it into the OF.
I added a small routine that dispatches either RB or the OF based on whether
REC button is pressed or not.

The patched bootloader always boots RB since the PCF50606 write (during the
ADC scan) fails.

Pseudocode:

  int result = PCF50606_write_byte(0x2f, 0x80 | (5<<1) | 1); // ADCMUX=5
(ADCIN2)
  if (!result) // HERE IT ALWAYS FAILS
  {
    unsigned char tmp[2] = {0,0};
    while ( ! (tmp[1] & 0x80)) // ADCRDY
      PCF50606_read(0x30, tmp, 2);
    
    if (tmp[0] >= 0x7c && tmp[0] < 0x98)
      boot_original();
  }
  boot_rockbox();

I use the PCF50606 read/write routines copied to DRAM by the OF preloader
(the part on flash addr 0x0 to 0x10000).
The preloader uses them to check for low-batt, so they're functional.

Any ideas?

TIA,
R.
Received on 2006-04-30

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy