Commit Graph

237 Commits

Author SHA1 Message Date
Rosen Penev
31554e50d2 ccache: update to 4.1
Upstream switched to building with CMake. Adjust accordingly.

Reapplied patch as upstream changed the file format.

Added HOST_BUILD_PARALLEL for faster compilation.

Added cmake tool dependency and removed circular dependencies as a
result.

Adjusted dependent tools to use NOCACHE as they are needed to build
ccache.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-31 10:03:21 +01:00
Andre Heider
b0cb305236 tools: always create $STAGING_DIR/usr/{include,lib}
rules.mk always passes these as -I/-L to the toolchain.

Fixes rare errors like:
cc1: error: staging_dir/target-aarch64_cortex-a53_musl/usr/include: No such file or directory [-Werror=missing-include-dirs]

Signed-off-by: Andre Heider <a.heider@gmail.com>
Acked-by: Paul Spooren <mail@aparcar.org>
Acked-by: Rosen Penev <rosenp@gmail.com>
2020-11-27 14:46:13 +01:00
Felix Fietkau
6c2ef55e69 tools/bc: use autoreconf to fix build failure on macOS with recent Xcode versions
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-11-14 14:48:30 +01:00
Adrian Schmutzler
edb5d2a320 tools: sort alphabetically
This sorts the added tools and builddir dependencies alphabetically
to make it easier to find something in the Makefile.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-02 16:29:22 +02:00
Adrian Schmutzler
48905af01d tools: drop unused upslug2 and wrt350nv2-builder
These tools have been used by the orion target which has been
removed in Jan 2020 [1].

Both were specifically meant for the WRT350Nv2, which is not
supported anymore.

So, let's remove them as well.

[1] 89f2deb372 ("orion: remove unmaintained target")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-02 16:29:22 +02:00
David Bauer
1aa71833fe tools: add back lzma-old for ath79
lzma-old host package is required for building ath79 images, as
mksquashfs-lzma is required for generating netgear images.

Fixes commit 4e4ee46495 ("ar71xx: drop target")

Signed-off-by: David Bauer <mail@david-bauer.net>
2020-08-31 00:21:18 +02:00
Adrian Schmutzler
4e4ee46495 ar71xx: drop target
This target has been mostly replaced by ath79 and won't be included
in the upcoming release anymore. Finally put it to rest.

This also removes all references in packages, tools, etc. as well as
the uboot-ar71xx and vsc73x5-ucode packages.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-30 22:18:35 +02:00
Thomas Petazzoni
9e7ef46065 tools: add fakeroot
SELinux support requires setting the appropriate SELinux security context
to files and directories, which needs to happen at build time in order
to support read-only root filesystem scenarios. In order to create these
security contexts, we will have to run some SELinux-specific tools on
the host machine, but that requires root access. This adds support for
fakeroot, which the build process will use to run the SELinux security
context creation and the image creation.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Apply to current master, and adjust commit message

Thomas' original work is available at
http://lists.infradead.org/pipermail/openwrt-devel/2019-November/025976.html.

Signed-off-by: W. Michael Petullo <mike@flyn.org>
[add rules.mk FAKEROOT variable]
Signed-off-by: Paul Spooren <mail@aparcar.org>
[update, fix macos build]
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-08-10 10:09:55 +02:00
Matthias Schiffer
258dc0d0fd
tools: add zstd
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2020-05-31 11:03:30 +02:00
Karel Kočí
3c1d1d4332 tools: add autoconf-archive
Some autotools based build systems are using autoconf-archive scripts
and are expecting them to almost always be available. This is not
required for regular releases as tar balls generated for releases
commonly have existing configure script. This is rather intended to be
used with autotools.mk's autoreconf and in cases it is not always
possible to get release tar ball.

Including this adds little to no overhead in terms of build time as
those are just m4 scripts copied to an appropriate location.

Signed-off-by: Karel Kočí <karel.koci@nic.cz>
[fixed From: to match SoB]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-05-20 15:37:16 +02:00
Kevin Darbyshire-Bryant
0a06fcf608 build: fix kernel 5.4 on macos
As part of the kernel build process there are utilities built to run on
the host system that expect linux kernel headers to be available.
Unfortunately macos/darwin doesn't have these headers.

