diff options
Diffstat (limited to 'bootloader')
-rw-r--r-- | bootloader/rocker_linux.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/bootloader/rocker_linux.c b/bootloader/rocker_linux.c index dd912ee378..cb0e5b66e5 100644 --- a/bootloader/rocker_linux.c +++ b/bootloader/rocker_linux.c | |||
@@ -449,6 +449,7 @@ static void tools_screen(void) | |||
449 | power_off(); | 449 | power_off(); |
450 | } | 450 | } |
451 | 451 | ||
452 | #if 0 | ||
452 | /* open log file */ | 453 | /* open log file */ |
453 | static int open_log(void) | 454 | static int open_log(void) |
454 | { | 455 | { |
@@ -467,11 +468,13 @@ static int open_log(void) | |||
467 | /* re-open the file, truncate in case the move was unsuccessful */ | 468 | /* re-open the file, truncate in case the move was unsuccessful */ |
468 | return open("/mnt/sd_0/rockbox.log", O_RDWR | O_CREAT | O_APPEND | O_TRUNC); | 469 | return open("/mnt/sd_0/rockbox.log", O_RDWR | O_CREAT | O_APPEND | O_TRUNC); |
469 | } | 470 | } |
471 | #endif | ||
470 | 472 | ||
471 | int main(int argc, char **argv) | 473 | int main(int argc, char **argv) |
472 | { | 474 | { |
473 | (void) argc; | 475 | (void) argc; |
474 | (void) argv; | 476 | (void) argv; |
477 | #if 0 | ||
475 | /* redirect stdout and stderr to have error messages logged somewhere on the | 478 | /* redirect stdout and stderr to have error messages logged somewhere on the |
476 | * user partition */ | 479 | * user partition */ |
477 | int fd = open_log(); | 480 | int fd = open_log(); |
@@ -485,6 +488,7 @@ int main(int argc, char **argv) | |||
485 | printf("Rockbox boot loader\n"); | 488 | printf("Rockbox boot loader\n"); |
486 | printf("Version: %s\n", rbversion); | 489 | printf("Version: %s\n", rbversion); |
487 | printf("%s\n", MODEL_NAME); | 490 | printf("%s\n", MODEL_NAME); |
491 | #endif | ||
488 | 492 | ||
489 | system_init(); | 493 | system_init(); |
490 | core_allocator_init(); | 494 | core_allocator_init(); |
@@ -506,10 +510,12 @@ int main(int argc, char **argv) | |||
506 | enum boot_mode mode = get_boot_mode(); | 510 | enum boot_mode mode = get_boot_mode(); |
507 | if(mode == BOOT_USB || mode == BOOT_OF) | 511 | if(mode == BOOT_USB || mode == BOOT_OF) |
508 | { | 512 | { |
513 | #if 0 | ||
509 | fflush(stdout); | 514 | fflush(stdout); |
510 | fflush(stderr); | 515 | fflush(stderr); |
511 | close(fileno(stdout)); | 516 | close(fileno(stdout)); |
512 | close(fileno(stderr)); | 517 | close(fileno(stderr)); |
518 | #endif | ||
513 | /* for now the only way we have to trigger USB mode it to run the OF */ | 519 | /* for now the only way we have to trigger USB mode it to run the OF */ |
514 | /* boot OF */ | 520 | /* boot OF */ |
515 | execvp("/usr/bin/hiby_player", argv); | 521 | execvp("/usr/bin/hiby_player", argv); |
@@ -522,13 +528,9 @@ int main(int argc, char **argv) | |||
522 | } | 528 | } |
523 | else if(mode == BOOT_ROCKBOX) | 529 | else if(mode == BOOT_ROCKBOX) |
524 | { | 530 | { |
525 | /* Rockbox expects /.rockbox to contain themes, rocks, etc, but we | ||
526 | * cannot easily create this symlink because the root filesystem is | ||
527 | * mounted read-only. Although we could remount it read-write temporarily, | ||
528 | * this is neededlessly complicated and we defer this job to the dualboot | ||
529 | * install script */ | ||
530 | fflush(stdout); | 531 | fflush(stdout); |
531 | execl("/mnt/sd_0/.rockbox/rockbox.rocker", "rockbox.rocker", NULL); | 532 | system("/bin/cp /mnt/sd_0/.rockbox/rockbox.rocker /tmp"); |
533 | execl("/tmp/rockbox.rocker", "rockbox.rocker", NULL); | ||
532 | printf("execvp failed: %s\n", strerror(errno)); | 534 | printf("execvp failed: %s\n", strerror(errno)); |
533 | /* fallback to OF in case of failure */ | 535 | /* fallback to OF in case of failure */ |
534 | error_screen("Cannot boot Rockbox"); | 536 | error_screen("Cannot boot Rockbox"); |