rv64 toolchain configure for riscv-pk

master
WangRunji 7 years ago
parent b88648ff44
commit 296b6196f4

@ -80,7 +80,7 @@ ifeq ($(uname), Darwin)
prefix := x86_64-elf- prefix := x86_64-elf-
endif endif
ifeq ($(arch), riscv32) ifeq ($(arch), riscv32)
prefix := riscv32-unknown-elf- prefix := riscv64-unknown-elf-
endif endif
ld := $(prefix)ld ld := $(prefix)ld
@ -128,10 +128,10 @@ build/riscv32/os.iso: $(kernel)
mkdir -p build && \ mkdir -p build && \
cd build && \ cd build && \
../configure \ ../configure \
--enable-32bit \
--enable-logo \ --enable-logo \
--prefix=$(RISCV) \
--disable-fp-emulation \ --disable-fp-emulation \
--host=riscv32-unknown-elf \ --host=riscv64-unknown-elf \
--with-payload=$(abspath $(kernel)) && \ --with-payload=$(abspath $(kernel)) && \
make && \ make && \
cp bbl ../../kernel/$@ cp bbl ../../kernel/$@

@ -4084,8 +4084,8 @@ fi
case "${BUILD_32BIT}" in case "${BUILD_32BIT}" in
yes|default) yes|default)
echo "Building 32-bit pk" echo "Building 32-bit pk"
CFLAGS="$default_CFLAGS -m32" CFLAGS="$default_CFLAGS -march=rv32i -mabi=ilp32"
LDFLAGS="-m32" LDFLAGS="-march=rv32i -mabi=ilp32"
install_subdir="riscv32-unknown-elf" install_subdir="riscv32-unknown-elf"
;; ;;
*) *)

@ -88,8 +88,8 @@ AC_ARG_ENABLE([32bit],
case "${BUILD_32BIT}" in case "${BUILD_32BIT}" in
yes|default) yes|default)
echo "Building 32-bit pk" echo "Building 32-bit pk"
CFLAGS="$default_CFLAGS -m32" CFLAGS="$default_CFLAGS -march=rv32i -mabi=ilp32"
LDFLAGS="-m32" LDFLAGS="-march=rv32i -mabi=ilp32"
install_subdir="riscv32-unknown-elf" install_subdir="riscv32-unknown-elf"
;; ;;
*) *)

@ -91,7 +91,7 @@ static void memory_init()
static void hart_init() static void hart_init()
{ {
mstatus_init(); mstatus_init();
fp_init(); // fp_init();
delegate_traps(); delegate_traps();
} }

Loading…
Cancel
Save