vdso2c requires types.h so provide a minimal stub to satisfy it.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2020-03-14 13:20:06 +00:00
Rosen Penev
867298cf47 tools/pkg-config: Replace with pkgconf
pkgconf is a newer, actively maintained implementation of pkg-config that
supports more aspects of the pkg-config file specification and provides a
library interface that applications can use to incorporate intelligent
handling of pkg-config files into themselves (such as build file
generators, IDEs, and compilers). Through its pkg-config compatibility
interface (activated when it is run as "pkg-config"), it also can
completely replace the original implementation.

It is also lighterweight and does not require glib2, as pkg-config does.

On other distros, pkgconf is symlinked to pkg-config. For simplicity here,
it is renamed to pkg-config.real, as in the original package.

Initial results have been positive. As before, pkgconf works as long as
the pkg-config files point to the proper paths.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[backported upstream fix for Meson]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-03-01 21:36:00 +01:00
Jeffery To
4a308bad82 tools: Fix "lib" symlink created inside $(STAGING_DIR_HOST)/lib
Currently, if "make tools/install" is called after tools have already
been installed, a symbolic link named "lib" will be created inside
$(STAGING_DIR_HOST)/lib, pointing to "lib" (i.e. itself).

During tools/prepare, a "lib64" symlink is created inside
$(STAGING_DIR_HOST) that points to "lib" (also inside
$(STAGING_DIR_HOST)).

If tools/prepare is called and the "lib64" symlink already exists, then
ln will treat it as a directory and instead create a symlink named "lib"
inside of that directory.

This adds the -n option for ln so that $(STAGING_DIR_HOST)/lib64 is
always treated as a normal file (the link name), not as a directory.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-03-01 21:35:59 +01:00
Sebastian Kemper
1f0063b58c rules.mk: remove "$(STAGING_DIR)/include"
"$(STAGING_DIR)/include" was carried over from buildroot-ng to OpenWrt
in commit 60c1f0f64d. buildroot has
dropped this directory a long time ago.

In OpenWrt the directory is still created by the PrepareStaging macro
and is part of the default TARGET_CPPFLAGS. But nothing at all installs
headers into this directory, nor should anything be installed under this
path.

Removing this directory from TARGET_CPPFLAGS will cut down the log noise
a bit. Not only will CPPFLAGS be shorter, there will be less warnings
set off by "-Wmissing-include-dirs" (or even failures when paired with
"-Werror"). After all the directory does not even _exist_ in the SDKs,
which are used on the build bots when building packages (see [1] and
[2]).

make[8]: Entering directory '/builder/shared-workdir/build/sdk/build_dir/target-aarch64_generic_musl/libmbim-1.20.0/src/common'
  CC       libmbim_common_la-mbim-common.lo
cc1: error: /builder/shared-workdir/build/sdk/staging_dir/target-aarch64_generic_musl/include: No such file or directory [-Werror=missing-include-dirs]
cc1: all warnings being treated as errors

[1] https://github.com/openwrt/packages/issues/10377
[2] https://github.com/openwrt/packages/pull/10378

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Acked-by: Jo-Philipp Wich <jo@mein.io>
Acked-by: Rosen Penev <rosenp@gmail.com>
2019-11-02 20:51:56 +01:00
Yousong Zhou
ed6ba2801c tools: keep stamp file in $(STAGING_DIR_HOST)
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-10-24 11:34:34 +00:00
Petr Štetiar
60eb0e8da2 scons: move to packages feed
This patch removes scons host build tool, as commit 7087efd72a8d
("scons: move host build tool to a proper place") in the packages feed
has moved scons into the new home.

There are currently no packages in the master tree which would need
scons, yet scons is build always as part of host tools, just in order to
satisfy host build dependency of few packages in the packages feeds.

Ref: https://github.com/openwrt/packages/pull/9584
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2019-09-15 22:53:01 +02:00
Tomasz Maciej Nowak
f0be038897 tools: cbootimage: depend on automake
Fix missing aclocal reported by buildbot.

Fixes: 8595bb0 ("tools: add cbootimage for tegra")
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
2019-04-07 15:25:28 +02:00
Tomasz Maciej Nowak
b874437644 tools: add cbootimage-configs for tegra
This provides board configuraion tables for various Tegra boards needed
by cbootimage tool to create flashable bootloader images.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
2019-04-06 14:48:46 +02:00
Tomasz Maciej Nowak
8595bb0b17 tools: add cbootimage for tegra
Tegra BCT and bootable flash image generator/compiler

>From documentation:
This project provides a tool which compiles BCT (Boot Configuration
Table) images to place into the boot flash of a Tegra-based device.

