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
|-+  Installation / Removal
| |-+  Manual Installation
| | |-+  Sandisk - Installation/Removal
| | | |-+  E200R Automatic Bootloader and Rockbox Installer
« previous next »
  • Print
Pages: 1 2 3 [4] 5

Author Topic: E200R Automatic Bootloader and Rockbox Installer  (Read 19624 times)

Offline e280ruser

  • Member
  • *
  • Posts: 21
Re: E200R Automatic Bootloader and Rockbox Installer
« Reply #45 on: September 14, 2007, 03:00:15 AM »
I've been doing a lot of thinking and googling, and I've begun to work on making a really small live linux "distro", designed to be an installer for the e280r.  I've started to modify/slim down Damn Small Linux.  It is a 50MB distrubution, which can run on just about anything.  I figure, I can slim that down to around 25MB (without a GUI), or somewhere in that ballpark.  

People would download the iso file, burn it to a cd, reboot, and follow the instructions.  It may be a bit different than other methods of installing (GUI windows installer), but it could get the job done very well, and I believe I can make it very easy, with some suggestions.

Edit Would it be possible to run this live cd with all the functionality in QEMU?  I know that it won't work in vmware, because the usb device is 'handed' to the virtual machine by windows, but am unable to find this information on QEMU.  If anyone knows this could save me a lot of time.  Thanks.  /Edit

Please give me some ideas as to what would be easy for most people to install Rockbox with.  I prefer a CLI, and consider a GUI hard and inefficient.  Should I go with a window manager, or CLI with prompts (Kind of like my Bash script).

I'll be posting back with updates...
« Last Edit: September 14, 2007, 03:10:55 AM by e280ruser »
Logged

Offline Bagder

  • Member
  • *
  • Posts: 1452
    • Daniel's site
Re: E200R Automatic Bootloader and Rockbox Installer
« Reply #46 on: September 14, 2007, 03:08:28 AM »
I think CLI only is fine, as it will keep the file size down by quite a bit.

But then of course I'm not the typical user of such an installer...
Logged

Offline Sup3rkirby

  • Member
  • *
  • Posts: 21
    • Work in Progress
Re: E200R Automatic Bootloader and Rockbox Installer
« Reply #47 on: September 14, 2007, 01:24:49 PM »
Well, I will first promise you nothing.

Now, just for the sake of getting the proper information, could someone tell me some details on the problems with the windows bootloader.

Can anyone tell me how the bootloader looks for the device, and how it finds the standard sansa, and why it does not detect the rhapsody version.  Also, linux works with usb differently(allowing it to detect the partition on the rhapsody players), so I would like to know the basics of what is really different.

I am still an amature programmer, but I am a windows programmer that is willing to look into this situation and give any help I can.  So I am just trying to get the details so I know what I'm trying to fix(specifically).
Logged
"Given billions of tries, could a spilled bottle of ink ever fall into the words of Shakespere?"

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: E200R Automatic Bootloader and Rockbox Installer
« Reply #48 on: September 14, 2007, 01:30:53 PM »
First off, there is no "windows bootloader." The bootloader is what is installed on the player, not the program that installs it, nor the tool we use to access the player.

Secondly, we don't access a hidden partition on the e200R. Unlike the e200, we don't see a hidden partition available at all from the computer's side. What we do is start the player in Manufacturer mode, which allows us to talk with it through the USB port and do certain things. In this case we replace the ROM with our own ROM, something we don't need to do on the normal e200 players ever.

In windows we haven't been able to talk properly to the player in this special mode because of the USB differences.
Logged

Offline squeeeezy

  • Member
  • *
  • Posts: 2
Re: E200R Automatic Bootloader and Rockbox Installer
« Reply #49 on: September 14, 2007, 08:03:30 PM »
so does this mean i cant load rockbox on my sansa cuz im using windows
Logged

Offline scorche

  • Administrator
  • Member
  • *
  • Posts: 666
Re: E200R Automatic Bootloader and Rockbox Installer
« Reply #50 on: September 14, 2007, 08:06:03 PM »
Have you read the install instructions/this thread?
Logged

zajacattack

  • Guest
