Blame SOURCES/0007-Android-inital-porting-of-libefivar.patch

a43681
From f5932cee024f080a005bbfc252a3596f093e7ecd Mon Sep 17 00:00:00 2001
a43681
From: Chih-Wei Huang <cwhuang@linux.org.tw>
a43681
Date: Thu, 10 Jan 2019 16:48:30 +0800
a43681
Subject: [PATCH 07/63] Android: inital porting of libefivar
a43681
a43681
The static library is linked by efibootmgr.
a43681
a43681
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
a43681
---
a43681
 src/Android.mk | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++
a43681
 1 file changed, 60 insertions(+)
a43681
 create mode 100644 src/Android.mk
a43681
a43681
diff --git a/src/Android.mk b/src/Android.mk
a43681
new file mode 100644
a43681
index 00000000000..b3410e1f3e7
a43681
--- /dev/null
a43681
+++ b/src/Android.mk
a43681
@@ -0,0 +1,60 @@
a43681
+#
a43681
+# Copyright (C) 2019 The Android-x86 Open Source Project
a43681
+#
a43681
+# Licensed under the GNU Lesser General Public License Version 2.1.
a43681
+# You may not use this file except in compliance with the License.
a43681
+# You may obtain a copy of the License at
a43681
+#
a43681
+#      https://www.gnu.org/licenses/lgpl-2.1.html
a43681
+#
a43681
+
a43681
+LOCAL_PATH := $(call my-dir)
a43681
+
a43681
+include $(CLEAR_VARS)
a43681
+
a43681
+LOCAL_MODULE := makeguids
a43681
+LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
a43681
+LOCAL_CFLAGS := -DEFIVAR_BUILD_ENVIRONMENT
a43681
+LOCAL_SRC_FILES := guid.c makeguids.c
a43681
+LOCAL_LDLIBS := -ldl
a43681
+include $(BUILD_HOST_EXECUTABLE)
a43681
+
a43681
+include $(CLEAR_VARS)
a43681
+
a43681
+LOCAL_MODULE := libefivar
a43681
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
a43681
+LIBEFIBOOT_SOURCES := \
a43681
+	crc32.c \
a43681
+	creator.c \
a43681
+	disk.c \
a43681
+	gpt.c \
a43681
+	loadopt.c \
a43681
+	path-helpers.c \
a43681
+	$(notdir $(wildcard $(LOCAL_PATH)/linux*.c))
a43681
+
a43681
+LIBEFIVAR_SOURCES := \
a43681
+	dp.c \
a43681
+	dp-acpi.c \
a43681
+	dp-hw.c \
a43681
+	dp-media.c \
a43681
+	dp-message.c \
a43681
+	efivarfs.c \
a43681
+	error.c \
a43681
+	export.c \
a43681
+	guid.c \
a43681
+	guids.S \
a43681
+	lib.c \
a43681
+	vars.c
a43681
+
a43681
+LOCAL_SRC_FILES := $(LIBEFIBOOT_SOURCES) $(LIBEFIVAR_SOURCES)
a43681
+LOCAL_CFLAGS := -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -std=gnu11
a43681
+LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
a43681
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_C_INCLUDES) $(LOCAL_C_INCLUDES)/efivar $(local-generated-sources-dir)
a43681
+LIBEFIVAR_GUIDS_H := $(local-generated-sources-dir)/efivar/efivar-guids.h
a43681
+LOCAL_GENERATED_SOURCES := $(LIBEFIVAR_GUIDS_H) $(local-generated-sources-dir)/guid-symbols.c
a43681
+$(LIBEFIVAR_GUIDS_H): PRIVATE_CUSTOM_TOOL = $^ $(addprefix $(dir $(@D)),guids.bin names.bin guid-symbols.c efivar/efivar-guids.h)
a43681
+$(LIBEFIVAR_GUIDS_H): $(BUILD_OUT_EXECUTABLES)/makeguids $(LOCAL_PATH)/guids.txt
a43681
+	$(transform-generated-source)
a43681
+$(lastword $(LOCAL_GENERATED_SOURCES)): $(LIBEFIVAR_GUIDS_H)
a43681
+
a43681
+include $(BUILD_STATIC_LIBRARY)
a43681
-- 
a43681
2.26.2
a43681