-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
287 additions
and
431 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,36 @@ | ||
# vim: tabstop=8 shiftwidth=8 noexpandtab: | ||
# vim: tabstop=2 shiftwidth=2 noexpandtab: | ||
# | ||
# Common makefile which specifies aarch64 architecture specific settings. | ||
# | ||
# Required common variables: KERNEL, BOARD. | ||
# | ||
|
||
TARGET := aarch64-mimiker-elf | ||
GCC_ABIFLAGS := -mno-outline-atomics | ||
CLANG_ABIFLAGS := -target aarch64-elf | ||
ELFTYPE := elf64-littleaarch64 | ||
ELFARCH := aarch64 | ||
|
||
ifeq ($(LLVM), 1) | ||
TARGET := aarch64-linux-mimiker-elf | ||
ABIFLAGS := | ||
else | ||
TARGET := aarch64-mimiker-elf | ||
ABIFLAGS := -mno-outline-atomics | ||
endif | ||
|
||
# NOTE(pj): We set A, SA, SA0 bits for SCTLR_EL1 register (sys/aarch64/boot.c) | ||
# as a result not aligned access to memory causes an exception. It's okay but | ||
# user-space (taken from NetBSD) doesn't care about that by default. It | ||
# requies STRICT_ALIGNMENT to be defined. It's also important for the kernel | ||
# because we share bcopy (memcpy) implementation with user-space. | ||
CPPFLAGS += -DSTRICT_ALIGNMENT=1 | ||
|
||
ASAN_SHADOW_OFFSET := 0xe0001f0000000000 | ||
|
||
ifeq ($(KERNEL), 1) | ||
CFLAGS += -mcpu=cortex-a53+nofp -march=armv8-a+nofp -mgeneral-regs-only | ||
ifeq ($(KASAN), 1) | ||
# Added to files that are sanitized | ||
CFLAGS_KASAN = -fsanitize=kernel-address \ | ||
-fasan-shadow-offset=0xe0001f0000000000 \ | ||
--param asan-globals=1 \ | ||
--param asan-stack=1 \ | ||
--param asan-instrument-allocas=1 | ||
endif | ||
CFLAGS += -mcpu=cortex-a53+nofp -march=armv8-a+nofp -mgeneral-regs-only | ||
else | ||
CFLAGS += -mcpu=cortex-a53 -march=armv8-a | ||
CFLAGS += -mcpu=cortex-a53 -march=armv8-a | ||
endif | ||
|
||
ifeq ($(BOARD), rpi3) | ||
KERNEL-IMAGES := mimiker.img mimiker.img.gz | ||
KERNEL-IMAGES := mimiker.img mimiker.img.gz | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,25 @@ | ||
# vim: tabstop=8 shiftwidth=8 noexpandtab: | ||
# vim: tabstop=2 shiftwidth=2 noexpandtab: | ||
# | ||
# Common makefile which specifies MIPS architecture specific settings. | ||
# | ||
# Required common variables: KERNEL, BOARD. | ||
|
||
TARGET := mipsel-mimiker-elf | ||
ELFARCH := mips | ||
|
||
# -G 0 disables small-data and small-bss, | ||
# as otherwise they would exceed 64KB limit | ||
GCC_ABIFLAGS := -mips32r2 -EL -G 0 | ||
CLANG_ABIFLAGS := -target mipsel-elf -march=mips32r2 -mno-abicalls \ | ||
-modd-spreg -G 0 -D__ELF__=1 | ||
ELFTYPE := elf32-littlemips | ||
ELFARCH := mips | ||
ifeq ($(LLVM), 1) | ||
TARGET := mipsel-linux-mimiker-elf | ||
ABIFLAGS := -march=mips32r2 -mno-abicalls -modd-spreg -G 0 -D__ELF__=1 | ||
ELFTYPE := elf32-tradlittlemips | ||
else | ||
TARGET := mipsel-mimiker-elf | ||
ABIFLAGS := -mips32r2 -EL -G 0 | ||
ELFTYPE := elf32-littlemips | ||
endif | ||
|
||
ASAN_SHADOW_OFFSET := 0xD8000000 | ||
|
||
ifeq ($(KERNEL), 1) | ||
ifeq ($(KASAN), 1) | ||
# Added to files that are sanitized | ||
CFLAGS_KASAN = -fsanitize=kernel-address -fasan-shadow-offset=0xD8000000 \ | ||
--param asan-globals=1 \ | ||
--param asan-stack=1 \ | ||
--param asan-instrument-allocas=1 | ||
endif | ||
# Added to all files | ||
GCC_ABIFLAGS += -msoft-float | ||
CLANG_ABIFLAGS += -msoft-float | ||
ifeq ($(KGPROF), 1) | ||
CFLAGS_KGPROF = -finstrument-functions | ||
endif | ||
ABIFLAGS += -msoft-float | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.