Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@
[submodule "nanoprintf"]
path = nanoprintf
url = https://github.com/charlesnicholson/nanoprintf.git
[submodule "seabios"]
path = seabios
url = https://github.com/FlyGoat/seabios-csmwrap.git
22 changes: 21 additions & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ BUILD_VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || ech
# Check if CC is Clang.
override CC_IS_CLANG := $(shell ! $(CC) --version 2>/dev/null | grep 'clang' >/dev/null 2>&1; echo $$?)

# Save user CFLAGS and CPPFLAGS before we append internal flags.
# Save user CFLAGS, CPPFLAGS, and LDFLAGS before we append internal flags.
override USER_CFLAGS := $(CFLAGS)
override USER_CPPFLAGS := $(CPPFLAGS)
override USER_LDFLAGS := $(LDFLAGS)

# Internal C flags that should not be changed by the user.
override CFLAGS += \
Expand Down Expand Up @@ -259,3 +260,22 @@ clean:
.PHONY: distclean
distclean:
rm -rf bin-* obj-* ovmf

# SeaBIOS build target.
.PHONY: seabios
seabios:
cp seabios-config seabios/.config
$(MAKE) -C seabios olddefconfig \
CC="$(CC)" \
OBJCOPY="$(OBJCOPY)" \
CFLAGS="$(USER_CFLAGS)" \
CPPFLAGS="$(USER_CPPFLAGS)" \
LDFLAGS="$(USER_LDFLAGS)"
$(MAKE) -C seabios \
CC="$(CC)" \
OBJCOPY="$(OBJCOPY)" \
CFLAGS="$(USER_CFLAGS)" \
CPPFLAGS="$(USER_CPPFLAGS)" \
LDFLAGS="$(USER_LDFLAGS)"
cd seabios/out && xxd -i Csm16.bin >../../src/bins/Csm16.h
cd seabios/out && xxd -i vgabios.bin >../../src/bins/vgabios.h
1 change: 1 addition & 0 deletions seabios
Submodule seabios added at e8cdc4
5 changes: 5 additions & 0 deletions seabios-config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
CONFIG_CSM=y
# CONFIG_FLASH_FLOPPY is not set
# CONFIG_VGAHOOKS is not set
# CONFIG_TCGBIOS is not set
CONFIG_VGA_COREBOOT=y
27 changes: 0 additions & 27 deletions seabios/patches/0001-csm-Setup-PIC-in-PrepareToBoot.patch

This file was deleted.