misc: Update Flanterm to latest
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -28,7 +28,7 @@
|
||||
/limine-protocol
|
||||
/nyu-efi
|
||||
/freestnd-c-hdrs
|
||||
/common/flanterm
|
||||
/flanterm
|
||||
/common/lib/stb_image.h.nopatch
|
||||
/common/lib/stb_image.h
|
||||
/common/cc-runtime.s2.c
|
||||
|
||||
@@ -306,8 +306,8 @@ dist:
|
||||
cd '$(call SHESCAPE,$(BUILDDIR))'/"$(DIST_OUTPUT)" && git checkout .
|
||||
cd '$(call SHESCAPE,$(BUILDDIR))'/"$(DIST_OUTPUT)" && ./bootstrap
|
||||
rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"$(DIST_OUTPUT)/build-aux/freestanding-toolchain/.git"
|
||||
rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"$(DIST_OUTPUT)/common/flanterm/.git"
|
||||
rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"$(DIST_OUTPUT)/common/flanterm/.gitignore"
|
||||
rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"$(DIST_OUTPUT)/flanterm/.git"
|
||||
rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"$(DIST_OUTPUT)/flanterm/.gitignore"
|
||||
rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"$(DIST_OUTPUT)/freestnd-c-hdrs/.git"
|
||||
rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"$(DIST_OUTPUT)/limine-protocol/.git"
|
||||
rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"$(DIST_OUTPUT)/nyu-efi/.git"
|
||||
@@ -342,7 +342,7 @@ distclean: clean
|
||||
|
||||
.PHONY: maintainer-clean
|
||||
maintainer-clean: distclean
|
||||
cd '$(call SHESCAPE,$(SRCDIR))' && rm -rf common/flanterm common/lib/stb_image.h.nopatch common/lib/stb_image.h decompressor/tinf tinf libfdt freestnd-c-hdrs cc-runtime common/cc-runtime.s2.c decompressor/cc-runtime.c limine-protocol nyu-efi configure timestamps build-aux *'~' autom4te.cache aclocal.m4 *.tar*
|
||||
cd '$(call SHESCAPE,$(SRCDIR))' && rm -rf flanterm common/lib/stb_image.h.nopatch common/lib/stb_image.h decompressor/tinf tinf libfdt freestnd-c-hdrs cc-runtime common/cc-runtime.s2.c decompressor/cc-runtime.c limine-protocol nyu-efi configure timestamps build-aux *'~' autom4te.cache aclocal.m4 *.tar*
|
||||
|
||||
.PHONY: common-uefi-x86-64
|
||||
common-uefi-x86-64:
|
||||
|
||||
@@ -108,8 +108,8 @@ if ! test -f version; then
|
||||
|
||||
clone_repo_commit \
|
||||
https://codeberg.org/mintsuki/flanterm.git \
|
||||
common/flanterm \
|
||||
201100c968ad6db4f38632f9b6c3544854897788
|
||||
flanterm \
|
||||
fa3ee697b4a9d0a506e5249a791ae2f830a0bf4c
|
||||
|
||||
download_by_hash \
|
||||
https://github.com/nothings/stb/raw/5c205738c191bcb0abc65c4febfa9bd25ff35234/stb_image.h \
|
||||
|
||||
@@ -45,6 +45,7 @@ override CPPFLAGS_FOR_TARGET := \
|
||||
-I . \
|
||||
-I libc-compat \
|
||||
-I ../limine-protocol/include \
|
||||
-I ../flanterm/src \
|
||||
-I ../libfdt/src \
|
||||
-I '$(call SHESCAPE,$(BUILDDIR))/..' \
|
||||
-isystem ../freestnd-c-hdrs/include \
|
||||
@@ -52,13 +53,14 @@ override CPPFLAGS_FOR_TARGET := \
|
||||
-DCOM_OUTPUT=$(COM_OUTPUT) \
|
||||
-DE9_OUTPUT=$(E9_OUTPUT) \
|
||||
-DLIMINE_API_REVISION=3 \
|
||||
-DFLANTERM_IN_FLANTERM \
|
||||
-MMD \
|
||||
-MP
|
||||
|
||||
$(call MKESCAPE,$(BUILDDIR))/libfdt/src/fdt_overlay.o: override CFLAGS_FOR_TARGET += \
|
||||
-Wno-unused-parameter
|
||||
|
||||
$(call MKESCAPE,$(BUILDDIR))/common/flanterm/backends/fb.o: override CPPFLAGS_FOR_TARGET += \
|
||||
$(call MKESCAPE,$(BUILDDIR))/flanterm/src/flanterm_backends/fb.o: override CPPFLAGS_FOR_TARGET += \
|
||||
-DFLANTERM_FB_DISABLE_BUMP_ALLOC
|
||||
|
||||
override NASMFLAGS_FOR_TARGET += \
|
||||
@@ -218,8 +220,8 @@ ifeq ($(TARGET),uefi-loongarch64)
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET),bios)
|
||||
override C_FILES := $(shell cd .. && find common libfdt -type f -name '*.c' | LC_ALL=C sort)
|
||||
override S_FILES := $(shell cd .. && find common libfdt -type f -name '*.S' | LC_ALL=C sort)
|
||||
override C_FILES := $(shell cd .. && find common flanterm/src libfdt/src -type f -name '*.c' | LC_ALL=C sort)
|
||||
override S_FILES := $(shell cd .. && find common -type f -name '*.S' | LC_ALL=C sort)
|
||||
|
||||
override ASMX86_FILES := $(shell cd .. && find common -type f -name '*.asm_x86' | LC_ALL=C sort)
|
||||
override ASM32_FILES := $(shell cd .. && find common -type f -name '*.asm_ia32' | LC_ALL=C sort)
|
||||
@@ -229,8 +231,8 @@ ifeq ($(TARGET),bios)
|
||||
override OBJ_S2 := $(filter %.s2.o,$(OBJ))
|
||||
endif
|
||||
ifeq ($(TARGET),uefi-x86-64)
|
||||
override C_FILES := $(shell cd .. && find common nyu-efi/x86_64 libfdt -type f -name '*.c' | LC_ALL=C sort)
|
||||
override S_FILES := $(shell cd .. && find common nyu-efi/x86_64 libfdt -type f -name '*.S' | LC_ALL=C sort)
|
||||
override C_FILES := $(shell cd .. && find common nyu-efi/x86_64 flanterm/src libfdt/src -type f -name '*.c' | LC_ALL=C sort)
|
||||
override S_FILES := $(shell cd .. && find common nyu-efi/x86_64 -type f -name '*.S' | LC_ALL=C sort)
|
||||
|
||||
override ASMX86_FILES := $(shell cd .. && find common -type f -name '*.asm_x86' | LC_ALL=C sort)
|
||||
override ASM64_FILES := $(shell cd .. && find common -type f -name '*.asm_x86_64' | LC_ALL=C sort)
|
||||
@@ -239,8 +241,8 @@ ifeq ($(TARGET),uefi-x86-64)
|
||||
override OBJ := $(addprefix $(call MKESCAPE,$(BUILDDIR))/, $(C_FILES:.c=.o) $(S_FILES:.S=.o) $(ASM64_FILES:.asm_x86_64=.o) $(ASM64U_FILES:.asm_uefi_x86_64=.o) $(ASMX86_FILES:.asm_x86=.o))
|
||||
endif
|
||||
ifeq ($(TARGET),uefi-ia32)
|
||||
override C_FILES := $(shell cd .. && find common nyu-efi/ia32 libfdt -type f -name '*.c' | LC_ALL=C sort)
|
||||
override S_FILES := $(shell cd .. && find common nyu-efi/ia32 libfdt -type f -name '*.S' | LC_ALL=C sort)
|
||||
override C_FILES := $(shell cd .. && find common nyu-efi/ia32 flanterm/src libfdt/src -type f -name '*.c' | LC_ALL=C sort)
|
||||
override S_FILES := $(shell cd .. && find common nyu-efi/ia32 -type f -name '*.S' | LC_ALL=C sort)
|
||||
|
||||
override ASMX86_FILES := $(shell cd .. && find common -type f -name '*.asm_x86' | LC_ALL=C sort)
|
||||
override ASM32_FILES := $(shell cd .. && find common -type f -name '*.asm_ia32' | LC_ALL=C sort)
|
||||
@@ -249,8 +251,8 @@ ifeq ($(TARGET),uefi-ia32)
|
||||
override OBJ := $(addprefix $(call MKESCAPE,$(BUILDDIR))/, $(C_FILES:.c=.o) $(S_FILES:.S=.o) $(ASM32_FILES:.asm_ia32=.o) $(ASM32U_FILES:.asm_uefi_ia32=.o) $(ASMX86_FILES:.asm_x86=.o))
|
||||
endif
|
||||
ifeq ($(TARGET),uefi-aarch64)
|
||||
override C_FILES := $(shell cd .. && find common nyu-efi/aarch64 libfdt -type f -name '*.c' | LC_ALL=C sort)
|
||||
override S_FILES := $(shell cd .. && find common nyu-efi/aarch64 libfdt -type f -name '*.S' | LC_ALL=C sort)
|
||||
override C_FILES := $(shell cd .. && find common nyu-efi/aarch64 flanterm/src libfdt/src -type f -name '*.c' | LC_ALL=C sort)
|
||||
override S_FILES := $(shell cd .. && find common nyu-efi/aarch64 -type f -name '*.S' | LC_ALL=C sort)
|
||||
|
||||
override ASM64_FILES := $(shell cd .. && find common -type f -name '*.asm_aarch64' | LC_ALL=C sort)
|
||||
override ASM64U_FILES := $(shell cd .. && find common -type f -name '*.asm_uefi_aarch64' | LC_ALL=C sort)
|
||||
@@ -258,8 +260,8 @@ ifeq ($(TARGET),uefi-aarch64)
|
||||
override OBJ := $(addprefix $(call MKESCAPE,$(BUILDDIR))/, $(C_FILES:.c=.o) $(S_FILES:.S=.o) $(ASM64_FILES:.asm_aarch64=.o) $(ASM64U_FILES:.asm_uefi_aarch64=.o))
|
||||
endif
|
||||
ifeq ($(TARGET),uefi-riscv64)
|
||||
override C_FILES := $(shell cd .. && find common nyu-efi/riscv64 libfdt -type f -name '*.c' | LC_ALL=C sort)
|
||||
override S_FILES := $(shell cd .. && find common nyu-efi/riscv64 libfdt -type f -name '*.S' | LC_ALL=C sort)
|
||||
override C_FILES := $(shell cd .. && find common nyu-efi/riscv64 flanterm/src libfdt/src -type f -name '*.c' | LC_ALL=C sort)
|
||||
override S_FILES := $(shell cd .. && find common nyu-efi/riscv64 -type f -name '*.S' | LC_ALL=C sort)
|
||||
|
||||
override ASM64_FILES := $(shell cd .. && find common -type f -name '*.asm_riscv64' | LC_ALL=C sort)
|
||||
override ASM64U_FILES := $(shell cd .. && find common -type f -name '*.asm_uefi_riscv64' | LC_ALL=C sort)
|
||||
@@ -267,8 +269,8 @@ ifeq ($(TARGET),uefi-riscv64)
|
||||
override OBJ := $(addprefix $(call MKESCAPE,$(BUILDDIR))/, $(C_FILES:.c=.o) $(S_FILES:.S=.o) $(ASM64_FILES:.asm_riscv64=.o) $(ASM64U_FILES:.asm_uefi_riscv64=.o))
|
||||
endif
|
||||
ifeq ($(TARGET),uefi-loongarch64)
|
||||
override C_FILES := $(shell cd .. && find common nyu-efi/loongarch64 libfdt -type f -name '*.c' | LC_ALL=C sort)
|
||||
override S_FILES := $(shell cd .. && find common nyu-efi/loongarch64 libfdt -type f -name '*.S' | LC_ALL=C sort)
|
||||
override C_FILES := $(shell cd .. && find common nyu-efi/loongarch64 flanterm/src libfdt/src -type f -name '*.c' | LC_ALL=C sort)
|
||||
override S_FILES := $(shell cd .. && find common nyu-efi/loongarch64 -type f -name '*.S' | LC_ALL=C sort)
|
||||
|
||||
override ASM64_FILES := $(shell cd .. && find common -type f -name '*.asm_loongarch64' | LC_ALL=C sort)
|
||||
override ASM64U_FILES := $(shell cd .. && find common -type f -name '*.asm_uefi_loongarch64' | LC_ALL=C sort)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#include <flanterm/flanterm.h>
|
||||
#include <flanterm.h>
|
||||
|
||||
#define VD_COLS (80 * 2)
|
||||
#define VD_ROWS 25
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
#include <lib/image.h>
|
||||
#include <lib/rand.h>
|
||||
#include <mm/pmm.h>
|
||||
#include <flanterm/flanterm.h>
|
||||
#include <flanterm/backends/fb.h>
|
||||
#include <flanterm.h>
|
||||
#include <flanterm_backends/fb.h>
|
||||
#include <lib/term.h>
|
||||
|
||||
// Builtin font originally taken from:
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <lib/fb.h>
|
||||
#include <mm/pmm.h>
|
||||
#include <drivers/vga_textmode.h>
|
||||
#include <flanterm/backends/fb.h>
|
||||
#include <flanterm_backends/fb.h>
|
||||
|
||||
#if defined (BIOS)
|
||||
int current_video_mode = -1;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <lib/print.h>
|
||||
#include <flanterm/flanterm.h>
|
||||
#include <flanterm.h>
|
||||
|
||||
enum {
|
||||
_NOT_READY,
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <sys/gdt.h>
|
||||
#include <lib/fb.h>
|
||||
#include <lib/term.h>
|
||||
#include <flanterm/backends/fb.h>
|
||||
#include <flanterm_backends/fb.h>
|
||||
#include <sys/pic.h>
|
||||
#include <sys/lapic.h>
|
||||
#include <sys/idt.h>
|
||||
|
||||
1
test/.gitignore
vendored
1
test/.gitignore
vendored
@@ -1,3 +1,2 @@
|
||||
test.o
|
||||
test.elf
|
||||
flanterm
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#if defined (_LIMINE_PROTO)
|
||||
#include <flanterm/flanterm.h>
|
||||
#include <flanterm.h>
|
||||
extern struct flanterm_context *ft_ctx;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
#include <stdbool.h>
|
||||
#include <limine.h>
|
||||
#include <e9print.h>
|
||||
#include <flanterm/flanterm.h>
|
||||
#include <flanterm/backends/fb.h>
|
||||
#include <flanterm.h>
|
||||
#include <flanterm_backends/fb.h>
|
||||
|
||||
__attribute__((section(".limine_requests")))
|
||||
static volatile LIMINE_BASE_REVISION(3);
|
||||
|
||||
16
test/test.mk
16
test/test.mk
@@ -60,6 +60,7 @@ override CFLAGS += \
|
||||
-fPIE \
|
||||
-I. \
|
||||
-I../limine-protocol/include \
|
||||
-I../flanterm/src \
|
||||
-isystem ../freestnd-c-hdrs/include \
|
||||
-D_LIMINE_PROTO \
|
||||
-DLIMINE_API_REVISION=3
|
||||
@@ -115,11 +116,13 @@ else
|
||||
all: test.elf device_tree.dtb
|
||||
endif
|
||||
|
||||
flanterm:
|
||||
mkdir -p flanterm
|
||||
cp -rv ../common/flanterm/* ./flanterm/
|
||||
flanterm.o: ../flanterm/src/flanterm.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
test.elf: limine.o e9print.o memory.o flanterm/flanterm.o flanterm/backends/fb.o
|
||||
flanterm_fb.o: ../flanterm/src/flanterm_backends/fb.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
test.elf: limine.o e9print.o memory.o flanterm.o flanterm_fb.o
|
||||
$(LD) $^ $(LDFLAGS) -o $@
|
||||
|
||||
multiboot2.elf: multiboot2_trampoline.o
|
||||
@@ -134,7 +137,7 @@ multiboot.elf: multiboot_trampoline.o
|
||||
$(CC) $(CFLAGS_MB) -c e9print.c -o e9print.o
|
||||
$(LD) $^ memory.o multiboot.o e9print.o $(LDFLAGS_MB1) -o $@
|
||||
|
||||
%.o: %.c flanterm
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
%.o: %.asm
|
||||
@@ -145,6 +148,7 @@ multiboot.elf: multiboot_trampoline.o
|
||||
|
||||
clean:
|
||||
rm -rf test.elf limine.o e9print.o memory.o
|
||||
rm -rf flanterm.o flanterm_fb.o
|
||||
rm -rf multiboot2.o multiboot2.elf multiboot2_trampoline.o
|
||||
rm -rf multiboot.o multiboot_trampoline.o multiboot.elf
|
||||
rm -rf flanterm device_tree.dtb
|
||||
rm -rf device_tree.dtb
|
||||
|
||||
Reference in New Issue
Block a user