Skip to content

Commit a68a626

Browse files
committed
devices: simplify Makefile
When the SEV or TDX environment variables are 1, we set BUILD_INIT to 0. Unless BUILD_INIT is 1, we don't actually build the init binary, which is the only part of the Makefile that uses INIT_DEFS and INIT_SRC. As such, there seems to be no point in setting both INIT_DEFS and INIT_SRC from the code paths used when SEV or TDX are 1. Remove these assignments. That in turn also allows us to remove the KBS_INIT_SRC, KBS_LD_FLAGS, and SNP_INIT_SRC variables. TDX_INIT_SRC seems to have been unused all along. Signed-off-by: Daniel Müller <deso@posteo.net>
1 parent 5597c96 commit a68a626

1 file changed

Lines changed: 1 addition & 21 deletions

File tree

Makefile

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,6 @@ ABI_VERSION=1
66
FULL_VERSION=1.17.3
77

88
INIT_SRC = init/init.c
9-
KBS_INIT_SRC = init/tee/kbs/kbs.h \
10-
init/tee/kbs/kbs_util.c \
11-
init/tee/kbs/kbs_types.c \
12-
init/tee/kbs/kbs_curl.c \
13-
init/tee/kbs/kbs_crypto.c \
14-
15-
SNP_INIT_SRC = init/tee/snp_attest.c \
16-
init/tee/snp_attest.h \
17-
$(KBS_INIT_SRC) \
18-
19-
TDX_INIT_SRC = $(KBS_INIT_SRC)
209
AWS_NITRO_INIT_SRC = \
2110
init/aws-nitro/include/* \
2211
init/aws-nitro/main.c \
@@ -30,27 +19,18 @@ AWS_NITRO_INIT_SRC = \
3019
init/aws-nitro/device/net_tap_afvsock.c \
3120
init/aws-nitro/device/signal.c \
3221

33-
KBS_LD_FLAGS = -lcurl -lidn2 -lssl -lcrypto -lzstd -lz -lbrotlidec-static \
34-
-lbrotlicommon-static
35-
3622
AWS_NITRO_INIT_LD_FLAGS = -larchive -lnsm
3723

3824
BUILD_INIT = 1
3925
INIT_DEFS =
4026
ifeq ($(SEV),1)
4127
VARIANT = -sev
4228
FEATURE_FLAGS := --features amd-sev
43-
INIT_DEFS += -DSEV=1
44-
INIT_DEFS += $(KBS_LD_FLAGS)
45-
INIT_SRC += $(SNP_INIT_SRC)
46-
BUILD_INIT = 0
29+
BUILD_INIT = 0
4730
endif
4831
ifeq ($(TDX),1)
4932
VARIANT = -tdx
5033
FEATURE_FLAGS := --features tdx
51-
INIT_DEFS += -DTDX=1
52-
INIT_DEFS += $(KBS_LD_FLAGS)
53-
INIT_SRC += $(KBS_INIT_SRC)
5434
BUILD_INIT = 0
5535
endif
5636
ifeq ($(VIRGL_RESOURCE_MAP2),1)

0 commit comments

Comments
 (0)