Deleted Added
sdiff udiff text old ( 276479 ) new ( 281002 )
full compact
1# $FreeBSD: head/sys/boot/powerpc/ps3/Makefile 281002 2015-04-02 20:07:05Z jkim $
2
3.include <src.opts.mk>
4MK_SSP= no
5
6PROG= loader.ps3
7NEWVERSWHAT= "Playstation 3 loader" ${MACHINE_ARCH}
8BINDIR?= /boot
9INSTALLFLAGS= -b
10
11# Architecture-specific loader code
12SRCS= start.S conf.c metadata.c vers.c main.c devicename.c ppc64_elf_freebsd.c
13SRCS+= lv1call.S ps3cons.c font.h ps3mmu.c ps3net.c ps3repo.c \
14 ps3stor.c ps3disk.c ps3cdrom.c
15SRCS+= ucmpdi2.c
16
17LOADER_DISK_SUPPORT?= yes
18LOADER_UFS_SUPPORT?= yes
19LOADER_CD9660_SUPPORT?= yes
20LOADER_EXT2FS_SUPPORT?= yes
21LOADER_NET_SUPPORT?= yes
22LOADER_NFS_SUPPORT?= yes
23LOADER_TFTP_SUPPORT?= no
24LOADER_GZIP_SUPPORT?= yes
25LOADER_FDT_SUPPORT?= no
26LOADER_BZIP2_SUPPORT?= no
27
28.if ${LOADER_DISK_SUPPORT} == "yes"
29CFLAGS+= -DLOADER_DISK_SUPPORT
30.endif
31.if ${LOADER_UFS_SUPPORT} == "yes"
32CFLAGS+= -DLOADER_UFS_SUPPORT
33.endif
34.if ${LOADER_CD9660_SUPPORT} == "yes"
35CFLAGS+= -DLOADER_CD9660_SUPPORT
36.endif
37.if ${LOADER_EXT2FS_SUPPORT} == "yes"
38CFLAGS+= -DLOADER_EXT2FS_SUPPORT
39.endif
40.if ${LOADER_GZIP_SUPPORT} == "yes"
41CFLAGS+= -DLOADER_GZIP_SUPPORT
42.endif
43.if ${LOADER_BZIP2_SUPPORT} == "yes"
44CFLAGS+= -DLOADER_BZIP2_SUPPORT
45.endif
46.if ${LOADER_NET_SUPPORT} == "yes"
47CFLAGS+= -DLOADER_NET_SUPPORT
48.endif
49.if ${LOADER_NFS_SUPPORT} == "yes"
50CFLAGS+= -DLOADER_NFS_SUPPORT
51.endif
52.if ${LOADER_TFTP_SUPPORT} == "yes"
53CFLAGS+= -DLOADER_TFTP_SUPPORT
54.endif
55.if ${LOADER_FDT_SUPPORT} == "yes"
56CFLAGS+= -I${.CURDIR}/../../fdt
57CFLAGS+= -I${.OBJDIR}/../../fdt
58CFLAGS+= -DLOADER_FDT_SUPPORT
59LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a
60.endif
61
62
63.if ${MK_FORTH} != "no"
64# Enable BootForth
65BOOT_FORTH= yes
66CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/powerpc
67LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
68.endif
69
70# Avoid the open-close-dance for every file access as some firmwares perform
71# an auto-negotiation on every open of the network interface and thus causes
72# netbooting to take horribly long.
73CFLAGS+= -DNETIF_OPEN_CLOSE_ONCE -mcpu=powerpc64
74
75# Always add MI sources
76.PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern
77.include "${.CURDIR}/../../common/Makefile.inc"
78CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../..
79CFLAGS+= -I.
80
81CLEANFILES+= vers.c loader.help
82
83CFLAGS+= -Wall -ffreestanding -msoft-float -DAIM
84# load address. set in linker script
85RELOC?= 0x0
86CFLAGS+= -DRELOC=${RELOC}
87
88LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc
89
90# Pull in common loader code
91#.PATH: ${.CURDIR}/../../ofw/common
92#.include "${.CURDIR}/../../ofw/common/Makefile.inc"
93
94# where to get libstand from
95LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a
96CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
97
98DPADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND}
99LDADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND}
100
101SC_DFLT_FONT=cp437
102
103font.h:
104 uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 'u_char dflt_font_16[16*256] = {' '};' < ${SC_DFLT_FONT}-8x16 > font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x14.fnt && file2c 'u_char dflt_font_14[14*256] = {' '};' < ${SC_DFLT_FONT}-8x14 >> font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x8.fnt && file2c 'u_char dflt_font_8[8*256] = {' '};' < ${SC_DFLT_FONT}-8x8 >> font.h
105
106vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
107 sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
108
109loader.help: help.common help.ps3 ${.CURDIR}/../../fdt/help.fdt
110 cat ${.ALLSRC} | \
111 awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
112
113.include "${.CURDIR}/../../forth/Makefile.inc"
114
115.if !exists(${DESTDIR}/boot/loader.rc)
116FILES+= loader.rc
117.endif
118
119.if !exists(${DESTDIR}/boot/menu.rc)
120FILES+= menu.rc
121.endif
122
123.include <bsd.prog.mk>