The tool will either:

a) Compile a textual representation of a BCT into a binary image.

b) Generate an entire boot image from a previously compiled BCT and a
   bootloader binary.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
2019-04-06 14:48:46 +02:00
Felix Fietkau
068c4cf407 tools: squashfskit4 should only depend on coreutils on non-linux systems
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-03-03 20:58:52 +01:00
Alexander Couzens
ac3bae907f tools/squashfskit: fix version detection on non-linux system
gnu date is present in our staging_dir which means squashfskit will fail
to build. Prevent also a race condition if coreutils is build after
squashfskit.

To prevent a race condition, depend on coreutils.

Acked-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2019-03-03 19:45:10 +01:00
Alexander Couzens
889b6423b7
tools: migrate from squashfs4 to squashfskit4
squashfskit is a fork of the squashfs-tools.
squashfskit creates reproducible filesystems and includes
many of the distro patches.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Tested-by: Paul Spooren <mail@aparcar.org>
2019-02-28 01:38:46 +01:00
Linus Walleij
c72b1d8468 gemini: Generate harddisk image for DNS-313
This makes OpenWrt build an Ext2+Ext4 partitioned image
for the D-Link DNS-313 with two blank partitions, a boot
partition on /dev/sda3 and a rootfs partition on
/dev/sda4.

This uses the methods already used in apm821xx including
the tricks to convert the generated Ext2 filesystem
partition to version 1 so that the firmware bootloader
will properly recognize it.

We patch a bit around the build files to make sure we
get the rootfs size set and that genext2fs is properly
built.

Tested on the D-Link DNS-313.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[Fixing and tricksing]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2019-02-20 18:51:31 +01:00
Kuang Rufan
eb31562370 tools/sed: fix incorrect dependency.
sed shall depend on xz instead of xz depends on sed.

Signed-off-by: Kuang Rufan <master@a1983.com.cn>
2019-01-22 11:28:49 +01:00
Mathias Kresin
ad8c2d6099 tools: add zip utility
One image requires a zip compressed image, so add the zip util found in
the packages feed, and extend it with some useful debian patches.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2019-01-15 19:11:53 +01:00
Hauke Mehrtens
759f111f8d tools: patch: Fix build by not modifing Makefile.am
A new test case was adding in one of the patches fixing a problem, this
also included a change in the test/Makefile.am to add this test case.
The build system detected a change in the Makefile.am and wants to
regenerate the Makefile.in, but this fails because automake-1.15 is not
installed yet. As automake depends on patch being build first, make sure
we do not modify the Makefile.am.

This fixes build problem seen by the build bots.

Fixes: 4797dddfde ("patch: apply upstream cve fixes")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-10-14 16:47:15 +02:00
Hauke Mehrtens
07e8c217cb tools: patch: make patch build depend on automake
The Makefile.am changed and now patch wants to use automake to
regenerate the Makefile.in. Make sure automake was build before we build
patch.

This fixes build problem seen by the build bots.
Fixes: 4797dddfde ("patch: apply upstream cve fixes")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-10-14 15:27:38 +02:00
Zoltan HERPAI
3e0489dcd9 tools: build squashfs (v3) for ath79
Certain Netgear and AVM devices use BE squashfs for the kernel image. As
squashfs4 only supports creating LE images, add squashfs (v3) into
the tools to be built for ath79.

Trying to use an LE squashfs (thus trying to use squashfs4 only for
building the image) for the kernel image results in the bootloader
barfing and stopping.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2018-06-16 10:08:51 +02:00
Hauke Mehrtens
c7cd166479 tools/mtd-utils: update to version 2.0.2
This version now uses autotools to configure the build system. They are
also using the newly added zlib package.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-04-28 15:29:13 +02:00
Hauke Mehrtens
8dcd941d8b tools/zlib: move zlib build to tools
This allows us to link the other tools against our libz and we do not
need the system zlib any more.

