Rockbox

Tasklist

FS#9559 - use BOOTDIR define in the bootloader

Attached to Project: Rockbox
Opened by Thomas Martitz (kugel.) - Monday, 17 November 2008, 08:58 GMT
Last edited by Björn Stenberg (zagor) - Sunday, 23 November 2008, 22:08 GMT
Task Type Patches
Category Bootloader
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I have no idea why, but the bootloader is hardcoded to /.rockbox (and if that fails to /), even though there's a bootdir define in the target configs. This patch fixes that.
This task depends upon

Closed by  Björn Stenberg (zagor)
Sunday, 23 November 2008, 22:08 GMT
Reason for closing:  Accepted
Comment by Thomas Martitz (kugel.) - Monday, 17 November 2008, 16:42 GMT
fixed gigabeats. Use bootdir for MI4 format and gigabeat-s as well in some printf's.
Comment by Thomas Martitz (kugel.) - Monday, 17 November 2008, 16:43 GMT
forgot to attach
Comment by Thomas Martitz (kugel.) - Monday, 17 November 2008, 16:46 GMT
fix mi4
Comment by Thomas Martitz (kugel.) - Monday, 17 November 2008, 16:50 GMT
fix one more printf
Comment by Thomas Martitz (kugel.) - Monday, 17 November 2008, 16:52 GMT
grml, what a mess. Fix mi4 again. That happens if you fix it the first time by only editing the diff and not the actual file :/
Comment by Dominik Riebeling (bluebrother) - Monday, 17 November 2008, 21:43 GMT
- printf("Can't load rockbox.ipod:");
+ printf("Can't load %s:", BOOTFILE);

could be done simpler as
printf("Can't load " BOOTFILE ":");
Comment by Thomas Martitz (kugel.) - Monday, 17 November 2008, 22:04 GMT
How's that simpler? It's just your preference.
Comment by Dominik Riebeling (bluebrother) - Monday, 17 November 2008, 23:28 GMT
It doesn't require run-time evaluation and replacement of the format string. It's not just my preference, though it's debatable if it's worth the change (though it's also debatable if moving the string constants to defines is worth it in this limited scope). You could even use puts() with that string instead. Oh, and your version stores two strings, thus two terminating \0 while the concatenated string only stores one.
Comment by Thomas Martitz (kugel.) - Monday, 17 November 2008, 23:38 GMT
Seems you used the past hours to collect arguments for this text :)

Anyway. I'll change it (if you don't do it, it's one line where you can even edit the diff). You're probably right, doing that at compile time would be better. (and I don't care about either way that much as I already said sometimes).

Still not my definition of simpler. More effective, indeed. But imho not really simpler.
Comment by Thomas Martitz (kugel.) - Monday, 17 November 2008, 23:41 GMT
BTW: Regarding doing stuff at compile time. Wouldn't it also make sense to remove the filename argument of load_firmware and insert BOOTFILE in those snprintfs too?
Comment by Thomas Martitz (kugel.) - Tuesday, 18 November 2008, 00:03 GMT
fix mentioned issues.

What do you think about the BOOTFILE thing?
Comment by Thomas Martitz (kugel.) - Sunday, 23 November 2008, 19:40 GMT
final version, only some whitespaces changed
Comment by Thomas Martitz (kugel.) - Sunday, 23 November 2008, 19:46 GMT
haha ok, one more. Fixed some more printfs using the method bluebrother proposed.

Loading...