2015-11-23 17:27:12 +01:00
|
|
|
config BR2_PACKAGE_ANDROID_TOOLS
|
2016-05-11 22:45:25 +02:00
|
|
|
bool "android-tools"
|
2016-05-14 16:17:11 +02:00
|
|
|
# Technically, fastboot could build on noMMU systems. But
|
|
|
|
# since we need at least one of the three sub-options enabled,
|
|
|
|
# and adb/adbd can't be built on noMMU systems, and fastboot
|
|
|
|
# has some complicated dependencies, we simply make the whole
|
|
|
|
# package not available on noMMU platforms.
|
|
|
|
depends on BR2_USE_MMU
|
2016-05-15 22:03:30 +02:00
|
|
|
depends on BR2_TOOLCHAIN_HAS_THREADS
|
2016-05-11 22:45:25 +02:00
|
|
|
select BR2_PACKAGE_ANDROID_TOOLS_ADBD if \
|
|
|
|
!BR2_PACKAGE_ANDROID_TOOLS_FASTBOOT && \
|
2016-05-14 16:17:11 +02:00
|
|
|
!BR2_PACKAGE_ANDROID_TOOLS_ADB
|
2016-05-11 22:45:25 +02:00
|
|
|
help
|
|
|
|
This package contains the fastboot and adb utilities, that
|
|
|
|
can be used to interact with target devices using of these
|
|
|
|
protocols.
|
2015-11-23 17:27:12 +01:00
|
|
|
|
|
|
|
if BR2_PACKAGE_ANDROID_TOOLS
|
|
|
|
|
android-tools: disable on some architecture with old kernel headers
The android-tools code is somewhat ugly, and defines its own u64 typedef
becore including kernel headers. Unfortunately, there are specific cases
where that doesn't work properly.
The android-tools code defines u64 as "unsigned long long", which is now
correct in the kernel. However, it used to be a time where u64 was
defined as "unsigned long" on a few 64 bits architecture (at least
PowerPC64 and MIPS64). The kernel headers have introduced a
__SANE_USERSPACE_TYPES__ macro that userspace can define in order to get
the "sane" definition, i.e "unsigned long long" for u64.
Unfortunately, this __SANE_USERSPACE_TYPES__ mechanism only appeared in
3.10 on PowerPC64, and in 3.16 on MIPS64.
Since android-tools is not using the autotools, and there's no easy way
to test types with the C pre-processor, we simply add some more
Config.in dependencies. They are a bit convoluted, but that's what the
dependency really is.
In our autobuilders, this issue was only showing up with an old MIPS64
toolchain that uses 3.9 kernel headers.
Also, since the problem is limited to the "fastboot" tool, the
dependency is only added for fastboot. Both adb and adbd build fine with
this toolchain.
Fixes:
http://autobuild.buildroot.net/results/ce45c995bd6abda6487ae3a11b4f45a7b9b3f8eb/
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-08-26 23:54:40 +02:00
|
|
|
# We need kernel headers that support the __SANE_USERSPACE_TYPES__
|
|
|
|
# mechanism for 64 bits architectures, so that u64 gets defined as
|
|
|
|
# "unsigned long long" and not "unsigned long". We know that >= 3.16
|
|
|
|
# is needed for MIPS64 (kernel commit
|
|
|
|
# f4b3aa7cd9d32407670e67238c5ee752bb98f481) and >= 3.10 is needed for
|
|
|
|
# PowerPC64 (kernel commit
|
|
|
|
# 2c9c6ce0199a4d252e20c531cfdc9d24e39235c0). Without this, the build
|
|
|
|
# fails with a bad redefinition of u64 (the android-tools fastboot
|
|
|
|
# code defines it as "unsigned long long").
|
|
|
|
config BR2_PACKAGE_ANDROID_TOOLS_FASTBOOT_GOOD_KERNEL_HEADERS
|
|
|
|
bool
|
|
|
|
default y if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 && (BR2_powerpc64 || BR2_powerpc64le)
|
|
|
|
default y if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16 && (BR2_mips64 || BR2_mips64el)
|
|
|
|
default y if !BR2_powerpc64 && !BR2_powerpc64le && !BR2_mips64 && !BR2_mips64el
|
|
|
|
|
2015-11-23 17:27:12 +01:00
|
|
|
config BR2_PACKAGE_ANDROID_TOOLS_FASTBOOT
|
2016-05-11 22:45:25 +02:00
|
|
|
bool "fastboot"
|
|
|
|
select BR2_PACKAGE_LIBSELINUX
|
|
|
|
select BR2_PACKAGE_ZLIB
|
2016-05-14 16:17:11 +02:00
|
|
|
depends on BR2_TOOLCHAIN_HAS_THREADS # libselinux
|
|
|
|
depends on !BR2_STATIC_LIBS # libselinux
|
2016-06-27 00:39:11 +02:00
|
|
|
depends on BR2_TOOLCHAIN_USES_GLIBC # libselinux
|
2016-05-14 16:17:11 +02:00
|
|
|
depends on !BR2_arc # libselinux
|
android-tools: disable on some architecture with old kernel headers
The android-tools code is somewhat ugly, and defines its own u64 typedef
becore including kernel headers. Unfortunately, there are specific cases
where that doesn't work properly.
The android-tools code defines u64 as "unsigned long long", which is now
correct in the kernel. However, it used to be a time where u64 was
defined as "unsigned long" on a few 64 bits architecture (at least
PowerPC64 and MIPS64). The kernel headers have introduced a
__SANE_USERSPACE_TYPES__ macro that userspace can define in order to get
the "sane" definition, i.e "unsigned long long" for u64.
Unfortunately, this __SANE_USERSPACE_TYPES__ mechanism only appeared in
3.10 on PowerPC64, and in 3.16 on MIPS64.
Since android-tools is not using the autotools, and there's no easy way
to test types with the C pre-processor, we simply add some more
Config.in dependencies. They are a bit convoluted, but that's what the
dependency really is.
In our autobuilders, this issue was only showing up with an old MIPS64
toolchain that uses 3.9 kernel headers.
Also, since the problem is limited to the "fastboot" tool, the
dependency is only added for fastboot. Both adb and adbd build fine with
this toolchain.
Fixes:
http://autobuild.buildroot.net/results/ce45c995bd6abda6487ae3a11b4f45a7b9b3f8eb/
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-08-26 23:54:40 +02:00
|
|
|
depends on BR2_PACKAGE_ANDROID_TOOLS_FASTBOOT_GOOD_KERNEL_HEADERS
|
2016-05-11 22:45:25 +02:00
|
|
|
help
|
|
|
|
This option will build and install the fastboot utility for
|
|
|
|
the target, which can be used to reflash other target devices
|
|
|
|
implementing the fastboot protocol.
|
2015-11-23 17:27:12 +01:00
|
|
|
|
2016-06-27 00:39:11 +02:00
|
|
|
comment "fastboot needs a glibc toolchain w/ threads, dynamic library"
|
2016-05-14 16:17:11 +02:00
|
|
|
depends on !BR2_arc
|
2016-06-27 00:39:11 +02:00
|
|
|
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS || \
|
|
|
|
!BR2_TOOLCHAIN_USES_GLIBC
|
2016-05-14 16:17:11 +02:00
|
|
|
|
android-tools: disable on some architecture with old kernel headers
The android-tools code is somewhat ugly, and defines its own u64 typedef
becore including kernel headers. Unfortunately, there are specific cases
where that doesn't work properly.
The android-tools code defines u64 as "unsigned long long", which is now
correct in the kernel. However, it used to be a time where u64 was
defined as "unsigned long" on a few 64 bits architecture (at least
PowerPC64 and MIPS64). The kernel headers have introduced a
__SANE_USERSPACE_TYPES__ macro that userspace can define in order to get
the "sane" definition, i.e "unsigned long long" for u64.
Unfortunately, this __SANE_USERSPACE_TYPES__ mechanism only appeared in
3.10 on PowerPC64, and in 3.16 on MIPS64.
Since android-tools is not using the autotools, and there's no easy way
to test types with the C pre-processor, we simply add some more
Config.in dependencies. They are a bit convoluted, but that's what the
dependency really is.
In our autobuilders, this issue was only showing up with an old MIPS64
toolchain that uses 3.9 kernel headers.
Also, since the problem is limited to the "fastboot" tool, the
dependency is only added for fastboot. Both adb and adbd build fine with
this toolchain.
Fixes:
http://autobuild.buildroot.net/results/ce45c995bd6abda6487ae3a11b4f45a7b9b3f8eb/
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-08-26 23:54:40 +02:00
|
|
|
comment "fastboot needs headers >= 3.10 (PowerPC64), headers >= 3.16 (MIPS64)"
|
|
|
|
depends on !BR2_arc
|
|
|
|
depends on !BR2_PACKAGE_ANDROID_TOOLS_FASTBOOT_GOOD_KERNEL_HEADERS
|
|
|
|
|
2015-11-23 17:27:12 +01:00
|
|
|
config BR2_PACKAGE_ANDROID_TOOLS_ADB
|
2016-05-11 22:45:25 +02:00
|
|
|
bool "adb"
|
2016-05-11 22:47:28 +02:00
|
|
|
depends on BR2_USE_MMU # uses fork()
|
2016-05-11 22:45:25 +02:00
|
|
|
select BR2_PACKAGE_OPENSSL
|
|
|
|
select BR2_PACKAGE_ZLIB
|
|
|
|
help
|
|
|
|
This option will build and install the adb utility for the
|
|
|
|
target, which can be used to interact with other target
|
|
|
|
devices implementing the ADB protocol.
|
2015-11-23 17:27:12 +01:00
|
|
|
|
|
|
|
config BR2_PACKAGE_ANDROID_TOOLS_ADBD
|
2016-05-11 22:45:25 +02:00
|
|
|
bool "adbd"
|
2016-05-11 22:47:28 +02:00
|
|
|
depends on BR2_USE_MMU # uses fork()
|
2016-05-11 22:45:25 +02:00
|
|
|
select BR2_PACKAGE_OPENSSL
|
|
|
|
select BR2_PACKAGE_ZLIB
|
|
|
|
help
|
|
|
|
This option will build and install the adbd utility for the
|
|
|
|
target, which can be used to interact with a host machine
|
|
|
|
implementing the ADB protocol.
|
2015-11-23 17:27:12 +01:00
|
|
|
|
|
|
|
endif
|
2016-05-15 22:03:30 +02:00
|
|
|
|
|
|
|
comment "android-tools needs a toolchain w/ threads"
|
|
|
|
depends on BR2_USE_MMU
|
|
|
|
depends on !BR2_TOOLCHAIN_HAS_THREADS
|