Only the static linked library is copied to the staging directory so we
have a statically linked library on all systems and not only on Linux.
This also adds the new dependencies of the packages which are depending
on zlib.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-04-28 15:28:59 +02:00
Daniel Engberg
0685f2a66c tools/upx: Remove from repo
Remove upx from repo, it hasn't been used for a very long time and serves little to no purpose.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
2017-03-20 08:26:35 +01:00
Felix Fietkau
d98bb7e6b9 build: extend CONFIG_AUTOREMOVE to tools/
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-18 23:57:09 +01:00
Felix Fietkau
131db366a3 build: remove separate /install step for host builds
Reduces the number of recursive make invocations

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-18 23:57:09 +01:00
Felix Fietkau
828a471e8d tools: remove obsolete yaffs tool
This was added a long time ago and was apparently never used

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-09 16:40:12 +01:00
Felix Fietkau
a9232ba1ed tools: reorganize dependencies, fix build after deleting staging dir
A lot of packages (especially those using libtool) depend on sed being
available. xz fails on an incremental build pretty early if it's not
there.

Clean up handling if essential core tools (patch, tar, xz), build them
in parallel and make them depend on sed

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-09 16:39:46 +01:00
Felix Fietkau
018d80007e kernel: remove ubifs xz decompression support
It has been unused, and less useful than squashfs for cases where flash
space usage matters.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-09 14:07:06 +01:00
Jo-Philipp Wich
bfb2512a4e tools: make libressl build depend on pkg-config
Ensure that pkg-config is available before building libressl as we're going
to need it for setting proper link flags in utilities requiring libcrypto.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-01-05 14:21:27 +01:00
Felix Fietkau
a0993dda5f tools: make cmake depend on libressl, one of its utilities uses it
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-05 11:09:12 +01:00
Felix Fietkau
f6e6341d89 tools: build libressl on all systems
Useful for having a more consistent build environment and finding API
issues faster

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-05 11:09:12 +01:00
Felix Fietkau
3f55e5aeb5 toolchain: remove ppl/cloog, disable graphite for gcc 4.8
graphite is disabled by default and it's not worth carrying ppl and
cloog for supporting this feature on the old gcc 4.8, which is only used
for ARC

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-12-24 09:40:46 +01:00
Felix Fietkau
180e93ba8b build: add CHECK_ALL variable to allow make download/check to include not selected packages
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-12-17 10:36:52 +01:00
Felix Fietkau
7a315b0b5d build: implement make check and make package/X/check
This is intended to be used for a wide array of package sanity checks.

The first check that is implemented is for the hash of downloaded files.
It checks:
  - Missing hash
  - Use of SHA256 instead of MD5
  - dl/<file> hash not matching hash in makefile
  - deprecated MD5SUM variable

The deprecated MD5SUM variable check is skipped for feeds/ until OpenWrt
is updated as well

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-12-17 10:36:25 +01:00
Felix Fietkau
b306f8254f tools: add missing dependency for dosfstools
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-10-12 12:25:27 +02:00
Jo-Philipp Wich
66a62b8966 tools: do not apply ccache dependency to xz
Since XZ is needed to bootstrap building ccache we must not depend on it,
so remove the dependency on ccache to avoid circular dependencies.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-10-06 15:29:33 +02:00
Jo-Philipp Wich
575d386590 tools: make all tools depend on xz
Make all tools except tar (which is required to bootstrap xz-utils) and XZ
itself depend on XZ, in order to be able to handle .tar.xz downloads.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-10-06 14:12:46 +02:00
Felix Fietkau
cf76b90a5f tools: make mtools/dosfstools unconditional
The list of targets that need them are getting longer

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-08-28 20:58:49 +02:00
Felix Fietkau
88b16da8c4 tools: build GNU date from coreutils on non-Linux systems
Required for reproducible builds in the kernel build system

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-08-23 11:56:13 +02:00
Alexey Brodkin
c1f4040f70 tools: Select dosfstools for archs38
In commit df4f41261c ("archs38: Introduce images for SD-cards")
we introduced building of SD-card images for ARC HS38-based boards.

While building images mkdosfs utility is used.
On machines I used for testing mentioned change this utility was
already installed so I didn't figure-out that requirement.

But thanks to Lede's autobuilder this missing bit was highlighted,
see failed build job here:
http://phase1.builds.lede-project.org/builders/archs38%2Fsd/builds/0/steps/images/logs/stdio

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: John Crispin <john@phrozen.org>
Cc: Jo-Philipp Wich <jo@mein.io>
2016-08-18 21:41:38 +02:00
Felix Fietkau
07577c5ebe tools: bring back genext2fs for apm821xx
This reverts commit 8c68c104ea.
It is used for apm821xx, which needs ext2 (not ext4) images for some
devices.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-23 19:37:20 +02:00
Felix Fietkau
01fc738b46 tools: build b43 tools if the SDK was enabled
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-07 10:52:51 +02:00