@ -14,12 +14,13 @@
# LOG = off | error | warn | info | debug | trace
# SFSIMG = SFS image path of user programs
# smp = 1 | 2 | ... SMP core number
# board = fpga Only available on riscv32, build without bbl, run on board
# board = none Running on qemu
# | fpga Only available on riscv32, build without bbl, run on board
# | raspi3 Only available on aarch64, run on Raspberry Pi 3 Model B/B+
# m_mode Only available on riscv32, build for M-Mode, without MMU
arch ?= riscv32
board ?= raspi3
board ?= none
mode ?= debug
LOG ?= debug
smp ?= 4
@ -83,7 +84,9 @@ features += no_mmu m_mode
bbl_m_mode := --enable-boot-machine
e n d i f
i f n e q ( $( board ) , n o n e )
features += board_$( board)
e n d i f
build_args := --target $( target) .json --features " $( features) "
i f e q ( $( mode ) , r e l e a s e )
@ -98,7 +101,7 @@ ifeq ($(uname), Darwin)
prefix := x86_64-elf-
e n d i f
e l s e i f e q ( $( arch ) , r i s c v 3 2 )
prefix := riscv64 -unknown-elf-
prefix := riscv32 -unknown-elf-
e l s e i f e q ( $( arch ) , a a r c h 6 4 )
prefix ?= aarch64-none-elf-
e n d i f
@ -159,7 +162,7 @@ else
$( bbl_m_mode) \
--with-arch= rv32imac \
--disable-fp-emulation \
--host= riscv64 -unknown-elf \
--host= riscv32 -unknown-elf \
--with-payload= $( abspath $( kernel) ) && \
make && \
cp bbl ../../kernel/$@