Commit Graph

28 Commits (MyCruft)

Author SHA1 Message Date
Thomas Petazzoni ebe5d9edfe boot, package, support, toolchain: switch to 2 spaces for the hash file
It's time to finally switch over globally to the new spacing format
that we have agreed on for the hash file, with 2 spaces as a separator
between fields.

This commit was mechanically generated using:

find . -type f -name '*.hash' | xargs sed -i 's%^md5[ \t]*\([^ \t]*\)[ \t]*\(.*\)$%md5  \1  \2%'
find . -type f -name '*.hash' | xargs sed -i 's%^sha1[ \t]*\([^ \t]*\)[ \t]*\(.*\)$%sha1  \1  \2%'
find . -type f -name '*.hash' | xargs sed -i 's%^sha256[ \t]*\([^ \t]*\)[ \t]*\(.*\)$%sha256  \1  \2%'
find . -type f -name '*.hash' | xargs sed -i 's%^sha512[ \t]*\([^ \t]*\)[ \t]*\(.*\)$%sha512  \1  \2%'

This commit can easily be backported on the LTS branch by re-running
the same commands, if needed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-07-28 23:05:23 +02:00
Fabrice Fontaine cdefb4538e package/android-tools: fastboot needs gcc >= 5
Commit 56d9b88768 forgot to add gcc >= 5
dependency to fastboot:

Makefile:591: *** libsepol is in the dependency chain of libselinux that has added it to its _DEPENDENCIES variable without selecting it or depending on it from Config.in.  Stop.

Fixes:
 - http://autobuild.buildroot.org/results/2430ba4afb40569ed54506201494baeebf6c5d42

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-02-12 23:00:38 +01:00
Fabrice Fontaine ae2c55df06 package/android-tools: add host gcc >= 5 dependency
Commit 56d9b88768 forgot to add host
gcc >= 5 dependency

Fixes:
 - No autobuilder failures (yet)

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-05 21:59:37 +01:00
Heiko Thiery abb9bc29c7 package/a*: add license file hashes
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-02-03 14:44:52 +01:00
Thomas Petazzoni 5d6687512a package/android-tools: re-enable fastboot on ARC
libselinux is now available on ARC, so we can re-enable the fastboot
option on this architecture.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-10-10 00:14:16 +02:00
Thomas Petazzoni 20d990669c package/android-tools: fastboot now available on !glibc toolchains
libselinux can now be built on !glibc toolchains, so we can re-enable
building fastboot on !glibc toolchains as well.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-10-10 00:08:11 +02:00
Giulio Benetti 8bd63b0b4a package/android-tools: host-android-tools need pkg-conf
Host version of this package needs pkg-conf the same way as target
package: for Makefiles library dependencies retrieving.

Fixes:

  http://autobuild.buildroot.net/results/8543eb3815a67747349a2e60654d19b9804a3a89/

Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-04-11 08:20:32 +02:00
Giulio Benetti 1e4f77a2e4 package/android-tools: fix static linking failure due to OpenSSL dependencies
When static linking some dependency library can be missing
(i.e. -latomic for -lcrypto) on linking libraries list. This is
because when static linking libraries dependencies are not
transparently linked into binary.

To avoid moving libraries before/after one another or add new ones
that are not needed at all in the dynamic linking case, we use `pkg-config --libs
LIBRARY` where LIBRARY is the library we "probe" for its existence and
dependency.

In this commit, we:

- Remove 0005-fix-static-link-zlib.patch where -lcrypto and -lz were
  swapped, as it is no longer needed thanks to the following point.

- Replace it with 0005-Use-pkgconf-to-get-libs-deps.patch where
  -lcrypto has been substituted with `pkg-config --libs libcrypto`

- Add host-pkgconf to ANDROID_TOOLS_DEPENDENCIES

Fixes:

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

Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-04-08 22:32:45 +02:00
Vadim Kochan bf3a57acdc package/android-tools: Fix build with OpenSSL 1.1.x
Use patch from:

	f63f20fb93

which fixes compilation of adb with OpenSSL 1.1.x, and took only part
for adb only.

Fixes:

	http://autobuild.buildroot.net/results/66f/66f05eb9a56aa8526a1420334d68c7eda094e90e/

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-02-05 10:00:44 +01:00
Alex Kaplan 567928e5ad package/android-tools: add option to build ext4 utils for the host
This patch adds an option to build and install the ext4_utils for the
host, i.e. make_ext4fs, ext4fixup, ext2simg, img2simg, simg2img and
simg2simg.

Signed-off-by: Alex Kaplan <kaplan2539@gmail.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
[Thomas:
 - simplify a bit the installation logic by using a single
   HOST_ANDROID_TOOLS_INSTALL_TARGETS variable, instead of having one
   specific for ext4 tools
 - drop "default n" from Config.in.host]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-11-24 10:29:26 +01:00
Matt Weber b7490dbd31 package/android-tools: update upstream URL in Config.in help
Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-09-20 22:20:22 +02:00
Giulio Benetti c8e8f8b0f5 android-tools: fix minor()/major() build failure due to glibc 2.28
glibc 2.28 no longer includes <sys/sysmacros.h> from <sys/types.h>,
and therefore <sys/sysmacros.h> must be included explicitly when
major()/minor() are used.

This commit adds a patch to directly include <sys/sysmacros.h> into
all usb_linux.c files where minor() and major() macros are used.

Fixes:
http://autobuild.buildroot.net/results/901/9011c6af71fb81988c2a05f2acee913a2bae2eff//
http://autobuild.buildroot.net/results/142/142c5672fdc44f2d68f18df3509e5051b3295df5//
http://autobuild.buildroot.net/results/b55/b55aa69654e758af5232ae69618ba1ea5c245074//

Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-09-09 15:14:31 +02:00
Thomas Petazzoni 7528c47523 package: declare target variant before host variant
Our package infrastructure uses inheritance of a number of values from
the target package to the host package, which assumes the target
package is defined before the host package. In addition, future
changes are going to make this requirement even more important.

Therefore, let's fix the android-tools, gauche, lcms2,
linux-syscall-support and pngquant packages, so that they declare
their target variant before their host variant, like all other
packages in Buildroot.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-04-30 17:43:46 +02:00
Maxime Hadjinlian 514291f39e packages: use new $($PKG)_DL_DIR) variable
Instead of DL_DIR, the package should now use $(PKG)_DL_DIR to ease the
transition into a new directory structure for DL_DIR.

This commit has been generated with the following scripts:

for i in $(find . -iname "*.mk"); do
	if ! grep -q "\$(DL_DIR)" ${i}; then
		continue
	fi
	pkg_name="$(basename $(dirname ${i}))"
	[ "${pkg_name}" = "package" ] && continue
	raw_pkg_name=$(echo ${pkg_name} | tr [a-z] [A-Z] | tr '-' '_')
	pkg_dl_dir="${raw_pkg_name}_DL_DIR"
	sed -i "s/\$(DL_DIR)/\$($pkg_dl_dir)/" ${i}
done

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-04-02 15:53:53 +02:00
Arnout Vandecappelle 0f9c0bf3d5 Globally replace $(HOST_DIR)/usr/bin with $(HOST_DIR)/bin
Since things are no longer installed in $(HOST_DIR)/usr, the callers
should also not refer to it.

This is a mechanical change with
git grep -l '$(HOST_DIR)/usr/bin' | xargs sed -i 's%$(HOST_DIR)/usr/bin%$(HOST_DIR)/bin%g'

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-05 15:19:29 +02:00
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