6 NEWVERSWHAT= "U-Boot loader" ${MACHINE_ARCH}
11 # Architecture-specific loader code
12 SRCS= start.S conf.c vers.c
14 .if !defined(LOADER_NO_DISK_SUPPORT)
15 LOADER_DISK_SUPPORT?= yes
17 LOADER_DISK_SUPPORT= no
19 LOADER_UFS_SUPPORT?= yes
20 LOADER_CD9660_SUPPORT?= no
21 LOADER_EXT2FS_SUPPORT?= no
22 LOADER_NET_SUPPORT?= yes
23 LOADER_NFS_SUPPORT?= yes
24 LOADER_TFTP_SUPPORT?= no
25 LOADER_GZIP_SUPPORT?= no
26 LOADER_BZIP2_SUPPORT?= no
28 LOADER_FDT_SUPPORT= yes
30 LOADER_FDT_SUPPORT= no
33 .if ${LOADER_DISK_SUPPORT} == "yes"
34 CFLAGS+= -DLOADER_DISK_SUPPORT
36 .if ${LOADER_UFS_SUPPORT} == "yes"
37 CFLAGS+= -DLOADER_UFS_SUPPORT
39 .if ${LOADER_CD9660_SUPPORT} == "yes"
40 CFLAGS+= -DLOADER_CD9660_SUPPORT
42 .if ${LOADER_EXT2FS_SUPPORT} == "yes"
43 CFLAGS+= -DLOADER_EXT2FS_SUPPORT
45 .if ${LOADER_GZIP_SUPPORT} == "yes"
46 CFLAGS+= -DLOADER_GZIP_SUPPORT
48 .if ${LOADER_BZIP2_SUPPORT} == "yes"
49 CFLAGS+= -DLOADER_BZIP2_SUPPORT
51 .if ${LOADER_NET_SUPPORT} == "yes"
52 CFLAGS+= -DLOADER_NET_SUPPORT
54 .if ${LOADER_NFS_SUPPORT} == "yes"
55 CFLAGS+= -DLOADER_NFS_SUPPORT
57 .if ${LOADER_TFTP_SUPPORT} == "yes"
58 CFLAGS+= -DLOADER_TFTP_SUPPORT
60 .if ${LOADER_FDT_SUPPORT} == "yes"
61 CFLAGS+= -I${.CURDIR}/../../fdt
62 CFLAGS+= -I${.OBJDIR}/../../fdt
63 CFLAGS+= -DLOADER_FDT_SUPPORT
64 LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a
67 .if !defined(NO_FORTH)
70 CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/arm
71 LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
74 # Always add MI sources
75 .PATH: ${.CURDIR}/../../common
76 .include "${.CURDIR}/../../common/Makefile.inc"
77 CFLAGS+= -I${.CURDIR}/../../common
80 CLEANFILES+= vers.c loader.help
82 CFLAGS+= -ffreestanding
84 LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.${MACHINE_CPUARCH}
86 # Pull in common loader code
87 .PATH: ${.CURDIR}/../../uboot/common
88 .include "${.CURDIR}/../../uboot/common/Makefile.inc"
89 CFLAGS+= -I${.CURDIR}/../../uboot/common
91 # U-Boot standalone support library
92 LIBUBOOT= ${.OBJDIR}/../../uboot/lib/libuboot.a
93 CFLAGS+= -I${.CURDIR}/../../uboot/lib
94 CFLAGS+= -I${.OBJDIR}/../../uboot/lib
96 # where to get libstand from
97 CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
99 DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBSTAND}
100 LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} -lstand
102 vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
103 sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
105 loader.help: help.common help.uboot
107 awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
109 .PATH: ${.CURDIR}/../../forth
112 .include <bsd.prog.mk>