Re: E200R Automatic Bootloader and Rockbox Installer
« Reply #51 on: September 15, 2007, 09:07:50 PM »
OK, as I stated here (http://forums.rockbox.org/index.php?topic=12712.0), I successfully have Rockbox running on my e280R, and I did it by getting e200tool to work in Windows; however, getting libusb-win32 to create the right drivers and recognize the Sansa was a pain. Now, I am willing to test out any installer that might make this easier, and the installer can use libusb-win32, the trick is to NOT install the filter drivers. I unzipped the DEVICE driver to my desktop and had inf-wizard create a driver for the Sansa in manufacturing mode, then e200tool could recognize it (I did have to rebuild e200tool with "usb_set_configuration(ud, 1);" added before the line "usb_claim_interface(ud, E200_INTERFACE);"). Anyways, I am willing to test any auto-installers seeing as most Rockbox devs don't have an e200R.
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: E200R Automatic Bootloader and Rockbox Installer
« Reply #52 on: September 15, 2007, 09:24:07 PM »
can you upload the .inf which libusb-wine32 created that worked?
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

zajacattack

  • Guest
Re: E200R Automatic Bootloader and Rockbox Installer
« Reply #53 on: September 15, 2007, 09:32:26 PM »
Sure, but just remember this, the Manufacturing Mode 1 driver must be installed when the Sansa is connected. Then, running "e200tool recover BL_SD_boardSupportSD.rom" will fail, but make the device 0666:E200. Then, Manufacturing Mode 2 driver must be installed. Then, the Sansa must be disconnected turned off, and reconnected in manufacturing mode. Then, "e200tool recover BL_SD_boardSupportSD.rom" will succeed, but the device will be given to libusb. So, using device manger, Manufacturing Mode 1 driver must be uninstalled and Windows must install its own driver (scan for changes), then you can upload the patched BL.

P.S. I uploaded them as .txt files. Just rename them to .inf files.

EDIT: Sorry, wrong drivers, these are the right ones. The 0781-0720 is the one you will want, the 0666-E200 is only if you use e200tool.
* 0666-E200.txt (3.45 kB - downloaded 131 times.)
* 0781-0720.txt (3.51 kB - downloaded 259 times.)
« Last Edit: September 16, 2007, 09:07:49 PM by zajacattack »
Logged

Offline Sup3rkirby

  • Member
  • *
  • Posts: 21
    • Work in Progress
Re: E200R Automatic Bootloader and Rockbox Installer
« Reply #54 on: September 15, 2007, 11:07:41 PM »
Quote from: Llorean on September 14, 2007, 01:30:53 PM
First off, there is no "windows bootloader." The bootloader is what is installed on the player, not the program that installs it, nor the tool we use to access the player.

Secondly, we don't access a hidden partition on the e200R. Unlike the e200, we don't see a hidden partition available at all from the computer's side. What we do is start the player in Manufacturer mode, which allows us to talk with it through the USB port and do certain things. In this case we replace the ROM with our own ROM, something we don't need to do on the normal e200 players ever.

In windows we haven't been able to talk properly to the player in this special mode because of the USB differences.
*Sigh*
I really do hate post like this.

I will first admit, I incorrectly referenced the 'bootloader', as I was thinking of the sansapatcher program.

But as far as anything related to a 'hidden partition'.  Please refer to an earlier post made by zajacattack:
Quote from: zajacattack on September 09, 2007, 11:21:34 PM
Well, what if we could directly write to the hidden partition on the R series? Then, the program could just overwrite the BL and firmware automatically instead of requiring e200tool. By the way, I can't figure out to compile e200tool in cygwin. Could someone post the latest version compiled in cygwin? I want to try something...

If you are not accessing the 'hidden partition', then what is he talking about. No comments were made to correct him.


I was simply offering help.  But to help I would need information and not criticism.  This topic seems to be intended for the need for a sansapatcher basically, that will allow windows users to run a program(the sansapatcher) and then have this program install a bootloader(like what is done now but only for the e200 series), thus allowing users of the e200R series to easily install and use RockBox.  I was intending to offer some help by creating an installer(sansapatcher) for this purpose exactly, and so after reading the post, asked for information specifically so I could get a better understanding of what exactly needs to be done by the program.

Now it seems an installer would need to create the drivers(using the uploaded .inf files) and install them, and then have the 'updated' version of the sansapatcher(with the 'usb_set_configuration(ud, 1);' line inserted) finish by detecting and installing the bootloader. Correct?
Logged
"Given billions of tries, could a spilled bottle of ink ever fall into the words of Shakespere?"

Offline linuxstb

  • Developer
  • Member
  • *
  • Posts: 1163
Re: E200R Automatic Bootloader and Rockbox Installer
« Reply #55 on: September 16, 2007, 05:04:21 AM »
I'll try and summarise what's going on:

1) On the E200, there is a hidden firmware partition (accessible from a computer via USB when the E200 is in MSC mode) containing both the Sansa bootloader (the BL_...rom file) and the original Sansa firmware (the PP5022.mi4 file).

The existing sansapatcher works by modifying the contents of this partition to replace the Sansa PP5022.mi4 file with the Rockbox bootloader.  It also moves the original Sansa PP5022.mi4 file to an otherwise unused part of the firmware partition.  This Rockbox bootloader then loads either Rockbox or the copy of the original Sansa PP5022.mi4.

