summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/selinux/android-tools/android-tools/fastboot_mk_change_out_dir.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/selinux/android-tools/android-tools/fastboot_mk_change_out_dir.patch')
-rw-r--r--dynamic-layers/selinux/android-tools/android-tools/fastboot_mk_change_out_dir.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/dynamic-layers/selinux/android-tools/android-tools/fastboot_mk_change_out_dir.patch b/dynamic-layers/selinux/android-tools/android-tools/fastboot_mk_change_out_dir.patch
new file mode 100644
index 0000000..c8904f0
--- /dev/null
+++ b/dynamic-layers/selinux/android-tools/android-tools/fastboot_mk_change_out_dir.patch
@@ -0,0 +1,52 @@
1patching fastboot.mk to build in yocto environment.
2
3Changes include:
4Introduced an output folder which will keep all the outputs from the
5android-tools.
6
7Adding an include file that is setting the common flags.
8Changed the cppflag to include the headers from other components
9of android-tools
10
11Modified LDflags so that the libraries that are coming from other android-tools
12are searched in the output folder.
13
14Modified the build rule so that it outputs the binary to the OUT_DIR
15
16Signed-off-by: Nisha Parrakat <Nisha.Parrakat@kpit.com>
17
18Upstream-Status: Pending
19
20--- git/system/core/debian/fastboot.mk 2021-05-17 07:47:56.800224043 +0000
21+++ git/system/core/debian/fastboot.mk 2021-05-17 07:49:40.130383096 +0000
22@@ -1,3 +1,4 @@
23+include ../../rules_yocto.mk
24 NAME = fastboot
25 fastboot_SOURCES = \
26 bootimg_utils.cpp \
27@@ -38,11 +39,11 @@
28 -Ifs_mgr/liblp/include \
29 -I/usr/include/android/openssl \
30 -Ilibsparse/include \
31- -Ilibziparchive/include
32+ -Ilibziparchive/include -I$(OUT_DIR)/usr/include/
33 LDFLAGS += -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \
34 -fuse-ld=gold \
35- -Wl,-rpath-link=. \
36- -L. -lziparchive -lsparse -lbase -lcutils -ladb -lcrypto -lext4_utils \
37+ -Wl,-rpath-link=$(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android \
38+ -L$(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android -lziparchive -lsparse -lbase -lcutils -ladb -lcrypto -lext4_utils \
39 -L/usr/lib/$(DEB_HOST_MULTIARCH)/android \
40 -l7z \
41
42@@ -53,7 +54,8 @@
43 endif
44
45 build: $(SOURCES)
46- $(CXX) $^ -o fastboot/$(NAME) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)
47+ mkdir --parents $(OUT_DIR)/usr/bin/fastboot
48+ $(CXX) $^ -o $(OUT_DIR)/usr/bin/fastboot/$(NAME) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)
49
50 clean:
51- $(RM) fastboot/$(NAME)
52+ $(RM) $(OUT_DIR)/usr/bin/fastboot/$(NAME)