diff mbox series

[2/8] avb2.0: integrate avb 2.0 into the build system

Message ID 1524662285-19617-3-git-send-email-igor.opaniuk@linaro.org
State New
Headers show
Series Initial integration of AVB2.0 | expand

Commit Message

Igor Opaniuk April 25, 2018, 1:17 p.m. UTC
Integrate libavb/libavb_ab into the build system. Introduce CONFIG_LIBAVB
and CONFIG_LIBAVB_AVB options for enabling build.

Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
---
 lib/Kconfig            | 20 ++++++++++++++++++++
 lib/Makefile           |  2 ++
 lib/libavb/Makefile    | 15 +++++++++++++++
 lib/libavb_ab/Makefile |  9 +++++++++
 4 files changed, 46 insertions(+)
 create mode 100644 lib/libavb/Makefile
 create mode 100644 lib/libavb_ab/Makefile
diff mbox series

Patch

diff --git a/lib/Kconfig b/lib/Kconfig
index 436b90f..0429e17 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -142,6 +142,26 @@  config TPM
 
 endmenu
 
+menu "Android Verified Boot"
+
+config LIBAVB
+	bool "Android Verified Boot 2.0 support"
+	depends on ANDROID_BOOT_IMAGE
+	help
+	  This enables support of Android Verified Boot 2.0 which can be used
+	  to assure the end user of the integrity of the software running on a
+	  device. Introduces such features as boot chain of trust, rollback
+	  protection etc.
+
+config LIBAVB_AB
+	bool "Android Verified Boot 2.0 A/B slot support"
+	depends on LIBAVB
+	help
+	  This enables support of Android Verified Boot for A/B slots, that
+	  are used in seamless system updates.
+
+endmenu
+
 menu "Hashing Support"
 
 config SHA1
diff --git a/lib/Makefile b/lib/Makefile
index 35da570..934f8a7 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -55,6 +55,8 @@  obj-$(CONFIG_$(SPL_)ZLIB) += zlib/
 obj-$(CONFIG_$(SPL_)GZIP) += gunzip.o
 obj-$(CONFIG_$(SPL_)LZO) += lzo/
 
+obj-$(CONFIG_LIBAVB) += libavb/
+obj-$(CONFIG_LIBAVB_AB) += libavb_ab/
 
 obj-$(CONFIG_$(SPL_TPL_)SAVEENV) += qsort.o
 obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += libfdt/
diff --git a/lib/libavb/Makefile b/lib/libavb/Makefile
new file mode 100644
index 0000000..0a06a26
--- /dev/null
+++ b/lib/libavb/Makefile
@@ -0,0 +1,15 @@ 
+#
+# (C) Copyright 2017 Linaro Limited
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+obj-$(CONFIG_LIBAVB) += avb_chain_partition_descriptor.o avb_crypto.o
+obj-$(CONFIG_LIBAVB) += avb_footer.o avb_hashtree_descriptor.o
+obj-$(CONFIG_LIBAVB) += avb_property_descriptor.o avb_sha256.o
+obj-$(CONFIG_LIBAVB) += avb_slot_verify.o avb_util.o avb_version.o
+obj-$(CONFIG_LIBAVB) += avb_descriptor.o avb_hash_descriptor.o
+obj-$(CONFIG_LIBAVB) += avb_kernel_cmdline_descriptor.o avb_rsa.o avb_sha512.o
+obj-$(CONFIG_LIBAVB) += avb_sysdeps_posix.o avb_vbmeta_image.o
+
+ccflags-y = -DAVB_COMPILATION
diff --git a/lib/libavb_ab/Makefile b/lib/libavb_ab/Makefile
new file mode 100644
index 0000000..f4bd72e
--- /dev/null
+++ b/lib/libavb_ab/Makefile
@@ -0,0 +1,9 @@ 
+#
+# (C) Copyright 2017 Linaro Limited
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+obj-$(CONFIG_LIBAVB_AB) += avb_ab_flow.o
+
+ccflags-y = -DAVB_COMPILATION