Compare commits

3 Commits
Author SHA1 Message Date
James Sullins 29304ab8a4 add sercon (serial console) support 2012-02-16 12:53:32 -06:00
James Sullins 1a958df6d4 center menu properly 2012-01-09 05:51:57 -06:00
James Sullins 5161dd4c2e add quick opal hack 2012-01-09 02:22:47 -06:00
4 changed files with 43 additions and 5 deletions

No files matched your search

+14 -2
View File
@@ -418,8 +418,8 @@ void moboot_init(const struct app_descriptor *app)
// set_menu_entry("DFU", BOOT_DFU, "", "");
set_menu_entry("shutdown", BOOT_SHUTDOWN, "", "shutdown");
xoff = (gfxconsole_getwidth() - 16) / 2;
yoff = (gfxconsole_getheight() - 12) / 2;
xoff = (gfxconsole_getwidth() - 12 ) / 2;
yoff = (gfxconsole_getheight() - (num_menu_entries + 4)) / 2;
#if 0
tgasz = fs_load_file_mem("/boot/moboot.tga", &tgaptr);
@@ -518,6 +518,18 @@ void moboot_init(const struct app_descriptor *app)
}
}
/* check for sercon boot */
sprintf(splash_path, "/boot/moboot.sercon.%s",
entries[act]->name);
splash_sz = fs_load_file_mem(splash_path, &splash_ptr);
if (splash_sz > 0) {
if (strncmp(splash_ptr, "yes", 3) == 0) {
boot_flags |= BOOTLINUX_SERCON;
}
}
if (splash_ptr) free(splash_ptr);
+2 -1
View File
@@ -37,7 +37,8 @@ extern void bootlinux_atags(void *kernel, unsigned *tags,
enum {
BOOTLINUX_NOFLAGS = 0,
BOOTLINUX_VERBOSE,
BOOTLINUX_VERBOSE = 1,
BOOTLINUX_SERCON = 2,
};
#endif
+23 -2
View File
@@ -172,7 +172,24 @@ unsigned bootlinux_uimage_mem(void *data, unsigned len, void (*callback)(),
, atags_get_cmdline_arg(passed_atags, "boardtype")
, atags_get_cmdline_arg(passed_atags, "lastboot")
);
} else {
}
else if (flags & BOOTLINUX_SERCON) {
sprintf(cmdline
#if 1
,"root=%s rootwait ro fbcon=disable hs_uart=1 console=ttyS0,115200n8 %s%s%s%s%s%s"
#else
,"root=%s rootwait ro fbcon=disable hs_uart=1 console=ttyHSL0,115200n8 %s%s%s%s%s%s"
#endif
, root_dev
, atags_get_cmdline_arg(passed_atags, "fb")
, atags_get_cmdline_arg(passed_atags, "nduid")
, atags_get_cmdline_arg(passed_atags, "klog")
, atags_get_cmdline_arg(passed_atags, "klog_len")
, atags_get_cmdline_arg(passed_atags, "boardtype")
, atags_get_cmdline_arg(passed_atags, "lastboot")
);
}
else {
sprintf(cmdline
,"root=%s rootwait ro fbcon=disable console=ttyS0,115200n8 %s%s%s%s%s%s"
, root_dev
@@ -190,7 +207,11 @@ unsigned bootlinux_uimage_mem(void *data, unsigned len, void (*callback)(),
printf("\nBooting...\n");
if (callback) callback();
if (flags & BOOTLINUX_SERCON) {
apq_gpio_set(58, 1);
}
#if 1
bootlinux_atags(kernel_ep, (void *)0x40200010,
cmdline, 3079, RAMDISK_ADDR, ramdisk_size);
+4
View File
@@ -155,6 +155,10 @@ void boardtype_init()
board_type_is_3g = 1;
}
if (!strcmp(boardtype_str, "opal-3G-evt3")) {
board_type_is_3g = 1;
}
boardtype_str -= 11;
free(boardtype_str);
}