Skip to content

Commit 8abb451

Browse files
committed
Apply SeaBIOS fixes
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
1 parent f951d0b commit 8abb451

File tree

3 files changed

+7793
-7782
lines changed

3 files changed

+7793
-7782
lines changed

GNUmakefile

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ endif
1818
QEMUFLAGS := -m 2G
1919

2020
# User controllable cross compiler prefix.
21-
CROSS_PREFIX :=
21+
CROSS_COMPILE :=
22+
CROSS_PREFIX := $(CROSS_COMPILE)
2223

2324
# User controllable C compiler command.
2425
ifneq ($(CROSS_PREFIX),)
@@ -29,6 +30,8 @@ endif
2930

3031
# User controllable objcopy command.
3132
OBJCOPY := $(CROSS_PREFIX)objcopy
33+
OBJDUMP := $(CROSS_PREFIX)objdump
34+
STRIP := $(CROSS_PREFIX)strip
3235

3336
# User controllable C flags.
3437
CFLAGS := -g -O2 -pipe
@@ -262,20 +265,28 @@ distclean:
262265
rm -rf bin-* obj-* ovmf
263266

264267
# SeaBIOS build target.
268+
SEABIOS_EXTRAVERSION := -CSMWrap-$(BUILD_VERSION)
265269
.PHONY: seabios
266270
seabios:
267271
cp seabios-config seabios/.config
268272
$(MAKE) -C seabios olddefconfig \
269273
CC="$(CC)" \
270274
OBJCOPY="$(OBJCOPY)" \
275+
OBJDUMP="$(OBJDUMP)" \
276+
STRIP="$(STRIP)" \
271277
CFLAGS="$(USER_CFLAGS)" \
272278
CPPFLAGS="$(USER_CPPFLAGS)" \
273-
LDFLAGS="$(USER_LDFLAGS)"
279+
LDFLAGS="$(USER_LDFLAGS)" \
280+
EXTRAVERSION=\"$(SEABIOS_EXTRAVERSION)\"
274281
$(MAKE) -C seabios \
275282
CC="$(CC)" \
276283
OBJCOPY="$(OBJCOPY)" \
284+
OBJDUMP="$(OBJDUMP)" \
285+
STRIP="$(STRIP)" \
286+
OBJCOPY="$(OBJCOPY)" \
277287
CFLAGS="$(USER_CFLAGS)" \
278288
CPPFLAGS="$(USER_CPPFLAGS)" \
279-
LDFLAGS="$(USER_LDFLAGS)"
289+
LDFLAGS="$(USER_LDFLAGS)" \
290+
EXTRAVERSION=\"$(SEABIOS_EXTRAVERSION)\"
280291
cd seabios/out && xxd -i Csm16.bin >../../src/bins/Csm16.h
281292
cd seabios/out && xxd -i vgabios.bin >../../src/bins/vgabios.h

0 commit comments

Comments
 (0)