|
|
|
@ -6,9 +6,9 @@ include ../common/docker.mk
|
|
|
|
|
include ../common/format.mk
|
|
|
|
|
include ../common/operating_system.mk
|
|
|
|
|
|
|
|
|
|
## --------------------------------------------------------------------------------------------------
|
|
|
|
|
## -------------------------------------------------------------------------------------------------
|
|
|
|
|
## Optional, user-provided configuration values
|
|
|
|
|
## --------------------------------------------------------------------------------------------------
|
|
|
|
|
## -------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
# Default to the RPi3.
|
|
|
|
|
BSP ?= rpi3
|
|
|
|
@ -18,9 +18,9 @@ DEV_SERIAL ?= /dev/ttyUSB0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## --------------------------------------------------------------------------------------------------
|
|
|
|
|
## -------------------------------------------------------------------------------------------------
|
|
|
|
|
## BSP-specific configuration values
|
|
|
|
|
## --------------------------------------------------------------------------------------------------
|
|
|
|
|
## -------------------------------------------------------------------------------------------------
|
|
|
|
|
QEMU_MISSING_STRING = "This board is not yet supported for QEMU."
|
|
|
|
|
|
|
|
|
|
ifeq ($(BSP),rpi3)
|
|
|
|
@ -56,9 +56,9 @@ export LD_SCRIPT_PATH
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## --------------------------------------------------------------------------------------------------
|
|
|
|
|
## -------------------------------------------------------------------------------------------------
|
|
|
|
|
## Targets and Prerequisites
|
|
|
|
|
## --------------------------------------------------------------------------------------------------
|
|
|
|
|
## -------------------------------------------------------------------------------------------------
|
|
|
|
|
KERNEL_MANIFEST = Cargo.toml
|
|
|
|
|
KERNEL_LINKER_SCRIPT = kernel.ld
|
|
|
|
|
LAST_BUILD_CONFIG = target/$(BSP).build_config
|
|
|
|
@ -70,9 +70,9 @@ KERNEL_ELF_DEPS = $(filter-out %: ,$(file < $(KERNEL_ELF).d)) $(KERNEL_MANIFEST)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## --------------------------------------------------------------------------------------------------
|
|
|
|
|
## -------------------------------------------------------------------------------------------------
|
|
|
|
|
## Command building blocks
|
|
|
|
|
## --------------------------------------------------------------------------------------------------
|
|
|
|
|
## -------------------------------------------------------------------------------------------------
|
|
|
|
|
RUSTFLAGS = $(RUSTC_MISC_ARGS) \
|
|
|
|
|
-C link-arg=--library-path=$(LD_SCRIPT_PATH) \
|
|
|
|
|
-C link-arg=--script=$(KERNEL_LINKER_SCRIPT)
|
|
|
|
@ -126,9 +126,9 @@ endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## --------------------------------------------------------------------------------------------------
|
|
|
|
|
## -------------------------------------------------------------------------------------------------
|
|
|
|
|
## Targets
|
|
|
|
|
## --------------------------------------------------------------------------------------------------
|
|
|
|
|
## -------------------------------------------------------------------------------------------------
|
|
|
|
|
.PHONY: all doc qemu chainboot clippy clean readelf objdump nm check
|
|
|
|
|
|
|
|
|
|
all: $(KERNEL_BIN)
|
|
|
|
@ -226,9 +226,9 @@ nm: $(KERNEL_ELF)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## --------------------------------------------------------------------------------------------------
|
|
|
|
|
## -------------------------------------------------------------------------------------------------
|
|
|
|
|
## Debugging targets
|
|
|
|
|
## --------------------------------------------------------------------------------------------------
|
|
|
|
|
## -------------------------------------------------------------------------------------------------
|
|
|
|
|
.PHONY: jtagboot openocd gdb gdb-opt0
|
|
|
|
|
|
|
|
|
|
## ------------------------------------------------------------------------------
|
|
|
|
@ -255,9 +255,9 @@ gdb gdb-opt0: $(KERNEL_ELF)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## --------------------------------------------------------------------------------------------------
|
|
|
|
|
## -------------------------------------------------------------------------------------------------
|
|
|
|
|
## Testing targets
|
|
|
|
|
## --------------------------------------------------------------------------------------------------
|
|
|
|
|
## -------------------------------------------------------------------------------------------------
|
|
|
|
|
.PHONY: test test_boot
|
|
|
|
|
|
|
|
|
|
ifeq ($(QEMU_MACHINE_TYPE),) # QEMU is not supported for the board.
|
|
|
|
|