From 046cf898d5451c07dee95eb95e01c47274bd38bd Mon Sep 17 00:00:00 2001 From: bzt Date: Mon, 18 Jan 2021 13:36:32 +0100 Subject: [PATCH] Initial Risc-V64 support --- mykernel/c/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mykernel/c/Makefile b/mykernel/c/Makefile index a0dcbef..713f71c 100644 --- a/mykernel/c/Makefile +++ b/mykernel/c/Makefile @@ -50,9 +50,9 @@ mykernel.aarch64.elf: kernel.c mykernel.riscv64.elf: kernel.c riscv64-elf-gcc $(CFLAGS) -c kernel.c -o kernel.o - @# fuck you GNU ld, not possible to set correct elf header flags + @# buggy GNU ld, not possible to set correct elf header flags, so we use a dd hack riscv64-elf-ld -r -b binary -o font.o font.psf - @echo -ne '\005' | dd conv=notrunc of=font.o bs=1 seek=48 1>/dev/null 2>/dev/null + @printf '\005' | dd conv=notrunc of=font.o bs=1 seek=48 1>/dev/null 2>/dev/null riscv64-elf-ld $(LDFLAGS) kernel.o font.o -o mykernel.riscv64.elf riscv64-elf-strip $(STRIPFLAGS) mykernel.riscv64.elf riscv64-elf-readelf -hls mykernel.riscv64.elf >mykernel.riscv64.txt