From 2b31f74867de367718933e645e5d865ae7614897 Mon Sep 17 00:00:00 2001 From: Tom Dohrmann Date: Sun, 15 Oct 2023 09:51:02 +0000 Subject: [PATCH] Makefile: remove kernel.elf dependency for stage1.o ... and move it to `all`. This way we can use the stage1/stage1.o target with another kernel (e.g. test kernel). Signed-off-by: Tom Dohrmann --- .github/workflows/rust.yml | 2 +- Makefile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e48379077f..710e6f967b 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -32,7 +32,7 @@ jobs: # ld to work, so build all the objects without performing the # final linking step. - name: Build - run: make FEATURES="default,enable-gdb" stage1/stage1.o stage1/reset.o + run: make FEATURES="default,enable-gdb" stage1/kernel.elf stage1/stage1.o stage1/reset.o - name: Run tests run: make test diff --git a/Makefile b/Makefile index 131fed03f4..4d86214772 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ FS_FILE ?= none STAGE1_OBJS = stage1/stage1.o stage1/reset.o -all: svsm.bin +all: stage1/kernel.elf svsm.bin test: cargo test --target=x86_64-unknown-linux-gnu @@ -42,7 +42,7 @@ ifneq ($(FS_FILE), none) endif touch stage1/svsm-fs.bin -stage1/stage1.o: stage1/stage1.S stage1/stage2.bin stage1/kernel.elf stage1/svsm-fs.bin +stage1/stage1.o: stage1/stage1.S stage1/stage2.bin stage1/svsm-fs.bin cc -c -o $@ stage1/stage1.S stage1/reset.o: stage1/reset.S stage1/meta.bin