diff options
Diffstat (limited to 'meta-oe/recipes-devtools/android-tools/android-tools_29.0.6.r14.bb')
| -rw-r--r-- | meta-oe/recipes-devtools/android-tools/android-tools_29.0.6.r14.bb | 193 |
1 files changed, 193 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools_29.0.6.r14.bb b/meta-oe/recipes-devtools/android-tools/android-tools_29.0.6.r14.bb new file mode 100644 index 0000000000..3d4e95b496 --- /dev/null +++ b/meta-oe/recipes-devtools/android-tools/android-tools_29.0.6.r14.bb | |||
| @@ -0,0 +1,193 @@ | |||
| 1 | DESCRIPTION = "Various 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 7zip libselinux googletest" | ||
| 11 | |||
| 12 | SRCREV_core = "abfd66fafcbb691d7860df059f1df1c9b1ef29da" | ||
| 13 | |||
| 14 | SRC_URI = " \ | ||
| 15 | git://salsa.debian.org/android-tools-team/android-platform-tools;name=core;protocol=https;branch=master \ | ||
| 16 | " | ||
| 17 | |||
| 18 | # Patches copied from android-platform-tools/debian/patches | ||
| 19 | # and applied in the order defined by the file debian/patches/series | ||
| 20 | SRC_URI += " \ | ||
| 21 | file://debian/external/libunwind/user_pt_regs.patch \ | ||
| 22 | file://debian/external/libunwind/legacy_built-in_sync_functions.patch \ | ||
| 23 | file://debian/external/libunwind/20150704-CVE-2015-3239_dwarf_i.h.patch \ | ||
| 24 | file://debian/external/libunwind/libunwind-guard-unreachable-macro-to-avoid-redefinit.patch \ | ||
| 25 | file://debian/external/libunwind/libunwind-fix-strchr-conformance-to-ISO-C23.patch \ | ||
| 26 | \ | ||
| 27 | file://debian/system/core/move-log-file-to-proper-dir.patch \ | ||
| 28 | file://debian/system/core/Added-missing-headers.patch \ | ||
| 29 | file://debian/system/core/libusb-header-path.patch \ | ||
| 30 | file://debian/system/core/stdatomic.patch \ | ||
| 31 | file://debian/system/core/Nonnull.patch \ | ||
| 32 | file://debian/system/core/Vector-cast.patch \ | ||
| 33 | file://debian/system/core/throw-exception-on-unknown-os.patch \ | ||
| 34 | file://debian/system/core/simg_dump-python3.patch \ | ||
| 35 | file://debian/system/core/fix-attribute-issue-with-gcc.patch \ | ||
| 36 | file://debian/system/core/fix-gettid-exception-declaration.patch \ | ||
| 37 | file://debian/system/core/fix-build-on-non-x86.patch \ | ||
| 38 | file://debian/system/core/add-missing-headers.patch \ | ||
| 39 | file://debian/system/core/hard-code-build-number.patch \ | ||
| 40 | file://debian/system/core/stub-out-fastdeploy.patch \ | ||
| 41 | file://debian/system/core/fix-standard-namespace-errors.patch \ | ||
| 42 | file://debian/system/core/Add-riscv64-support.patch \ | ||
| 43 | file://debian/system/core/android-tools-scope-write-macro-to-prevent-conflict-.patch \ | ||
| 44 | file://debian/system/core/libziparchive-fix-missing-fixed-width-integer-types-.patch \ | ||
| 45 | \ | ||
| 46 | " | ||
| 47 | |||
| 48 | # patches which don't come from debian | ||
| 49 | SRC_URI += " \ | ||
| 50 | file://rules_yocto.mk;subdir=${BB_GIT_DEFAULT_DESTSUFFIX} \ | ||
| 51 | file://android-tools-adbd.service \ | ||
| 52 | file://adbd.mk;subdir=${BB_GIT_DEFAULT_DESTSUFFIX}/debian/system/core \ | ||
| 53 | file://remount \ | ||
| 54 | file://0001-Fixes-for-yocto-build.patch \ | ||
| 55 | file://0002-android-tools-modifications-to-make-it-build-in-yoct.patch \ | ||
| 56 | file://0003-Update-usage-of-usbdevfs_urb-to-match-new-kernel-UAP.patch \ | ||
| 57 | file://0004-adb-Fix-build-on-big-endian-systems.patch \ | ||
| 58 | file://0005-adb-Allow-adbd-to-be-run-as-root.patch \ | ||
| 59 | file://0001-liblp-fix-building-with-GCC-14.patch \ | ||
| 60 | " | ||
| 61 | |||
| 62 | B = "${WORKDIR}/${BPN}" | ||
| 63 | |||
| 64 | # http://errors.yoctoproject.org/Errors/Details/1debian881/ | ||
| 65 | ARM_INSTRUCTION_SET:armv4 = "arm" | ||
| 66 | ARM_INSTRUCTION_SET:armv5 = "arm" | ||
| 67 | |||
| 68 | COMPATIBLE_HOST:powerpc = "(null)" | ||
| 69 | COMPATIBLE_HOST:powerpc64 = "(null)" | ||
| 70 | COMPATIBLE_HOST:powerpc64le = "(null)" | ||
| 71 | |||
| 72 | inherit systemd | ||
| 73 | |||
| 74 | SYSTEMD_PACKAGES = "${PN}-adbd" | ||
| 75 | SYSTEMD_SERVICE:${PN}-adbd = "android-tools-adbd.service" | ||
| 76 | |||
| 77 | # Find libbsd headers during native builds | ||
| 78 | CC:append:class-native = " -I${STAGING_INCDIR}" | ||
| 79 | CC:append:class-nativesdk = " -I${STAGING_INCDIR}" | ||
| 80 | |||
| 81 | PREREQUISITE_core = "liblog libbase libsparse liblog libcutils" | ||
| 82 | TOOLS_TO_BUILD = "libcrypto_utils libadb libziparchive fastboot adb img2simg simg2img libbacktrace" | ||
| 83 | TOOLS_TO_BUILD:append:class-target = " adbd" | ||
| 84 | |||
| 85 | do_compile() { | ||
| 86 | |||
| 87 | case "${HOST_ARCH}" in | ||
| 88 | arm) | ||
| 89 | export android_arch=linux-arm | ||
| 90 | cpu=arm | ||
| 91 | deb_host_arch=arm | ||
| 92 | ;; | ||
| 93 | aarch64) | ||
| 94 | export android_arch=linux-arm64 | ||
| 95 | cpu=arm64 | ||
| 96 | deb_host_arch=arm64 | ||
| 97 | ;; | ||
| 98 | riscv64) | ||
| 99 | export android_arch=linux-riscv64 | ||
| 100 | ;; | ||
| 101 | mips|mipsel) | ||
| 102 | export android_arch=linux-mips | ||
| 103 | cpu=mips | ||
| 104 | deb_host_arch=mips | ||
| 105 | ;; | ||
| 106 | mips64|mips64el) | ||
| 107 | export android_arch=linux-mips64 | ||
| 108 | cpu=mips64 | ||
| 109 | deb_host_arch=mips64 | ||
| 110 | ;; | ||
| 111 | powerpc|powerpc64) | ||
| 112 | export android_arch=linux-ppc | ||
| 113 | ;; | ||
| 114 | i586|i686|x86_64) | ||
| 115 | export android_arch=linux-x86 | ||
| 116 | cpu=x86_64 | ||
| 117 | deb_host_arch=amd64 | ||
| 118 | ;; | ||
| 119 | esac | ||
| 120 | |||
| 121 | export SRCDIR=${S} | ||
| 122 | |||
| 123 | oe_runmake -f ${S}/debian/external/boringssl/libcrypto.mk -C ${S} | ||
| 124 | oe_runmake -f ${S}/debian/external/libunwind/libunwind.mk -C ${S} CPU=${cpu} | ||
| 125 | |||
| 126 | for tool in ${PREREQUISITE_core}; do | ||
| 127 | oe_runmake -f ${S}/debian/system/core/${tool}.mk -C ${S} | ||
| 128 | done | ||
| 129 | |||
| 130 | for i in `find ${S}/debian/system/extras/ -name "*.mk"`; do | ||
| 131 | oe_runmake -f $i -C ${S} | ||
| 132 | done | ||
| 133 | |||
| 134 | for tool in ${TOOLS_TO_BUILD}; do | ||
| 135 | if [ "$tool" = "libbacktrace" ]; then | ||
| 136 | oe_runmake -f ${S}/debian/system/core/${tool}.mk -C ${S} DEB_HOST_ARCH=${deb_host_arch} | ||
| 137 | else | ||
| 138 | oe_runmake -f ${S}/debian/system/core/${tool}.mk -C ${S} | ||
| 139 | fi | ||
| 140 | done | ||
| 141 | |||
| 142 | } | ||
| 143 | |||
| 144 | do_install() { | ||
| 145 | install -d ${D}${base_sbindir} | ||
| 146 | install -m 0755 ${UNPACKDIR}/remount -D ${D}${base_sbindir}/remount | ||
| 147 | |||
| 148 | for tool in img2simg simg2img fastboot adbd; do | ||
| 149 | if echo ${TOOLS_TO_BUILD} | grep -q "$tool" ; then | ||
| 150 | install -D -p -m0755 ${S}/debian/out/system/core/$tool ${D}${bindir}/$tool | ||
| 151 | fi | ||
| 152 | done | ||
| 153 | |||
| 154 | # grep adb also matches adbd, so handle adb separately from other tools | ||
| 155 | if echo ${TOOLS_TO_BUILD} | grep -q "adb " ; then | ||
| 156 | install -d ${D}${bindir} | ||
| 157 | install -m0755 ${S}/debian/out/system/core/adb ${D}${bindir} | ||
| 158 | fi | ||
| 159 | |||
| 160 | # Outside the if statement to avoid errors during do_package | ||
| 161 | install -D -p -m0644 ${UNPACKDIR}/android-tools-adbd.service \ | ||
| 162 | ${D}${systemd_unitdir}/system/android-tools-adbd.service | ||
| 163 | |||
| 164 | install -d ${D}${libdir}/android/ | ||
| 165 | install -m0755 ${S}/debian/out/system/core/*.so.* ${D}${libdir}/android/ | ||
| 166 | if echo ${TOOLS_TO_BUILD} | grep -q "mkbootimg" ; then | ||
| 167 | install -d ${D}${bindir} | ||
| 168 | install -m0755 ${B}/mkbootimg/mkbootimg ${D}${bindir} | ||
| 169 | fi | ||
| 170 | } | ||
| 171 | |||
| 172 | PACKAGES =+ "${PN}-fstools ${PN}-adbd" | ||
| 173 | |||
| 174 | RDEPENDS:${BPN} = "${BPN}-conf 7zip" | ||
| 175 | |||
| 176 | FILES:${PN}-adbd = "\ | ||
| 177 | ${bindir}/adbd \ | ||
| 178 | ${systemd_unitdir}/system/android-tools-adbd.service \ | ||
| 179 | " | ||
| 180 | |||
| 181 | FILES:${PN}-fstools = "\ | ||
| 182 | ${bindir}/ext2simg \ | ||
| 183 | ${bindir}/ext4fixup \ | ||
| 184 | ${bindir}/img2simg \ | ||
| 185 | ${bindir}/make_ext4fs \ | ||
| 186 | ${bindir}/simg2img \ | ||
| 187 | ${bindir}/simg2simg \ | ||
| 188 | ${bindir}/simg_dump \ | ||
| 189 | ${bindir}/mkuserimg \ | ||
| 190 | " | ||
| 191 | FILES:${PN} += "${libdir}/android ${libdir}/android/*" | ||
| 192 | |||
| 193 | BBCLASSEXTEND = "native" | ||
