1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

kboot: Split out powerpc build

Split the powerpc specific parts into kboot/arch/powerpc64. More may be
needed here.

Sponsored by:		Netflix
Reviewed by:		jhibbits
Differential Revision:	https://reviews.freebsd.org/D33514
This commit is contained in:
Warner Losh 2021-12-30 16:07:13 -07:00
parent 4366199644
commit 6497250f6f
8 changed files with 21 additions and 12 deletions

View File

@ -80,8 +80,10 @@ SUBDIR_DEPEND_forth+= ficl
SUBDIR_DEPEND_lua+= liblua
SUBDIR_DEPEND_efi+= ${INTERP_DEPENDS}
SUBDIR_DEPEND_kboot+= ${INTERP_DEPENDS}
.if ${MK_FDT} != "no"
SUBDIR_DEPEND_efi+= fdt
SUBDIR_DEPEND_kboot+= fdt
.endif
SUBDIR_DEPEND_uboot+= ${INTERP_DEPENDS}

View File

@ -17,30 +17,23 @@ NEWVERSWHAT= "kboot loader" ${MACHINE_ARCH}
INSTALLFLAGS= -b
# Architecture-specific loader code
SRCS= conf.c vers.c main.c ppc64_elf_freebsd.c
SRCS+= host_syscall.S hostcons.c hostdisk.c kerneltramp.S kbootfdt.c
SRCS+= ucmpdi2.c gfx_fb_stub.c
SRCS= vers.c main.c hostcons.c hostdisk.c kbootfdt.c gfx_fb_stub.c
CFLAGS.gfx_fb_stub.c += -I${SRCTOP}/contrib/pnglite -I${SRCTOP}/sys/teken
.include "${BOOTSRC}/fdt.mk"
CFLAGS+= -mcpu=powerpc64
.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}
.include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc"
# Always add MI sources
.include "${BOOTSRC}/loader.mk"
.PATH: ${SYSDIR}/libkern
CFLAGS+= -I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH}
CFLAGS+= -Wall -DAIM
# load address. set in linker script
RELOC?= 0x0
CFLAGS+= -DRELOC=${RELOC}
LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc
CFLAGS+= -Wall
DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA}
LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA}
MK_PIE= no
.include <bsd.prog.mk>

View File

@ -0,0 +1,14 @@
CFLAGS+= -mcpu=powerpc64
SRCS+= conf.c ppc64_elf_freebsd.c host_syscall.S kerneltramp.S
SRCS+= ucmpdi2.c
# load address. set in linker script
RELOC?= 0x0
CFLAGS+= -DRELOC=${RELOC}
LDFLAGS= -nostdlib -static -T ${.CURDIR}/arch/${MACHINE_ARCH}/ldscript.powerpc
MK_PIE= no
# Maybe bogus?
CFLAGS+= -DAIM