1 2LOADER_UFS_SUPPORT?= yes 3LOADER_CD9660_SUPPORT?= no 4LOADER_MSDOS_SUPPORT?= no 5LOADER_EXT2FS_SUPPORT?= no 6LOADER_NET_SUPPORT?= yes 7LOADER_NFS_SUPPORT?= yes 8LOADER_TFTP_SUPPORT?= no 9LOADER_GZIP_SUPPORT?= no 10LOADER_BZIP2_SUPPORT?= no 11LOADER_DISK_SUPPORT?= yes 12 13.include <bsd.init.mk> 14 15.include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc" 16 17LOADER_UBLDR_BIN?= yes 18.if ${LOADER_UBLDR_BIN} != "no" 19FILES+= ubldr ubldr.bin 20.else 21PROG= ubldr 22.endif 23 24NEWVERSWHAT= "U-Boot loader" ${MACHINE_ARCH} 25BINDIR= /boot/uboot 26INSTALLFLAGS= -b 27WARNS?= 1 28 29.PATH: ${BOOTSRC}/common 30.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH} 31 32 33.if ${COMPILER_TYPE} == "gcc" 34CWARNFLAGS.self_reloc.c+= -Wno-error=maybe-uninitialized 35.endif 36 37HELP_FILES= ${.CURDIR}/help.uboot ${BOOTSRC}/fdt/help.fdt 38HELP_FILENAME= loader.help.uboot 39 40# Always add MI sources 41.include "${BOOTSRC}/loader.mk" 42 43LDSCRIPT= ${.CURDIR}/arch/${MACHINE_CPUARCH}/ldscript.${MACHINE_CPUARCH} 44LDFLAGS= -nostdlib -static -T ${LDSCRIPT} 45LDFLAGS+= -Wl,-znotext 46 47SRCS+= main.c vers.c 48SRCS+= copy.c devicename.c elf_freebsd.c glue.c 49SRCS+= net.c reboot.c time.c 50SRCS+= uboot_console.c uboot_disk.c uboot_fdt.c uboot_module.c 51 52CFLAGS.glue.c+= -DHAVE_MEMCPY -I${SRCTOP}/sys/contrib/zlib 53 54CFLAGS+= -I${BOOTSRC}/common 55CFLAGS+= -I${.CURDIR} 56CFLAGS+= -I${.OBJDIR} 57 58.if ${MACHINE_CPUARCH} == "arm" 59SRCS+= metadata.c 60.endif 61 62.include "${BOOTSRC}/fdt.mk" 63 64# Pick up the bootstrap header for some interface items 65CFLAGS+= -I${LDRSRC} 66 67# libfdt headers 68CFLAGS+= -I${FDTSRC} 69 70.ifdef(BOOT_DISK_DEBUG) 71# Make the disk code more talkative 72CFLAGS+= -DDISK_DEBUG 73.endif 74 75.if ${LOADER_UBLDR_BIN} != "no" 76OBJS+= ${SRCS:N*.h:R:S/$/.o/g} 77ubldr ubldr.bin ubldr.pie: ${OBJS} 78.endif 79 80DPADD= ${LDR_INTERP} ${LIBSAFDT} ${LIBSA} 81LDADD= ${LDR_INTERP} ${LIBSAFDT} ${LIBSA} 82 83.include <bsd.prog.mk> 84