diff options
Diffstat (limited to 'dynamic-layers/selinux/android-tools/android-tools_10.0.0.r36.bb')
-rw-r--r-- | dynamic-layers/selinux/android-tools/android-tools_10.0.0.r36.bb | 229 |
1 files changed, 0 insertions, 229 deletions
diff --git a/dynamic-layers/selinux/android-tools/android-tools_10.0.0.r36.bb b/dynamic-layers/selinux/android-tools/android-tools_10.0.0.r36.bb deleted file mode 100644 index f342655..0000000 --- a/dynamic-layers/selinux/android-tools/android-tools_10.0.0.r36.bb +++ /dev/null | |||
@@ -1,229 +0,0 @@ | |||
1 | DESCRIPTION = "Different utilities from Android" | ||
2 | SECTION = "console/utils" | ||
3 | LICENSE = "Apache-2.0 & GPL-2.0-only & BSD-2-Clause & BSD-3-Clause" | ||
4 | LIC_FILES_CHKSUM = " \ | ||
5 | file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10 \ | ||
6 | file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6 \ | ||
7 | file://${COMMON_LICENSE_DIR}/BSD-2-Clause;md5=cb641bc04cda31daea161b1bc15da69f \ | ||
8 | file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9 \ | ||
9 | " | ||
10 | DEPENDS = "libbsd libpcre zlib libcap libusb squashfs-tools p7zip libselinux" | ||
11 | |||
12 | ANDROID_MIRROR = "android.googlesource.com" | ||
13 | |||
14 | # matches with 10.0.0+r36 | ||
15 | SRCREV_boringssl = "ae2dd49c7cb74d04bdba7c1c9bd62c1e9cdf98f6" | ||
16 | SRCREV_core = "5aa13b053182b758d7a19db0c83e1b9b5bf1ec2e" | ||
17 | SRCREV_extras = "d31740f9d0399f8b938e88e58843d966e1cccab6" | ||
18 | SRCREV_libhardware = "c6925520342a7d37758f85eb1cf3baa20a7b7a18" | ||
19 | SRCREV_build = "28768b3120f751583a2743101b892f210d4715cf" | ||
20 | SRCREV_libunwind = "03a963ecf6ea836b38b3537cbcda0ecfd7a77393" | ||
21 | |||
22 | SRC_URI = " \ | ||
23 | git://salsa.debian.org/android-tools-team/android-platform-external-boringssl;name=boringssl;protocol=https;nobranch=1;destsuffix=git/external/boringssl \ | ||
24 | git://salsa.debian.org/android-tools-team/android-platform-system-core;name=core;protocol=https;nobranch=1;destsuffix=git/system/core \ | ||
25 | git://salsa.debian.org/android-tools-team/android-platform-system-extras;name=extras;protocol=https;nobranch=1;destsuffix=git/system/extras \ | ||
26 | git://${ANDROID_MIRROR}/platform/hardware/libhardware;name=libhardware;protocol=https;nobranch=1;destsuffix=git/hardware/libhardware \ | ||
27 | git://salsa.debian.org/android-tools-team/android-platform-build.git;name=build;protocol=https;nobranch=1;destsuffix=git/build \ | ||
28 | git://salsa.debian.org/android-tools-team/android-platform-external-libunwind.git;protocol=https;name=libunwind;nobranch=1;destsuffix=git/external/libunwind \ | ||
29 | " | ||
30 | |||
31 | # Patches copied from android-platform-system-core/debian/patches | ||
32 | # and applied in the order defined by the "series" file | ||
33 | SRC_URI += " \ | ||
34 | file://core-debian/move-log-file-to-proper-dir.patch;patchdir=system/core \ | ||
35 | file://core-debian/Added-missing-headers.patch;patchdir=system/core \ | ||
36 | file://core-debian/libusb-header-path.patch;patchdir=system/core \ | ||
37 | file://core-debian/stdatomic.patch;patchdir=system/core \ | ||
38 | file://core-debian/Nonnull.patch;patchdir=system/core \ | ||
39 | file://core-debian/Vector-cast.patch;patchdir=system/core \ | ||
40 | file://core-debian/use-Python-3-for-mkbootimg.patch;patchdir=system/core \ | ||
41 | file://core-debian/throw-exception-on-unknown-os.patch;patchdir=system/core \ | ||
42 | file://core-debian/simg_dump-python3.patch;patchdir=system/core \ | ||
43 | file://core-debian/fix-attribute-issue-with-gcc.patch;patchdir=system/core \ | ||
44 | file://core-debian/workaround-error-expected-primary-expression-before-.-token.patch;patchdir=system/core \ | ||
45 | file://core-debian/fix-gettid-exception-declaration.patch;patchdir=system/core \ | ||
46 | file://core-debian/fix-build-on-non-x86.patch;patchdir=system/core \ | ||
47 | file://core-debian/add-missing-headers.patch;patchdir=system/core \ | ||
48 | file://core-debian/hard-code-build-number.patch;patchdir=system/core \ | ||
49 | file://core-debian/fix-gcc-11-ftbfs.patch;patchdir=system/core \ | ||
50 | file://core-debian/fix-gnu-hurd.patch;patchdir=system/core \ | ||
51 | " | ||
52 | |||
53 | # Patches copied from android-platform-external-libunwind/debian/patches | ||
54 | # and applied in the order defined by the "series" file | ||
55 | SRC_URI += " \ | ||
56 | file://libunwind-debian/user_pt_regs.patch;patchdir=external/libunwind \ | ||
57 | file://libunwind-debian/legacy_built-in_sync_functions.patch;patchdir=external/libunwind \ | ||
58 | file://libunwind-debian/20150704-CVE-2015-3239_dwarf_i.h.patch;patchdir=external/libunwind \ | ||
59 | " | ||
60 | |||
61 | # meta-clang specific patches + files: | ||
62 | SRC_URI += " \ | ||
63 | file://core/0001-patching-adb.mk-to-build-in-yocto-environment.patch;patchdir=system/core \ | ||
64 | file://core/0002-libadb.mk-modifications-to-make-it-build-in-yocto-en.patch;patchdir=system/core \ | ||
65 | file://core/0003-socket.h-removing-dependency-of-gtest.patch;patchdir=system/core \ | ||
66 | file://core/0004-patching-fastboot.mk-to-build-in-yocto-environment.patch;patchdir=system/core \ | ||
67 | file://core/0005-fastboot-don-t-use-sparse_file_import_auto-in-load_b.patch;patchdir=system/core \ | ||
68 | file://core/0006-libbase.mk-modifications-to-make-it-build-in-yocto-e.patch;patchdir=system/core \ | ||
69 | file://core/0007-libcrypto_utils.mk-modifications-to-make-it-build-in.patch;patchdir=system/core \ | ||
70 | file://core/0008-libcutils-modifications-to-make-it-build-in-yocto-en.patch;patchdir=system/core \ | ||
71 | file://core/0009-patching-img2simg.mk-to-build-in-yocto-environment.patch;patchdir=system/core \ | ||
72 | file://core/0010-patching-simg2img.mk-to-build-in-yocto-environment.patch;patchdir=system/core \ | ||
73 | file://core/0011-patching-liblog.mk-to-build-in-yocto-environment.patch;patchdir=system/core \ | ||
74 | file://core/0012-patching-libsparse.mk-to-build-in-yocto-environment.patch;patchdir=system/core \ | ||
75 | file://core/0013-patching-libziparchive.mk-to-build-in-yocto-environm.patch;patchdir=system/core \ | ||
76 | file://core/0014-patching-libbacktrace.mk-to-build-in-yocto-environme.patch;patchdir=system/core \ | ||
77 | file://core/0015-Use-namespace-std-to-compile-libbacktrace.patch;patchdir=system/core \ | ||
78 | file://core/0016-Adapt-adbd-to-work-with-yocto.patch;patchdir=system/core \ | ||
79 | file://0001-libcrypto.mk-modifications-to-make-it-build-in-yocto.patch;patchdir=external/boringssl \ | ||
80 | file://0001-patching-libundwind-to-build-in-yocto-environment.patch;patchdir=external/libunwind \ | ||
81 | file://0001-libext4_utils.mk-modifications-to-make-it-build-in-y.patch;patchdir=system/extras \ | ||
82 | file://0002-libfec-change-out_dir-in-makefile.patch;patchdir=system/extras \ | ||
83 | file://rules_yocto.mk;subdir=git \ | ||
84 | file://android-tools-adbd.service \ | ||
85 | file://adbd.mk;subdir=git/system/core/debian \ | ||
86 | " | ||
87 | |||
88 | S = "${WORKDIR}/git" | ||
89 | B = "${WORKDIR}/${BPN}" | ||
90 | |||
91 | # http://errors.yoctoproject.org/Errors/Details/1debian881/ | ||
92 | ARM_INSTRUCTION_SET:armv4 = "arm" | ||
93 | ARM_INSTRUCTION_SET:armv5 = "arm" | ||
94 | |||
95 | COMPATIBLE_HOST:powerpc = "(null)" | ||
96 | COMPATIBLE_HOST:powerpc64 = "(null)" | ||
97 | COMPATIBLE_HOST:powerpc64le = "(null)" | ||
98 | |||
99 | inherit systemd clang | ||
100 | |||
101 | TOOLCHAIN = "clang" | ||
102 | TOOLCHAIN:class-native = "clang" | ||
103 | DEPENDS:append:class-target = "\ | ||
104 | clang-cross-${TARGET_ARCH} \ | ||
105 | " | ||
106 | DEPENDS:append:class-native = " clang-native" | ||
107 | |||
108 | SYSTEMD_SERVICE:${PN} = "android-tools-adbd.service" | ||
109 | |||
110 | # Find libbsd headers during native builds | ||
111 | CC:append:class-native = " -I${STAGING_INCDIR}" | ||
112 | CC:append:class-nativesdk = " -I${STAGING_INCDIR}" | ||
113 | |||
114 | PREREQUISITE_core = "libbase libsparse liblog libcutils" | ||
115 | TOOLS_TO_BUILD = "libcrypto_utils libadb libziparchive fastboot adb img2simg simg2img libbacktrace" | ||
116 | TOOLS_TO_BUILD:append:class-target = " adbd" | ||
117 | |||
118 | # Adb needs sys/capability.h, which is not available for native* | ||
119 | TOOLS:class-native = "boringssl fastboot ext4_utils mkbootimg" | ||
120 | TOOLS:class-nativesdk = "boringssl fastboot ext4_utils mkbootimg" | ||
121 | |||
122 | do_compile() { | ||
123 | |||
124 | case "${HOST_ARCH}" in | ||
125 | arm) | ||
126 | export android_arch=linux-arm | ||
127 | cpu=arm | ||
128 | deb_host_arch=arm | ||
129 | ;; | ||
130 | aarch64) | ||
131 | export android_arch=linux-arm64 | ||
132 | cpu=arm64 | ||
133 | deb_host_arch=arm64 | ||
134 | ;; | ||
135 | riscv64) | ||
136 | export android_arch=linux-riscv64 | ||
137 | ;; | ||
138 | mips|mipsel) | ||
139 | export android_arch=linux-mips | ||
140 | cpu=mips | ||
141 | deb_host_arch=mips | ||
142 | ;; | ||
143 | mips64|mips64el) | ||
144 | export android_arch=linux-mips64 | ||
145 | cpu=mips64 | ||
146 | deb_host_arch=mips64 | ||
147 | ;; | ||
148 | powerpc|powerpc64) | ||
149 | export android_arch=linux-ppc | ||
150 | ;; | ||
151 | i586|i686|x86_64) | ||
152 | export android_arch=linux-x86 | ||
153 | cpu=x86_64 | ||
154 | deb_host_arch=amd64 | ||
155 | ;; | ||
156 | esac | ||
157 | |||
158 | export SRCDIR=${S} | ||
159 | |||
160 | oe_runmake -f ${S}/external/boringssl/debian/libcrypto.mk -C ${S}/external/boringssl | ||
161 | oe_runmake -f ${S}/external/libunwind/debian/libunwind.mk -C ${S}/external/libunwind CPU=${cpu} | ||
162 | |||
163 | for tool in ${PREREQUISITE_core}; do | ||
164 | oe_runmake -f ${S}/system/core/debian/${tool}.mk -C ${S}/system/core | ||
165 | done | ||
166 | |||
167 | for i in `find ${S}/system/extras/debian/ -name "*.mk"`; do | ||
168 | oe_runmake -f $i -C ${S}/system/extras | ||
169 | done | ||
170 | |||
171 | for tool in ${TOOLS_TO_BUILD}; do | ||
172 | if [ "$tool" = "libbacktrace" ]; then | ||
173 | oe_runmake -f ${S}/system/core/debian/${tool}.mk -C ${S}/system/core DEB_HOST_ARCH=${deb_host_arch} | ||
174 | else | ||
175 | oe_runmake -f ${S}/system/core/debian/${tool}.mk -C ${S}/system/core | ||
176 | fi | ||
177 | done | ||
178 | |||
179 | } | ||
180 | |||
181 | do_install() { | ||
182 | if echo ${TOOLS_TO_BUILD} | grep -q "ext4_utils" ; then | ||
183 | install -D -p -m0755 ${S}/system/core/libsparse/simg_dump.py ${D}${bindir}/simg_dump | ||
184 | fi | ||
185 | |||
186 | if echo ${TOOLS_TO_BUILD} | grep -q "adb " ; then | ||
187 | install -d ${D}${bindir} | ||
188 | install -m0755 ${S}/debian/out/usr/lib/android/adb/adb ${D}${bindir} | ||
189 | fi | ||
190 | |||
191 | if echo ${TOOLS_TO_BUILD} | grep -q "adbd" ; then | ||
192 | install -d ${D}${bindir} | ||
193 | install -m0755 ${B}/adbd/adbd ${D}${bindir} | ||
194 | fi | ||
195 | |||
196 | # Outside the if statement to avoid errors during do_package | ||
197 | install -D -p -m0644 ${WORKDIR}/android-tools-adbd.service \ | ||
198 | ${D}${systemd_unitdir}/system/android-tools-adbd.service | ||
199 | |||
200 | if echo ${TOOLS_TO_BUILD} | grep -q "fastboot" ; then | ||
201 | install -d ${D}${bindir} | ||
202 | install -m0755 ${S}/debian/out/usr/bin/fastboot/fastboot ${D}${bindir} | ||
203 | fi | ||
204 | |||
205 | install -d ${D}${libdir}/android/ | ||
206 | install -m0755 ${S}/debian/out/usr/lib/android/*.so.* ${D}${libdir}/android/ | ||
207 | if echo ${TOOLS_TO_BUILD} | grep -q "mkbootimg" ; then | ||
208 | install -d ${D}${bindir} | ||
209 | install -m0755 ${B}/mkbootimg/mkbootimg ${D}${bindir} | ||
210 | fi | ||
211 | } | ||
212 | |||
213 | PACKAGES += "${PN}-fstools" | ||
214 | |||
215 | RDEPENDS:${BPN} = "${BPN}-conf p7zip" | ||
216 | |||
217 | FILES:${PN}-fstools = "\ | ||
218 | ${bindir}/ext2simg \ | ||
219 | ${bindir}/ext4fixup \ | ||
220 | ${bindir}/img2simg \ | ||
221 | ${bindir}/make_ext4fs \ | ||
222 | ${bindir}/simg2img \ | ||
223 | ${bindir}/simg2simg \ | ||
224 | ${bindir}/simg_dump \ | ||
225 | ${bindir}/mkuserimg \ | ||
226 | " | ||
227 | FILES:${PN} += "${libdir}/android ${libdir}/android/*" | ||
228 | |||
229 | BBCLASSEXTEND = "native" | ||