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
| | |-+  [Solved] New USB-enabled bootloader not appearing to work on e200
« previous next »
  • Print
Pages: [1]

Author Topic: [Solved] New USB-enabled bootloader not appearing to work on e200  (Read 2992 times)

Offline bascule

  • Rockbox Expert
  • Member
  • *
  • Posts: 1298
[Solved] New USB-enabled bootloader not appearing to work on e200
« on: July 18, 2009, 04:39:45 AM »
I'm trying to install the USB-enabled bootloader on my Sansa e200. Version r21236-090609, USB working fine from within Rockbox.

I built the bootloader from SVN of 15 July 2009:

Code: [Select]
[root@localhost build-e200-boot]# ls -l
total 588
drwxr-xr-x 3 main main   4096 Jul 15 21:22 apps/
-rw-r--r-- 1 main main    585 Jul 15 21:22 autoconf.h
drwxr-xr-x 2 main main   4096 Jul 15 21:22 bitmaps/
-rw-r--r-- 1 main main    752 Jul 15 21:22 boot.link
drwxr-xr-x 2 main main   4096 Jul 15 21:22 bootloader/
-rwxr-xr-x 1 main main  73568 Jul 15 21:22 bootloader.bin*
-rwxr-xr-x 1 main main 456133 Jul 15 21:22 bootloader.elf*
-rw-r--r-- 1 main main  70610 Jul 15 21:22 bootloader.map
drwxr-xr-x 6 main main   4096 Jul 15 21:22 firmware/
-rw-r--r-- 1 main main  85926 Jul 15 21:22 make.dep
-rw-r--r-- 1 main main   2286 Jul 15 21:22 Makefile
-rw-r--r-- 1 main main  74752 Jul 15 21:22 PP5022.mi4
-rw-r--r-- 1 main main    331 Jul 15 21:22 rockbox-info.txt
-rw-r--r-- 1 main main  22209 Jul 15 21:22 sysfont.c
-rw-r--r-- 1 main main    653 Jul 15 21:22 sysfont.h
-rw-r--r-- 1 main main   1816 Jul 15 21:22 sysfont.o

I then installed it over the Sansa OF bootloader (sansapatcher -bl), as per this Flyspray task http://www.rockbox.org/tracker/task/8642

Code: [Select]
[root@localhost build-e200-boot]# /home/main/bin/sansapatcher -bl bootloader.bin
sansapatcher v0.7 with v5.0 bootloaders - (C) Dave Chapman 2006-2007
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[INFO] Scanning disk devices...
[INFO] e200 found - /dev/sde
[INFO] Reading partition table from /dev/sde
[INFO] Sector size is 512 bytes
[INFO] Part    Start Sector    End Sector   Size (MB)   Type
[INFO]    0             600      15667199      7649.7   W95 FAT32 (0x0b)
[INFO]    1        15667200      15708159        20.0   OS/2 hidden C: drive (0x84)
[WARN] PPBL installation will overwrite your bootloader. This will lead to a
       Sansa that won't boot if the bootloader file is invalid. Only continue if
       you're sure you know what you're doing.
       Continue (y/n)? y
[INFO] PPBL updated successfully.

Result: plugging the e200 into my computer whilst shutdown causes it to restart into the Sansa OF, not straight into USB mode as I was expecting...

Any ideas? Have I completely got the wrong end of the stick?

EDIT: If I hold |<< when booting to go into the OF, the bootloader reports version r17297M-080501, which would seem to indicate that the new one hasn't been installed, despite what sansapatcher said.
« Last Edit: July 18, 2009, 02:52:28 PM by bascule »
Logged
DataBase fanboy and author of the totally overhauled Rockbox Sync Tool

Offline mc2739

  • Developer
  • Member
  • *
  • Posts: 262
Re: New USB-enabled bootloader not appearing to work on e200
« Reply #1 on: July 18, 2009, 09:10:42 AM »
Quote from: bascule on July 18, 2009, 04:39:45 AM
Any ideas? Have I completely got the wrong end of the stick?

Your procedure looks correct.  I use the same and have no problems getting my bootloader installed.  You might try sansapatcher -d to remove the old bootloader first, but that should not be necessary.

If that fails, sansapatcher -a PP5022.mi4 will use the sansa OF bootloader to start your Rockbox bootloader.  The disadvantage of this is that it is slightly slower, but the advantage is you still have recovery mode which you lose with sansapatcher -bl.
Logged

Offline bascule

  • Rockbox Expert
  • Member
  • *
  • Posts: 1298
Re: New USB-enabled bootloader not appearing to work on e200
« Reply #2 on: July 18, 2009, 11:56:35 AM »
Hmmm... this is all making me very nervous:

