This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#6554 - Move bootloader code into a common file
Attached to Project:
Rockbox
Opened by Barry Wardell (barrywardell) - Saturday, 20 January 2007, 15:39 GMT+2
Last edited by Barry Wardell (barrywardell) - Saturday, 20 January 2007, 15:40 GMT+2
Opened by Barry Wardell (barrywardell) - Saturday, 20 January 2007, 15:39 GMT+2
Last edited by Barry Wardell (barrywardell) - Saturday, 20 January 2007, 15:40 GMT+2
|
DetailsThere is quite a bit of common code between the bootloaders. At the moment, this code is in separate files for each target which results in code duplication.
This patch pulls all common code out to a common.c file. The functions in common.c are the result of merging the small differences between the corresponding functions in the target specific bootloader files. Other changes made are: * more descriptive error messages on targets other than the iPod (the error code is taken from the iPod code). * power off after 5 seconds when there's a bootloader error on PP targets * Load directly to DRAM_START and skip memcpy() phase on PP and iPod. This is possible since the bootloader is already copied to and running from IRAM on those targets. * Remove unneeded #include's from main-pp.c * Minor whitespace fixes in main-pp.c in the ata_init phase. I have tested this on my H10 and e200 and it seems to work. It could do with testing on other targets (iPods, X5, H100, H300, are there any others affected?) |
This task depends upon
Closed by Linus Nielsen Feltzing (linusnielsen)
Thursday, 22 February 2007, 16:10 GMT+2
Reason for closing: Accepted
Thursday, 22 February 2007, 16:10 GMT+2
Reason for closing: Accepted
Binary size increases by about 300-500 bytes on all targets other than the iPod. This is mainly down the the addition of the verbose error messages with the function strerror().
1) If hold is on or Menu is pressed, try to load RetailOS
a) If apple_os.ipod exists try to load it.
b) If apple_os.ipod doesn't exist, but RetailOS is already at DRAM_START, load that.
2) If play is pressed, try to load iPod Linux
3) Otherwise try to load rockbox.ipod
If any of those steps fail, direct the user to reboot into disk mode.
common.c:241: error: redefinition of 'reset_screen'
common.c:36: error: previous definiton of 'reset_screen' was here