Makefile revision 224857
1217044Snwhitehorn# $FreeBSD: head/sys/boot/powerpc/ps3/Makefile 224857 2011-08-14 00:20:37Z nwhitehorn $ 2217044Snwhitehorn 3217044Snwhitehorn.include <bsd.own.mk> 4217044SnwhitehornMK_SSP= no 5217044Snwhitehorn 6217044SnwhitehornPROG= loader.ps3 7217044SnwhitehornNEWVERSWHAT= "Playstation 3 loader" ${MACHINE_ARCH} 8217044SnwhitehornBINDIR?= /boot 9217044SnwhitehornINSTALLFLAGS= -b 10217044Snwhitehorn 11217044Snwhitehorn# Architecture-specific loader code 12217044SnwhitehornSRCS= start.S conf.c metadata.c vers.c main.c devicename.c ppc64_elf_freebsd.c 13224857SnwhitehornSRCS+= lv1call.S ps3cons.c font.h ps3mmu.c ps3net.c ps3repo.c \ 14224857Snwhitehorn ps3stor.c ps3disk.c ps3cdrom.c 15217044SnwhitehornSRCS+= ucmpdi2.c 16217044Snwhitehorn 17217044SnwhitehornLOADER_DISK_SUPPORT?= yes 18217044SnwhitehornLOADER_UFS_SUPPORT?= yes 19217044SnwhitehornLOADER_CD9660_SUPPORT?= yes 20224106SnwhitehornLOADER_EXT2FS_SUPPORT?= yes 21217044SnwhitehornLOADER_NET_SUPPORT?= yes 22217044SnwhitehornLOADER_NFS_SUPPORT?= yes 23217044SnwhitehornLOADER_TFTP_SUPPORT?= no 24217044SnwhitehornLOADER_GZIP_SUPPORT?= yes 25217044SnwhitehornLOADER_FDT_SUPPORT?= no 26217044SnwhitehornLOADER_BZIP2_SUPPORT?= no 27217044Snwhitehorn 28217044Snwhitehorn.if ${LOADER_DISK_SUPPORT} == "yes" 29217044SnwhitehornCFLAGS+= -DLOADER_DISK_SUPPORT 30217044Snwhitehorn.endif 31217044Snwhitehorn.if ${LOADER_UFS_SUPPORT} == "yes" 32217044SnwhitehornCFLAGS+= -DLOADER_UFS_SUPPORT 33217044Snwhitehorn.endif 34217044Snwhitehorn.if ${LOADER_CD9660_SUPPORT} == "yes" 35217044SnwhitehornCFLAGS+= -DLOADER_CD9660_SUPPORT 36217044Snwhitehorn.endif 37217044Snwhitehorn.if ${LOADER_EXT2FS_SUPPORT} == "yes" 38217044SnwhitehornCFLAGS+= -DLOADER_EXT2FS_SUPPORT 39217044Snwhitehorn.endif 40217044Snwhitehorn.if ${LOADER_GZIP_SUPPORT} == "yes" 41217044SnwhitehornCFLAGS+= -DLOADER_GZIP_SUPPORT 42217044Snwhitehorn.endif 43217044Snwhitehorn.if ${LOADER_BZIP2_SUPPORT} == "yes" 44217044SnwhitehornCFLAGS+= -DLOADER_BZIP2_SUPPORT 45217044Snwhitehorn.endif 46217044Snwhitehorn.if ${LOADER_NET_SUPPORT} == "yes" 47217044SnwhitehornCFLAGS+= -DLOADER_NET_SUPPORT 48217044Snwhitehorn.endif 49217044Snwhitehorn.if ${LOADER_NFS_SUPPORT} == "yes" 50217044SnwhitehornCFLAGS+= -DLOADER_NFS_SUPPORT 51217044Snwhitehorn.endif 52217044Snwhitehorn.if ${LOADER_TFTP_SUPPORT} == "yes" 53217044SnwhitehornCFLAGS+= -DLOADER_TFTP_SUPPORT 54217044Snwhitehorn.endif 55217044Snwhitehorn.if ${LOADER_FDT_SUPPORT} == "yes" 56217044SnwhitehornCFLAGS+= -I${.CURDIR}/../../fdt 57217044SnwhitehornCFLAGS+= -I${.OBJDIR}/../../fdt 58217044SnwhitehornCFLAGS+= -DLOADER_FDT_SUPPORT 59217044SnwhitehornLIBFDT= ${.OBJDIR}/../../fdt/libfdt.a 60217044Snwhitehorn.endif 61217044Snwhitehorn 62217044Snwhitehorn 63217044Snwhitehorn.if ${MK_FORTH} != "no" 64217044Snwhitehorn# Enable BootForth 65217044SnwhitehornBOOT_FORTH= yes 66217044SnwhitehornCFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/powerpc 67217044SnwhitehornLIBFICL= ${.OBJDIR}/../../ficl/libficl.a 68217044Snwhitehorn.endif 69217044Snwhitehorn 70217044Snwhitehorn# Avoid the open-close-dance for every file access as some firmwares perform 71217044Snwhitehorn# an auto-negotiation on every open of the network interface and thus causes 72217044Snwhitehorn# netbooting to take horribly long. 73217044SnwhitehornCFLAGS+= -DNETIF_OPEN_CLOSE_ONCE -mcpu=powerpc64 74217044Snwhitehorn 75217044Snwhitehorn# Always add MI sources 76217044Snwhitehorn.PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern 77217044Snwhitehorn.include "${.CURDIR}/../../common/Makefile.inc" 78217044SnwhitehornCFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. 79217044SnwhitehornCFLAGS+= -I. 80217044Snwhitehorn 81217044SnwhitehornCLEANFILES+= vers.c loader.help 82217044Snwhitehorn 83217044SnwhitehornCFLAGS+= -Wall -ffreestanding -msoft-float -DAIM 84217044Snwhitehorn# load address. set in linker script 85217044SnwhitehornRELOC?= 0x0 86217044SnwhitehornCFLAGS+= -DRELOC=${RELOC} 87217044Snwhitehorn 88217044SnwhitehornLDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc 89217044Snwhitehorn 90217044Snwhitehorn# 64-bit bridge extensions 91217044SnwhitehornCFLAGS+= -Wa,-mppc64bridge 92217044Snwhitehorn 93217044Snwhitehorn# Pull in common loader code 94217044Snwhitehorn#.PATH: ${.CURDIR}/../../ofw/common 95217044Snwhitehorn#.include "${.CURDIR}/../../ofw/common/Makefile.inc" 96217044Snwhitehorn 97217044Snwhitehorn# where to get libstand from 98217044SnwhitehornCFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ 99217044Snwhitehorn 100217044SnwhitehornDPADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND} 101217044SnwhitehornLDADD= ${LIBFICL} ${LIBOFW} -lstand 102217044Snwhitehorn 103217044SnwhitehornSC_DFLT_FONT=cp437 104217044Snwhitehorn 105217044Snwhitehornfont.h: 106217044Snwhitehorn 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 107217044Snwhitehorn 108217044Snwhitehornvers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version 109217044Snwhitehorn sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} 110217044Snwhitehorn 111217044Snwhitehornloader.help: help.common help.ps3 112217044Snwhitehorn cat ${.ALLSRC} | \ 113217044Snwhitehorn awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} 114217044Snwhitehorn 115217044Snwhitehorn.PATH: ${.CURDIR}/../../forth 116217044SnwhitehornFILES= loader.help loader.4th support.4th loader.conf 117222472SjulianFILES+= screen.4th frames.4th 118222417SjulianFILES+= beastie.4th brand.4th check-password.4th color.4th delay.4th 119222472SjulianFILES+= menu.4th menu-commands.4th shortcuts.4th version.4th 120217044SnwhitehornFILESDIR_loader.conf= /boot/defaults 121217044Snwhitehorn 122217044Snwhitehorn.if !exists(${DESTDIR}/boot/loader.rc) 123217044SnwhitehornFILES+= loader.rc 124217044Snwhitehorn.endif 125217044Snwhitehorn 126222417Sjulian.if !exists(${DESTDIR}/boot/menu.rc) 127222417SjulianFILES+= menu.rc 128222417Sjulian.endif 129222417Sjulian 130217044Snwhitehorn.include <bsd.prog.mk> 131