Commit graph

20 commits

Author SHA1 Message Date
Jonathan Gordon
ceb1e7a2fe minor code cleanup and policing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12889 a1c6a512-1295-4272-9138-f99709370657
2007-03-22 12:55:51 +00:00
Jonathan Gordon
a76947f2a2 Enable usb detection in the sansa bootloader (loads OF if detected)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12888 a1c6a512-1295-4272-9138-f99709370657
2007-03-22 12:45:19 +00:00
Barry Wardell
7e03b0a2e0 Fix build errors.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12867 a1c6a512-1295-4272-9138-f99709370657
2007-03-20 22:56:51 +00:00
Barry Wardell
7cd559dde0 Oops, the mi4 magic was being looked for in the wrong place when decrypting. Also decrease verbosity of PP bootloader a bit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12865 a1c6a512-1295-4272-9138-f99709370657
2007-03-20 22:18:35 +00:00
Barry Wardell
9a9aebb99e We should check the CRC32 whether it is encrypted or not.
Do the encryption in-place so that it is faster. 
Add comment explaining why we need our own CRC32 implemenatation.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12864 a1c6a512-1295-4272-9138-f99709370657
2007-03-20 22:02:26 +00:00
Barry Wardell
3de41f5250 Add support for encrypted mi4 bootloaders.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12863 a1c6a512-1295-4272-9138-f99709370657
2007-03-20 20:45:25 +00:00
Barry Wardell
bada0b7190 Hopefully fix CRC32 errors when loading the Sansa OF from the firmware partition.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12852 a1c6a512-1295-4272-9138-f99709370657
2007-03-20 12:35:45 +00:00
Barry Wardell
0c1a304620 PP bootloader:
1) Proper error handling when we can't find the firmware. 
2) Show verbose debug messages when any button is pressed.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12847 a1c6a512-1295-4272-9138-f99709370657
2007-03-20 10:36:26 +00:00
Barry Wardell
ca8f7bf352 The model and type strings are only 4 characters long. Also remove the 20 at the start of the version string - it should never have been there.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12839 a1c6a512-1295-4272-9138-f99709370657
2007-03-19 11:20:22 +00:00
Barry Wardell
e293bbb451 If loading rockbox.mi4 fails, then drop back to trying rockbox.h10/rockbox.e200 instead. This will allow the new bootloader to be used with older rockbox builds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12824 a1c6a512-1295-4272-9138-f99709370657
2007-03-17 19:07:20 +00:00
Barry Wardell
b8a5adfcdb Partition type 0x84 is "OS/2 hidden C: drive"
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12805 a1c6a512-1295-4272-9138-f99709370657
2007-03-16 14:41:55 +00:00
Barry Wardell
a91a35be74 The hidden partition stuff is only used Sansa.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12803 a1c6a512-1295-4272-9138-f99709370657
2007-03-16 14:36:14 +00:00
Barry Wardell
14ed3ca8d8 In preparation for use with sansapatcher, change portalplayer bootloaders to read firmwares in mi4 format.
When loading the OF:
1) first try to load from a hidden disk partition
2) try loading /System/OF.mi4
3) finally fall back to loading /System/OF.bin which is what the old bootloader used.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12802 a1c6a512-1295-4272-9138-f99709370657
2007-03-16 14:28:00 +00:00
Barry Wardell
a42070df85 Make it possible to boot the OF and show verbose messages at the same time in the PP bootloaders.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12791 a1c6a512-1295-4272-9138-f99709370657
2007-03-15 22:32:58 +00:00
Barry Wardell
2370998a87 Disable bootloader messages in the H10 and Sansa bootloaders unless the PLAY (on H10) or RIGHT (on Sansa) button is being held. Messages are still displayed if an error occurs. This has already been implemented for iPod bootloaders, but still needs implementing for the other bootloaders.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12742 a1c6a512-1295-4272-9138-f99709370657
2007-03-12 22:12:20 +00:00
Barry Wardell
7908740b94 Oops. sleep() doesn't work on PortalPlayer builds. Use udelay() instead.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12138 a1c6a512-1295-4272-9138-f99709370657
2007-01-28 20:40:58 +00:00
Barry Wardell
84b509dc43 FS#6554. Move bootloader code into a common file. Only PortalPlayer devices (iPods, H10, Sansa) are affected for the moment. Someone with access to (and no fear of bricking) an X5, H100, H300 and Gigabeat should try to adapt those bootloaders to also use the code in common.c. The (non-working) patch in the tracker would be a good place to start with this.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12136 a1c6a512-1295-4272-9138-f99709370657
2007-01-28 18:42:11 +00:00
Barry Wardell
e9327a947f Fix build warning.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12043 a1c6a512-1295-4272-9138-f99709370657
2007-01-17 12:35:22 +00:00
Barry Wardell
f4709d0c7c Make the build system create a sysfont.h which includes font information for the system font. Available #defines are: SYSFONT_NAME, SYSFONT_FACENAME, SYSFONT_WIDTH, SYSFONT_HEIGHT, SYSFONT_SIZE, SYSFONT_ASCENT, SYSFONT_DESCENT, SYSFONT_FIRST_CHAR, SYSFONT_LAST_CHAR, SYSFONT_DEFAULT_CHAR, SYSFONT_PROPORTIONAL, SYSFONT_COPYRIGHT, SYSFONT_BITS_SIZE.
Also fix a small bug in the iPod bootloader printf() code and use printf() for PortalPlayer bootloaders too.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12041 a1c6a512-1295-4272-9138-f99709370657
2007-01-17 12:20:38 +00:00
Barry Wardell
2f16d4f1b3 Add working dual-boot bootloaders for H10 and Sansa, which allow booting the OF and Rockbox. Rolo also works.
Changes made:

Combine bootloader/h10.c and bootloader/e200.c into a common bootloader file (bootloader/main-pp.c) to be used by all mi4 based PortalPlayer targets. The file bootloader/main-pp.c is based off the old bootloader/h10.c with some minor changes to allow it to work on the Sansa too. This effectively adds a Sansa bootloader.

Define MODEL_NAME string in config-*.h for use in bootloader.

Split crt0-pp.S into separate files for bootloader and normal builds. Bootloader code is now in crt0-pp-bl.S while normal build code stays in crt0-pp.S.

Improvements to crt0-pp.S and crt0-pp-bl.S (mostly to make it more multiprocessor safe):
* Leave space in bootloader at 0xe0-0xeb since scramble writes over there when it creates the mi4 file (don't leave space for iPods since it's not needed and all code in crt0-pp-bl.S needs to fit before the boot_table at 0x100).
* Remove unused DEBUG and STUB code from crt0-pp.S.
* Make CPU wait for COP to be sleeping when we put the COP to sleep.
* Invalidate COP cache when COP wakes
* Flush CPU cache before waking COP
* Make sure only the CPU clears the BSS (not the COP)
* Make sure only the CPU sets up its own stack (not the COP)

Rolo works on H10, so enable it.

Make Sansa e200 use rockbox.e200 rather than PP5022.mi4 for 'Normal' builds. This makes updating rockbox simpler as we don't need to go through the firmware update procedure, but rather just put a new rockbox.e200 on the device. rockbox.e200 uses a simple 'add' checksum.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11815 a1c6a512-1295-4272-9138-f99709370657
2006-12-19 11:33:53 +00:00
Renamed from bootloader/h10.c (Browse further)