I did a list (sansapatcher -l), giving me this:

Code: [Select]
[root@localhost build-e200-boot]# /home/main/bin/sansapatcher -l
...
[INFO] Image 1 - 60416 bytes
[INFO] Image 2 - 5856256 bytes

The Image 1 appears to be the (old?) bootloader, because doing the delete switch removed the bootloader successfully. However, when I then did the PPBL bootloader install, which stated it completed successfully, I still only had the one Image as if nothing had actually changed:

Code: [Select]
[root@localhost build-e200-boot]# /home/main/bin/sansapatcher -l
...
[INFO] Image 1 - 5856256 bytes

The next move was
Code: [Select]
[root@localhost build-e200-boot]# /home/main/bin/sansapatcher --install
which worked OK, giving me these listed Images:

Code: [Select]
[root@localhost build-e200-boot]# /home/main/bin/sansapatcher -l
...
[INFO] Image 1 - 74752 bytes
[INFO] Image 2 - 5856256 bytes

So now there's a bootloader (Image 1), but matching the sizes with those listed in my working directory, it's the PP5022.mi4 one, not the bootloader.bin one.

Now I'm afraid to unplug the device until I feel comfortable that there is a working bootloader installed. I think there is,  but it's not the one I want. For me, neither the -bl or the --update-ppbl switches appear to do anything.

For info this is all being done natively in Linux.
Logged
DataBase fanboy and author of the totally overhauled Rockbox Sync Tool

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: New USB-enabled bootloader not appearing to work on e200
« Reply #3 on: July 18, 2009, 12:01:39 PM »
I'm not sure whats going on, but I've flashed random files to the sansa and still been able to recover it with e200tool in ubuntu, so at worst you'd have to use e200tool to restore it.
Logged

Offline bascule

  • Rockbox Expert
  • Member
  • *
  • Posts: 1298
Re: New USB-enabled bootloader not appearing to work on e200
« Reply #4 on: July 18, 2009, 12:08:48 PM »
Quote from: saratoga on July 18, 2009, 12:01:39 PM
...so at worst you'd have to use e200tool to restore it.

Yes, I did have to use that the last time I tried this bootloader trick when I was still using Windows and the Rockbox VM. But I did get it installed successfully, because I got rid of the SanDisk splash. Why it's not working now, I'm not sure.

saratoga, am I correct in thinking that the smaller Image is the bootloader and the larger one the OF?
Logged
DataBase fanboy and author of the totally overhauled Rockbox Sync Tool

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: New USB-enabled bootloader not appearing to work on e200
« Reply #5 on: July 18, 2009, 02:38:34 PM »
I just tried this on my Sansa using the latest SVN:

Code: [Select]
mike@biosgroup-desktop:~/rockbox/ams/rbutil/sansapatcher$ sudo ./sansapatcher  -bl ../../e200v1bl/bootloader.bin 
sansapatcher v0.8 with v6.0 bootloaders - (C) Dave Chapman 2006-2007
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[INFO] Scanning disk devices...
[INFO] e200 found - /dev/sdc
[INFO] Reading partition table from /dev/sdc
[INFO] Sector size is 512 bytes
[INFO] Part    Start Sector    End Sector   Size (MB)   Type
[INFO]    0             600      15667199      7649.7   W95 FAT32 (0x0b)
[INFO]    1        15667200      15708159        20.0   OS/2 hidden C: drive (0x84)
[WARN] PPBL installation will overwrite your bootloader. This will lead to a
       Sansa that won't boot if the bootloader file is invalid. Only continue if
       you're sure you know what you're doing.
       Continue (y/n)? y
[INFO] PPBL updated successfully.
mike@biosgroup-desktop:~/rockbox/ams/rbutil/sansapatcher$

Everything works as expected.  Are you sure you didn't just accidentally flash an old bootloader.bin file?
Logged

Offline bascule

  • Rockbox Expert
  • Member
  • *
  • Posts: 1298
Re: New USB-enabled bootloader not appearing to work on e200
« Reply #6 on: July 18, 2009, 02:51:58 PM »
Well, you're correct. I bit the bullet and disconnected and booted and it's fine, including the direct USB mode from power-off. I suspect deleting the bootloader was required before re-loading.

It all just looked as though nothing had happened. And still, the sansapatcher -l lists only one Image, which was the bit that worried me...

Anyway, thanks as always for all the help, here. Much appreciated.
Logged
DataBase fanboy and author of the totally overhauled Rockbox Sync Tool

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  [Solved] New USB-enabled bootloader not appearing to work on e200
 

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

Page created in 0.076 seconds with 15 queries.