diff options
author | Jone Chou <jonechou@google.com> | 2019-05-09 00:27:31 +0800 |
---|---|---|
committer | Jone Chou <jonechou@google.com> | 2019-05-14 11:16:05 +0000 |
commit | f65e581bdc441d8fff606b47379b2ac68a585c19 (patch) | |
tree | 1b21488f6f892a551fe70a35e2f18f54a2486110 | |
parent | cd06a0e2abb1826645944059583e9b8569729b3a (diff) |
kdebuginfo: Backup uts release for bootloader
Bug: 131703261
Change-Id: I269488558deda16f8dcd7abdccb7eb80322dcbfa
Signed-off-by: Jone Chou <jonechou@google.com>
-rw-r--r-- | kernel/kdebuginfo.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/kdebuginfo.c b/kernel/kdebuginfo.c index e253078a6ba0..5e4520546f5b 100644 --- a/kernel/kdebuginfo.c +++ b/kernel/kdebuginfo.c @@ -14,6 +14,7 @@ #include <linux/io.h> #include <linux/of_address.h> #include <linux/bldr_debug_tools.h> +#include <linux/utsname.h> /* * These will be re-linked against their real values @@ -74,6 +75,9 @@ struct kernel_info { u64 page_offset; u64 phys_offset; u64 kimage_voffset; + + /* For linux banner */ + u8 last_uts_release[__NEW_UTS_LEN]; } __packed; struct kernel_all_info { @@ -149,6 +153,8 @@ static void backup_kernel_info(void) info->page_offset = PAGE_OFFSET; info->phys_offset = PHYS_OFFSET; info->kimage_voffset = kimage_voffset; + strlcpy(info->last_uts_release, init_utsname()->release, + sizeof(info->last_uts_release)); checksum_info = (u32 *)info; for (index = 0; index < sizeof(struct kernel_info)/sizeof(u32); |