1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-21 07:15:49 +00:00

libfdt: Make an internal FDT library available

This will be used by bhyve to build a device tree when booting arm64
guests.

Reviewed by:	corvink, jhb
MFC after:	1 week
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D40994
This commit is contained in:
Mark Johnston 2024-03-21 00:21:16 -04:00
parent d1c5d0cfcc
commit f29af8618b
3 changed files with 34 additions and 0 deletions

View File

@ -171,6 +171,7 @@ SUBDIR+= clang
SUBDIR.${MK_CUSE}+= libcuse
SUBDIR.${MK_TOOLCHAIN}+=libpe
SUBDIR.${MK_DIALOG}+= libdpv libfigpar
SUBDIR.${MK_FDT}+= libfdt
SUBDIR.${MK_FILE}+= libmagic
SUBDIR.${MK_GPIO}+= libgpio
SUBDIR.${MK_GSSAPI}+= libgssapi librpcsec_gss

29
lib/libfdt/Makefile Normal file
View File

@ -0,0 +1,29 @@
LIB= fdt
INTERNALLIB=
LIBFDTSRCDIR= ${SRCTOP}/sys/contrib/libfdt
.PATH: ${LIBFDTSRCDIR}
SRCS= \
fdt.c \
fdt_addresses.c \
fdt_empty_tree.c \
fdt_overlay.c \
fdt_ro.c \
fdt_rw.c \
fdt_strerror.c \
fdt_sw.c \
fdt_wip.c
INCS= \
fdt.h \
libfdt.h \
ibfdt_env.h
CFLAGS+= -I${LIBFDTSRCDIR}
WARNS?= 2
MAN=
.include <bsd.lib.mk>

View File

@ -44,6 +44,7 @@ _INTERNALLIBS= \
c_nossp_pic \
cron \
elftc \
fdt \
fifolog \
ifconfig \
ipf \
@ -546,6 +547,9 @@ _LIB_OBJTOP?= ${OBJTOP}
LIBELFTCDIR= ${_LIB_OBJTOP}/lib/libelftc
LIBELFTC?= ${LIBELFTCDIR}/libelftc${PIE_SUFFIX}.a
LIBFDTDIR= ${_LIB_OBJTOP}/lib/libfdt
LIBFDT?= ${LIBFDTDIR}/libfdt${PIE_SUFFIX}.a
LIBLUADIR= ${_LIB_OBJTOP}/lib/liblua
LIBLUA?= ${LIBLUADIR}/liblua${PIE_SUFFIX}.a