• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category Bootloader
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by kugel. - 2008-11-17
Last edited by zagor - 2008-11-23

FS#9559 - use BOOTDIR define in the bootloader

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.

Closed by  zagor
2008-11-23 22:08
Reason for closing:  Accepted

fixed gigabeats. Use bootdir for MI4 format and gigabeat-s as well in some printf’s.

forgot to attach

fix one more printf

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 :/

- printf(”Can’t load rockbox.ipod:”);
+ printf(”Can’t load %s:”, BOOTFILE);

could be done simpler as
printf(”Can’t load " BOOTFILE “:”);

How’s that simpler? It’s just your preference.

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.

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.

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?

fix mentioned issues.

What do you think about the BOOTFILE thing?

final version, only some whitespaces changed

haha ok, one more. Fixed some more printfs using the method bluebrother proposed.


Available keyboard shortcuts


Task Details

Task Editing