This process (replacing the Sansa PP5022.mi4 with the Rockbox bootloader PP5022.mi4) can also be done via the standard Sansa firmware upgrade procedure - copying the PP5022.mi4 player to the root (I think) of the FAT32 partition and rebooting.  But in this case the original Sansa PP5022.mi4 is no longer in the firmware partition, requiring the user to create the "OF.mi4" or "OF.bin" file which the Rockbox bootloader also looks for.

2) On the E200R, this second partition isn't exported via MSC - only the main FAT32 partition is accessible.  So a different approach to sansapatcher is needed to install Rockbox.

A further complication is that we can't create a Rockbox bootloader PP5022.mi4 file which will be accepted as valid by the Sansa bootloader as a firmware upgrade - unlike the E200, the digital signature can't be skipped.

The current e200tool process is used to replace the Sansa bootloader stored in the (very) hidden firmware partition with a version that has been patched to skip the digital signature check.  We can then install a Rockbox bootloader PP5022.mi4

e200tool works by uploading and running a small application to the E200(R) when its in manufacturing mode.  This small application then communicates via USB to e200tool and can be instructed to do various things, such as uploading a Sansa bootloader (BL_*) file and executing that file.

The install tool that's in development (you can find the source code in the rbutil/e200rpatcher directory in the Rockbox SVN) works by uploading a different application to the E200 in manufacturing mode - one that performs a binary patch of the Sansa bootloader in the firmware partition, instead of the e200tool communication app.

This is where we are today - this e200rpatcher tool was working on Linux, but now appears to have been broken (it's being investigated).  Hopefully once it's working on Linux again, it will work on Windows, thanks to zajacattack's work.

The plan is for this e200rpatcher tool to also perform the sansapatcher steps - i.e. actually install the Rockbox bootloader in the firmware partition, moving the original firmware to an unused place.  This will then make e200rpatcher almost as easy as sansapatcher - the differences being the need to install libusb, and the need to put the E200R in manufacturing mode instead of MSC mode.
Logged

Offline stevetuc

  • Member
  • *
  • Posts: 1
Re: E200R Automatic Bootloader and Rockbox Installer
« Reply #56 on: September 16, 2007, 11:06:28 AM »
Quote from: linuxstb on September 16, 2007, 05:04:21 AM
..........

The plan is for this e200rpatcher tool to also perform the sansapatcher steps - i.e. actually install the Rockbox bootloader in the firmware partition, moving the original firmware to an unused place.  This will then make e200rpatcher almost as easy as sansapatcher - the differences being the need to install libusb, and the need to put the E200R in manufacturing mode instead of MSC mode.

It would be useful if the sansapatcher step could be invoked separately, so that E200 users who have installed (decrypted & null encrypted) E200R firmware can make use of the sansapatcher facility of installing the Rockbox bootloader and moving the firmware to unused place, instead of having to use OF.bin
« Last Edit: September 16, 2007, 11:19:36 AM by stevetuc »
Logged

zajacattack

  • Guest
Re: E200R Automatic Bootloader and Rockbox Installer
« Reply #57 on: September 16, 2007, 12:32:37 PM »
OK, I think I see what's going on. Once, e200rpatcher is fixed, it can be again ported to Windows. Then, by installing the 1st driver I uploaded (the 2nd is only necessary for e200tool), everything can be done, and there is no need to go to recovery mode and uninstall the driver, making this fairly simple, right?

EDIT: Just in case you didn't see, I uploaded the wrong drivers last time. If you go to my previous post, you will see the new, correct (I tested them with e200tool) driver inf files.
« Last Edit: September 16, 2007, 09:16:27 PM by zajacattack »
Logged

zajacattack

  • Guest
Re: E200R Automatic Bootloader and Rockbox Installer
« Reply #58 on: September 17, 2007, 10:41:49 PM »
Sorry for double-posting, but, I have a question. When you guys upload the next version of e200rpatcher that works and needs to be tested for Windows, would it be best if I turned my e200R back into an official e200R (non-patched BL, Rhapsody firmware, etc.) before testing e200rpatcher?
Logged

Offline AlexP

  • Global Moderator
  • Member
  • *
  • Posts: 3688
  • ex-BigBambi
Re: E200R Automatic Bootloader and Rockbox Installer
« Reply #59 on: September 18, 2007, 03:28:59 AM »
Quote from: zajacattack on September 17, 2007, 10:41:49 PM
Sorry for double-posting

Please use the modifiy button next time.
Logged
H140, F60, S120, e260, c240, Clip, Fuze v2, Connect, MP170, Meizu M3, Nano 1G, Android

  • Print
Pages: 1 2 3 [4] 5
« previous next »
+  Rockbox Technical Forums
|-+  Installation / Removal
| |-+  Manual Installation
| | |-+  Sandisk - Installation/Removal
| | | |-+  E200R Automatic Bootloader and Rockbox Installer
 

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

Page created in 0.131 seconds with 16 queries.