Commit graph

13 commits

Author SHA1 Message Date
Adam Duskett 7b493e411f package/a*/Config.in: fix ordering of statements
The check-package script when ran gives warnings on ordering issues
on all of these Config files.  This patch cleans up all warnings
related to the ordering in the Config files for packages starting with
the letter a in the package directory.

The appropriate ordering is: type, default, depends on, select, help
See http://nightly.buildroot.org/#_config_files for more information.

Signed-off-by: Adam Duskett <Adamduskett@outlook.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-04-29 17:17:02 +02:00
Thomas Petazzoni a2e178d6b4 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-28 23:38:35 +02:00
Yann E. MORIN 6e8617f222 package/android-tools: drop musl-compatibility cdefs patching out
We now always have a sys/cdefs.h, so we no longer need to patch it out.

Simplify the patch by removing any hunk removing cdefs.h or the use of
__BEGIN_DECLS/__END_DECLS. However, it must be included when macros it
defines are being used.

Also, renumber patches to guarantee ordering (static patch was added
before big-endian one).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-08-19 11:33:57 +02:00
Adam Duskett ebcca24c95 libselinux: bump to version 2.5
In addition, if a user is using glibc 2.22, the default CFLAG
D_FILE_OFFSET_BITS=64 will cause a compile error.  This flag is now
removed from the CFLAGS in the make file to ensure that toolchains
compiled against glibc 2.22 will build the new version of the package
properly.

In addition, libselinux now uses fts(), which is not available on musl,
and not provided by our default uClibc configuration. Therefore,
libselinux now depends on glibc, as well as all its reverse
dependencies.

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
[Thomas: add glibc dependency for fts().]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-07-01 11:06:05 +02:00
Thomas Petazzoni 60cc46321d android-tools: fix build on big endian systems
This commit adds a patch to the android-tools package to make it build
properly on big-endian systems.

Fixes:

  http://autobuild.buildroot.net/results/1b8ace1a083b419c1ab913fda0d36a1d2d910f13/ (PowerPC)
  http://autobuild.buildroot.net/results/5bb304c91367f1570903c8c527b387c65e572e56/ (Xtensa)

Cc: Gary Bisson <gary.bisson@boundarydevices.com>
Cc: Antoine Tenart <antoine.tenart@free-electrons.com>
Cc: Julien Corjon <corjon.j@ecagroup.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-05-17 15:47:18 +02:00
Thomas Petazzoni 9194be9f3a android-tools: add patch to fix static linking
Fixes:

  http://autobuild.buildroot.net/results/c3b95741a5f6622dc9542f9eaefe295a328e2e40/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-05-15 22:10:08 +02:00
Thomas Petazzoni 247592ed00 android-tools: needs thread support
Both adb and adbd use <pthread.h>, and fastboot needs thread due to
its dependency on libselinux, so we put the dependency in the
top-level android-tools Config.in option.

Fixes:

  http://autobuild.buildroot.net/results/bafadedc0ae91f8a1e26d14f30b37d6bb9486816/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-05-15 22:03:30 +02:00
Thomas Petazzoni f0d995cafd package/android-tools: fix the select logic
The android-tools Config.in.host has some logic to ensure that at
least one of its sub-options is enabled. However, this logic
incorrectly uses the sub-option names from the *target* android-tools
package, while it should be using the ones from the *host*
android-tools package.

Fixes the following kconfig warning:

  warning: (BR2_PACKAGE_HOST_ANDROID_TOOLS) selects BR2_PACKAGE_ANDROID_TOOLS_ADB which has unmet direct dependencies (BR2_PACKAGE_ANDROID_TOOLS && BR2_USE_MMU)

Reported-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-05-15 21:33:50 +02:00
Samuel Martin 9624685030 package/android-tools: fix indentation in Config.in.host
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-05-15 21:31:58 +02:00
Thomas Petazzoni b5527d006b android-tools: fix dependency on libselinux
The fastboot sub-option of android-tools did not properly replicate the
dependency of libselinux, which it is selecting. Due to this, an invalid
configuration could be generated, with fastboot selected while thread
support is not available for example (and therefore libselinux is not
available). This problem was causing the following build failure:

 http://autobuild.buildroot.net/results/21e45cee04fd983c85c6702595ee3f7ed8470931/

This is fixed by replicating the selinux dependencies in the fastboot
sub-option and adding the relevant Config.in comment.

In addition, the main android-tools option had some logic to make sure
at least one of its sub-option is enabled: adbd by default on systems
with MMU, and fastboot by default on systems without MMU (because
fastboot is the only part that builds on noMMU systems).

However, with the new dependencies in the fastboot sub-option, this
logic would have become a lot more complicated. Since fastboot is very
unlikely to be used on noMMU systems, we simply make the whole package
not available on noMMU systems.

Cc: Gary Bisson <gary.bisson@boundarydevices.com>
Cc: Antoine Tenart <antoine.tenart@free-electrons.com>
Cc: Julien Corjon <corjon.j@ecagroup.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-05-15 21:20:36 +02:00
Peter Korsgaard 30706f9252 android-tools: adb/adbd sub options use fork(), need MMU
Fixes:
http://autobuild.buildroot.org/results/d87/d87a4bd35cedca94ef6266a06ba05dda103d49ce/
http://autobuild.buildroot.org/results/a83/a8312469b4da6142f0ae67a5eeaf255da351a379/

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-05-11 22:47:28 +02:00
Peter Korsgaard cfac2c01c3 android-tools: fix Config.in indentation
Config.in files should be indented using <tab>.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-05-11 22:45:25 +02:00
Thomas Petazzoni 88cbfd1007 android-tools: add new package
This package allows to build the fastboot and adb host utilities,
which can be used to interact with target devices implementing one of
these protocols.

The work behind the host utilities was funded by ECA Group
<http://www.ecagroup.com>. ECA Group is the copyright owner of the
contributed code.

The package also allows to build fastboot, adb and adbd daemon for the
target.

Regarding adbd, the target is required to have the FunctionFS USB Gadget
configuration. Then the following commands enable the use of adb:
 # modprobe g_ffs idVendor=0x18d1 idProduct=0x4e42 \
   iSerialNumber="buildroot"
 # mkdir -p /dev/usb-ffs/adb
 # mount -t functionfs adb /dev/usb-ffs/adb -o uid=2000,gid=2000
 # adbd &

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
Tested-by: Julien Corjon <corjon.j@ecagroup.com>
[Thomas:
 - update on top of master.
 - fix Config.in.host prompt, it should have been "host android-tools"
   and not just "android-tools".]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-04-30 19:04:10 +02:00