Skip to content

Commit

Permalink
libfdt: Make an internal FDT library available
Browse files Browse the repository at this point in the history
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
  • Loading branch information
markjdb committed Mar 21, 2024
1 parent d1c5d0c commit f29af86
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 29 additions & 0 deletions lib/libfdt/Makefile
Original file line number Diff line number Diff line change
@@ -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>
4 changes: 4 additions & 0 deletions share/mk/src.libnames.mk
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ _INTERNALLIBS= \
c_nossp_pic \
cron \
elftc \
fdt \
fifolog \
ifconfig \
ipf \
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit f29af86

Please sign in to comment.