1LOADER_UFS_SUPPORT?= yes 2LOADER_CD9660_SUPPORT?= no 3LOADER_MSDOS_SUPPORT?= no 4LOADER_EXT2FS_SUPPORT?= no 5LOADER_NET_SUPPORT?= yes 6LOADER_NFS_SUPPORT?= yes 7LOADER_TFTP_SUPPORT?= no 8LOADER_GZIP_SUPPORT?= no 9LOADER_BZIP2_SUPPORT?= no 10LOADER_DISK_SUPPORT?= yes 11 12BINDIR= /boot/uboot 13 14.include <bsd.init.mk> 15 16.include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc" 17 18LOADER_UBLDR_BIN?= yes 19.if ${LOADER_UBLDR_BIN} != "no" 20FILES+= ubldr ubldr.bin 21.else 22PROG= ubldr 23.endif 24 25NEWVERSWHAT= "U-Boot loader" ${MACHINE_ARCH} 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}/${MACHINE_CPUARCH}.ldscript 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