diff options
| -rw-r--r-- | meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb | 59 |
1 files changed, 40 insertions, 19 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 2dbddf1575..1769b6a8a7 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 | |||
| @@ -65,6 +65,16 @@ do_unpack_extra() { | |||
| 65 | 65 | ||
| 66 | addtask unpack_extra after do_unpack before do_patch | 66 | addtask unpack_extra after do_unpack before do_patch |
| 67 | 67 | ||
| 68 | # Find libbsd headers during native builds | ||
| 69 | CC_append_class-native = " -I${STAGING_INCDIR}" | ||
| 70 | CC_append_class-nativesdk = " -I${STAGING_INCDIR}" | ||
| 71 | |||
| 72 | TOOLS = "adb fastboot ext4_utils mkbootimg adbd" | ||
| 73 | |||
| 74 | # Adb needs sys/capability.h, which is not available for native* | ||
| 75 | TOOLS_class-native = "fastboot ext4_utils mkbootimg" | ||
| 76 | TOOLS_class-nativesdk = "fastboot ext4_utils mkbootimg" | ||
| 77 | |||
| 68 | do_compile() { | 78 | do_compile() { |
| 69 | # Setting both variables below causing our makefiles to not work with | 79 | # Setting both variables below causing our makefiles to not work with |
| 70 | # implicit make rules | 80 | # implicit make rules |
| @@ -91,31 +101,42 @@ do_compile() { | |||
| 91 | ;; | 101 | ;; |
| 92 | esac | 102 | esac |
| 93 | 103 | ||
| 94 | tools="adb fastboot ext4_utils mkbootimg adbd" | 104 | for tool in ${TOOLS}; do |
| 95 | for tool in ${tools}; do | ||
| 96 | mkdir -p ${B}/${tool} | 105 | mkdir -p ${B}/${tool} |
| 97 | oe_runmake -f ${B}/${tool}.mk -C ${B}/${tool} | 106 | oe_runmake -f ${B}/${tool}.mk -C ${B}/${tool} |
| 98 | done | 107 | done |
| 99 | } | 108 | } |
| 100 | 109 | ||
| 101 | do_install() { | 110 | do_install() { |
| 102 | install -D -p -m0755 ${S}/system/core/libsparse/simg_dump.py ${D}${bindir}/simg_dump | 111 | if [ grep -q "ext4_utils" "${TOOLS}" ] ; then |
| 103 | install -D -p -m0755 ${S}/system/extras/ext4_utils/mkuserimg.sh ${D}${bindir}/mkuserimg | 112 | install -D -p -m0755 ${S}/system/core/libsparse/simg_dump.py ${D}${bindir}/simg_dump |
| 104 | 113 | install -D -p -m0755 ${S}/system/extras/ext4_utils/mkuserimg.sh ${D}${bindir}/mkuserimg | |
| 105 | install -m0755 ${B}/ext4_utils/ext2simg ${D}${bindir} | 114 | |
| 106 | install -m0755 ${B}/ext4_utils/ext4fixup ${D}${bindir} | 115 | install -m0755 ${B}/ext4_utils/ext2simg ${D}${bindir} |
| 107 | install -m0755 ${B}/ext4_utils/img2simg ${D}${bindir} | 116 | install -m0755 ${B}/ext4_utils/ext4fixup ${D}${bindir} |
| 108 | install -m0755 ${B}/ext4_utils/make_ext4fs ${D}${bindir} | 117 | install -m0755 ${B}/ext4_utils/img2simg ${D}${bindir} |
| 109 | install -m0755 ${B}/ext4_utils/simg2img ${D}${bindir} | 118 | install -m0755 ${B}/ext4_utils/make_ext4fs ${D}${bindir} |
| 110 | install -m0755 ${B}/ext4_utils/simg2simg ${D}${bindir} | 119 | install -m0755 ${B}/ext4_utils/simg2img ${D}${bindir} |
| 111 | 120 | install -m0755 ${B}/ext4_utils/simg2simg ${D}${bindir} | |
| 112 | install -m0755 ${B}/adb/adb ${D}${bindir} | 121 | fi |
| 113 | install -m0755 ${B}/adbd/adbd ${D}${bindir} | 122 | |
| 114 | install -m0755 ${B}/fastboot/fastboot ${D}${bindir} | 123 | if [ grep -q "adb " "${TOOLS}" ] ; then |
| 115 | install -m0755 ${B}/mkbootimg/mkbootimg ${D}${bindir} | 124 | install -m0755 ${B}/adb/adb ${D}${bindir}i |
| 116 | 125 | fi | |
| 117 | install -D -p -m0644 ${WORKDIR}/android-tools-adbd.service \ | 126 | |
| 118 | ${D}${systemd_unitdir}/system/android-tools-adbd.service | 127 | if [ grep -q "adbd" "${TOOLS}" ] ; then |
| 128 | install -m0755 ${B}/adbd/adbd ${D}${bindir} | ||
| 129 | install -D -p -m0644 ${WORKDIR}/android-tools-adbd.service \ | ||
| 130 | ${D}${systemd_unitdir}/system/android-tools-adbd.service | ||
| 131 | fi | ||
| 132 | |||
| 133 | if [ grep -q "fastboot" "${TOOLS}" ] ; then | ||
| 134 | install -m0755 ${B}/fastboot/fastboot ${D}${bindir} | ||
| 135 | fi | ||
| 136 | |||
| 137 | if [ grep -q "mkbootimg" "${TOOLS}" ] ; then | ||
| 138 | install -m0755 ${B}/mkbootimg/mkbootimg ${D}${bindir} | ||
| 139 | fi | ||
| 119 | } | 140 | } |
| 120 | 141 | ||
| 121 | PACKAGES += "${PN}-fstools" | 142 | PACKAGES += "${PN}-fstools" |
