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:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Third Party
| |-+  Repairing and Upgrading Rockbox Capable Players
| | |-+  ARM Binaries, .sansa format?
« previous next »
  • Print
Pages: [1]

Author Topic: ARM Binaries, .sansa format?  (Read 1503 times)

Offline lightrays

  • Member
  • *
  • Posts: 3
ARM Binaries, .sansa format?
« on: August 23, 2012, 06:19:20 PM »
Hello. I'm new here. I used rockbox on one of my old players and recently bought a sansa clip zip to mess around with. I then bought another one after discovering a particular capability, with the intent to develop for the clip zip (in the sense of it being a ARM board). Therefore, I have a few quick questions, which I don't mind being pointed elsewhere with.

The sansa clip zip manual mentions a ".sansa" file which contains an executable. I briefly compared the .bin to the .sansa. The header is different but I'm not good at reverse engineering. Can anyone explain what this header is, maybe the format and how to transform ARM code into this "container" format?

Next, I'm using rockbox as a sort of jumping ground. I have done ARM development before. Is there any way to flash a firmware once it's stable enough, overwriting the sansa code, or is it Read-Only? Obviously this is a concern.

I read the wiki, which linked to a (roughly) 130 page forum topic. I really don't have the patience to comb through something so long with (plenty) dead ends. So I'm open to being directed to the important posts if someone doesn't mind.

I dunno who can answer this, and if it isn't the right forum, then feel free to move it. ;D
Logged

Offline torne

  • Developer
  • Member
  • *
  • Posts: 994
  • arf arf
Re: ARM Binaries, .sansa format?
« Reply #1 on: August 23, 2012, 06:33:49 PM »
Quote from: lightrays on August 23, 2012, 06:19:20 PM
The sansa clip zip manual mentions a ".sansa" file which contains an executable. I briefly compared the .bin to the .sansa. The header is different but I'm not good at reverse engineering. Can anyone explain what this header is, maybe the format and how to transform ARM code into this "container" format?
It's just a short header pasted onto the front of a raw binary file, with a model number and checksum. It's just our invention (the same format we use for all our binaries) and is only for our bootloader, nothing to do with the Sansa firmware. Read the source for the "scramble" tool in our tree (it's called that for historical reasons, it doesn't actually scramble anything on most devices, just adds the header). You can just use our tool to produce it.

Quote
Next, I'm using rockbox as a sort of jumping ground. I have done ARM development before. Is there any way to flash a firmware once it's stable enough, overwriting the sansa code, or is it Read-Only? Obviously this is a concern.
You can, yes; just call the file the right thing with the right structure and the sansa firmware will flash it itself. This is how the Rockbox bootloader installation works; we paste a copy of our bootloader onto the original firmware and modify the startup code slightly to jump to our dual-boot stub first (jumping back to the original firmware if a given button is held). I'd suggest you simply use our bootloader; we've already tested it extensively and it leaves a reliable way to get back to USB mass storage mode if you screw something up by booting the original firmware.
Logged
some kind of ARM guy. ipodvideo/gigabeat-s/h120/clipv2. to save time let's assume i know everything.

Offline lightrays

  • Member
  • *
  • Posts: 3
Re: ARM Binaries, .sansa format?
« Reply #2 on: August 23, 2012, 06:40:47 PM »
Thanks for answering my questions. That was quick!  :P

So I can basically just replace the rockbox binary with whatever I want to launch?

...I didn't suspect it would be so easy. ;D
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: ARM Binaries, .sansa format?
« Reply #3 on: August 23, 2012, 07:07:27 PM »
FWIW, I recommend using our main function or maybe our plugin system for this.  That way you can use our drivers for things like reading buttons or mass storage. 
Logged

Offline lightrays

  • Member
  • *
  • Posts: 3
Re: ARM Binaries, .sansa format?
« Reply #4 on: August 23, 2012, 07:12:00 PM »
As much as I'd love to, In the end I'm planning to use the MIT license. The GPL requires linked code, be well, GPL. I'll settle for implementing it myself. :D Plus, from what I've seen, all the rockbox code is pretty tightly integrated. And when it comes to systems development, I like to reinvent the wheel. (Yes, I know I'm crazy.)
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Third Party
| |-+  Repairing and Upgrading Rockbox Capable Players
| | |-+  ARM Binaries, .sansa format?
 

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

Page created in 0.075 seconds with 17 queries.