Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Sansa Clip+: How to patch the bootloader to the OF
« previous next »
  • Print
Pages: [1]

Author Topic: Sansa Clip+: How to patch the bootloader to the OF  (Read 2674 times)

Offline backhome2017

  • Member
  • *
  • Posts: 20
Sansa Clip+: How to patch the bootloader to the OF
« on: August 11, 2015, 03:07:57 PM »
I am just starting out with the developing instructions. As a test I was able to compile the rockbox files and create the .rockbox folder. I was wondering if there were instructions for making adjustments to the bootloader and then patching it to the original firmware binary to create and new firmware. Any help would be appreciated. THanks.
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Sansa Clip+: How to patch the bootloader to the OF
« Reply #1 on: August 11, 2015, 07:46:18 PM »
You can compile the bootloader like a normal build from the configure script and then use the manual install directions to flash it.

The bootloader on  AMS devices is very simple however. The only notable thing it does is present a bootloader USB mode.
Logged

Offline backhome2017

  • Member
  • *
  • Posts: 20
Re: Sansa Clip+: How to patch the bootloader to the OF
« Reply #2 on: August 12, 2015, 08:00:12 AM »
Thanks. I am new to this so I wanted to try something simple like changing which button is needed for the dual boot control (i.e. - change holding the left button for the Sansa OF to the right button) just to get use to the coding and the configuration script.
Logged

Offline gevaerts

  • Administrator
  • Member
  • *
  • Posts: 1053
Re: Sansa Clip+: How to patch the bootloader to the OF
« Reply #3 on: August 12, 2015, 08:55:16 AM »
Quote from: backhome2017 on August 12, 2015, 08:00:12 AM
Thanks. I am new to this so I wanted to try something simple like changing which button is needed for the dual boot control (i.e. - change holding the left button for the Sansa OF to the right button) just to get use to the coding and the configuration script.

That particular change happens to be the one that's not simple. Dualboot on ams sansas (such as the clip+) is implemented in assembler, very early in the boot process, and is the one bit that is more or less guaranteed to brick the device if you get it wrong.
Logged

Offline backhome2017

  • Member
  • *
  • Posts: 20
Re: Sansa Clip+: How to patch the bootloader to the OF
« Reply #4 on: August 12, 2015, 09:21:39 AM »
Hmmm, I guess I need to get use to the assembler coding but it seems that just changing the register that is being read would do it. Obviously, I am just starting and don't know the intricacies to this.
Logged

Offline gevaerts

  • Administrator
  • Member
  • *
  • Posts: 1053
Re: Sansa Clip+: How to patch the bootloader to the OF
« Reply #5 on: August 12, 2015, 09:34:55 AM »
Quote from: backhome2017 on August 12, 2015, 09:21:39 AM
Hmmm, I guess I need to get use to the assembler coding but it seems that just changing the register that is being read would do it. Obviously, I am just starting and don't know the intricacies to this.

That will be more or less it, yes, but if you get it wrong you can't boot the OF, which means you can't install new firmware any more, which means game over.
Logged

Offline backhome2017

  • Member
  • *
  • Posts: 20
Re: Sansa Clip+: How to patch the bootloader to the OF
« Reply #6 on: August 12, 2015, 10:18:49 AM »
Hmmm. So before I do something crazy, guide me a bit. If I edit the "dualboot.s" file so that for the clipplus instead of reading the GPIO C3 pin as high, it reads, say the GPIO A6 pin (Vol-), would this be the only change necessary to change the dualboot process?

Also, if I did happen to get it wrong and it cannot locate an OF anymore, could I boot the clipplus into "recovery" mode and use an image writer to flash an image and start all over again?? Or would the recovery mode option be dead also?
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Sansa Clip+: How to patch the bootloader to the OF
« Reply #7 on: August 14, 2015, 11:19:18 AM »
Quote from: backhome2017 on August 12, 2015, 10:18:49 AM
Also, if I did happen to get it wrong and it cannot locate an OF anymore, could I boot the clipplus into "recovery" mode and use an image writer to flash an image and start all over again?? Or would the recovery mode option be dead also?

There is no real recovery mode on the Clip+, so if you brick the player, the only thing you can try is taking it apart, shorting out the flash memory chip, and trying to coax it into booting to USB. 
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Sansa Clip+: How to patch the bootloader to the OF
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.073 seconds with 14 queries.