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

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