Skip to content

Commit

Permalink
google/debug: add __build_info and embed UTS_RELEASE
Browse files Browse the repository at this point in the history
After kernel and modules are built separately the build info needs to be
preserved separately as well. Add __build_info string to module
'debug-reboot', and put UTS_RELEASE in format
'vendor-build-info: UTS_RELEASE=<UTS_RELEASE>' to it.

Bug: 186171455
Change-Id: Idffa0bf9577c478f60c106a987524b58676da74f
Signed-off-by: Woody Lin <[email protected]>
  • Loading branch information
holio0 committed Apr 30, 2021
1 parent 46b2b2f commit 92581c1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/power/reset/debug-reboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
#include <linux/init.h>
#include <linux/module.h>
#include <linux/reboot.h>
#include <linux/stop_machine.h>
#include <linux/time.h>
#include <linux/sched/debug.h>
#include <linux/stop_machine.h>
#include <linux/sysrq.h>
#include <linux/time.h>
#include <generated/utsrelease.h>

#define PANIC_REBOOT_CMD "debug-reboot-panic"
#define WDOG_REBOOT_CMD "debug-reboot-watchdog"
Expand All @@ -41,6 +42,9 @@ static bool stop_cpus = true;
module_param(stop_cpus, bool, 0644);
MODULE_PARM_DESC(stop_cpus, "Stop other cpus during watchdog (default: Y)");

static const char __build_info[] __attribute__((used)) =
"vendor-build-info: UTS_RELEASE=" UTS_RELEASE;

static void debug_reboot_panic(void)
{
char *pointer = NULL;
Expand Down

0 comments on commit 92581c1

Please sign in to comment.