diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2018-10-02 13:10:17 +0000 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2019-05-24 16:42:15 +0000 |
commit | bc6f77df76b6f0efc31b299bfa7971d3eab067ef (patch) | |
tree | 5fc730ea78ed8a40ebe7a72183aaaad339e1e8b6 /meta-oe/recipes-devtools/android-tools/android-tools_9.0.0.r10.bb | |
parent | f3018013ffbf7277ecc618787eca92455285f667 (diff) | |
download | meta-openembedded-contrib-bc6f77df76b6f0efc31b299bfa7971d3eab067ef.tar.gz |
android-tools: upgrade to 9.0.0-r10jansa/android
* build it with ninja like Arch does in:
https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/android-tools&id=21f3ef02af9b2252129bee4d11b7740ce4b1d88f
and import the patches from Arch
* import few more patches from debian, Nonnull.patch, stdatomic.patch from
https://salsa.debian.org/android-tools-team/android-platform-system-core/tree/e80c68d02a2fde9f351ac26e9feb984da1e8841a/debian/patches
* and switch to boringssl, because with openssl10 it cannot be really
used by anything, because openssl.cnf from openssl10-native will conflict
with openssl.cnf installed to RSS by openssl-native, e.g.:
DEBUG: Executing python function sstate_task_prefunc
DEBUG: Python function sstate_task_prefunc finished
DEBUG: Executing python function extend_recipe_sysroot
NOTE: Direct dependencies are ['virtual:native:/OE/build/owpb/webos-ports/openembedded-core/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.44.3.bb:do_populate_sysroot', '/OE/build/owpb/webos-ports/openembedded-core/meta/recipes-devtools/quilt/quilt-native_0.65.bb:do_populate_sysroot', '/OE/build/owpb/webos-ports/openembedded-core/meta/recipes-devtools/gcc/gcc-cross_8.2.bb:do_populate_sysroot', '/OE/build/owpb/webos-ports/openembedded-core/meta/recipes-devtools/gcc/gcc-runtime_8.2.bb:do_populate_sysroot', '/OE/build/owpb/webos-ports/openembedded-core/meta/recipes-core/glibc/glibc_2.28.bb:do_populate_sysroot', 'virtual:native:/OE/build/owpb/webos-ports/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb:do_populate_sysroot', 'virtual:native:/OE/build/owpb/webos-ports/openembedded-core/meta/recipes-devtools/rpm/rpm_4.14.2.bb:do_populate_sysroot', 'virtual:native:/OE/build/owpb/webos-ports/openembedded-core/meta/recipes-devtools/dwarfsrcfiles/dwarfsrcfiles.bb:do_populate_sysroot', 'virtual:native:/OE/build/owpb/webos-ports/openembedded-core/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot']
ERROR: Error executing a python function in exec_python_func() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:extend_recipe_sysroot(d)
0003:
File: '/OE/build/owpb/webos-ports/openembedded-core/meta/classes/staging.bbclass', lineno: 553, function: extend_recipe_sysroot
0549: dest = newmanifest[l]
0550: if l.endswith("/"):
0551: staging_copydir(l, targetdir, dest, seendirs)
0552: continue
*** 0553: staging_copyfile(l, targetdir, dest, postinsts, seendirs)
0554:
0555: bb.note("Installed into sysroot: %s" % str(msg_adding))
0556: bb.note("Skipping as already exists in sysroot: %s" % str(msg_exists))
0557:
File: '/OE/build/owpb/webos-ports/openembedded-core/meta/classes/staging.bbclass', lineno: 151, function: staging_copyfile
0147: os.symlink(linkto, dest)
0148: #bb.warn(c)
0149: else:
0150: try:
*** 0151: os.link(c, dest)
0152: except OSError as err:
0153: if err.errno == errno.EXDEV:
0154: bb.utils.copyfile(c, dest)
0155: else:
Exception: FileExistsError: [Errno 17] File exists: '/OE/build/owpb/webos-ports/tmp-glibc/sysroots-components/x86_64/openssl-native/etc/ssl/openssl.cnf' -> '/OE/build/owpb/webos-ports/tmp-glibc/work/tissot-webos-linux/android-system-image-tissot/20180914-22-r0/recipe-sysroot-native/etc/ssl/openssl.cnf'
DEBUG: Python function extend_recipe_sysroot finished
ERROR: Function failed: extend_recipe_sysroot
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/android-tools/android-tools_9.0.0.r10.bb')
-rw-r--r-- | meta-oe/recipes-devtools/android-tools/android-tools_9.0.0.r10.bb | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools_9.0.0.r10.bb b/meta-oe/recipes-devtools/android-tools/android-tools_9.0.0.r10.bb new file mode 100644 index 0000000000..7b06234b87 --- /dev/null +++ b/meta-oe/recipes-devtools/android-tools/android-tools_9.0.0.r10.bb @@ -0,0 +1,117 @@ +SUMMARY = "Different utilities from Android" +SECTION = "console/utils" +LICENSE = "Apache-2.0 & GPL-2.0 & 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}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9 \ +" +DEPENDS = "libbsd libpcre zlib libcap ruby-native cmake-native ninja-native go-native libusb1 gtest" + +# matches with android-9.0.0_r10 +SRCREV_core = "c8a633cd4782fd594af3f06b80ba7ee780ce65d6" +SRCREV_extras = "740a3c436188f9ad615f830e599f15506962cbcd" +SRCREV_selinux = "c679e266062e711dcf892dacd9c0cb978fde5a8a" +SRCREV_f2fs-tools = "23f82306bb2ca2553afe6791be10f93e68111da9" +SRCREV_e2fsprogs = "f63aeea08e882dad0520a1df0c57e6578d738bfe" +# instead of platfrom/external/boringssl from: +# git://${ANDROID_MIRROR}/platform/external/boringssl;name=boringssl;protocol=https;nobranch=1;destsuffix=git/boringssl \ +# SRCREV_boringssl = "8c2f177d0c90eac12f6bb9a264d383e8302148f1" +# we use the standalone one (because it has cmake support) with matching SRCREV from: +# https://android.googlesource.com/platform/external/boringssl/+/android-9.0.0_r10/BORINGSSL_REVISION +SRCREV_boringssl = "45210dd4e21ace9d28cb76b3f83303fcdd2efcce" +ANDROID_MIRROR = "android.googlesource.com" + +SRC_URI = " \ + git://${ANDROID_MIRROR}/platform/system/core;name=core;protocol=https;nobranch=1;destsuffix=git/core \ + git://${ANDROID_MIRROR}/platform/system/extras;name=extras;protocol=https;nobranch=1;destsuffix=git/extras \ + git://${ANDROID_MIRROR}/platform/external/selinux;name=selinux;protocol=https;nobranch=1;destsuffix=git/selinux \ + git://${ANDROID_MIRROR}/platform/external/f2fs-tools;name=f2fs-tools;protocol=https;nobranch=1;destsuffix=git/f2fs-tools \ + git://${ANDROID_MIRROR}/platform/external/e2fsprogs;name=e2fsprogs;protocol=https;nobranch=1;destsuffix=git/e2fsprogs \ + git://boringssl.googlesource.com/boringssl;name=boringssl;protocol=https;nobranch=1;destsuffix=git/boringssl \ + file://fix_build_core.patch;patchdir=core \ + file://stdatomic.patch;patchdir=core \ + file://Nonnull.patch;patchdir=core \ + file://fix_build_e2fsprogs.patch;patchdir=e2fsprogs \ + file://fix_build_selinux.patch;patchdir=selinux \ + file://generate_build.rb \ +" + +S = "${WORKDIR}/git" + +inherit systemd + +SYSTEMD_SERVICE_${PN} = "android-tools-adbd.service" + +# Find libbsd headers during native builds +CC_append_class-native = " -I${STAGING_INCDIR}" +CC_append_class-nativesdk = " -I${STAGING_INCDIR}" + +TOOLS = "adb mke2fs.android fastboot e2fsdroid ext2simg 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" + +do_compile() { + PKGVER=${PV} ruby ${WORKDIR}/generate_build.rb > build.ninja + [ -d ${S}/boringssl/build ] && rm -rf ${S}/boringssl/build + mkdir ${S}/boringssl/build && cd ${S}/boringssl/build && cmake -G Ninja -DCMAKE_MAKE_PROGRAM=ninja ..; ninja; cd - + ninja +} + +do_install() { + if echo ${TOOLS} | grep -q "ext4_utils" ; then + install -D -p -m0755 ${S}/system/core/libsparse/simg_dump.py ${D}${bindir}/simg_dump + install -D -p -m0755 ${S}/system/extras/ext4_utils/mkuserimg.sh ${D}${bindir}/mkuserimg + + install -m0755 ${B}/ext4_utils/ext2simg ${D}${bindir} + install -m0755 ${B}/ext4_utils/ext4fixup ${D}${bindir} + install -m0755 ${B}/ext4_utils/img2simg ${D}${bindir} + install -m0755 ${B}/ext4_utils/make_ext4fs ${D}${bindir} + install -m0755 ${B}/ext4_utils/simg2img ${D}${bindir} + install -m0755 ${B}/ext4_utils/simg2simg ${D}${bindir} + fi + + if echo ${TOOLS} | grep -q "adb " ; then + install -d ${D}${bindir} + install -m0755 ${B}/adb/adb ${D}${bindir} + fi + + if echo ${TOOLS} | grep -q "adbd" ; then + install -d ${D}${bindir} + install -m0755 ${B}/adbd/adbd ${D}${bindir} + fi + + # Outside the if statement to avoid errors during do_package + install -D -p -m0644 ${WORKDIR}/android-tools-adbd.service \ + ${D}${systemd_unitdir}/system/android-tools-adbd.service + + if echo ${TOOLS} | grep -q "fastboot" ; then + install -d ${D}${bindir} + install -m0755 ${B}/fastboot/fastboot ${D}${bindir} + fi + + if echo ${TOOLS} | grep -q "mkbootimg" ; then + install -d ${D}${bindir} + install -m0755 ${B}/mkbootimg/mkbootimg ${D}${bindir} + fi +} + +PACKAGES += "${PN}-fstools" + +RDEPENDS_${BPN} = "${BPN}-conf bash" + +FILES_${PN}-fstools = "\ + ${bindir}/ext2simg \ + ${bindir}/ext4fixup \ + ${bindir}/img2simg \ + ${bindir}/make_ext4fs \ + ${bindir}/simg2img \ + ${bindir}/simg2simg \ + ${bindir}/simg_dump \ + ${bindir}/mkuserimg \ +" + +BBCLASSEXTEND = "native" |