summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/Kconfig2
-rw-r--r--common/console_simple.c11
-rw-r--r--common/efi/efi.c2
-rw-r--r--common/filetype.c22
-rw-r--r--common/ratp/Kconfig1
5 files changed, 15 insertions, 23 deletions
diff --git a/common/Kconfig b/common/Kconfig
index d397d8bc4d..60237d3056 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1309,7 +1309,7 @@ config DEBUG_INITCALLS
config PBL_BREAK
bool "Execute software break on pbl start"
- depends on ARM
+ depends on ARM && (!CPU_32v4T && !ARCH_TEGRA)
help
If this enabled, barebox will be compiled with BKPT instruction
on early pbl init. This option should be used only with JTAG debugger!
diff --git a/common/console_simple.c b/common/console_simple.c
index 6d293b2ba1..42224842c5 100644
--- a/common/console_simple.c
+++ b/common/console_simple.c
@@ -64,9 +64,6 @@ void console_flush(void)
}
EXPORT_SYMBOL(console_flush);
-void ctrlc_handled(void)
-{
-}
/* test if ctrl-c was pressed */
int ctrlc (void)
{
@@ -81,14 +78,6 @@ int ctrlc (void)
}
EXPORT_SYMBOL(ctrlc);
-void console_ctrlc_allow(void)
-{
-}
-
-void console_ctrlc_forbid(void)
-{
-}
-
int console_register(struct console_device *newcdev)
{
if (console)
diff --git a/common/efi/efi.c b/common/efi/efi.c
index 73cea37036..ed81583550 100644
--- a/common/efi/efi.c
+++ b/common/efi/efi.c
@@ -361,7 +361,7 @@ efi_status_t efi_main(efi_handle_t image, efi_system_table_t *sys_table)
if (EFI_ERROR(efiret))
panic("failed to allocate malloc pool: %s\n",
efi_strerror(efiret));
- mem_malloc_init((void *)mem, (void *)mem + memsize);
+ mem_malloc_init((void *)mem, (void *)mem + memsize - 1);
start_barebox();
diff --git a/common/filetype.c b/common/filetype.c
index 4966c5e068..39fea45edf 100644
--- a/common/filetype.c
+++ b/common/filetype.c
@@ -316,19 +316,21 @@ enum filetype file_detect_type(const void *_buf, size_t bufsize)
buf8[0] == 0x8b || buf8[0] == 0x9c) &&
buf8[0x1] == 0 && buf8[0x2] == 0 && buf8[0x3] == 0 &&
buf8[0x18] == 0 && buf8[0x1b] == 0 && buf8[0x1c] == 0) {
- unsigned char sum = 0;
- int i;
- for (i = 0; i <= 0x1e; ++i)
- sum += buf8[i];
+ if (buf8[0x8] == 0) {
+ unsigned char sum = 0;
+ int i;
- if (sum == buf8[0x1f] && buf8[0x8] == 0)
- return filetype_kwbimage_v0;
+ for (i = 0; i <= 0x1e; ++i)
+ sum += buf8[i];
- if (sum == buf8[0x1f] &&
- buf8[0x8] == 1 && buf8[0x1d] == 0 &&
- (buf8[0x1e] == 0 || buf8[0x1e] == 1))
- return filetype_kwbimage_v1;
+ if (sum == buf8[0x1f])
+ return filetype_kwbimage_v0;
+ } else if (buf8[0x8] == 1) {
+ if (buf8[0x1d] == 0 &&
+ (buf8[0x1e] == 0 || buf8[0x1e] == 1))
+ return filetype_kwbimage_v1;
+ }
}
if (is_sparse_image(_buf))
diff --git a/common/ratp/Kconfig b/common/ratp/Kconfig
index 30462c6c97..25150addfd 100644
--- a/common/ratp/Kconfig
+++ b/common/ratp/Kconfig
@@ -6,6 +6,7 @@ config CONSOLE_RATP
select POLLER
select CMDLINE_EDITING
depends on CONSOLE_FULL
+ depends on !SHELL_NONE
prompt "RATP console support"
help
This option adds support for remote controlling barebox via serial