1# $FreeBSD$ 2 3LOADER_UFS_SUPPORT?= yes 4LOADER_CD9660_SUPPORT?= no 5LOADER_MSDOS_SUPPORT?= no 6LOADER_EXT2FS_SUPPORT?= no 7LOADER_NET_SUPPORT?= yes 8LOADER_NFS_SUPPORT?= yes 9LOADER_TFTP_SUPPORT?= no 10LOADER_GZIP_SUPPORT?= no 11LOADER_BZIP2_SUPPORT?= no 12LOADER_DISK_SUPPORT?= yes 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} 26BINDIR= /boot/uboot 27INSTALLFLAGS= -b 28WARNS?= 1 29 30.PATH: ${BOOTSRC}/common 31.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH} 32 33 34.if ${COMPILER_TYPE} == "gcc" 35CWARNFLAGS.self_reloc.c+= -Wno-error=maybe-uninitialized 36.endif 37 38HELP_FILES= ${.CURDIR}/help.uboot ${BOOTSRC}/fdt/help.fdt 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 gfx_fb_stub.c 50SRCS+= uboot_console.c uboot_disk.c uboot_fdt.c uboot_module.c 51 52CFLAGS.gfx_fb_stub.c += -I${SRCTOP}/contrib/pnglite -I${SRCTOP}/sys/teken 53CFLAGS.glue.c+= -DHAVE_MEMCPY -I${SRCTOP}/sys/contrib/zlib 54 55CFLAGS+= -I${BOOTSRC}/common 56CFLAGS+= -I${.CURDIR} 57CFLAGS+= -I${.OBJDIR} 58 59.if ${MACHINE_CPUARCH} == "arm" 60SRCS+= metadata.c 61.endif 62 63.include "${BOOTSRC}/fdt.mk" 64 65# Pick up the bootstrap header for some interface items 66CFLAGS+= -I${LDRSRC} 67 68# libfdt headers 69CFLAGS+= -I${FDTSRC} 70 71.ifdef(BOOT_DISK_DEBUG) 72# Make the disk code more talkative 73CFLAGS+= -DDISK_DEBUG 74.endif 75 76.if ${LOADER_UBLDR_BIN} != "no" 77OBJS+= ${SRCS:N*.h:R:S/$/.o/g} 78ubldr ubldr.bin ubldr.pie: ${OBJS} 79.endif 80 81DPADD= ${LDR_INTERP} ${LIBFDT} ${LIBSA} 82LDADD= ${LDR_INTERP} ${LIBFDT} ${LIBSA} 83 84.include <bsd.prog.mk> 85