diff options
| author | Mark Johnston <markj@FreeBSD.org> | 2024-03-21 04:21:16 +0000 |
|---|---|---|
| committer | Mark Johnston <markj@FreeBSD.org> | 2024-03-21 05:05:05 +0000 |
| commit | f29af8618bf94f1e58877feb6dbef35bd8bbf56b (patch) | |
| tree | 00546da3a9a33f01438fc07726da7d2879656e87 | |
| parent | d1c5d0cfcc1733c243d87f20477b115db4cf24b6 (diff) | |
| download | src-f29af8618bf.tar.gz src-f29af8618bf.zip | |
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
| -rw-r--r-- | lib/Makefile | 1 | ||||
| -rw-r--r-- | lib/libfdt/Makefile | 29 | ||||
| -rw-r--r-- | share/mk/src.libnames.mk | 4 |
3 files changed, 34 insertions, 0 deletions
diff --git a/lib/Makefile b/lib/Makefile index 9d2531820c8b..a632a77e6071 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -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 diff --git a/lib/libfdt/Makefile b/lib/libfdt/Makefile new file mode 100644 index 000000000000..c4ada46c3b2e --- /dev/null +++ b/lib/libfdt/Makefile @@ -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> diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index 0fd349d0d00f..d9fe88146dbe 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -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 |
