patching fastboot.mk to build in yocto environment.
|
|
Changes include:
|
Introduced an output folder which will keep all the outputs from the
|
android-tools.
|
|
Adding an include file that is setting the common flags.
|
Changed the cppflag to include the headers from other components
|
of android-tools
|
|
Modified LDflags so that the libraries that are coming from other android-tools
|
are searched in the output folder.
|
|
Modified the build rule so that it outputs the binary to the OUT_DIR
|
|
Signed-off-by: Nisha Parrakat <Nisha.Parrakat@kpit.com>
|
|
Upstream-Status: Pending
|
|
--- git/system/core/debian/fastboot.mk 2021-05-17 07:47:56.800224043 +0000
|
+++ git/system/core/debian/fastboot.mk 2021-05-17 07:49:40.130383096 +0000
|
@@ -1,3 +1,4 @@
|
+include ../../rules_yocto.mk
|
NAME = fastboot
|
fastboot_SOURCES = \
|
bootimg_utils.cpp \
|
@@ -38,11 +39,11 @@
|
-Ifs_mgr/liblp/include \
|
-I/usr/include/android/openssl \
|
-Ilibsparse/include \
|
- -Ilibziparchive/include
|
+ -Ilibziparchive/include -I$(OUT_DIR)/usr/include/
|
LDFLAGS += -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \
|
-fuse-ld=gold \
|
- -Wl,-rpath-link=. \
|
- -L. -lziparchive -lsparse -lbase -lcutils -ladb -lcrypto -lext4_utils \
|
+ -Wl,-rpath-link=$(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android \
|
+ -L$(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android -lziparchive -lsparse -lbase -lcutils -ladb -lcrypto -lext4_utils \
|
-L/usr/lib/$(DEB_HOST_MULTIARCH)/android \
|
-l7z \
|
|
@@ -53,7 +54,8 @@
|
endif
|
|
build: $(SOURCES)
|
- $(CXX) $^ -o fastboot/$(NAME) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
+ mkdir --parents $(OUT_DIR)/usr/bin/fastboot
|
+ $(CXX) $^ -o $(OUT_DIR)/usr/bin/fastboot/$(NAME) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
|
clean:
|
- $(RM) fastboot/$(NAME)
|
+ $(RM) $(OUT_DIR)/usr/bin/fastboot/$(NAME)
|