Skip to content

Commit

Permalink
loader: use teken teminal emulator for x86 and uefi
Browse files Browse the repository at this point in the history
Replace mini cons25 emulator with teken, this does enable us proper console
terminal for loader and will make it possible to implement different
back end callbacks to draw to screen.

At this time we still only "draw" in text mode.
  • Loading branch information
tsoome authored and tsoome committed Sep 5, 2019
1 parent 117aa42 commit 9b4871e
Show file tree
Hide file tree
Showing 11 changed files with 987 additions and 850 deletions.
7 changes: 7 additions & 0 deletions stand/defs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,13 @@ CFLAGS+=-I.

all: ${PROG}

CLEANFILES+= teken_state.h
teken.c: teken_state.h

teken_state.h: ${SYSDIR}/teken/sequences
awk -f ${SYSDIR}/teken/gensequences \
${SYSDIR}/teken/sequences > teken_state.h

.if !defined(NO_OBJ)
_ILINKS=machine
.if ${MACHINE} != ${MACHINE_CPUARCH} && ${MACHINE} != "arm64"
Expand Down
1 change: 1 addition & 0 deletions stand/efi/include/efilib.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ EFI_STATUS errno_to_efi_status(int errno);
void efi_time_init(void);
void efi_time_fini(void);

bool efi_cons_update_mode(void);
EFI_STATUS efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE* Xsystab);

EFI_STATUS main(int argc, CHAR16 *argv[]);
Expand Down
10 changes: 5 additions & 5 deletions stand/efi/libefi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ SRCS= delay.c \
libefi.c \
wchar.c

.PATH: ${SYSDIR}/teken
SRCS+= teken.c

.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
SRCS+= time.c
.elif ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm"
Expand All @@ -45,6 +48,8 @@ CFLAGS+= -fPIC -mno-red-zone
.endif
CFLAGS+= -I${EFIINC}
CFLAGS+= -I${EFIINCMD}
CFLAGS.efi_console.c+= -I${SRCTOP}/sys/teken
CFLAGS.teken.c+= -I${SRCTOP}/sys/teken
.if ${MK_LOADER_ZFS} != "no"
CFLAGS+= -I${ZFSSRC}
CFLAGS+= -DEFI_ZFS_BOOT
Expand All @@ -56,9 +61,4 @@ CFLAGS+= -I${LDRSRC}
# Handle FreeBSD specific %b and %D printf format specifiers
CFLAGS+= ${FORMAT_EXTENSIONS}

# Do not use TERM_EMU on arm and arm64 as it doesn't behave well with serial console
.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "aarch64"
CFLAGS+= -DTERM_EMU
.endif

.include <bsd.lib.mk>
Loading

0 comments on commit 9b4871e

Please sign in to comment.