Index: stable/11/sys/boot/Makefile.ficl =================================================================== --- stable/11/sys/boot/Makefile.ficl (revision 329130) +++ stable/11/sys/boot/Makefile.ficl (revision 329131) @@ -1,43 +1,43 @@ # $FreeBSD$ # Common flags to build FICL related files FICLDIR?= ${SRCTOP}/sys/boot/ficl .if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32) FICL_CPUARCH= i386 .elif ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el" FICL_CPUARCH= mips64 .else FICL_CPUARCH= ${MACHINE_CPUARCH} .endif .PATH: ${FICLDIR} ${FICLDIR}/${FICL_CPUARCH} .if ${MACHINE_CPUARCH} == "amd64" .if defined(FICL32) CFLAGS+= -m32 -I. .else CFLAGS+= -fPIC .endif .endif .if ${MACHINE_ARCH} == "powerpc64" CFLAGS+= -m32 -mcpu=powerpc -I. .endif CFLAGS+= -I${FICLDIR} -I${FICLDIR}/${FICL_CPUARCH} \ - -I${FICLDIR}/../common -I${SASRC} + -I${FICLDIR}/../common .if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32) .if !exists(machine) ${SRCS:M*.c:R:S/$/.o/g}: machine beforedepend ${OBJS}: machine .endif machine: .NOMETA ln -sf ${.CURDIR}/../../i386/include machine CLEANFILES+= machine .endif Index: stable/11/sys/boot/Makefile.inc =================================================================== --- stable/11/sys/boot/Makefile.inc (revision 329130) +++ stable/11/sys/boot/Makefile.inc (revision 329131) @@ -1,43 +1,45 @@ # $FreeBSD$ .include .if !defined(__BOOT_MAKEFILE_INC__) __BOOT_MAKEFILE_INC__=${MFILE} SASRC=${SRCTOP}/lib/libstand -# Normal stand alone library +# Normal standalone library LIBSA=${OBJTOP}/sys/boot/libsa/libstand.a -# stand alone library compiled for 32-bit version of the processor +# Standalone library compiled for 32-bit version of the processor LIBSA32=${OBJTOP}/sys/boot/libstand32/libstand.a -# stand along library compiled for userboot +# Standalone library compiled for userboot LIBSAU=${OBJTOP}/sys/boot/userboot/libstand/libstand.a + +CFLAGS+=-I${SASRC} SSP_CFLAGS= .if ${MACHINE_CPUARCH} == "arm" # Do not generate movt/movw, because the relocation fixup for them does not # translate to the -Bsymbolic -pie format required by self_reloc() in loader(8). # Also, the fpu is not available in a standalone environment. .if ${COMPILER_VERSION} < 30800 CFLAGS.clang+= -mllvm -arm-use-movt=0 .else CFLAGS.clang+= -mno-movt .endif CFLAGS.clang+= -mfpu=none .endif # The boot loader build uses dd status=none, where possible, for reproducible # build output (since performance varies from run to run). Trouble is that # option was recently (10.3) added to FreeBSD and is non-standard. Only use it # when this test succeeds rather than require dd to be a bootstrap tool. DD_NOSTATUS!=(dd status=none count=0 2> /dev/null && echo status=none) || true DD=dd ${DD_NOSTATUS} .if ${MK_LOADER_FORCE_LE} != "no" .if ${MACHINE_ARCH} == "powerpc64" CFLAGS+= -mlittle-endian .endif .endif .endif Index: stable/11/sys/boot/arm/uboot/Makefile =================================================================== --- stable/11/sys/boot/arm/uboot/Makefile (revision 329130) +++ stable/11/sys/boot/arm/uboot/Makefile (revision 329131) @@ -1,161 +1,159 @@ # $FreeBSD$ .include FILES= ubldr ubldr.bin NEWVERSWHAT= "U-Boot loader" ${MACHINE_ARCH} BINDIR?= /boot INSTALLFLAGS= -b WARNS?= 1 # Address at which ubldr will be loaded. # This varies for different boards and SOCs. UBLDR_LOADADDR?= 0x1000000 # Architecture-specific loader code SRCS= start.S conf.c self_reloc.c vers.c .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} > 40201 CWARNFLAGS.self_reloc.c+= -Wno-error=maybe-uninitialized .endif .if !defined(LOADER_NO_DISK_SUPPORT) LOADER_DISK_SUPPORT?= yes .else LOADER_DISK_SUPPORT= no .endif LOADER_UFS_SUPPORT?= yes LOADER_CD9660_SUPPORT?= no LOADER_EXT2FS_SUPPORT?= no .if ${MK_NAND} != "no" LOADER_NANDFS_SUPPORT?= yes .else LOADER_NANDFS_SUPPORT?= no .endif LOADER_NET_SUPPORT?= yes LOADER_NFS_SUPPORT?= yes LOADER_TFTP_SUPPORT?= no LOADER_GZIP_SUPPORT?= no LOADER_BZIP2_SUPPORT?= no .if ${MK_FDT} != "no" LOADER_FDT_SUPPORT= yes .else LOADER_FDT_SUPPORT= no .endif .if ${LOADER_DISK_SUPPORT} == "yes" CFLAGS+= -DLOADER_DISK_SUPPORT .endif .if ${LOADER_UFS_SUPPORT} == "yes" CFLAGS+= -DLOADER_UFS_SUPPORT .endif .if ${LOADER_CD9660_SUPPORT} == "yes" CFLAGS+= -DLOADER_CD9660_SUPPORT .endif .if ${LOADER_EXT2FS_SUPPORT} == "yes" CFLAGS+= -DLOADER_EXT2FS_SUPPORT .endif .if ${LOADER_NANDFS_SUPPORT} == "yes" CFLAGS+= -DLOADER_NANDFS_SUPPORT .endif .if ${LOADER_GZIP_SUPPORT} == "yes" CFLAGS+= -DLOADER_GZIP_SUPPORT .endif .if ${LOADER_BZIP2_SUPPORT} == "yes" CFLAGS+= -DLOADER_BZIP2_SUPPORT .endif .if ${LOADER_NET_SUPPORT} == "yes" CFLAGS+= -DLOADER_NET_SUPPORT .endif .if ${LOADER_NFS_SUPPORT} == "yes" CFLAGS+= -DLOADER_NFS_SUPPORT .endif .if ${LOADER_TFTP_SUPPORT} == "yes" CFLAGS+= -DLOADER_TFTP_SUPPORT .endif .if ${LOADER_FDT_SUPPORT} == "yes" CFLAGS+= -I${.CURDIR}/../../fdt CFLAGS+= -I${.OBJDIR}/../../fdt CFLAGS+= -DLOADER_FDT_SUPPORT LIBUBOOT_FDT= ${.OBJDIR}/../../uboot/fdt/libuboot_fdt.a LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a .endif .if ${MK_FORTH} != "no" # Enable BootForth BOOT_FORTH= yes CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl CFLAGS+= -I${.CURDIR}/../../ficl/arm LIBFICL= ${.OBJDIR}/../../ficl/libficl.a .endif # Always add MI sources .PATH: ${.CURDIR}/../../common .include "${.CURDIR}/../../common/Makefile.inc" CFLAGS+= -I${.CURDIR}/../../common CFLAGS+= -I. CLEANFILES+= loader.help CFLAGS+= -ffreestanding -msoft-float LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.${MACHINE_CPUARCH} LDFLAGS+= -Wl,-znotext # Pull in common loader code .PATH: ${.CURDIR}/../../uboot/common .include "${.CURDIR}/../../uboot/common/Makefile.inc" CFLAGS+= -I${.CURDIR}/../../uboot/common # U-Boot standalone support library LIBUBOOT= ${.OBJDIR}/../../uboot/lib/libuboot.a CFLAGS+= -I${.CURDIR}/../../uboot/lib CFLAGS+= -I${.OBJDIR}/../../uboot/lib -CFLAGS+= -I${SASRC} - CFLAGS+= -fPIC # clang doesn't understand %D as a specifier to printf NO_WERROR.clang= DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA} LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA} OBJS+= ${SRCS:N*.h:R:S/$/.o/g} loader.help: help.common help.uboot ${.CURDIR}/../../fdt/help.fdt cat ${.ALLSRC} | \ awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} ldscript.abs: echo "UBLDR_LOADADDR = ${UBLDR_LOADADDR};" >${.TARGET} ldscript.pie: echo "UBLDR_LOADADDR = 0;" >${.TARGET} ubldr: ${OBJS} ldscript.abs ${.CURDIR}/ldscript.${MACHINE_CPUARCH} ${DPADD} ${CC} ${CFLAGS} -T ldscript.abs ${LDFLAGS} \ -o ${.TARGET} ${OBJS} ${LDADD} ubldr.pie: ${OBJS} ldscript.pie ${.CURDIR}/ldscript.${MACHINE_CPUARCH} ${DPADD} ${CC} ${CFLAGS} -T ldscript.pie ${LDFLAGS} -pie -Wl,-Bsymbolic \ -o ${.TARGET} ${OBJS} ${LDADD} ubldr.bin: ubldr.pie ${OBJCOPY} -S -O binary ubldr.pie ${.TARGET} CLEANFILES+= ldscript.abs ldscript.pie ubldr ubldr.pie ubldr.bin .if !defined(LOADER_ONLY) .PATH: ${.CURDIR}/../../forth .include "${.CURDIR}/../../forth/Makefile.inc" # Install loader.rc. FILES+= loader.rc # Put sample menu.rc on disk but don't enable it by default. FILES+= menu.rc FILESNAME_menu.rc= menu.rc.sample .endif .include Index: stable/11/sys/boot/common/Makefile.inc =================================================================== --- stable/11/sys/boot/common/Makefile.inc (revision 329130) +++ stable/11/sys/boot/common/Makefile.inc (revision 329131) @@ -1,87 +1,86 @@ # $FreeBSD$ SRCS+= boot.c commands.c console.c devopen.c interp.c SRCS+= interp_backslash.c interp_parse.c ls.c misc.c SRCS+= module.c panic.c .if ${MACHINE} == "i386" || ${MACHINE_CPUARCH} == "amd64" SRCS+= load_elf32.c load_elf32_obj.c reloc_elf32.c SRCS+= load_elf64.c load_elf64_obj.c reloc_elf64.c .elif ${MACHINE} == "pc98" SRCS+= load_elf32.c load_elf32_obj.c reloc_elf32.c .elif ${MACHINE_CPUARCH} == "aarch64" SRCS+= load_elf64.c reloc_elf64.c .elif ${MACHINE_CPUARCH} == "arm" SRCS+= load_elf32.c reloc_elf32.c .elif ${MACHINE_CPUARCH} == "powerpc" SRCS+= load_elf32.c reloc_elf32.c SRCS+= load_elf64.c reloc_elf64.c .elif ${MACHINE_CPUARCH} == "sparc64" SRCS+= load_elf64.c reloc_elf64.c .elif ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el" SRCS+= load_elf64.c reloc_elf64.c .elif ${MACHINE} == "mips" SRCS+= load_elf32.c reloc_elf32.c .endif .if defined(LOADER_NET_SUPPORT) SRCS+= dev_net.c .endif .if !defined(LOADER_NO_DISK_SUPPORT) SRCS+= disk.c part.c CFLAGS+= -DLOADER_DISK_SUPPORT .if !defined(LOADER_NO_GPT_SUPPORT) SRCS+= crc32.c CFLAGS+= -DLOADER_GPT_SUPPORT .endif .if !defined(LOADER_NO_MBR_SUPPORT) CFLAGS+= -DLOADER_MBR_SUPPORT .endif .endif .if !defined(LOADER_NO_GELI_SUPPORT) CFLAGS+= -DLOADER_GELI_SUPPORT .endif .if defined(HAVE_BCACHE) SRCS+= bcache.c .endif .if defined(MD_IMAGE_SIZE) CFLAGS+= -DMD_IMAGE_SIZE=${MD_IMAGE_SIZE} SRCS+= md.c .else CLEANFILES+= md.o .endif # Machine-independant ISA PnP .if defined(HAVE_ISABUS) SRCS+= isapnp.c .endif .if defined(HAVE_PNP) SRCS+= pnp.c .endif # Forth interpreter .if defined(BOOT_FORTH) SRCS+= interp_forth.c .include "${SRCTOP}/sys/boot/Makefile.ficl" .endif .if defined(BOOT_PROMPT_123) CFLAGS+= -DBOOT_PROMPT_123 .endif .if defined(LOADER_INSTALL_SUPPORT) SRCS+= install.c -CFLAGS+=-I${SASRC} .endif CLEANFILES+= vers.c VERSION_FILE?= ${.CURDIR}/version .if ${MK_REPRODUCIBLE_BUILD} != no REPRO_FLAG= -r .endif vers.c: ${SRCTOP}/sys/boot/common/newvers.sh ${VERSION_FILE} sh ${SRCTOP}/sys/boot/common/newvers.sh ${REPRO_FLAG} ${VERSION_FILE} \ ${NEWVERSWHAT} Index: stable/11/sys/boot/efi/fdt/Makefile =================================================================== --- stable/11/sys/boot/efi/fdt/Makefile (revision 329130) +++ stable/11/sys/boot/efi/fdt/Makefile (revision 329131) @@ -1,39 +1,37 @@ # $FreeBSD$ .include .PATH: ${.CURDIR}/../../common LIB= efi_fdt INTERNALLIB= WARNS?= 6 SRCS= efi_fdt.c CFLAGS+= -ffreestanding .if ${MACHINE_CPUARCH} == "aarch64" CFLAGS+= -mgeneral-regs-only .else CFLAGS+= -msoft-float .endif -CFLAGS+= -I${SASRC} - # EFI library headers CFLAGS+= -I${.CURDIR}/../include CFLAGS+= -I${.CURDIR}/../include/${MACHINE} # libfdt headers CFLAGS+= -I${.CURDIR}/../../fdt # Pick up the bootstrap header for some interface items CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I. machine: .NOMETA ln -sf ${.CURDIR}/../../../${MACHINE}/include machine CLEANFILES+= machine .include beforedepend ${OBJS}: machine Index: stable/11/sys/boot/efi/libefi/Makefile =================================================================== --- stable/11/sys/boot/efi/libefi/Makefile (revision 329130) +++ stable/11/sys/boot/efi/libefi/Makefile (revision 329131) @@ -1,61 +1,60 @@ # $FreeBSD$ .include .if ${MK_FORTH} != "no" CFLAGS+= -DBOOT_FORTH .include "${.CURDIR}/../../Makefile.ficl" .endif LIB= efi INTERNALLIB= WARNS?= 2 SRCS= delay.c devpath.c efi_console.c efichar.c efinet.c efipart.c env.c errno.c \ handles.c wchar.c libefi.c efi_driver_utils.c efizfs.c devicename.c .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" SRCS+= time.c .elif ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" SRCS+= time_event.c .endif # We implement a slightly non-standard %S in that it always takes a # CHAR16 that's common in UEFI-land instead of a wchar_t. This only # seems to matter on arm64 where wchar_t defaults to an int instead # of a short. There's no good cast to use here so just ignore the # warnings for now. CWARNFLAGS.efinet.c+= -Wno-format CWARNFLAGS.efipart.c+= -Wno-format CWARNFLAGS.env.c+= -Wno-format .if ${MACHINE_CPUARCH} == "aarch64" CFLAGS+= -mgeneral-regs-only .endif .if ${MACHINE_ARCH} == "amd64" CFLAGS+= -fPIC -mno-red-zone .endif CFLAGS+= -I${.CURDIR}/../include CFLAGS+= -I${.CURDIR}/../include/${MACHINE} -CFLAGS+= -I${SASRC} .if ${MK_ZFS} != "no" CFLAGS+= -I${.CURDIR}/../../zfs CFLAGS+= -I${.CURDIR}/../../../cddl/boot/zfs CFLAGS+= -I${.CURDIR}/../../../crypto/skein CFLAGS+= -DEFI_ZFS_BOOT .endif # Pick up the bootstrap header for some interface items CFLAGS+= -I${.CURDIR}/../../common # Handle FreeBSD specific %b and %D printf format specifiers CFLAGS+= ${FORMAT_EXTENSIONS} # Do not use TERM_EMU on arm and arm64 as it doesn't behave well with serial console .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "aarch64" CFLAGS+= -DTERM_EMU .endif CFLAGS+= -DLIBEFI .include Index: stable/11/sys/boot/efi/loader/Makefile =================================================================== --- stable/11/sys/boot/efi/loader/Makefile (revision 329130) +++ stable/11/sys/boot/efi/loader/Makefile (revision 329131) @@ -1,178 +1,174 @@ # $FreeBSD$ MAN= .include MK_SSP= no PROG= loader.sym INTERNALPROG= WARNS?= 3 LOADER_NET_SUPPORT?= yes # architecture-specific loader code SRCS= autoload.c \ bootinfo.c \ conf.c \ copy.c \ efi_main.c \ main.c \ self_reloc.c \ smbios.c \ vers.c .if ${MK_ZFS} != "no" SRCS+= zfs.c .PATH: ${.CURDIR}/../../zfs SRCS+= skein.c skein_block.c # Do not unroll skein loops, reduce code size CFLAGS+= -DSKEIN_LOOP=111 .PATH: ${.CURDIR}/../../../crypto/skein # Disable warnings that are currently incompatible with the zfs boot code CWARNFLAGS.zfs.c+= -Wno-sign-compare CWARNFLAGS.zfs.c+= -Wno-array-bounds CWARNFLAGS.zfs.c+= -Wno-missing-prototypes .endif -.if defined(LOADER_NET_SUPPORT) -CFLAGS+= -I${SASRC} -.endif - .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} > 40201 CWARNFLAGS.self_reloc.c+= -Wno-error=maybe-uninitialized .endif # We implement a slightly non-standard %S in that it always takes a # CHAR16 that's common in UEFI-land instead of a wchar_t. This only # seems to matter on arm64 where wchar_t defaults to an int instead # of a short. There's no good cast to use here so just ignore the # warnings for now. CWARNFLAGS.main.c+= -Wno-format .PATH: ${.CURDIR}/arch/${MACHINE} # For smbios.c .PATH: ${.CURDIR}/../../i386/libi386 .include "${.CURDIR}/arch/${MACHINE}/Makefile.inc" CFLAGS+= -I${.CURDIR} CFLAGS+= -I${.CURDIR}/arch/${MACHINE} CFLAGS+= -I${.CURDIR}/../include CFLAGS+= -I${.CURDIR}/../include/${MACHINE} CFLAGS+= -I${.CURDIR}/../../../contrib/dev/acpica/include CFLAGS+= -I${.CURDIR}/../../.. CFLAGS+= -I${.CURDIR}/../../i386/libi386 .if ${MK_ZFS} != "no" CFLAGS+= -I${.CURDIR}/../../zfs CFLAGS+= -I${.CURDIR}/../../../cddl/boot/zfs CFLAGS+= -I${.CURDIR}/../../../crypto/skein CFLAGS+= -DEFI_ZFS_BOOT .endif CFLAGS+= -DNO_PCI -DEFI # make buildenv doesn't set DESTDIR, this means LIBSTAND # will be wrong when crossbuilding. .if exists(${.OBJDIR}/../../../../lib/libstand/libstand.a) LIBSTAND= ${.OBJDIR}/../../../../lib/libstand/libstand.a .endif .if !defined(BOOT_HIDE_SERIAL_NUMBERS) # Export serial numbers, UUID, and asset tag from loader. CFLAGS+= -DSMBIOS_SERIAL_NUMBERS .if defined(BOOT_LITTLE_ENDIAN_UUID) # Use little-endian UUID format as defined in SMBIOS 2.6. CFLAGS+= -DSMBIOS_LITTLE_ENDIAN_UUID .elif defined(BOOT_NETWORK_ENDIAN_UUID) # Use network-endian UUID format for backward compatibility. CFLAGS+= -DSMBIOS_NETWORK_ENDIAN_UUID .endif .endif .if ${MK_FORTH} != "no" BOOT_FORTH= yes CFLAGS+= -DBOOT_FORTH CFLAGS+= -I${.CURDIR}/../../ficl CFLAGS+= -I${.CURDIR}/../../ficl/${MACHINE_CPUARCH} LIBFICL= ${.OBJDIR}/../../ficl/libficl.a .endif LOADER_FDT_SUPPORT?= no .if ${MK_FDT} != "no" && ${LOADER_FDT_SUPPORT} != "no" CFLAGS+= -I${.CURDIR}/../../fdt CFLAGS+= -I${.OBJDIR}/../../fdt CFLAGS+= -DLOADER_FDT_SUPPORT LIBEFI_FDT= ${.OBJDIR}/../../efi/fdt/libefi_fdt.a LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a .endif # Include bcache code. HAVE_BCACHE= yes .if defined(EFI_STAGING_SIZE) CFLAGS+= -DEFI_STAGING_SIZE=${EFI_STAGING_SIZE} .endif # Always add MI sources .PATH: ${.CURDIR}/../../common .include "${.CURDIR}/../../common/Makefile.inc" CFLAGS+= -I${.CURDIR}/../../common FILES+= loader.efi FILESMODE_loader.efi= ${BINMODE} LDSCRIPT= ${.CURDIR}/arch/${MACHINE}/ldscript.${MACHINE} LDFLAGS+= -Wl,-T${LDSCRIPT},-Bsymbolic,-znotext -shared CLEANFILES+= loader.efi NEWVERSWHAT= "EFI loader" ${MACHINE} NM?= nm OBJCOPY?= objcopy .if ${MACHINE_CPUARCH} == "amd64" EFI_TARGET= efi-app-x86_64 .elif ${MACHINE_CPUARCH} == "i386" EFI_TARGET= efi-app-ia32 .else EFI_TARGET= binary .endif # Arbitrarily set the PE/COFF header timestamps to 1 Jan 2016 00:00:00 # for build reproducibility. SOURCE_DATE_EPOCH?=1451606400 loader.efi: ${PROG} if ${NM} ${.ALLSRC} | grep ' U '; then \ echo "Undefined symbols in ${.ALLSRC}"; \ exit 1; \ fi SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH} \ ${OBJCOPY} -j .peheader -j .text -j .sdata -j .data \ -j .dynamic -j .dynsym -j .rel.dyn \ -j .rela.dyn -j .reloc -j .eh_frame -j set_Xcommand_set \ -j set_Xficl_compile_set \ --output-target=${EFI_TARGET} ${.ALLSRC} ${.TARGET} LIBEFI= ${.OBJDIR}/../libefi/libefi.a DPADD= ${LIBFICL} ${LIBEFI} ${LIBFDT} ${LIBEFI_FDT} ${LIBSA} \ ${LDSCRIPT} LDADD= ${LIBFICL} ${LIBEFI} ${LIBFDT} ${LIBEFI_FDT} ${LIBSA} .include beforedepend ${OBJS}: machine CLEANFILES+= machine machine: .NOMETA ln -sf ${.CURDIR}/../../../${MACHINE}/include machine .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" beforedepend ${OBJS}: x86 CLEANFILES+= x86 x86: .NOMETA ln -sf ${.CURDIR}/../../../x86/include x86 .endif Index: stable/11/sys/boot/fdt/Makefile =================================================================== --- stable/11/sys/boot/fdt/Makefile (revision 329130) +++ stable/11/sys/boot/fdt/Makefile (revision 329131) @@ -1,31 +1,30 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../contrib/libfdt/ LIB= fdt INTERNALLIB= # Vendor sources of libfdt. SRCS+= fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c \ fdt_empty_tree.c fdt_addresses.c fdt_overlay.c # Loader's fdt commands extension sources. SRCS+= fdt_loader_cmd.c -CFLAGS+= -I${SASRC} CFLAGS+= -I${.CURDIR}/../../contrib/libfdt/ -I${.CURDIR}/../common/ CFLAGS+= -ffreestanding .if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "mips" CFLAGS+= -msoft-float .endif .if ${MACHINE_ARCH} == "powerpc64" CFLAGS+= -m32 .endif CFLAGS+= -Wformat -Wall .include .include Index: stable/11/sys/boot/i386/libfirewire/Makefile =================================================================== --- stable/11/sys/boot/i386/libfirewire/Makefile (revision 329130) +++ stable/11/sys/boot/i386/libfirewire/Makefile (revision 329131) @@ -1,30 +1,29 @@ # $FreeBSD$ LIB= firewire INTERNALLIB= .PATH: ${.CURDIR}/../../../dev/dcons ${.CURDIR}/../../../dev/firewire SRCS+= firewire.c fwohci.c dconsole.c SRCS+= dcons.c fwcrom.c CFLAGS+= -D_BOOT CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I. -CFLAGS+= -I${SASRC} CFLAGS+= -I${.CURDIR}/../btx/lib CFLAGS+= -I${.CURDIR}/../libi386 CFLAGS+= -Wformat -Wall .if ${MACHINE_CPUARCH} == "amd64" CLEANFILES+= machine machine: .NOMETA ln -sf ${.CURDIR}/../../../i386/include machine .endif .include .if ${MACHINE_CPUARCH} == "amd64" beforedepend ${OBJS}: machine .endif Index: stable/11/sys/boot/i386/libi386/Makefile =================================================================== --- stable/11/sys/boot/i386/libi386/Makefile (revision 329130) +++ stable/11/sys/boot/i386/libi386/Makefile (revision 329131) @@ -1,82 +1,80 @@ # $FreeBSD$ # LIB= i386 INTERNALLIB= SRCS= biosacpi.c bioscd.c biosdisk.c biosmem.c biospnp.c \ biospci.c biossmap.c bootinfo.c bootinfo32.c bootinfo64.c \ comconsole.c devicename.c elf32_freebsd.c \ elf64_freebsd.c multiboot.c multiboot_tramp.S relocater_tramp.S \ i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \ smbios.c time.c vidconsole.c amd64_tramp.S spinconsole.c .PATH: ${.CURDIR}/../../zfs SRCS+= devicename_stubs.c .if defined(LOADER_TFTP_SUPPORT) CFLAGS+= -DLOADER_TFTP_SUPPORT .endif .if defined(LOADER_NFS_SUPPORT) CFLAGS+= -DLOADER_NFS_SUPPORT .endif BOOT_COMCONSOLE_PORT?= 0x3f8 CFLAGS+= -DCOMPORT=${BOOT_COMCONSOLE_PORT} BOOT_COMCONSOLE_SPEED?= 9600 CFLAGS+= -DCOMSPEED=${BOOT_COMCONSOLE_SPEED} .ifdef(BOOT_BIOSDISK_DEBUG) # Make the disk code more talkative CFLAGS+= -DDISK_DEBUG .endif .if !defined(LOADER_NO_GELI_SUPPORT) # Decrypt encrypted drives CFLAGS+= -DLOADER_GELI_SUPPORT CFLAGS+= -I${.CURDIR}/../../geli .endif .if !defined(BOOT_HIDE_SERIAL_NUMBERS) # Export serial numbers, UUID, and asset tag from loader. CFLAGS+= -DSMBIOS_SERIAL_NUMBERS .if defined(BOOT_LITTLE_ENDIAN_UUID) # Use little-endian UUID format as defined in SMBIOS 2.6. CFLAGS+= -DSMBIOS_LITTLE_ENDIAN_UUID .elif defined(BOOT_NETWORK_ENDIAN_UUID) # Use network-endian UUID format for backward compatibility. CFLAGS+= -DSMBIOS_NETWORK_ENDIAN_UUID .endif .endif # Include simple terminal emulation (cons25-compatible) CFLAGS+= -DTERM_EMU # XXX: make alloca() useable CFLAGS+= -Dalloca=__builtin_alloca CFLAGS+= -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/i386 \ -I${.CURDIR}/../../common -I${.CURDIR}/../common \ -I${.CURDIR}/../btx/lib \ -I${.CURDIR}/../../../contrib/dev/acpica/include \ -I${.CURDIR}/../../.. -I. -# the location of libstand -CFLAGS+= -I${SASRC} # Handle FreeBSD specific %b and %D printf format specifiers CFLAGS+= ${FORMAT_EXTENSIONS} .if ${MACHINE_CPUARCH} == "amd64" CLEANFILES+= machine machine: .NOMETA ln -sf ${.CURDIR}/../../../i386/include machine .endif .include # XXX: clang integrated-as doesn't grok .codeNN directives yet CFLAGS.amd64_tramp.S= ${CLANG_NO_IAS} CFLAGS.multiboot_tramp.S= ${CLANG_NO_IAS} .if ${MACHINE_CPUARCH} == "amd64" beforedepend ${OBJS}: machine .endif Index: stable/11/sys/boot/i386/loader/Makefile =================================================================== --- stable/11/sys/boot/i386/loader/Makefile (revision 329130) +++ stable/11/sys/boot/i386/loader/Makefile (revision 329131) @@ -1,139 +1,135 @@ # $FreeBSD$ .include MK_SSP= no LOADER?= loader PROG= ${LOADER}.sym MAN= INTERNALPROG= NEWVERSWHAT?= "bootstrap loader" x86 VERSION_FILE= ${.CURDIR}/../loader/version LOADER_NET_SUPPORT?= yes LOADER_NFS_SUPPORT?= yes LOADER_TFTP_SUPPORT?= yes # architecture-specific loader code SRCS= main.c conf.c vers.c chain.c # Put LOADER_FIREWIRE_SUPPORT=yes in /etc/make.conf for FireWire/dcons support .if defined(LOADER_FIREWIRE_SUPPORT) CFLAGS+= -DLOADER_FIREWIRE_SUPPORT LIBFIREWIRE= ${.OBJDIR}/../libfirewire/libfirewire.a .endif # Set by zfsloader Makefile .if defined(LOADER_ZFS_SUPPORT) CFLAGS+= -DLOADER_ZFS_SUPPORT LIBZFSBOOT= ${.OBJDIR}/../../zfs/libzfsboot.a .endif -.if defined(LOADER_NET_SUPPORT) -CFLAGS+= -I${SASRC} -.endif - .if defined(LOADER_TFTP_SUPPORT) CFLAGS+= -DLOADER_TFTP_SUPPORT .endif .if defined(LOADER_NFS_SUPPORT) CFLAGS+= -DLOADER_NFS_SUPPORT .endif # Include bcache code. HAVE_BCACHE= yes # Enable PnP and ISA-PnP code. HAVE_PNP= yes HAVE_ISABUS= yes .if ${MK_FORTH} != "no" # Enable BootForth BOOT_FORTH= yes CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/i386 .if ${MACHINE_CPUARCH} == "amd64" LIBFICL= ${.OBJDIR}/../../ficl32/libficl.a .else LIBFICL= ${.OBJDIR}/../../ficl/libficl.a .endif .endif .if defined(LOADER_BZIP2_SUPPORT) CFLAGS+= -DLOADER_BZIP2_SUPPORT .endif .if !defined(LOADER_NO_GZIP_SUPPORT) CFLAGS+= -DLOADER_GZIP_SUPPORT .endif .if defined(LOADER_NANDFS_SUPPORT) CFLAGS+= -DLOADER_NANDFS_SUPPORT .endif .if !defined(LOADER_NO_GELI_SUPPORT) CFLAGS+= -DLOADER_GELI_SUPPORT CFLAGS+= -I${.CURDIR}/../../geli LIBGELIBOOT= ${.OBJDIR}/../../geli/libgeliboot.a .PATH: ${.CURDIR}/../../../opencrypto SRCS+= xform_aes_xts.c CFLAGS+= -I${.CURDIR}/../../.. -D_STAND .endif # Always add MI sources .PATH: ${.CURDIR}/../../common .include "${.CURDIR}/../../common/Makefile.inc" CFLAGS+= -I${.CURDIR}/../../common CFLAGS+= -I. CLEANFILES= ${LOADER} ${LOADER}.bin loader.help CFLAGS+= -Wall LDFLAGS= -static -Ttext 0x0 # i386 standalone support library LIBI386= ${.OBJDIR}/../libi386/libi386.a CFLAGS+= -I${.CURDIR}/.. # BTX components CFLAGS+= -I${.CURDIR}/../btx/lib # Debug me! #CFLAGS+= -g #LDFLAGS+= -g # Pick up ../Makefile.inc early. .include ${LOADER}: ${LOADER}.bin ${BTXLDR} ${BTXKERN} btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \ -b ${BTXKERN} ${LOADER}.bin ${LOADER}.bin: ${LOADER}.sym strip -R .comment -R .note -o ${.TARGET} ${.ALLSRC} loader.help: help.common help.i386 cat ${.ALLSRC} | awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} FILES= ${LOADER} # XXX INSTALLFLAGS_loader= -b FILESMODE_${LOADER}= ${BINMODE} -b .if !defined(LOADER_ONLY) .PATH: ${.CURDIR}/../../forth .include "${.CURDIR}/../../forth/Makefile.inc" FILES+= pcibios.4th FILES+= loader.rc menu.rc .endif # XXX crt0.o needs to be first for pxeboot(8) to work OBJS= ${BTXCRT} DPADD= ${LIBFICL} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBGELIBOOT} ${LIBSA32} LDADD= ${LIBFICL} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBGELIBOOT} ${LIBSA32} .include .if ${MACHINE_CPUARCH} == "amd64" beforedepend ${OBJS}: machine CLEANFILES+= machine CFLAGS+= -DLOADER_PREFER_AMD64 machine: .NOMETA ln -sf ${.CURDIR}/../../../i386/include machine .endif Index: stable/11/sys/boot/mips/beri/boot2/Makefile =================================================================== --- stable/11/sys/boot/mips/beri/boot2/Makefile (revision 329130) +++ stable/11/sys/boot/mips/beri/boot2/Makefile (revision 329131) @@ -1,88 +1,85 @@ #- # Copyright (c) 2013-2014 Robert N. M. Watson # All rights reserved. # # This software was developed by SRI International and the University of # Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) # ("CTSRD"), as part of the DARPA CRASH research programme. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # $FreeBSD$ BINDIR?= /boot INSTALLFLAGS= -b LOADERS= flashboot jtagboot FILES= ${LOADERS} ${LOADERS:S/$/.md5/} SRCS= relocate.S \ start.S \ boot2.c \ altera_jtag_uart.c \ cfi.c \ sdcard.c MAN= AFLAGS= -G0 CFLAGS= -ffreestanding \ -I${.CURDIR} \ -I${.CURDIR}/../../../common \ -I${.CURDIR}/../../../.. \ -D_KERNEL \ -Wall \ -G0 \ -fno-pic -mno-abicalls \ -msoft-float \ -g -# where to get libstand from -CFLAGS+= -I${SASRC} - LDFLAGS= -nostdlib \ -static \ -Wl,-N \ -G0 \ -L${.CURDIR} .PATH: ${.CURDIR}/../common CFLAGS+= -I${.CURDIR}/../common flashboot.elf: relocate.o start.o boot2.o altera_jtag_uart.o cfi.o sdcard.o ${CC} ${LDFLAGS} -T ${.CURDIR}/flashboot.ldscript -o ${.TARGET} \ ${.ALLSRC} ${LIBSA} flashboot: flashboot.elf ${OBJCOPY} -S -O binary ${.TARGET}.elf ${.TARGET} flashboot.md5: flashboot md5 flashboot > flashboot.md5 jtagboot: start.o boot2.o altera_jtag_uart.o cfi.o sdcard.o ${CC} ${LDFLAGS} -T ${.CURDIR}/jtagboot.ldscript -o ${.TARGET} \ ${.ALLSRC} ${LIBSA} jtagboot.md5: jtagboot md5 jtagboot > jtagboot.md5 CLEANFILES+= flashboot.elf .include Index: stable/11/sys/boot/mips/beri/loader/Makefile =================================================================== --- stable/11/sys/boot/mips/beri/loader/Makefile (revision 329130) +++ stable/11/sys/boot/mips/beri/loader/Makefile (revision 329131) @@ -1,138 +1,135 @@ #- # Copyright (c) 2013-2014 Robert N. M. Watson # All rights reserved. # # This software was developed by SRI International and the University of # Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) # ("CTSRD"), as part of the DARPA CRASH research programme. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # $FreeBSD$ .include MK_SSP= no MAN= PROG?= loader NEWVERSWHAT= "BERI loader" ${MACHINE_CPUARCH} INSTALLFLAGS= -b # Architecture-specific loader code SRCS= start.S \ main.c \ devicename.c \ exec.c \ metadata.c \ vers.c \ arch.c # libstand front-ends for shared driver code SRCS+= beri_console.c \ beri_disk_cfi.c \ beri_disk_sdcard.c # Common code with boot2 SRCS+= altera_jtag_uart.c \ cfi.c \ sdcard.c # Since we don't have a backward compatibility issue, default to this on BERI. CFLAGS+= -DBOOT_PROMPT_123 CFLAGS+= -DLOADER_DISK_SUPPORT CFLAGS+= -DLOADER_UFS_SUPPORT CFLAGS+= -DLOADER_GZIP_SUPPORT CFLAGS+= -DLOADER_BZIP2_SUPPORT #CFLAGS+= -DLOADER_NET_SUPPORT #CFLAGS+= -DLOADER_NFS_SUPPORT #CFLAGS+= -DLOADER_TFTP_SUPPORT .if ${MK_FORTH} != "no" # Enable BootForth BOOT_FORTH= yes CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../../ficl CFLAGS+= -I${.CURDIR}/../../../ficl/mips64 LIBFICL= ${.OBJDIR}/../../../ficl/libficl.a .endif # Common code across BERI boot loader parts .PATH: ${.CURDIR}/../common CFLAGS+= -I${.CURDIR}/../common # Always add MI sources .PATH: ${.CURDIR}/../../../common .include "${.CURDIR}/../../../common/Makefile.inc" CFLAGS+= -I${.CURDIR}/../../../common # BERI files common to boot2 and loader .PATH: ${.CURDIR}/../common CFLAGS+= -I${.CURDIR}/../common # Loader-specific MD headers CFLAGS+= -I${.CURDIR} CLEANFILES+= loader.help # Generate code appropriate for the loader environment CFLAGS+= -G0 \ -fno-pic \ -mno-abicalls \ -msoft-float \ -g LDFLAGS= -nostdlib \ -static \ -T ${.CURDIR}/loader.ldscript \ -L${.CURDIR} \ -e __start -# where to get libstand from -CFLAGS+= -I${SASRC} - DPADD= ${LIBFICL} ${LIBSA} LDADD= ${LIBFICL} ${LIBSA} loader.help: help.common help.mips cat ${.ALLSRC} | \ awk -f ${.CURDIR}/../../../common/merge_help.awk > ${.TARGET} .PATH: ${.CURDIR}/../../../forth .include "${.CURDIR}/../../../forth/Makefile.inc" FILES+= loader.rc menu.rc .if defined(LOADER_USB_SUPPORT) # Do garbage collection CFLAGS+= -ffunction-sections -fdata-sections CFLAGS+= -Wl,--gc-sections # Link USB BOOT library LDADD+= ${.OBJDIR}/../../../usb/libusbboot.a CFLAGS+= -I${.CURDIR}/../../../usb # Define USB SUPPORT CFLAGS+= -DLOADER_USB_SUPPORT .endif all: loader .include Index: stable/11/sys/boot/mips/uboot/Makefile =================================================================== --- stable/11/sys/boot/mips/uboot/Makefile (revision 329130) +++ stable/11/sys/boot/mips/uboot/Makefile (revision 329131) @@ -1,159 +1,156 @@ # $FreeBSD$ .include FILES= ubldr NEWVERSWHAT= "U-Boot loader" ${MACHINE_ARCH} BINDIR?= /boot INSTALLFLAGS= -b WARNS?= 1 # Address at which ubldr will be loaded. # This varies for different boards and SOCs. UBLDR_LOADADDR?= 0xffffffff80800000 # Architecture-specific loader code SRCS= start.S conf.c vers.c .if !defined(LOADER_NO_DISK_SUPPORT) LOADER_DISK_SUPPORT?= yes .else LOADER_DISK_SUPPORT= no .endif LOADER_MSDOS_SUPPORT?= yes LOADER_UFS_SUPPORT?= yes LOADER_CD9660_SUPPORT?= no LOADER_EXT2FS_SUPPORT?= no .if ${MK_NAND} != "no" LOADER_NANDFS_SUPPORT?= yes .else LOADER_NANDFS_SUPPORT?= no .endif LOADER_NET_SUPPORT?= yes LOADER_NFS_SUPPORT?= yes LOADER_TFTP_SUPPORT?= no LOADER_GZIP_SUPPORT?= no LOADER_BZIP2_SUPPORT?= no .if ${MK_FDT} != "no" LOADER_FDT_SUPPORT= yes .else LOADER_FDT_SUPPORT= no .endif .if ${LOADER_DISK_SUPPORT} == "yes" CFLAGS+= -DLOADER_DISK_SUPPORT .endif .if ${LOADER_MSDOS_SUPPORT} == "yes" CFLAGS+= -DLOADER_MSDOS_SUPPORT .endif .if ${LOADER_UFS_SUPPORT} == "yes" CFLAGS+= -DLOADER_UFS_SUPPORT .endif .if ${LOADER_CD9660_SUPPORT} == "yes" CFLAGS+= -DLOADER_CD9660_SUPPORT .endif .if ${LOADER_EXT2FS_SUPPORT} == "yes" CFLAGS+= -DLOADER_EXT2FS_SUPPORT .endif .if ${LOADER_NANDFS_SUPPORT} == "yes" CFLAGS+= -DLOADER_NANDFS_SUPPORT .endif .if ${LOADER_GZIP_SUPPORT} == "yes" CFLAGS+= -DLOADER_GZIP_SUPPORT .endif .if ${LOADER_BZIP2_SUPPORT} == "yes" CFLAGS+= -DLOADER_BZIP2_SUPPORT .endif .if ${LOADER_NET_SUPPORT} == "yes" CFLAGS+= -DLOADER_NET_SUPPORT .endif .if ${LOADER_NFS_SUPPORT} == "yes" CFLAGS+= -DLOADER_NFS_SUPPORT .endif .if ${LOADER_TFTP_SUPPORT} == "yes" CFLAGS+= -DLOADER_TFTP_SUPPORT .endif .if ${LOADER_FDT_SUPPORT} == "yes" CFLAGS+= -I${.CURDIR}/../../fdt CFLAGS+= -I${.OBJDIR}/../../fdt CFLAGS+= -DLOADER_FDT_SUPPORT LIBUBOOT_FDT= ${.OBJDIR}/../../uboot/fdt/libuboot_fdt.a LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a .endif .if ${MK_FORTH} != "no" # Enable BootForth BOOT_FORTH= yes CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl .if ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el" CFLAGS+= -I${.CURDIR}/../../ficl/mips64 .else CFLAGS+= -I${.CURDIR}/../../ficl/mips .endif LIBFICL= ${.OBJDIR}/../../ficl/libficl.a .endif # Always add MI sources .PATH: ${.CURDIR}/../../common .include "${.CURDIR}/../../common/Makefile.inc" CFLAGS+= -I${.CURDIR}/../../common CFLAGS+= -I. CLEANFILES+= loader.help CFLAGS+= -ffreestanding -msoft-float -g LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.${MACHINE_CPUARCH} # Pull in common loader code .PATH: ${.CURDIR}/../../uboot/common .include "${.CURDIR}/../../uboot/common/Makefile.inc" CFLAGS+= -I${.CURDIR}/../../uboot/common # U-Boot standalone support library LIBUBOOT= ${.OBJDIR}/../../uboot/lib/libuboot.a CFLAGS+= -I${.CURDIR}/../../uboot/lib CFLAGS+= -I${.OBJDIR}/../../uboot/lib -# where to get libstand from -CFLAGS+= -I${SASRC} - # clang doesn't understand %D as a specifier to printf #NO_WERROR.clang= #NO_WERROR= DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA} LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA} OBJS+= ${SRCS:N*.h:R:S/$/.o/g} loader.help: help.common help.uboot ${.CURDIR}/../../fdt/help.fdt cat ${.ALLSRC} | \ awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} ldscript.abs: echo "UBLDR_LOADADDR = ${UBLDR_LOADADDR};" >${.TARGET} ldscript.pie: echo "UBLDR_LOADADDR = 0;" >${.TARGET} ubldr: ${OBJS} ldscript.abs ${.CURDIR}/ldscript.${MACHINE_CPUARCH} ${DPADD} ${CC} ${CFLAGS} -T ldscript.abs ${LDFLAGS} \ -o ${.TARGET} ${OBJS} ${LDADD} ${OBJCOPY} -S -O binary ubldr ubldr.bin CLEANFILES+= ldscript.abs ldscript.pie ubldr ubldr.pie ubldr.bin .if !defined(LOADER_ONLY) .PATH: ${.CURDIR}/../../forth .include "${.CURDIR}/../../forth/Makefile.inc" # Install loader.rc. FILES+= loader.rc # Put sample menu.rc on disk but don't enable it by default. FILES+= menu.rc FILESNAME_menu.rc= menu.rc.sample .endif .include .include Index: stable/11/sys/boot/ofw/libofw/Makefile =================================================================== --- stable/11/sys/boot/ofw/libofw/Makefile (revision 329130) +++ stable/11/sys/boot/ofw/libofw/Makefile (revision 329131) @@ -1,35 +1,33 @@ # $FreeBSD$ LIB= ofw INTERNALLIB= SRCS= devicename.c elf_freebsd.c ofw_console.c ofw_copy.c ofw_disk.c \ ofw_memory.c ofw_module.c ofw_net.c ofw_reboot.c \ ofw_time.c openfirm.c .PATH: ${.CURDIR}/../../zfs SRCS+= devicename_stubs.c -CFLAGS+= -I${SASRC} - # Pick up the bootstrap header for some interface items CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I. CFLAGS+= -ffreestanding .if ${MACHINE_CPUARCH} == "powerpc" CFLAGS+= -msoft-float SRCS+= ppc64_elf_freebsd.c .endif .ifdef(BOOT_DISK_DEBUG) # Make the disk code more talkative CFLAGS+= -DDISK_DEBUG .endif machine: .NOMETA ln -sf ${.CURDIR}/../../../${MACHINE_CPUARCH}/include machine CLEANFILES+= machine .include beforedepend ${OBJS}: machine Index: stable/11/sys/boot/powerpc/kboot/Makefile =================================================================== --- stable/11/sys/boot/powerpc/kboot/Makefile (revision 329130) +++ stable/11/sys/boot/powerpc/kboot/Makefile (revision 329131) @@ -1,111 +1,108 @@ # $FreeBSD$ .include MK_SSP= no MAN= PROG= loader.kboot NEWVERSWHAT= "kboot loader" ${MACHINE_ARCH} BINDIR?= /boot INSTALLFLAGS= -b # Architecture-specific loader code SRCS= conf.c metadata.c vers.c main.c ppc64_elf_freebsd.c SRCS+= host_syscall.S hostcons.c hostdisk.c kerneltramp.S kbootfdt.c SRCS+= ucmpdi2.c LOADER_DISK_SUPPORT?= yes LOADER_UFS_SUPPORT?= yes LOADER_CD9660_SUPPORT?= yes LOADER_EXT2FS_SUPPORT?= yes LOADER_NET_SUPPORT?= yes LOADER_NFS_SUPPORT?= yes LOADER_TFTP_SUPPORT?= no LOADER_GZIP_SUPPORT?= yes LOADER_FDT_SUPPORT= yes LOADER_BZIP2_SUPPORT?= no .if ${LOADER_DISK_SUPPORT} == "yes" CFLAGS+= -DLOADER_DISK_SUPPORT .endif .if ${LOADER_UFS_SUPPORT} == "yes" CFLAGS+= -DLOADER_UFS_SUPPORT .endif .if ${LOADER_CD9660_SUPPORT} == "yes" CFLAGS+= -DLOADER_CD9660_SUPPORT .endif .if ${LOADER_EXT2FS_SUPPORT} == "yes" CFLAGS+= -DLOADER_EXT2FS_SUPPORT .endif .if ${LOADER_GZIP_SUPPORT} == "yes" CFLAGS+= -DLOADER_GZIP_SUPPORT .endif .if ${LOADER_BZIP2_SUPPORT} == "yes" CFLAGS+= -DLOADER_BZIP2_SUPPORT .endif .if ${LOADER_NET_SUPPORT} == "yes" CFLAGS+= -DLOADER_NET_SUPPORT .endif .if ${LOADER_NFS_SUPPORT} == "yes" CFLAGS+= -DLOADER_NFS_SUPPORT .endif .if ${LOADER_TFTP_SUPPORT} == "yes" CFLAGS+= -DLOADER_TFTP_SUPPORT .endif .if ${LOADER_FDT_SUPPORT} == "yes" CFLAGS+= -I${.CURDIR}/../../fdt CFLAGS+= -I${.OBJDIR}/../../fdt CFLAGS+= -I${.CURDIR}/../../../contrib/libfdt CFLAGS+= -DLOADER_FDT_SUPPORT LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a .endif .if ${MK_FORTH} != "no" # Enable BootForth BOOT_FORTH= yes CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl CFLAGS+= -I${.CURDIR}/../../ficl/powerpc LIBFICL= ${.OBJDIR}/../../ficl/libficl.a .endif CFLAGS+= -mcpu=powerpc64 # Always add MI sources .PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern .include "${.CURDIR}/../../common/Makefile.inc" CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. CFLAGS+= -I. CLEANFILES+= loader.help CFLAGS+= -Wall -ffreestanding -msoft-float -DAIM # load address. set in linker script RELOC?= 0x0 CFLAGS+= -DRELOC=${RELOC} LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc # 64-bit bridge extensions CFLAGS+= -Wa,-mppc64bridge # Pull in common loader code #.PATH: ${.CURDIR}/../../ofw/common #.include "${.CURDIR}/../../ofw/common/Makefile.inc" -# where to get libstand from -CFLAGS+= -I${SASRC} - DPADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA32} LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA32} loader.help: help.common help.kboot ${.CURDIR}/../../fdt/help.fdt cat ${.ALLSRC} | \ awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} .PATH: ${.CURDIR}/../../forth .include "${.CURDIR}/../../forth/Makefile.inc" FILES+= loader.rc menu.rc .include Index: stable/11/sys/boot/powerpc/ofw/Makefile =================================================================== --- stable/11/sys/boot/powerpc/ofw/Makefile (revision 329130) +++ stable/11/sys/boot/powerpc/ofw/Makefile (revision 329131) @@ -1,109 +1,106 @@ # $FreeBSD$ .include MK_SSP= no MAN= PROG= loader NEWVERSWHAT= "Open Firmware loader" ${MACHINE_ARCH} BINDIR?= /boot INSTALLFLAGS= -b # Architecture-specific loader code SRCS= conf.c metadata.c vers.c start.c SRCS+= ucmpdi2.c LOADER_DISK_SUPPORT?= yes LOADER_UFS_SUPPORT?= yes LOADER_CD9660_SUPPORT?= yes LOADER_EXT2FS_SUPPORT?= no LOADER_NET_SUPPORT?= yes LOADER_NFS_SUPPORT?= yes LOADER_TFTP_SUPPORT?= no LOADER_GZIP_SUPPORT?= yes LOADER_BZIP2_SUPPORT?= no LOADER_FDT_SUPPORT?= yes .if ${LOADER_DISK_SUPPORT} == "yes" CFLAGS+= -DLOADER_DISK_SUPPORT .endif .if ${LOADER_UFS_SUPPORT} == "yes" CFLAGS+= -DLOADER_UFS_SUPPORT .endif .if ${LOADER_CD9660_SUPPORT} == "yes" CFLAGS+= -DLOADER_CD9660_SUPPORT .endif .if ${LOADER_EXT2FS_SUPPORT} == "yes" CFLAGS+= -DLOADER_EXT2FS_SUPPORT .endif .if ${LOADER_GZIP_SUPPORT} == "yes" CFLAGS+= -DLOADER_GZIP_SUPPORT .endif .if ${LOADER_BZIP2_SUPPORT} == "yes" CFLAGS+= -DLOADER_BZIP2_SUPPORT .endif .if ${LOADER_NET_SUPPORT} == "yes" CFLAGS+= -DLOADER_NET_SUPPORT .endif .if ${LOADER_NFS_SUPPORT} == "yes" CFLAGS+= -DLOADER_NFS_SUPPORT .endif .if ${LOADER_TFTP_SUPPORT} == "yes" CFLAGS+= -DLOADER_TFTP_SUPPORT .endif .if ${LOADER_FDT_SUPPORT} == "yes" SRCS+= ofwfdt.c CFLAGS+= -I${.CURDIR}/../../fdt CFLAGS+= -I${.OBJDIR}/../../fdt CFLAGS+= -I${.CURDIR}/../../../contrib/libfdt CFLAGS+= -DLOADER_FDT_SUPPORT LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a .endif .if ${MK_FORTH} != "no" # Enable BootForth BOOT_FORTH= yes CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl CFLAGS+= -I${.CURDIR}/../../ficl/powerpc LIBFICL= ${.OBJDIR}/../../ficl/libficl.a .endif # Always add MI sources .PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern .include "${.CURDIR}/../../common/Makefile.inc" CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. CFLAGS+= -I. CLEANFILES+= loader.help CFLAGS+= -ffreestanding -msoft-float # load address. set in linker script RELOC?= 0x1C00000 CFLAGS+= -DRELOC=${RELOC} LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc # Pull in common loader code .PATH: ${.CURDIR}/../../ofw/common .include "${.CURDIR}/../../ofw/common/Makefile.inc" # Open Firmware standalone support library LIBOFW= ${.OBJDIR}/../../ofw/libofw/libofw.a CFLAGS+= -I${.CURDIR}/../../ofw/libofw -# where to get libstand from -CFLAGS+= -I${SASRC} - DPADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA32} LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA32} loader.help: help.common help.ofw ${.CURDIR}/../../fdt/help.fdt cat ${.ALLSRC} | \ awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} .PATH: ${.CURDIR}/../../forth .include "${.CURDIR}/../../forth/Makefile.inc" FILES+= loader.rc menu.rc .include Index: stable/11/sys/boot/powerpc/ps3/Makefile =================================================================== --- stable/11/sys/boot/powerpc/ps3/Makefile (revision 329130) +++ stable/11/sys/boot/powerpc/ps3/Makefile (revision 329131) @@ -1,113 +1,110 @@ # $FreeBSD$ .include MK_SSP= no MAN= PROG= loader.ps3 NEWVERSWHAT= "Playstation 3 loader" ${MACHINE_ARCH} BINDIR?= /boot INSTALLFLAGS= -b # Architecture-specific loader code SRCS= start.S conf.c metadata.c vers.c main.c devicename.c ppc64_elf_freebsd.c SRCS+= lv1call.S ps3cons.c font.h ps3mmu.c ps3net.c ps3repo.c \ ps3stor.c ps3disk.c ps3cdrom.c SRCS+= ucmpdi2.c LOADER_DISK_SUPPORT?= yes LOADER_UFS_SUPPORT?= yes LOADER_CD9660_SUPPORT?= yes LOADER_EXT2FS_SUPPORT?= yes LOADER_NET_SUPPORT?= yes LOADER_NFS_SUPPORT?= yes LOADER_TFTP_SUPPORT?= no LOADER_GZIP_SUPPORT?= yes LOADER_FDT_SUPPORT?= no LOADER_BZIP2_SUPPORT?= no .if ${LOADER_DISK_SUPPORT} == "yes" CFLAGS+= -DLOADER_DISK_SUPPORT .endif .if ${LOADER_UFS_SUPPORT} == "yes" CFLAGS+= -DLOADER_UFS_SUPPORT .endif .if ${LOADER_CD9660_SUPPORT} == "yes" CFLAGS+= -DLOADER_CD9660_SUPPORT .endif .if ${LOADER_EXT2FS_SUPPORT} == "yes" CFLAGS+= -DLOADER_EXT2FS_SUPPORT .endif .if ${LOADER_GZIP_SUPPORT} == "yes" CFLAGS+= -DLOADER_GZIP_SUPPORT .endif .if ${LOADER_BZIP2_SUPPORT} == "yes" CFLAGS+= -DLOADER_BZIP2_SUPPORT .endif .if ${LOADER_NET_SUPPORT} == "yes" CFLAGS+= -DLOADER_NET_SUPPORT .endif .if ${LOADER_NFS_SUPPORT} == "yes" CFLAGS+= -DLOADER_NFS_SUPPORT .endif .if ${LOADER_TFTP_SUPPORT} == "yes" CFLAGS+= -DLOADER_TFTP_SUPPORT .endif .if ${LOADER_FDT_SUPPORT} == "yes" CFLAGS+= -I${.CURDIR}/../../fdt CFLAGS+= -I${.OBJDIR}/../../fdt CFLAGS+= -DLOADER_FDT_SUPPORT LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a .endif .if ${MK_FORTH} != "no" # Enable BootForth BOOT_FORTH= yes CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl CFLAGS+= -I${.CURDIR}/../../ficl/powerpc LIBFICL= ${.OBJDIR}/../../ficl/libficl.a .endif CFLAGS+= -mcpu=powerpc64 # Always add MI sources .PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern .include "${.CURDIR}/../../common/Makefile.inc" CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. CFLAGS+= -I. CLEANFILES+= loader.help CFLAGS+= -Wall -ffreestanding -msoft-float -DAIM # load address. set in linker script RELOC?= 0x0 CFLAGS+= -DRELOC=${RELOC} LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc # Pull in common loader code #.PATH: ${.CURDIR}/../../ofw/common #.include "${.CURDIR}/../../ofw/common/Makefile.inc" -# where to get libstand from -CFLAGS+= -I${SASRC} - DPADD= ${LIBFICL} ${LIBOFW} ${LIBSA32} LDADD= ${LIBFICL} ${LIBOFW} ${LIBSA32} SC_DFLT_FONT=cp437 font.h: uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 'u_char dflt_font_16[16*256] = {' '};' < ${SC_DFLT_FONT}-8x16 > font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x14.fnt && file2c 'u_char dflt_font_14[14*256] = {' '};' < ${SC_DFLT_FONT}-8x14 >> font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x8.fnt && file2c 'u_char dflt_font_8[8*256] = {' '};' < ${SC_DFLT_FONT}-8x8 >> font.h loader.help: help.common help.ps3 ${.CURDIR}/../../fdt/help.fdt cat ${.ALLSRC} | \ awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} .PATH: ${.CURDIR}/../../forth .include "${.CURDIR}/../../forth/Makefile.inc" FILES+= loader.rc menu.rc .include Index: stable/11/sys/boot/powerpc/uboot/Makefile =================================================================== --- stable/11/sys/boot/powerpc/uboot/Makefile (revision 329130) +++ stable/11/sys/boot/powerpc/uboot/Makefile (revision 329131) @@ -1,112 +1,109 @@ # $FreeBSD$ .include PROG= ubldr NEWVERSWHAT= "U-Boot loader" ${MACHINE_ARCH} BINDIR?= /boot INSTALLFLAGS= -b MAN= # Architecture-specific loader code SRCS= start.S conf.c vers.c SRCS+= ucmpdi2.c .if !defined(LOADER_NO_DISK_SUPPORT) LOADER_DISK_SUPPORT?= yes .else LOADER_DISK_SUPPORT= no .endif LOADER_UFS_SUPPORT?= yes LOADER_CD9660_SUPPORT?= no LOADER_EXT2FS_SUPPORT?= no LOADER_NET_SUPPORT?= yes LOADER_NFS_SUPPORT?= yes LOADER_TFTP_SUPPORT?= no LOADER_GZIP_SUPPORT?= no LOADER_BZIP2_SUPPORT?= no .if ${MK_FDT} != "no" LOADER_FDT_SUPPORT= yes .else LOADER_FDT_SUPPORT= no .endif .if ${LOADER_DISK_SUPPORT} == "yes" CFLAGS+= -DLOADER_DISK_SUPPORT .endif .if ${LOADER_UFS_SUPPORT} == "yes" CFLAGS+= -DLOADER_UFS_SUPPORT .endif .if ${LOADER_CD9660_SUPPORT} == "yes" CFLAGS+= -DLOADER_CD9660_SUPPORT .endif .if ${LOADER_EXT2FS_SUPPORT} == "yes" CFLAGS+= -DLOADER_EXT2FS_SUPPORT .endif .if ${LOADER_GZIP_SUPPORT} == "yes" CFLAGS+= -DLOADER_GZIP_SUPPORT .endif .if ${LOADER_BZIP2_SUPPORT} == "yes" CFLAGS+= -DLOADER_BZIP2_SUPPORT .endif .if ${LOADER_NET_SUPPORT} == "yes" CFLAGS+= -DLOADER_NET_SUPPORT .endif .if ${LOADER_NFS_SUPPORT} == "yes" CFLAGS+= -DLOADER_NFS_SUPPORT .endif .if ${LOADER_TFTP_SUPPORT} == "yes" CFLAGS+= -DLOADER_TFTP_SUPPORT .endif .if ${LOADER_FDT_SUPPORT} == "yes" CFLAGS+= -I${.CURDIR}/../../fdt CFLAGS+= -I${.OBJDIR}/../../fdt CFLAGS+= -DLOADER_FDT_SUPPORT LIBUBOOT_FDT= ${.OBJDIR}/../../uboot/fdt/libuboot_fdt.a LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a .endif .if ${MK_FORTH} != "no" # Enable BootForth BOOT_FORTH= yes CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl CFLAGS+= -I${.CURDIR}/../../ficl/powerpc LIBFICL= ${.OBJDIR}/../../ficl/libficl.a .endif # Always add MI sources .PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern .include "${.CURDIR}/../../common/Makefile.inc" CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. CFLAGS+= -I. CLEANFILES+= ${PROG}.help CFLAGS+= -ffreestanding LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc # Pull in common loader code .PATH: ${.CURDIR}/../../uboot/common .include "${.CURDIR}/../../uboot/common/Makefile.inc" CFLAGS+= -I${.CURDIR}/../../uboot/common # U-Boot standalone support library LIBUBOOT= ${.OBJDIR}/../../uboot/lib/libuboot.a CFLAGS+= -I${.CURDIR}/../../uboot/lib CFLAGS+= -I${.OBJDIR}/../../uboot/lib -# where to get libstand from -CFLAGS+= -I${SASRC} - DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA32} LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA32} loader.help: help.common help.uboot ${.CURDIR}/../../fdt/help.fdt cat ${.ALLSRC} | \ awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} .PATH: ${.CURDIR}/../../forth FILES= loader.help .include Index: stable/11/sys/boot/sparc64/loader/Makefile =================================================================== --- stable/11/sys/boot/sparc64/loader/Makefile (revision 329130) +++ stable/11/sys/boot/sparc64/loader/Makefile (revision 329131) @@ -1,100 +1,97 @@ # $FreeBSD$ .include MK_SSP= no MAN= PROG?= loader NEWVERSWHAT?= "bootstrap loader" sparc64 VERSION_FILE= ${.CURDIR}/../loader/version INSTALLFLAGS= -b # Architecture-specific loader code SRCS= locore.S main.c metadata.c vers.c LOADER_DISK_SUPPORT?= yes LOADER_UFS_SUPPORT?= yes LOADER_CD9660_SUPPORT?= yes LOADER_ZFS_SUPPORT?= no LOADER_NET_SUPPORT?= yes LOADER_NFS_SUPPORT?= yes LOADER_TFTP_SUPPORT?= yes LOADER_GZIP_SUPPORT?= yes LOADER_BZIP2_SUPPORT?= no LOADER_DEBUG?= no .if ${LOADER_DEBUG} == "yes" CFLAGS+= -DLOADER_DEBUG .endif .if ${LOADER_DISK_SUPPORT} == "yes" CFLAGS+= -DLOADER_DISK_SUPPORT .endif .if ${LOADER_UFS_SUPPORT} == "yes" CFLAGS+= -DLOADER_UFS_SUPPORT .endif .if ${LOADER_CD9660_SUPPORT} == "yes" CFLAGS+= -DLOADER_CD9660_SUPPORT .endif .if ${LOADER_ZFS_SUPPORT} == "yes" CFLAGS+= -DLOADER_ZFS_SUPPORT CFLAGS+= -I${.CURDIR}/../../zfs CFLAGS+= -I${.CURDIR}/../../../cddl/boot/zfs LIBZFSBOOT= ${.OBJDIR}/../../zfs/libzfsboot.a .endif .if ${LOADER_GZIP_SUPPORT} == "yes" CFLAGS+= -DLOADER_GZIP_SUPPORT .endif .if ${LOADER_BZIP2_SUPPORT} == "yes" CFLAGS+= -DLOADER_BZIP2_SUPPORT .endif .if ${LOADER_NET_SUPPORT} == "yes" CFLAGS+= -DLOADER_NET_SUPPORT .endif .if ${LOADER_NFS_SUPPORT} == "yes" CFLAGS+= -DLOADER_NFS_SUPPORT .endif .if ${LOADER_TFTP_SUPPORT} == "yes" CFLAGS+= -DLOADER_TFTP_SUPPORT .endif .if ${MK_FORTH} != "no" # Enable BootForth BOOT_FORTH= yes CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl CFLAGS+= -I${.CURDIR}/../../ficl/sparc64 LIBFICL= ${.OBJDIR}/../../ficl/libficl.a .endif # Always add MI sources .PATH: ${.CURDIR}/../../common .include "${.CURDIR}/../../common/Makefile.inc" CFLAGS+= -I${.CURDIR}/../../common CFLAGS+= -I. CLEANFILES+= loader.help LDFLAGS= -static # Open Firmware standalone support library LIBOFW= ${.OBJDIR}/../../ofw/libofw/libofw.a CFLAGS+= -I${.CURDIR}/../../ofw/libofw/ -# where to get libstand from -CFLAGS+= -I${SASRC} - # Need sys/ for crypto/intake.h CFLAGS+= -I${SRCTOP}/sys DPADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} ${LIBSA} LDADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} ${LIBSA} loader.help: help.common help.sparc64 cat ${.ALLSRC} | \ awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} .PATH: ${.CURDIR}/../../forth .include "${.CURDIR}/../../forth/Makefile.inc" FILES+= loader.rc menu.rc .include Index: stable/11/sys/boot/uboot/fdt/Makefile =================================================================== --- stable/11/sys/boot/uboot/fdt/Makefile (revision 329130) +++ stable/11/sys/boot/uboot/fdt/Makefile (revision 329131) @@ -1,34 +1,32 @@ # $FreeBSD$ .include .PATH: ${.CURDIR}/../../common LIB= uboot_fdt INTERNALLIB= WARNS?= 2 SRCS= uboot_fdt.c CFLAGS+= -ffreestanding -msoft-float -CFLAGS+= -I${SASRC} - # U-Boot library headers CFLAGS+= -I${.CURDIR}/../lib # libfdt headers CFLAGS+= -I${.CURDIR}/../../fdt # Pick up the bootstrap header for some interface items CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I. machine: .NOMETA ln -sf ${.CURDIR}/../../../${MACHINE_CPUARCH}/include machine CLEANFILES+= machine .include .include beforedepend ${OBJS}: machine Index: stable/11/sys/boot/uboot/lib/Makefile =================================================================== --- stable/11/sys/boot/uboot/lib/Makefile (revision 329130) +++ stable/11/sys/boot/uboot/lib/Makefile (revision 329131) @@ -1,52 +1,50 @@ # $FreeBSD$ .include .PATH: ${.CURDIR}/../../common LIB= uboot INTERNALLIB= WARNS?= 2 SRCS= crc32.c console.c copy.c devicename.c elf_freebsd.c glue.c SRCS+= module.c net.c reboot.c time.c CFLAGS+= -ffreestanding -msoft-float -CFLAGS+= -I${SASRC} - .if !defined(LOADER_NO_DISK_SUPPORT) SRCS+= disk.c CFLAGS+= -DLOADER_DISK_SUPPORT .endif .if ${MK_FDT} != "no" LOADER_FDT_SUPPORT= yes .else LOADER_FDT_SUPPORT= no .endif .if ${LOADER_FDT_SUPPORT} == "yes" CFLAGS+= -DLOADER_FDT_SUPPORT -I${.CURDIR}/../../fdt .endif # Pick up FDT includes CFLAGS+= -I${.CURDIR}/../../../../sys/contrib/libfdt/ # Pick up the bootstrap header for some interface items CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I. .ifdef(BOOT_DISK_DEBUG) # Make the disk code more talkative CFLAGS+= -DDISK_DEBUG .endif machine: .NOMETA ln -sf ${.CURDIR}/../../../${MACHINE_CPUARCH}/include machine CLEANFILES+= machine .include .include beforedepend ${OBJS}: machine Index: stable/11/sys/boot/userboot/userboot/Makefile =================================================================== --- stable/11/sys/boot/userboot/userboot/Makefile (revision 329130) +++ stable/11/sys/boot/userboot/userboot/Makefile (revision 329131) @@ -1,65 +1,64 @@ # $FreeBSD$ MAN= .include MK_SSP= no SHLIB_NAME= userboot.so MK_CTF= no STRIP= LIBDIR= /boot SRCS= autoload.c SRCS+= bcache.c SRCS+= biossmap.c SRCS+= bootinfo.c SRCS+= bootinfo32.c SRCS+= bootinfo64.c SRCS+= conf.c SRCS+= console.c SRCS+= copy.c SRCS+= devicename.c SRCS+= elf32_freebsd.c SRCS+= elf64_freebsd.c SRCS+= host.c SRCS+= main.c SRCS+= userboot_cons.c SRCS+= userboot_disk.c SRCS+= vers.c CFLAGS+= -Wall CFLAGS+= -I${.CURDIR}/.. CFLAGS+= -I${.CURDIR}/../../common CFLAGS+= -I${.CURDIR}/../../.. -CFLAGS+= -I${SASRC} CFLAGS+= -ffreestanding -I. CWARNFLAGS.main.c += -Wno-implicit-function-declaration LDFLAGS+= -nostdlib -Wl,-Bsymbolic NEWVERSWHAT= "User boot" ${MACHINE_CPUARCH} .if ${MK_FORTH} != "no" BOOT_FORTH= yes CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl CFLAGS+= -I${.CURDIR}/../../ficl/i386 CFLAGS+= -DBF_DICTSIZE=15000 LIBFICL= ${.OBJDIR}/../ficl/libficl.a .endif .if ${MK_ZFS} != "no" CFLAGS+= -DUSERBOOT_ZFS_SUPPORT LIBZFSBOOT= ${.OBJDIR}/../zfs/libzfsboot.a .endif # Always add MI sources .PATH: ${.CURDIR}/../../common .include "${.CURDIR}/../../common/Makefile.inc" CFLAGS+= -I${.CURDIR}/../../common CFLAGS+= -I. DPADD+= ${LIBFICL} ${LIBZFSBOOT} ${LIBSAU} LDADD+= ${LIBFICL} ${LIBZFSBOOT} ${LIBSAU} .include Index: stable/11/sys/boot/zfs/Makefile =================================================================== --- stable/11/sys/boot/zfs/Makefile (revision 329130) +++ stable/11/sys/boot/zfs/Makefile (revision 329131) @@ -1,41 +1,40 @@ # $FreeBSD$ LIB= zfsboot INTERNALLIB= SRCS+= zfs.c SRCS+= skein.c skein_block.c # Do not unroll skein loops, reduce code size CFLAGS+= -DSKEIN_LOOP=111 .PATH: ${.CURDIR}/../../crypto/skein CFLAGS+= -DBOOTPROG=\"zfsloader\" CFLAGS+= -I${.CURDIR}/../common -I${.CURDIR}/../.. -I. -CFLAGS+= -I${SASRC} CFLAGS+= -I${.CURDIR}/../../cddl/boot/zfs CFLAGS+= -I${.CURDIR}/../../crypto/skein .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -march=i386 .endif .if ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -m32 .endif CFLAGS+= -Wformat -Wall .if ${MACHINE_CPUARCH} == "amd64" CLEANFILES+= machine machine: .NOMETA ln -sf ${.CURDIR}/../../i386/include machine .endif .include .include .if ${MACHINE_CPUARCH} == "amd64" .if !exists(machine) beforedepend ${OBJS}: machine .endif .endif Index: stable/11 =================================================================== --- stable/11 (revision 329130) +++ stable/11 (revision 329131) Property changes on: stable/11 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r324460,324471