summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2022-06-07 12:21:57 -0400
committerTom Rini <[email protected]>2022-06-07 12:21:57 -0400
commited1cbbe2afe4d4c7c25316db4c2e15c4c579fc4e (patch)
treea8315fd7fca59a0cff90ba0343d73c3f15e18c50 /boot
parent41e47b420d6b122f6eb21e6e4438b334cc983eb1 (diff)
parentb62450cf229c50ad2ce819dd02a09726909cc89a (diff)
Merge branch '2022-06-07-assorted-improvements' into next
- A wide ranging set of minor clean-ups and improvements
Diffstat (limited to 'boot')
-rw-r--r--boot/bootm.c16
-rw-r--r--boot/image-pre-load.c5
2 files changed, 9 insertions, 12 deletions
diff --git a/boot/bootm.c b/boot/bootm.c
index 714406ab668..dfa65f125e5 100644
--- a/boot/bootm.c
+++ b/boot/bootm.c
@@ -498,7 +498,8 @@ ulong bootm_disable_interrupts(void)
}
#define CONSOLE_ARG "console="
-#define CONSOLE_ARG_SIZE sizeof(CONSOLE_ARG)
+#define NULL_CONSOLE (CONSOLE_ARG "ttynull")
+#define CONSOLE_ARG_SIZE sizeof(NULL_CONSOLE)
/**
* fixup_silent_linux() - Handle silencing the linux boot if required
@@ -550,21 +551,22 @@ static int fixup_silent_linux(char *buf, int maxlen)
char *end = strchr(start, ' ');
int start_bytes;
- start_bytes = start - cmdline + CONSOLE_ARG_SIZE - 1;
+ start_bytes = start - cmdline;
strncpy(buf, cmdline, start_bytes);
+ strncpy(buf + start_bytes, NULL_CONSOLE, CONSOLE_ARG_SIZE);
if (end)
- strcpy(buf + start_bytes, end);
+ strcpy(buf + start_bytes + CONSOLE_ARG_SIZE - 1, end);
else
- buf[start_bytes] = '\0';
+ buf[start_bytes + CONSOLE_ARG_SIZE] = '\0';
} else {
- sprintf(buf, "%s %s", cmdline, CONSOLE_ARG);
+ sprintf(buf, "%s %s", cmdline, NULL_CONSOLE);
}
if (buf + strlen(buf) >= cmdline)
return -ENOSPC;
} else {
- if (maxlen < sizeof(CONSOLE_ARG))
+ if (maxlen < CONSOLE_ARG_SIZE)
return -ENOSPC;
- strcpy(buf, CONSOLE_ARG);
+ strcpy(buf, NULL_CONSOLE);
}
debug("after silent fix-up: %s\n", buf);
diff --git a/boot/image-pre-load.c b/boot/image-pre-load.c
index 78d89069a98..5ab9ae18746 100644
--- a/boot/image-pre-load.c
+++ b/boot/image-pre-load.c
@@ -23,11 +23,6 @@ DECLARE_GLOBAL_DATA_PTR;
#define IMAGE_PRE_LOAD_PROP_PUBLIC_KEY "public-key"
#define IMAGE_PRE_LOAD_PROP_MANDATORY "mandatory"
-#ifndef CONFIG_SYS_BOOTM_LEN
-/* use 8MByte as default max gunzip size */
-#define CONFIG_SYS_BOOTM_LEN 0x800000
-#endif
-
/*
* Information in the device-tree about the signature in the header
*/