Skip to content

Commit 9b944c5

Browse files
committed
payload: Pass m1n1 stage 1 version when chainloading
This might come in handy in the future. Signed-off-by: Hector Martin <[email protected]>
1 parent 5a4e30a commit 9b944c5

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/payload.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
/* SPDX-License-Identifier: MIT */
22

3+
#include "../build/build_cfg.h"
4+
#include "../build/build_tag.h"
5+
36
#include "payload.h"
47
#include "adt.h"
58
#include "assert.h"
@@ -152,8 +155,15 @@ static void *load_kernel(void *p, size_t size)
152155

153156
#define MAX_CHOSEN_VARS 16
154157

158+
#ifdef CHAINLOADING
159+
static size_t chosen_cnt = 1;
160+
static char *chosen[MAX_CHOSEN_VARS] = {
161+
"chosen.m1n1-stage1-version=" BUILD_TAG,
162+
};
163+
#else
155164
static size_t chosen_cnt = 0;
156165
static char *chosen[MAX_CHOSEN_VARS];
166+
#endif
157167

158168
static bool enable_tso = false;
159169

0 commit comments

Comments
 (0)