1 # Makefile.arm64 -- with config changes.
2 # Copyright 1990 W. Jolitz
3 # from: @(#)Makefile.i386 7.1 5/10/91
4 # from FreeBSD: src/sys/conf/Makefile.i386,v 1.255 2002/02/20 23:35:49
9 # This makefile is constructed from a machine description:
11 # Most changes should be made in the machine description
12 # /sys/arm64/conf/``machineid''
13 # after which you should do
15 # Generic makefile changes should be made in
16 # /sys/conf/Makefile.arm64
17 # after which config should be rerun for all machines.
20 # Which version of config(8) is required.
26 .include "$S/conf/kern.pre.mk"
28 INCLUDES+= -I$S/contrib/libfdt
30 # Use a custom SYSTEM_LD command to generate the elf kernel, so we can
31 # set the text segment start address, and also strip the "arm mapping
32 # symbols" which have names like $a.0 and $d.2; see the document
33 # "ELF for the ARM architecture" for more info on the mapping symbols.
35 ${SYSTEM_LD_BASECMD} \
36 --defsym='text_start=kernbase + SIZEOF_HEADERS' \
37 -o ${.TARGET} ${SYSTEM_OBJS} vers.o; \
40 --strip-symbol='$$[adtx]*' \
43 # Generate the .bin (no elf headers) kernel as an extra build output.
44 # We must relink to generate the .bin kernel, because without headers the
45 # location of everything changes. We also strip the ARM marker symbols.
46 KERNEL_EXTRA+= ${KERNEL_KO}.bin
47 KERNEL_EXTRA_INSTALL+= ${KERNEL_KO}.bin
49 ${KERNEL_KO}.bin: ${SYSTEM_DEP} vers.o
50 @echo "linking ${.TARGET}"
51 @${SYSTEM_LD_BASECMD} \
52 --defsym='text_start=kernbase' \
53 -o ${.TARGET} ${SYSTEM_OBJS} vers.o
57 --strip-symbol='$$[adtx]*' \
58 --output-target=binary \
62 .if !empty(DDB_ENABLED)
63 CFLAGS += -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
77 CLEAN+= ${KERNEL_KO}.bin
81 .include "$S/conf/kern.post.mk"