Deleted Added
full compact
Makefile (279799) Makefile (281002)
1# $FreeBSD: head/sys/boot/powerpc/ofw/Makefile 279799 2015-03-09 02:57:34Z nwhitehorn $
1# $FreeBSD: head/sys/boot/powerpc/ofw/Makefile 281002 2015-04-02 20:07:05Z jkim $
2
3.include <src.opts.mk>
4MK_SSP= no
5
6PROG= loader
7NEWVERSWHAT= "Open Firmware loader" ${MACHINE_ARCH}
8BINDIR?= /boot
9INSTALLFLAGS= -b
10
11# Architecture-specific loader code
12SRCS= conf.c metadata.c vers.c start.c
13SRCS+= ucmpdi2.c
14
15LOADER_DISK_SUPPORT?= yes
16LOADER_UFS_SUPPORT?= yes
17LOADER_CD9660_SUPPORT?= yes
18LOADER_EXT2FS_SUPPORT?= no
19LOADER_NET_SUPPORT?= yes
20LOADER_NFS_SUPPORT?= yes
21LOADER_TFTP_SUPPORT?= no
22LOADER_GZIP_SUPPORT?= yes
23LOADER_BZIP2_SUPPORT?= no
24LOADER_FDT_SUPPORT?= yes
25
26.if ${LOADER_DISK_SUPPORT} == "yes"
27CFLAGS+= -DLOADER_DISK_SUPPORT
28.endif
29.if ${LOADER_UFS_SUPPORT} == "yes"
30CFLAGS+= -DLOADER_UFS_SUPPORT
31.endif
32.if ${LOADER_CD9660_SUPPORT} == "yes"
33CFLAGS+= -DLOADER_CD9660_SUPPORT
34.endif
35.if ${LOADER_EXT2FS_SUPPORT} == "yes"
36CFLAGS+= -DLOADER_EXT2FS_SUPPORT
37.endif
38.if ${LOADER_GZIP_SUPPORT} == "yes"
39CFLAGS+= -DLOADER_GZIP_SUPPORT
40.endif
41.if ${LOADER_BZIP2_SUPPORT} == "yes"
42CFLAGS+= -DLOADER_BZIP2_SUPPORT
43.endif
44.if ${LOADER_NET_SUPPORT} == "yes"
45CFLAGS+= -DLOADER_NET_SUPPORT
46.endif
47.if ${LOADER_NFS_SUPPORT} == "yes"
48CFLAGS+= -DLOADER_NFS_SUPPORT
49.endif
50.if ${LOADER_TFTP_SUPPORT} == "yes"
51CFLAGS+= -DLOADER_TFTP_SUPPORT
52.endif
53.if ${LOADER_FDT_SUPPORT} == "yes"
54SRCS+= ofwfdt.c
55CFLAGS+= -I${.CURDIR}/../../fdt
56CFLAGS+= -I${.OBJDIR}/../../fdt
57CFLAGS+= -I${.CURDIR}/../../../contrib/libfdt
58CFLAGS+= -DLOADER_FDT_SUPPORT
59LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a
60.endif
61
62.if ${MK_FORTH} != "no"
63# Enable BootForth
64BOOT_FORTH= yes
65CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/powerpc
66LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
67.endif
68
69# Avoid the open-close-dance for every file access as some firmwares perform
70# an auto-negotiation on every open of the network interface and thus causes
71# netbooting to take horribly long.
72CFLAGS+= -DNETIF_OPEN_CLOSE_ONCE
73
74# Always add MI sources
75.PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern
76.include "${.CURDIR}/../../common/Makefile.inc"
77CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../..
78CFLAGS+= -I.
79
80CLEANFILES+= vers.c loader.help
81
82CFLAGS+= -ffreestanding -msoft-float
83# load address. set in linker script
84RELOC?= 0x1C00000
85CFLAGS+= -DRELOC=${RELOC}
86
87LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc
88
89# Pull in common loader code
90.PATH: ${.CURDIR}/../../ofw/common
91.include "${.CURDIR}/../../ofw/common/Makefile.inc"
92
93# Open Firmware standalone support library
94LIBOFW= ${.OBJDIR}/../../ofw/libofw/libofw.a
95CFLAGS+= -I${.CURDIR}/../../ofw/libofw
96
97# where to get libstand from
98LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a
99CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
100
101DPADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSTAND}
102LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSTAND}
103
104vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
105 sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
106
107loader.help: help.common help.ofw ${.CURDIR}/../../fdt/help.fdt
108 cat ${.ALLSRC} | \
109 awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
110
2
3.include <src.opts.mk>
4MK_SSP= no
5
6PROG= loader
7NEWVERSWHAT= "Open Firmware loader" ${MACHINE_ARCH}
8BINDIR?= /boot
9INSTALLFLAGS= -b
10
11# Architecture-specific loader code
12SRCS= conf.c metadata.c vers.c start.c
13SRCS+= ucmpdi2.c
14
15LOADER_DISK_SUPPORT?= yes
16LOADER_UFS_SUPPORT?= yes
17LOADER_CD9660_SUPPORT?= yes
18LOADER_EXT2FS_SUPPORT?= no
19LOADER_NET_SUPPORT?= yes
20LOADER_NFS_SUPPORT?= yes
21LOADER_TFTP_SUPPORT?= no
22LOADER_GZIP_SUPPORT?= yes
23LOADER_BZIP2_SUPPORT?= no
24LOADER_FDT_SUPPORT?= yes
25
26.if ${LOADER_DISK_SUPPORT} == "yes"
27CFLAGS+= -DLOADER_DISK_SUPPORT
28.endif
29.if ${LOADER_UFS_SUPPORT} == "yes"
30CFLAGS+= -DLOADER_UFS_SUPPORT
31.endif
32.if ${LOADER_CD9660_SUPPORT} == "yes"
33CFLAGS+= -DLOADER_CD9660_SUPPORT
34.endif
35.if ${LOADER_EXT2FS_SUPPORT} == "yes"
36CFLAGS+= -DLOADER_EXT2FS_SUPPORT
37.endif
38.if ${LOADER_GZIP_SUPPORT} == "yes"
39CFLAGS+= -DLOADER_GZIP_SUPPORT
40.endif
41.if ${LOADER_BZIP2_SUPPORT} == "yes"
42CFLAGS+= -DLOADER_BZIP2_SUPPORT
43.endif
44.if ${LOADER_NET_SUPPORT} == "yes"
45CFLAGS+= -DLOADER_NET_SUPPORT
46.endif
47.if ${LOADER_NFS_SUPPORT} == "yes"
48CFLAGS+= -DLOADER_NFS_SUPPORT
49.endif
50.if ${LOADER_TFTP_SUPPORT} == "yes"
51CFLAGS+= -DLOADER_TFTP_SUPPORT
52.endif
53.if ${LOADER_FDT_SUPPORT} == "yes"
54SRCS+= ofwfdt.c
55CFLAGS+= -I${.CURDIR}/../../fdt
56CFLAGS+= -I${.OBJDIR}/../../fdt
57CFLAGS+= -I${.CURDIR}/../../../contrib/libfdt
58CFLAGS+= -DLOADER_FDT_SUPPORT
59LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a
60.endif
61
62.if ${MK_FORTH} != "no"
63# Enable BootForth
64BOOT_FORTH= yes
65CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/powerpc
66LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
67.endif
68
69# Avoid the open-close-dance for every file access as some firmwares perform
70# an auto-negotiation on every open of the network interface and thus causes
71# netbooting to take horribly long.
72CFLAGS+= -DNETIF_OPEN_CLOSE_ONCE
73
74# Always add MI sources
75.PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern
76.include "${.CURDIR}/../../common/Makefile.inc"
77CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../..
78CFLAGS+= -I.
79
80CLEANFILES+= vers.c loader.help
81
82CFLAGS+= -ffreestanding -msoft-float
83# load address. set in linker script
84RELOC?= 0x1C00000
85CFLAGS+= -DRELOC=${RELOC}
86
87LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc
88
89# Pull in common loader code
90.PATH: ${.CURDIR}/../../ofw/common
91.include "${.CURDIR}/../../ofw/common/Makefile.inc"
92
93# Open Firmware standalone support library
94LIBOFW= ${.OBJDIR}/../../ofw/libofw/libofw.a
95CFLAGS+= -I${.CURDIR}/../../ofw/libofw
96
97# where to get libstand from
98LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a
99CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
100
101DPADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSTAND}
102LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSTAND}
103
104vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
105 sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
106
107loader.help: help.common help.ofw ${.CURDIR}/../../fdt/help.fdt
108 cat ${.ALLSRC} | \
109 awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
110
111.PATH: ${.CURDIR}/../../forth
112FILES= loader.help loader.4th support.4th loader.conf
113FILES+= screen.4th frames.4th
114FILES+= beastie.4th brand.4th check-password.4th color.4th delay.4th
115FILES+= menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th
116FILESDIR_loader.conf= /boot/defaults
111.include "${.CURDIR}/../../forth/Makefile.inc"
117
118.if !exists(${DESTDIR}/boot/loader.rc)
119FILES+= loader.rc
120.endif
121
122.if !exists(${DESTDIR}/boot/menu.rc)
123FILES+= menu.rc
124.endif
125
126.include <bsd.prog.mk>
112
113.if !exists(${DESTDIR}/boot/loader.rc)
114FILES+= loader.rc
115.endif
116
117.if !exists(${DESTDIR}/boot/menu.rc)
118FILES+= menu.rc
119.endif
120
121.include <bsd.prog.mk>