From 8516ebe6f57424bf5f2eb801dd03386f0b043f17 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Thu, 14 Sep 2017 10:46:32 +0800 Subject: [PATCH] Add libfdt --- .gitmodules | 3 +++ jni/external/Android.mk | 16 ++++++++++++++++ jni/external/dtc | 1 + 3 files changed, 20 insertions(+) create mode 160000 jni/external/dtc diff --git a/.gitmodules b/.gitmodules index 7af98d361..c12cb1cb2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,6 @@ [submodule "jni/busybox"] path = jni/external/busybox url = https://github.com/topjohnwu/ndk-busybox.git +[submodule "jni/external/dtc"] + path = jni/external/dtc + url = https://github.com/dgibson/dtc diff --git a/jni/external/Android.mk b/jni/external/Android.mk index 921f7a929..dae2530af 100644 --- a/jni/external/Android.mk +++ b/jni/external/Android.mk @@ -14,6 +14,22 @@ LOCAL_C_INCLUDES := $(LIBSELINUX) LOCAL_SRC_FILES := stubs/selinux_stub.c include $(BUILD_SHARED_LIBRARY) +# libfdt +include $(CLEAR_VARS) +LOCAL_MODULE:= libfdt +LOCAL_C_INCLUDES := $(LIBFDT) +LOCAL_SRC_FILES := \ + dtc/libfdt/fdt.c \ + dtc/libfdt/fdt_addresses.c \ + dtc/libfdt/fdt_empty_tree.c \ + dtc/libfdt/fdt_overlay.c \ + dtc/libfdt/fdt_ro.c \ + dtc/libfdt/fdt_rw.c \ + dtc/libfdt/fdt_strerror.c \ + dtc/libfdt/fdt_sw.c \ + dtc/libfdt/fdt_wip.c +include $(BUILD_STATIC_LIBRARY) + # libsepol, static library include $(SELINUX_PATH)/libsepol/Android.mk diff --git a/jni/external/dtc b/jni/external/dtc new file mode 160000 index 000000000..fe50bd1ec --- /dev/null +++ b/jni/external/dtc @@ -0,0 +1 @@ +Subproject commit fe50bd1ecc1da273a7627a76dcd38da9d77e496f