diff --git a/stand/common/gfx_fb_stub.c b/stand/common/gfx_fb_stub.c deleted file mode 100644 index a4ebdeb8c388..000000000000 --- a/stand/common/gfx_fb_stub.c +++ /dev/null @@ -1,76 +0,0 @@ -/*- - * Copyright 2021 Toomas Soome - * All rights reserved. - * - * 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. - */ - -#include -/* - * Generic gfx stubs. - */ - -#include -#include -#include "bootstrap.h" -#include "gfx_fb.h" - -font_list_t fonts = STAILQ_HEAD_INITIALIZER(fonts); -teken_gfx_t gfx_state = { 0 }; - -void -gfx_fb_setpixel(uint32_t x __unused, uint32_t y __unused) -{ -} - -void -gfx_fb_drawrect(uint32_t x1 __unused, uint32_t y1 __unused, - uint32_t x2 __unused, uint32_t y2 __unused, uint32_t fill __unused) -{ -} - -void -gfx_term_drawrect(uint32_t x1 __unused, uint32_t y1 __unused, - uint32_t x2 __unused, uint32_t y2 __unused) -{ -} - -void -gfx_fb_line(uint32_t x0 __unused, uint32_t y0 __unused, - uint32_t x1 __unused, uint32_t y1 __unused, uint32_t w __unused) -{ -} - -void -gfx_fb_bezier(uint32_t x0 __unused, uint32_t y0 __unused, - uint32_t x1 __unused, uint32_t y1 __unused, uint32_t x2 __unused, - uint32_t y2 __unused, uint32_t w __unused) -{ -} - -int -gfx_fb_putimage(png_t *png __unused, uint32_t ux1 __unused, - uint32_t uy1 __unused, uint32_t ux2 __unused, uint32_t uy2 __unused, - uint32_t flags __unused) -{ - return (1); -} diff --git a/stand/kboot/kboot/Makefile b/stand/kboot/kboot/Makefile index 055027b85eb2..2e68a9ba9214 100644 --- a/stand/kboot/kboot/Makefile +++ b/stand/kboot/kboot/Makefile @@ -1,65 +1,63 @@ LOADER_DISK_SUPPORT?= yes LOADER_CD9660_SUPPORT?= yes LOADER_MSDOS_SUPPORT?= no LOADER_EXT2FS_SUPPORT?= yes LOADER_UFS_SUPPORT?= yes LOADER_ZFS_SUPPORT?= yes LOADER_NET_SUPPORT?= no LOADER_NFS_SUPPORT?= no LOADER_TFTP_SUPPORT?= no LOADER_GZIP_SUPPORT?= no LOADER_BZIP2_SUPPORT?= no .include PROG= loader.kboot NEWVERSWHAT= "kboot loader" ${MACHINE_ARCH} INSTALLFLAGS= -b # Architecture-specific loader code SRCS= \ bootinfo.c \ conf.c \ - gfx_fb_stub.c \ hostcons.c \ hostdisk.c \ hostfs.c \ init.c \ kbootfdt.c \ main.c \ seg.c \ util.c \ vers.c -CFLAGS.gfx_fb_stub.c += -I${SRCTOP}/contrib/pnglite -I${SRCTOP}/sys/teken .if ${MK_LOADER_ZFS} != "no" CFLAGS+= -I${ZFSSRC} CFLAGS+= -I${SYSDIR}/contrib/openzfs/include CFLAGS+= -I${SYSDIR}/contrib/openzfs/include/os/freebsd/zfs HAVE_ZFS=yes .endif HELP_FILENAME= loader.help.kboot .include "${BOOTSRC}/fdt.mk" # We share bootinfo.c with efi .PATH: ${BOOTSRC}/efi/loader # Note: Since we're producing a userland binary, we key off of MACHINE_ARCH # instead of the more normal MACHINE since the changes between different flavors # of MACHINE_ARCH are large enough in Linux that it's easier that way. .PATH: ${.CURDIR}/arch/${MACHINE_ARCH} .include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc" # Always add MI sources .include "${BOOTSRC}/loader.mk" CFLAGS+= -I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH} CFLAGS+= -Wall DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBSAFDT} ${LIBSA} ${LIBKBOOT} LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBSAFDT} ${LIBSA} ${LIBKBOOT} .include diff --git a/stand/powerpc/ofw/Makefile b/stand/powerpc/ofw/Makefile index 3e4c92220fac..b7cbbd9fca00 100644 --- a/stand/powerpc/ofw/Makefile +++ b/stand/powerpc/ofw/Makefile @@ -1,67 +1,65 @@ LOADER_CD9660_SUPPORT?= yes LOADER_EXT2FS_SUPPORT?= no LOADER_MSDOS_SUPPORT?= no LOADER_UFS_SUPPORT?= yes LOADER_NET_SUPPORT?= yes LOADER_NFS_SUPPORT?= yes LOADER_TFTP_SUPPORT?= no LOADER_GZIP_SUPPORT?= yes LOADER_BZIP2_SUPPORT?= no .include PROG= loader NEWVERSWHAT= "Open Firmware loader" ${MACHINE_ARCH} INSTALLFLAGS= -b # Architecture-specific loader code SRCS= conf.c vers.c main.c elf_freebsd.c ppc64_elf_freebsd.c start.c -SRCS+= ucmpdi2.c gfx_fb_stub.c - -CFLAGS.gfx_fb_stub.c += -I${SRCTOP}/contrib/pnglite -I${SRCTOP}/sys/teken +SRCS+= ucmpdi2.c .include "${BOOTSRC}/fdt.mk" .if ${MK_FDT} == "yes" SRCS+= ofwfdt.c .endif .if ${MACHINE_ARCH:Mpowerpc64*} != "" SRCS+= cas.c CFLAGS+= -DCAS .endif .if ${MACHINE_ARCH} == "powerpc64le" SRCS+= trampolineLE.S .endif HELP_FILES= ${FDTSRC}/help.fdt HELP_FILENAME= loader.help.ofw # Always add MI sources .include "${BOOTSRC}/loader.mk" .PATH: ${SYSDIR}/libkern # load address. set in linker script RELOC?= 0x1C00000 CFLAGS+= -DRELOC=${RELOC} -g LDFLAGS= -nostdlib -static .if ${MACHINE_ARCH} == "powerpc64le" LDFLAGS+= -T ${.CURDIR}/ldscript.powerpcle .else LDFLAGS+= -T ${.CURDIR}/ldscript.powerpc .endif # Open Firmware standalone support library LIBOFW= ${BOOTOBJ}/libofw/libofw.a CFLAGS+= -I${BOOTSRC}/libofw DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBSAFDT} ${LIBSA} LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBSAFDT} ${LIBSA} MK_PIE= no .include diff --git a/stand/uboot/Makefile b/stand/uboot/Makefile index 83ac5949cbb3..4405f09408bf 100644 --- a/stand/uboot/Makefile +++ b/stand/uboot/Makefile @@ -1,84 +1,83 @@ LOADER_UFS_SUPPORT?= yes LOADER_CD9660_SUPPORT?= no LOADER_MSDOS_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 LOADER_DISK_SUPPORT?= yes .include .include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc" LOADER_UBLDR_BIN?= yes .if ${LOADER_UBLDR_BIN} != "no" FILES+= ubldr ubldr.bin .else PROG= ubldr .endif NEWVERSWHAT= "U-Boot loader" ${MACHINE_ARCH} BINDIR= /boot/uboot INSTALLFLAGS= -b WARNS?= 1 .PATH: ${BOOTSRC}/common .PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH} .if ${COMPILER_TYPE} == "gcc" CWARNFLAGS.self_reloc.c+= -Wno-error=maybe-uninitialized .endif HELP_FILES= ${.CURDIR}/help.uboot ${BOOTSRC}/fdt/help.fdt HELP_FILENAME= loader.help.uboot # Always add MI sources .include "${BOOTSRC}/loader.mk" LDSCRIPT= ${.CURDIR}/arch/${MACHINE_CPUARCH}/ldscript.${MACHINE_CPUARCH} LDFLAGS= -nostdlib -static -T ${LDSCRIPT} LDFLAGS+= -Wl,-znotext SRCS+= main.c vers.c SRCS+= copy.c devicename.c elf_freebsd.c glue.c -SRCS+= net.c reboot.c time.c gfx_fb_stub.c +SRCS+= net.c reboot.c time.c SRCS+= uboot_console.c uboot_disk.c uboot_fdt.c uboot_module.c -CFLAGS.gfx_fb_stub.c += -I${SRCTOP}/contrib/pnglite -I${SRCTOP}/sys/teken CFLAGS.glue.c+= -DHAVE_MEMCPY -I${SRCTOP}/sys/contrib/zlib CFLAGS+= -I${BOOTSRC}/common CFLAGS+= -I${.CURDIR} CFLAGS+= -I${.OBJDIR} .if ${MACHINE_CPUARCH} == "arm" SRCS+= metadata.c .endif .include "${BOOTSRC}/fdt.mk" # Pick up the bootstrap header for some interface items CFLAGS+= -I${LDRSRC} # libfdt headers CFLAGS+= -I${FDTSRC} .ifdef(BOOT_DISK_DEBUG) # Make the disk code more talkative CFLAGS+= -DDISK_DEBUG .endif .if ${LOADER_UBLDR_BIN} != "no" OBJS+= ${SRCS:N*.h:R:S/$/.o/g} ubldr ubldr.bin ubldr.pie: ${OBJS} .endif DPADD= ${LDR_INTERP} ${LIBSAFDT} ${LIBSA} LDADD= ${LDR_INTERP} ${LIBSAFDT} ${LIBSA} .include diff --git a/stand/userboot/userboot/Makefile b/stand/userboot/userboot/Makefile index d652f2b53968..15ac8701e4d4 100644 --- a/stand/userboot/userboot/Makefile +++ b/stand/userboot/userboot/Makefile @@ -1,68 +1,66 @@ LOADER_MSDOS_SUPPORT?= yes LOADER_UFS_SUPPORT?= yes LOADER_CD9660_SUPPORT?= no LOADER_EXT2FS_SUPPORT?= no PIC=yes # Note: -nostdlib needs to be added to LDFLAGS before including defs.mk LDFLAGS+= -nostdlib -Wl,-Bsymbolic .include SHLIB_NAME= userboot_${LOADER_INTERP}.so STRIP= LIBDIR= /boot .PATH: ${.CURDIR}/../userboot SRCS= autoload.c SRCS+= bcache.c SRCS+= biossmap.c SRCS+= bootinfo.c SRCS+= bootinfo32.c SRCS+= bootinfo64.c SRCS+= conf.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 -SRCS+= gfx_fb_stub.c CFLAGS+= -Wall CFLAGS+= -I${BOOTSRC}/userboot .if ${MK_LOADER_ZFS} != "no" CFLAGS.main.c+= -I${BOOTSRC}/libsa/zfs CFLAGS.main.c+= -I${SYSDIR}/contrib/openzfs/include CFLAGS.main.c+= -I${SYSDIR}/contrib/openzfs/include/os/freebsd/zfs .endif CWARNFLAGS.main.c += -Wno-implicit-function-declaration -CFLAGS.gfx_fb_stub.c += -I${SRCTOP}/contrib/pnglite -I${SRCTOP}/sys/teken NEWVERSWHAT= "User boot ${LOADER_INTERP}" ${MACHINE_CPUARCH} VERSION_FILE= ${.CURDIR}/../userboot/version .if ${LOADER_INTERP} == ${LOADER_DEFAULT_INTERP} LINKS+= ${BINDIR}/${SHLIB_NAME} ${BINDIR}/userboot.so .endif .if ${MK_LOADER_ZFS} != "no" CFLAGS+= -DUSERBOOT_ZFS_SUPPORT HAVE_ZFS=yes .endif HELP_FILENAME= loader.help.userboot # Always add MI sources .include "${BOOTSRC}/loader.mk" CFLAGS+= -I. DPADD+= ${LDR_INTERP} ${LIBSA} LDADD+= ${LDR_INTERP} ${LIBSA} .include