diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-04-02 15:27:19 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-04-02 15:27:19 +0200 |
| commit | b884315aa529f5993f8aa12d44d601fdf4a4fac3 (patch) | |
| tree | eb86f6be580bd4a9b99d07e401c522099b3f7a25 | |
| parent | 74f329a38884e3d3468ad6abad43a4fbd7afa970 (diff) | |
add: rv64 CI, and copyright updates.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
| -rw-r--r-- | .github/workflows/rv64.yml | 19 | ||||
| -rw-r--r-- | src/arm64/ci.make | 2 | ||||
| -rw-r--r-- | src/arm64/makefile | 2 | ||||
| -rw-r--r-- | src/ppc64/makefile | 2 | ||||
| -rw-r--r-- | src/rv64/ci.make | 53 | ||||
| -rw-r--r-- | src/rv64/makefile | 4 | ||||
| -rw-r--r-- | src/rv64/script.lds (renamed from src/rv64/linkscript.ld) | 0 |
7 files changed, 77 insertions, 5 deletions
diff --git a/.github/workflows/rv64.yml b/.github/workflows/rv64.yml new file mode 100644 index 0000000..e25982b --- /dev/null +++ b/.github/workflows/rv64.yml @@ -0,0 +1,19 @@ +name: FW CI (RV64) + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Install Packages + run: sudo apt update && sudo apt install gcc-riscv64-unknown-elf + - name: Build FW (ARM64) + run: cd src && cd rv64 && make -f ci.make all
\ No newline at end of file diff --git a/src/arm64/ci.make b/src/arm64/ci.make index 169d7f7..07f1746 100644 --- a/src/arm64/ci.make +++ b/src/arm64/ci.make @@ -3,7 +3,7 @@ # # CoreBoot # Date Added: 08/11/2023 - # Copyright 2024, ZKA Technologies, all rights reserved. + # Copyright 2024, Amlal El Mahrouss, all rights reserved. # # ======================================================== # diff --git a/src/arm64/makefile b/src/arm64/makefile index 7aa0ae4..8d05e8b 100644 --- a/src/arm64/makefile +++ b/src/arm64/makefile @@ -3,7 +3,7 @@ # # CoreBoot # Date Added: 08/11/2023 - # Copyright 2024, ZKA Technologies, all rights reserved. + # Copyright 2024, Amlal El Mahrouss, all rights reserved. # # ======================================================== # diff --git a/src/ppc64/makefile b/src/ppc64/makefile index 03d524f..8adb03f 100644 --- a/src/ppc64/makefile +++ b/src/ppc64/makefile @@ -3,7 +3,7 @@ #
# CoreBoot
# Date Added: 08/11/2023
- # Copyright 2024, ZKA Technologies, all rights reserved.
+ # Copyright 2024, Amlal El Mahrouss, all rights reserved.
#
# ========================================================
#
diff --git a/src/rv64/ci.make b/src/rv64/ci.make new file mode 100644 index 0000000..757d6c1 --- /dev/null +++ b/src/rv64/ci.make @@ -0,0 +1,53 @@ + # + # ======================================================== + # + # CoreBoot + # Date Added: 08/11/2023 + # Copyright 2024, Amlal El Mahrouss, all rights reserved. + # + # ======================================================== + # + +CC=riscv64-unknown-elf-gcc +FIRMWARE=core-boot.elf +FLAGS=-D__COMPILE_RISCV__ -I../../ -Wall -c -nostdlib -ffreestanding -fno-builtin -D__BSTRICT__ -D__BDEBUG__ -O0 -mcmodel=medany +C_SRC= $(wildcard *.s) $(wildcard *.c) $(wildcard ../*.c) -c + +CXX=riscv64-unknown-elf-g++ +CXX_SRC= $(wildcard *.cc) $(wildcard ../*.cc) -c + +LD=riscv64-unknown-elf-ld +OBJ=*.o +FLAGS_LD= --script=script.lds -o core-boot.elf + +EMU=qemu-system-riscv64 -m 4G -smp 2 -machine virt -bios $(FIRMWARE) -d int -device VGA + +.PHONY: all +all: firmware-link + @echo "[CoreBoot] Done." + +# link (make firmware) +.PHONY: firmware-link +firmware-link: firmware-compile + $(LD) $(OBJ) $(FLAGS_LD) + +# compile firmware +.PHONY: firmware-compile +firmware-compile: + $(CC) $(FLAGS) $(C_SRC) + $(CXX) -ffreestanding -fno-rtti -fno-exceptions $(FLAGS) $(CXX_SRC) + +# launch qemu rule +.PHONY: run +run: + $(EMU) + +# launch qemu with attached debugger +.PHONY: run-dbg +run-dbg: + $(EMU) -S + +# remove object files +.PHONY: clean +clean: + rm -f $(wildcard *.o) $(wildcard *.elf) $(wildcard *.rom) $(wildcard *.epm) diff --git a/src/rv64/makefile b/src/rv64/makefile index 0bd8a28..757d6c1 100644 --- a/src/rv64/makefile +++ b/src/rv64/makefile @@ -3,7 +3,7 @@ # # CoreBoot # Date Added: 08/11/2023 - # Copyright 2024, ZKA Technologies, all rights reserved. + # Copyright 2024, Amlal El Mahrouss, all rights reserved. # # ======================================================== # @@ -18,7 +18,7 @@ CXX_SRC= $(wildcard *.cc) $(wildcard ../*.cc) -c LD=riscv64-unknown-elf-ld OBJ=*.o -FLAGS_LD= --script=linkscript.ld -o core-boot.elf +FLAGS_LD= --script=script.lds -o core-boot.elf EMU=qemu-system-riscv64 -m 4G -smp 2 -machine virt -bios $(FIRMWARE) -d int -device VGA diff --git a/src/rv64/linkscript.ld b/src/rv64/script.lds index ca4e8dc..ca4e8dc 100644 --- a/src/rv64/linkscript.ld +++ b/src/rv64/script.lds |
