8 NEWVERSWHAT= "Playstation 3 loader" ${MACHINE_ARCH}
12 # Architecture-specific loader code
13 SRCS= start.S conf.c metadata.c vers.c main.c devicename.c ppc64_elf_freebsd.c
14 SRCS+= lv1call.S ps3cons.c font.h ps3mmu.c ps3net.c ps3repo.c \
15 ps3stor.c ps3disk.c ps3cdrom.c
18 LOADER_DISK_SUPPORT?= yes
19 LOADER_UFS_SUPPORT?= yes
20 LOADER_CD9660_SUPPORT?= yes
21 LOADER_EXT2FS_SUPPORT?= yes
22 LOADER_NET_SUPPORT?= yes
23 LOADER_NFS_SUPPORT?= yes
24 LOADER_TFTP_SUPPORT?= no
25 LOADER_GZIP_SUPPORT?= yes
26 LOADER_FDT_SUPPORT?= no
27 LOADER_BZIP2_SUPPORT?= no
29 .if ${LOADER_DISK_SUPPORT} == "yes"
30 CFLAGS+= -DLOADER_DISK_SUPPORT
32 .if ${LOADER_UFS_SUPPORT} == "yes"
33 CFLAGS+= -DLOADER_UFS_SUPPORT
35 .if ${LOADER_CD9660_SUPPORT} == "yes"
36 CFLAGS+= -DLOADER_CD9660_SUPPORT
38 .if ${LOADER_EXT2FS_SUPPORT} == "yes"
39 CFLAGS+= -DLOADER_EXT2FS_SUPPORT
41 .if ${LOADER_GZIP_SUPPORT} == "yes"
42 CFLAGS+= -DLOADER_GZIP_SUPPORT
44 .if ${LOADER_BZIP2_SUPPORT} == "yes"
45 CFLAGS+= -DLOADER_BZIP2_SUPPORT
47 .if ${LOADER_NET_SUPPORT} == "yes"
48 CFLAGS+= -DLOADER_NET_SUPPORT
50 .if ${LOADER_NFS_SUPPORT} == "yes"
51 CFLAGS+= -DLOADER_NFS_SUPPORT
53 .if ${LOADER_TFTP_SUPPORT} == "yes"
54 CFLAGS+= -DLOADER_TFTP_SUPPORT
56 .if ${LOADER_FDT_SUPPORT} == "yes"
57 CFLAGS+= -I${.CURDIR}/../../fdt
58 CFLAGS+= -I${.OBJDIR}/../../fdt
59 CFLAGS+= -DLOADER_FDT_SUPPORT
60 LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a
64 .if ${MK_FORTH} != "no"
67 CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl
68 CFLAGS+= -I${.CURDIR}/../../ficl/powerpc
69 LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
72 CFLAGS+= -mcpu=powerpc64
74 # Always add MI sources
75 .PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern
76 .include "${.CURDIR}/../../common/Makefile.inc"
77 CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../..
80 CLEANFILES+= loader.help
82 CFLAGS+= -Wall -ffreestanding -msoft-float -DAIM
83 # load address. set in linker script
85 CFLAGS+= -DRELOC=${RELOC}
87 LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc
89 # Pull in common loader code
90 #.PATH: ${.CURDIR}/../../ofw/common
91 #.include "${.CURDIR}/../../ofw/common/Makefile.inc"
93 # where to get libstand from
94 LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a
95 CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
97 DPADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND}
98 LDADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND}
103 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 loader.help: help.common help.ps3 ${.CURDIR}/../../fdt/help.fdt
107 awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
109 .PATH: ${.CURDIR}/../../forth
110 .include "${.CURDIR}/../../forth/Makefile.inc"
112 FILES+= loader.rc menu.rc
114 .include <bsd.prog.mk>