blob: 6a077739489c46264d4dbe99aeb8d6698f5ed898 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# $FreeBSD$
.include <src.opts.mk>
MK_SSP= no
MAN=
PROG= loader.kboot
NEWVERSWHAT= "kboot loader" ${MACHINE_ARCH}
BINDIR?= /boot
INSTALLFLAGS= -b
# Architecture-specific loader code
SRCS= conf.c metadata.c vers.c main.c ppc64_elf_freebsd.c
SRCS+= host_syscall.S hostcons.c hostdisk.c kerneltramp.S kbootfdt.c
SRCS+= ucmpdi2.c
LOADER_CD9660_SUPPORT?= yes
LOADER_MSDOS_SUPPORT?= no
LOADER_EXT2FS_SUPPORT?= yes
LOADER_UFS_SUPPORT?= yes
LOADER_NET_SUPPORT?= yes
LOADER_NFS_SUPPORT?= yes
LOADER_TFTP_SUPPORT?= no
LOADER_GZIP_SUPPORT?= yes
LOADER_FDT_SUPPORT= yes
LOADER_BZIP2_SUPPORT?= no
.if ${LOADER_FDT_SUPPORT} == "yes"
CFLAGS+= -I${.CURDIR}/../../fdt
CFLAGS+= -I${.OBJDIR}/../../fdt
CFLAGS+= -I${.CURDIR}/../../../contrib/libfdt
CFLAGS+= -DLOADER_FDT_SUPPORT
LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a
.endif
CFLAGS+= -mcpu=powerpc64
# Always add MI sources
.include "../../loader.mk"
.PATH: ${.CURDIR}/../../../libkern
CFLAGS+= -I${.CURDIR}/../../..
CFLAGS+= -I.
CLEANFILES+= loader.help
CFLAGS+= -Wall -ffreestanding -msoft-float -DAIM
# load address. set in linker script
RELOC?= 0x0
CFLAGS+= -DRELOC=${RELOC}
LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc
# 64-bit bridge extensions
CFLAGS+= -Wa,-mppc64bridge
# Pull in common loader code
#.PATH: ${.CURDIR}/../../ofw/common
#.include "${.CURDIR}/../../ofw/common/Makefile.inc"
DPADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA32}
LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA32}
loader.help: help.common help.kboot ${.CURDIR}/../../fdt/help.fdt
cat ${.ALLSRC} | \
awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
.PATH: ${.CURDIR}/../../forth
.include "${.CURDIR}/../../forth/Makefile.inc"
FILES+= loader.rc menu.rc
.include <bsd.prog.mk>
|