Mercurial > hg > CbC > CbC_xv6
changeset 20:33c9000056b5
use cortex-a15
author | kono |
---|---|
date | Sat, 07 Apr 2018 15:50:32 +0900 |
parents | bf2f70fa8852 |
children | 45035047d186 |
files | src/makefile-armclang src/makefile.inc |
diffstat | 2 files changed, 13 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/src/makefile-armclang Thu Apr 05 12:10:21 2018 +0900 +++ b/src/makefile-armclang Sat Apr 07 15:50:32 2018 +0900 @@ -1,19 +1,20 @@ # specify path to QEMU, installed with MacPorts QEMU = qemu-system-arm +CPU = armv8 +QEMUCPU = cortex-a15 include makefile.inc -CPU = armv6 CC = /usr/local/cbclang/bin/clang AS = arm-linux-gnu-as LD = arm-linux-gnu-ld OBJCOPY = arm-linux-gnu-objcopy OBJDUMP = arm-linux-gnu-objdump -# CFLAGS = -march=armv6 -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -Werror -I. -g -O0 -CFLAGS = -target arm-linux-gnueabihf -march=${CPU} -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -I. -I ../cbclang/arm -g -O0 +# CFLAGS = -march=${CPU} -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -Werror -I. -g -O0 +CFLAGS = -target ${CPU}-linux-gnueabihf -march=${CPU} -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -I. -I ../cbclang/arm -g -O0 LDFLAGS = --noinhibit-exec -# ASFLAGS = -march=armv6 -ASFLAGS = -target arm-linux-gnueabihf +# ASFLAGS = -march=${CPU} +ASFLAGS = -target ${CPU}-linux-gnueabihf LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) @@ -65,12 +66,12 @@ qemu: kernel.elf @clear @echo "Press Ctrl-A and then X to terminate QEMU session\n" - export QEMU_AUDIO_DRV=none ; $(QEMU) -M versatilepb -m 128 -cpu arm1176 -nographic -soundhw hda -kernel kernel.elf + export QEMU_AUDIO_DRV=none ; $(QEMU) -M versatilepb -m 128 -cpu ${QEMUCPU} -nographic -soundhw hda -kernel kernel.elf qemu-debug : kernel.elf @clear @echo "Press Ctrl-A and then X to terminate QEMU session\n" - export QEMU_AUDIO_DRV=none ; $(QEMU) -M versatilepb -m 128 -cpu arm1176 -nographic -singlestep -d exec,cpu,guest_errors -D qemu.log -kernel kernel.elf -s -S + export QEMU_AUDIO_DRV=none ; $(QEMU) -M versatilepb -m 128 -cpu ${QEMUCPU} -nographic -singlestep -d exec,cpu,guest_errors -D qemu.log -kernel kernel.elf -s -S INITCODE_OBJ = initcode.o $(addprefix build/,$(INITCODE_OBJ)): initcode.S
--- a/src/makefile.inc Thu Apr 05 12:10:21 2018 +0900 +++ b/src/makefile.inc Sat Apr 07 15:50:32 2018 +0900 @@ -2,17 +2,18 @@ CROSSCOMPILE := arm-linux-gnu- +CPU = armv8 CC = /usr/local/cbclang/bin/clang AS = $(CROSSCOMPILE)as LD = $(CROSSCOMPILE)ld OBJCOPY = $(CROSSCOMPILE)objcopy OBJDUMP = $(CROSSCOMPILE)objdump -# CFLAGS = -march=armv6 -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -Werror -I. -g -O0 -CFLAGS = -target armv6-arm-none-eabi -I /net/open/Linux/arm/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/ /net/open/Linux/arm/gcc-arm-none-eabi-7-2017-q4-major/lib/gcc/arm-none-eabi/7.2.1/include-fixed/ -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -I. -g -O0 +# CFLAGS = -march=${CPU} -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -Werror -I. -g -O0 +CFLAGS = -target ${CPU}-none-eabi -I /net/open/Linux/arm/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/ /net/open/Linux/arm/gcc-arm-none-eabi-7-2017-q4-major/lib/gcc/arm-none-eabi/7.2.1/include-fixed/ -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -I. -g -O0 LDFLAGS = -L. -# ASFLAGS = -march=armv6 -ASFLAGS = -target armv6-arm-none-eabi +# ASFLAGS = -march=${CPU} +ASFLAGS = -target ${CPU}-none-eabi #LIBGCC = $(shell $(gcc) -print-libgcc-file-name) LIBGCC = /net/open/Linux/arm/gcc-arm-none-eabi-7-2017-q4-major/lib/gcc/arm-none-eabi/7.2.1/libgcc.a