diff options
Diffstat (limited to 'meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb')
-rw-r--r-- | meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb | 124 |
1 files changed, 83 insertions, 41 deletions
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb b/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb index 780ecaa11a..198ef281f2 100644 --- a/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb +++ b/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb @@ -1,20 +1,16 @@ DESCRIPTION = "Different utilities from Android" SECTION = "console/utils" -LICENSE = "Apache-2.0 & GPL-2.0 & BSD-2-Clause & BSD-3-Clause" +LICENSE = "Apache-2.0 & GPL-2.0-only & BSD-2-Clause & BSD-3-Clause" LIC_FILES_CHKSUM = " \ file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10 \ - file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \ - file://${COMMON_LICENSE_DIR}/BSD-2-Clause;md5=8bef8e6712b1be5aa76af1ebde9d6378 \ + file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6 \ + file://${COMMON_LICENSE_DIR}/BSD-2-Clause;md5=cb641bc04cda31daea161b1bc15da69f \ file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9 \ " -DEPENDS = "libbsd libpcre openssl zlib libcap" +DEPENDS = "libbsd libpcre zlib libcap" +DEPENDS:append:class-target = " openssl" ANDROID_MIRROR = "android.googlesource.com" -CORE_REPO = "${ANDROID_MIRROR}/platform/system/core" -EXTRAS_REPO = "${ANDROID_MIRROR}/platform/system/extras" -LIBHARDWARE_REPO = "${ANDROID_MIRROR}/platform/hardware/libhardware" -LIBSELINUX_REPO = "${ANDROID_MIRROR}/platform/external/libselinux" -BUILD_REPO = "${ANDROID_MIRROR}/platform/build" # matches with android-5.1.1_r37 SRCREV_core = "2314b110bdebdbfd2d94c502282f9e57c849897e" @@ -23,25 +19,40 @@ SRCREV_libhardware = "be55eb1f4d840c82ffaf7c47460df17ff5bc4d9b" SRCREV_libselinux = "07e9e1339ad1ba608acfba9dce2d0f474b252feb" SRCREV_build = "16e987def3d7d8f7d30805eb95cef69e52a87dbc" +SRCREV_FORMAT = "core_extras_libhardware_libselinux_build" SRC_URI = " \ - git://${CORE_REPO};name=core;protocol=https;nobranch=1;destsuffix=git/system/core \ - git://${EXTRAS_REPO};name=extras;protocol=https;nobranch=1;destsuffix=git/system/extras \ - git://${LIBHARDWARE_REPO};name=libhardware;protocol=https;nobranch=1;destsuffix=git/hardware/libhardware \ - git://${LIBSELINUX_REPO};name=libselinux;protocol=https;nobranch=1;destsuffix=git/external/libselinux \ - git://${BUILD_REPO};name=build;protocol=https;nobranch=1;destsuffix=git/build \ - file://remove-selinux-android.patch \ - file://use-capability.patch \ - file://use-local-socket.patch \ - file://preserve-ownership.patch;patchdir=system/extras \ - file://mkbootimg-Add-dt-parameter-to-specify-DT-image.patch \ - file://remove-bionic-android.patch \ - file://define-shell-command.patch \ - file://implicit-declaration-function-strlcat-strlcopy.patch \ - file://fix-big-endian-build.patch \ - file://0001-add-base64-implementation.patch \ - file://0002-adb-Musl-fixes.patch \ + git://${ANDROID_MIRROR}/platform/system/core;name=core;protocol=https;nobranch=1;destsuffix=git/system/core \ + git://${ANDROID_MIRROR}/platform/system/extras;name=extras;protocol=https;nobranch=1;destsuffix=git/system/extras \ + git://${ANDROID_MIRROR}/platform/hardware/libhardware;name=libhardware;protocol=https;nobranch=1;destsuffix=git/hardware/libhardware \ + git://${ANDROID_MIRROR}/platform/external/libselinux;name=libselinux;protocol=https;nobranch=1;destsuffix=git/external/libselinux \ + git://${ANDROID_MIRROR}/platform/build;name=build;protocol=https;nobranch=1;destsuffix=git/build \ + file://core/0001-adb-remove-selinux-extensions.patch;patchdir=system/core \ + file://core/0002-adb-Use-local-sockets-where-appropriate.patch;patchdir=system/core \ + file://core/0003-adb-define-shell-command.patch;patchdir=system/core \ + file://core/0004-adb-Fix-build-on-big-endian-systems.patch;patchdir=system/core \ + file://core/0005-adb-add-base64-implementation.patch;patchdir=system/core \ + file://core/0006-adb-Musl-fixes.patch;patchdir=system/core \ + file://core/0007-adb-usb_linux.c-fix-build-with-glibc-2.28.patch;patchdir=system/core \ + file://core/0008-adb-Allow-adbd-to-be-ran-as-root.patch;patchdir=system/core \ + file://core/0009-mkbootimg-Add-dt-parameter-to-specify-DT-image.patch;patchdir=system/core \ + file://core/0010-Use-linux-capability.h-on-linux-systems-too.patch;patchdir=system/core \ + file://core/0011-Remove-bionic-specific-calls.patch;patchdir=system/core \ + file://core/0012-Fix-implicit-declaration-of-stlcat-strlcopy-function.patch;patchdir=system/core \ + file://core/adb_libssl_11.diff;patchdir=system/core \ + file://core/b64_pton_function_decl.patch;patchdir=system/core \ + file://core/0013-adb-Support-riscv64.patch;patchdir=system/core \ + file://core/0014-add-u3-ss-descriptor-support-for-adb.patch;patchdir=system/core \ + file://core/0015-libsparse-Split-off-most-of-sparse_file_read_normal-.patch;patchdir=system/core \ + file://core/0016-libsparse-Add-hole-mode-to-sparse_file_read.patch;patchdir=system/core \ + file://core/0017-img2simg-Add-support-for-converting-holes-to-don-t-c.patch;patchdir=system/core \ + file://core/0001-memory.h-Always-define-strlcpy-for-glibc-based-syste.patch;patchdir=system/core \ + file://extras/0001-ext4_utils-remove-selinux-extensions.patch;patchdir=system/extras \ + file://extras/0002-ext4_utils-add-o-argument-to-preserve-ownership.patch;patchdir=system/extras \ + file://libselinux/0001-Remove-bionic-specific-calls.patch;patchdir=external/libselinux \ + file://libselinux/0001-libselinux-Do-not-define-gettid-if-glibc-2.30-is-use.patch;patchdir=external/libselinux \ file://android-tools-adbd.service \ - file://.gitignore;subdir=git \ + file://build/0001-Riscv-Add-risc-v-Android-config-header.patch;patchdir=build \ + file://gitignore \ file://adb.mk;subdir=${BPN} \ file://adbd.mk;subdir=${BPN} \ file://ext4_utils.mk;subdir=${BPN} \ @@ -49,31 +60,39 @@ SRC_URI = " \ file://mkbootimg.mk;subdir=${BPN} \ " + S = "${WORKDIR}/git" B = "${WORKDIR}/${BPN}" # http://errors.yoctoproject.org/Errors/Details/133881/ -ARM_INSTRUCTION_SET_armv4 = "arm" -ARM_INSTRUCTION_SET_armv5 = "arm" +ARM_INSTRUCTION_SET:armv4 = "arm" +ARM_INSTRUCTION_SET:armv5 = "arm" + +COMPATIBLE_HOST:powerpc = "(null)" +COMPATIBLE_HOST:powerpc64 = "(null)" +COMPATIBLE_HOST:powerpc64le = "(null)" inherit systemd -SYSTEMD_SERVICE_${PN} = "android-tools-adbd.service" +SYSTEMD_PACKAGES = "${PN}-adbd" +SYSTEMD_SERVICE:${PN}-adbd = "android-tools-adbd.service" # Find libbsd headers during native builds -CC_append_class-native = " -I${STAGING_INCDIR}" -CC_append_class-nativesdk = " -I${STAGING_INCDIR}" +CC:append:class-native = " -I${STAGING_INCDIR}" +CC:append:class-nativesdk = " -I${STAGING_INCDIR}" TOOLS = "adb fastboot ext4_utils mkbootimg adbd" # Adb needs sys/capability.h, which is not available for native* -TOOLS_class-native = "fastboot ext4_utils mkbootimg" -TOOLS_class-nativesdk = "fastboot ext4_utils mkbootimg" +TOOLS:class-native = "fastboot ext4_utils mkbootimg" +TOOLS:class-nativesdk = "fastboot ext4_utils mkbootimg" do_compile() { + cp ${UNPACKDIR}/gitignore ${S}/.gitignore + # Setting both variables below causing our makefiles to not work with # implicit make rules - unset CFLAGS + CFLAGS="-ffile-prefix-map=${S}=${TARGET_DBGSRC_DIR}" unset CPPFLAGS export SRCDIR=${S} @@ -85,20 +104,26 @@ do_compile() { aarch64) export android_arch=linux-arm64 ;; + riscv64) + export android_arch=linux-riscv64 + ;; mips|mipsel) export android_arch=linux-mips ;; + mips64|mips64el) + export android_arch=linux-mips64 + ;; powerpc|powerpc64) export android_arch=linux-ppc ;; - i586|x86_64) + i586|i686|x86_64) export android_arch=linux-x86 ;; esac for tool in ${TOOLS}; do mkdir -p ${B}/${tool} - oe_runmake -f ${B}/${tool}.mk -C ${B}/${tool} + oe_runmake -f ${UNPACKDIR}/${BPN}/${tool}.mk -C ${B}/${tool} done } @@ -115,7 +140,7 @@ do_install() { install -m0755 ${B}/ext4_utils/simg2simg ${D}${bindir} fi - if echo ${TOOLS} | grep -q "adb " ; then + if echo ${TOOLS} | grep -q "adb\>" ; then install -d ${D}${bindir} install -m0755 ${B}/adb/adb ${D}${bindir} fi @@ -126,7 +151,7 @@ do_install() { fi # Outside the if statement to avoid errors during do_package - install -D -p -m0644 ${WORKDIR}/android-tools-adbd.service \ + install -D -p -m0644 ${UNPACKDIR}/android-tools-adbd.service \ ${D}${systemd_unitdir}/system/android-tools-adbd.service if echo ${TOOLS} | grep -q "fastboot" ; then @@ -140,11 +165,17 @@ do_install() { fi } -PACKAGES += "${PN}-fstools" +PACKAGES =+ "${PN}-fstools ${PN}-adbd" -RDEPENDS_${BPN} = "${BPN}-conf bash" +RDEPENDS:${PN}-adbd = "${PN}-conf" +RDEPENDS:${PN}-fstools = "bash" -FILES_${PN}-fstools = "\ +FILES:${PN}-adbd = "\ + ${bindir}/adbd \ + ${systemd_unitdir}/system/android-tools-adbd.service \ +" + +FILES:${PN}-fstools = "\ ${bindir}/ext2simg \ ${bindir}/ext4fixup \ ${bindir}/img2simg \ @@ -156,3 +187,14 @@ FILES_${PN}-fstools = "\ " BBCLASSEXTEND = "native" + +android_tools_enable_devmode() { + touch ${IMAGE_ROOTFS}/var/usb-debugging-enabled +} + +ROOTFS_POSTPROCESS_COMMAND_${PN}-adbd += "${@bb.utils.contains("USB_DEBUGGING_ENABLED", "1", "android_tools_enable_devmode;", "", d)}" + +# http://errors.yoctoproject.org/Errors/Details/766881/ +# android-tools/5.1.1.r37/git/system/core/adb/adb_auth_host.c:86:23: error: passing argument 2 of 'RSA_get0_key' from incompatible pointer type [-Wincompatible-pointer-types] +# android-tools/5.1.1.r37/git/system/core/adb/adb_auth_host.c:86:27: error: passing argument 3 of 'RSA_get0_key' from incompatible pointer type [-Wincompatible-pointer-types] +CC += "-Wno-error=incompatible-pointer-types" |