From 1c48ee1cae247817c61ad6479a310fdd635068ce Mon Sep 17 00:00:00 2001 From: Mathieu Strypsteen Date: Wed, 25 Dec 2024 20:03:32 +0100 Subject: [PATCH] Download compiler in CI --- .clang-format | 1 + .forgejo/workflows/build.yaml | 7 +++++++ init/src/start.s | 6 ++++++ lib/acpica-build/Makefile | 2 +- 4 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..a32aaf8 --- /dev/null +++ b/.clang-format @@ -0,0 +1 @@ +ColumnLimit: 200 diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index ac07aff..b7bf6fe 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -12,6 +12,13 @@ jobs: uses: actions/checkout@v4 with: submodules: true + - name: Download Compiler + uses: forgejo/download-artifact@v4 + with: + repository: mathieu/os-rust + run-id: 9 + - name: test + run: ls - name: Build run: . ~/.bashrc && ./build.py - name: Install cargo-deny diff --git a/init/src/start.s b/init/src/start.s index 4d621f8..129f2b6 100644 --- a/init/src/start.s +++ b/init/src/start.s @@ -5,6 +5,12 @@ _start: mov $stack, %rsp call main +.global syscall +syscall: + mov %rcx, %r10 + syscall + ret + .section .bss .align 16 .skip 0x10000 diff --git a/lib/acpica-build/Makefile b/lib/acpica-build/Makefile index 644d11d..98410a5 100644 --- a/lib/acpica-build/Makefile +++ b/lib/acpica-build/Makefile @@ -3,7 +3,7 @@ COMPONENTS:=dispatcher events executer hardware namespace parser resources table CFILES:=$(foreach comp, $(COMPONENTS), $(wildcard ../acpica/source/components/$(comp)/*.c)) printf.c OFILES:=$(patsubst %.c, %.o, $(CFILES)) CC:=clang -CFLAGS:=--target=x86_64-elf -ffreestanding -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -mno-sse2 -fstack-protector-strong -O2 -I. -I../acpica/source/include -DACPI_LIBRARY -D__linux__ +CFLAGS:=--target=x86_64-elf -ffreestanding -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -mno-sse2 -fstack-protector-strong -Wall -Werror -O2 -I. -I../acpica/source/include -DACPI_LIBRARY -D__linux__ libacpica.a: $(OFILES) llvm-ar rcD $@ $^