summaryrefslogtreecommitdiffstats
path: root/bootloader
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2018-03-13 21:24:56 +0100
committerMarcin Bukat <marcin.bukat@gmail.com>2018-06-12 10:31:15 +0200
commit7692558674be24dfe51d7be84b4d01995c23e67b (patch)
tree9cf8909c361ea6373ee81d46518cc168c5d60074 /bootloader
parentd5889b3d94c0ff2403c2c6c9c89500b85e050bca (diff)
downloadrockbox-7692558674be24dfe51d7be84b4d01995c23e67b.tar.gz
rockbox-7692558674be24dfe51d7be84b4d01995c23e67b.tar.bz2
rockbox-7692558674be24dfe51d7be84b4d01995c23e67b.zip
Agptek Rocker: Implement USB mass storage driver
Agptek uses composite android driver. Change-Id: Iece188ad640f3dfd24c171946c14da4c3516b6d5
Diffstat (limited to 'bootloader')
-rw-r--r--bootloader/rocker_linux.c14
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)
power_off();
}
+#if 0
/* open log file */
static int open_log(void)
{
@@ -467,11 +468,13 @@ static int open_log(void)
/* re-open the file, truncate in case the move was unsuccessful */
return open("/mnt/sd_0/rockbox.log", O_RDWR | O_CREAT | O_APPEND | O_TRUNC);
}
+#endif
int main(int argc, char **argv)
{
(void) argc;
(void) argv;
+#if 0
/* redirect stdout and stderr to have error messages logged somewhere on the
* user partition */
int fd = open_log();
@@ -485,6 +488,7 @@ int main(int argc, char **argv)
printf("Rockbox boot loader\n");
printf("Version: %s\n", rbversion);
printf("%s\n", MODEL_NAME);
+#endif
system_init();
core_allocator_init();
@@ -506,10 +510,12 @@ int main(int argc, char **argv)
enum boot_mode mode = get_boot_mode();
if(mode == BOOT_USB || mode == BOOT_OF)
{
+#if 0
fflush(stdout);
fflush(stderr);
close(fileno(stdout));
close(fileno(stderr));
+#endif
/* for now the only way we have to trigger USB mode it to run the OF */
/* boot OF */
execvp("/usr/bin/hiby_player", argv);
@@ -522,13 +528,9 @@ int main(int argc, char **argv)
}
else if(mode == BOOT_ROCKBOX)
{
- /* Rockbox expects /.rockbox to contain themes, rocks, etc, but we
- * cannot easily create this symlink because the root filesystem is
- * mounted read-only. Although we could remount it read-write temporarily,
- * this is neededlessly complicated and we defer this job to the dualboot
- * install script */
fflush(stdout);
- execl("/mnt/sd_0/.rockbox/rockbox.rocker", "rockbox.rocker", NULL);
+ system("/bin/cp /mnt/sd_0/.rockbox/rockbox.rocker /tmp");
+ execl("/tmp/rockbox.rocker", "rockbox.rocker", NULL);
printf("execvp failed: %s\n", strerror(errno));
/* fallback to OF in case of failure */
error_screen("Cannot boot Rockbox");