Commit Graph

1119 Commits (b02636fcb4b16d437442f817a60a30e9b7ce4ed2)

Author SHA1 Message Date
Felix Fietkau 6f9011f089 cmake: properly pass host cflags/ldflags to the build
This should hopefully fix build issues where libraries that we ship in
tools/ were accidentally picked up from other places on the system, e.g.
/usr/local

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 7969770100 cmake: support verbose build that shows compiler commands
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau d6de31310c cmake: restore parallel build support for bootstrap
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Jo-Philipp Wich 43d5339940 tools: cmake: link librt if needed (FS#381)
Patch cmakes cmcurl component to unconditionally link librt when we discover
a clock_gettime() symbol in -lrt.

This is required to sucessfully link LibreSSL's libcrypto which might or
might not reqauire librt.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
Jo-Philipp Wich 69be65b594 tools: mkimage: pass crypto libraries through HOST_LOADLIBES (FS#381)
Since linker argument order is significant on modern host compilers, pass
the required libcrypto libraries through the HOST_LOADLIBES variable in
order to ensure proper order of the final linker command line.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
Matthias Schiffer 96a940308b
tools: libressl: always build as PIC
Fixes link errors for host packages like ruby like the following:

/usr/bin/ld: .../staging_dir/host/lib/libcrypto.a(libcrypto_la-md5_dgst.o):
relocation R_X86_64_PC32 against symbol `memcpy@@GLIBC_2.14' can not be used when making a shared object; recompile with -fPIC

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years ago
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>
7 years ago
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>
7 years ago
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>
7 years ago
Felix Fietkau b9857b21c2 tools/kernel2minor: fix permissions of created files
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 476e77c3b7 tools/kernel2minor: fix endian conversion issues, allow creating little-endian images
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 8782672b90 tools/kernel2minor: fix portability issue
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Matthias Schiffer 2ee3e8dd42
firmware-utils: tplink-safeloader: add support for TP-Link WBS210/510 1.2
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years ago
Jo-Philipp Wich 08d73bfdce tools: cmake: use different approach for passing LDFLAGS
Funnel the required LDFLAGS environment through HOST_CONFIGURE_CMD for now
as the HOST_CONFIGURE_VARS semantics are completely broken.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
Jo-Philipp Wich f9b253147a tools: cmake: use pkg-config to discover libcrypto linker flags
LibreSSL's libcrypto.so has an indirect dependency to librt for clock_gettime()
on Linux.

Use pkg-config to portably discover the required linker flags.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
Jo-Philipp Wich 0c03650160 tools: mkimage: use pkg-config to discover libcrypto linker flags
LibreSSL's libcrypto.so has an indirect dependency to librt for clock_gettime()
on Linux.

Use pkg-config to portably discover the required linker flags.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
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>
7 years ago
Felix Fietkau 8160beb014 cmake: update to version 3.7.1
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau a0993dda5f tools: make cmake depend on libressl, one of its utilities uses it
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
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>
7 years ago
Daniel Engberg cd18ff9ed6 tools: gmp: Update to 6.1.2
Updates GMP to 6.1.2

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years ago
Daniel Engberg 54ff3b1def xz: Update to 5.2.3
Update xz to 5.2.3

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years ago
Felix Fietkau 2fd5ce9488 libressl: disable shared libraries, fixes build issues
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
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>
8 years ago
Felix Fietkau 18300db77a b43-tools: fix tarball hash
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau c7c1cf5618 treewide: clean up and unify PKG_VERSION for git based downloads
Also use default defintions for PKG_SOURCE_SUBDIR, PKG_SOURCE

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Henryk Heisig c8043137bb ramips: Add support to TP-Link Archer MR200
CPU: MT7620N 580MHz
Flash: 8MB
RAM: 64MB
build-in modem 3G/4G
four ethernet port 10/100Mbps

Signed-off-by: Henryk Heisig <hyniu@o2.pl>
8 years ago
Radek Dostál 5515edae9f firmware-utils/tplink-safeloader: add support for TP-Link RE450
Signed-off-by: Radek Dostál <rd@radekdostal.com>
[Jo-Philipp Wich: use .support_trail member]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Tal Keren 0d9d980ecd firmware-utils: kernel image generator for TP-Link RE450
The firmware image that is used in TP-Link RE450 (and some more devices from
the RE series) is tplink-safeloader.
In the kernel partition, the kernel is compressed in a regular tp-link
firmware that is just used for booting. Since it is only used for compressing
and booting, only four fields are filled in the header:
Vendor, version, kernel load address and kernel entry point.
mktplinkfw-kernel is a simpler version of mktpolinkfw that generate such
images. It also specifies the hardware id (as it is in the product info
section), so when doing a sysupgrade - the existing code will check for
hardware compatibility.

Signed-off-by: Tal Keren <kooolk@gmail.com>
[rd@radekdostal.com: add build target to .../image/tp-link.mk]
Signed-off-by: Radek Dostál <rd@radekdostal.com>
8 years ago
Matthias Schiffer 51740990cd
firmware-utils: add support for TL-WR1043ND v4 to mktplinkfw and tplink-safeloader
The TL-WR1043ND v4 uses a kernel image with a mktplinkfw header inside the
os-image partition of a tplink-safeloader image.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
8 years ago
Jo-Philipp Wich fff6443b5b
firmware-utils/tplink-safeloader: refactor code for further board support
In order to make it easier to add new boards in the future, refactor the code
to describe the image layouts of supported boards in a struct array and alter
the image generation routines to figure out the sysupgrade partitions
automatically.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Jo-Philipp Wich d58e8a9076
firmware-utils/tplink-safeloader: make vendor data optional
Restructure the code a bit to allow for omitting vendor data when generating
factory images.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Felix Fietkau 2b510d97ba tar: fix reproducibility issue
Force root/root as names for uid0/gid0 instead of using the system
names. This helps make packed download tarballs more reproducible

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
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>
8 years ago
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>
8 years ago
Felix Fietkau 720b99215d treewide: clean up download hashes
Replace *MD5SUM with *HASH, replace MD5 hashes with SHA256

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Jo-Philipp Wich 38ebd1d133 firmware-utils: add E2100L support to addpattern.c
Based on OpenWrt PR#250

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Matthias Schiffer d1a2c3f9b1
firmware-utils: tplink-safeloader: update support lists for CPE210/510/...
Adds support for new EU and US variants; removes a few strings that were
never actually used and have been removed from the stock firmwares.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
8 years ago
Felix Fietkau a245772291 tools/upslug2: add SHA256 hash to use mirror tarball
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Jo-Philipp Wich 0b3b8c83c0 tools: cmake: fix compatibility with LibreSSL as well
Sadly, LibreSSL claims to be OpenSSL v2.0.0 while not providing the new
interfaces introduced with OpenSSL v1.1.x, so extend the pre-OpenSSL 1.1.x
compat checks to consider LibreSSL as well.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Jo-Philipp Wich 83697ec389 tools: cmake: import another upstream commit for OpenSSL backwards compatibility
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Jo-Philipp Wich 7abd011b0a tools: cmake: import upstream patch for OpenSSL 1.1.x compatibility
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Felix Fietkau e678c9f764 mkimage: fix openssl 1.1.x compat fix with libressl
libressl sets OPENSSL_VERSION_NUMBER to 0x20000000L, which breaks API
checks based on it.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Jo-Philipp Wich 70b104f98c tools: mkimage: fix build with OpenSSL 1.1.x (FS#182)
The OpenSSL 1.1.x version series undergone some major API changes which made
the RSA structure opaque and deprecated a number of methods, so add some
conditional compat code to make the u-boot source build again.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Rafał Miłecki cb7ab730c7 firmware-utils: replace md5 code with Alexander Peslyak's implementation
Our current implementation is pretty old and uses some pre-standard/old
ANSI C style that triggers warnings like:
warning: call to function 'MD5_Init' without a real prototype [-Wunprototyped-calls]

This is caused by declarations specified in a following way:
src/md5.h:60:6: note: 'MD5_Init' was declared here
 void MD5_Init ();

Having these warnings makes it harded to notice real problems. We could
try hiding them but it makes more sense to just use a cleaner code.
Another tiny gain from this switch is slightly reduced binary size, on
x86_64 tplink-safeloader's size 48104 became 48003.

The new code is public domain, uses "heavily cut-down BSD license".

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Florian Fainelli 97eff5cba5 firmware-utils: Fix build failure in mkmerakifw.c FS#298
Earlier compilers such as GCC 4 do not like anynomous unions, make it a named
union "u", and update the code where relevant.

Fixes FS#298
Fixes: a72e1692b8 ("firmware-utils: Add support for the Cisco Meraki MX60/MX60W")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
8 years ago
Hannu Nyman 2c05fd7ef4 tools/cmake: update to 3.7.0
Release notes at
https://cmake.org/cmake/help/v3.7/release/3.7.html

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
8 years ago
Hannu Nyman a22464b92f tools/quilt: update to 0.65
User-visible changes since 0.64 are as follows:

  - Translation fixes
  - Project settings have priority
  - Reject binary files in patches
  - Fix a race condition in diff_file
  - Performance: Optimizations to the setup command
  - Performance: Optimizations to the bash completion script
  - Test suite: Improve the edit test case
  - Test suite: Make the symlink test more robust
  - Test suite: Test backup failure
  - Test suite: Test the header command with hard links
  - diff: Report diff failures
  - edit: Fix a corner case bug
  - mail: Fix the help text
  - push: Fix the synopsis
  - refresh: Do not remove symlinks
  - refresh: Break links to read-only patch files
  - refresh: Always preserve modification time
  - setup: Report failed look-ups in inspect-wrapper
  - quilt.el: Fix quilt-editable when patches are stored in subdirs
  - bash_completion: Handle spaces in file names
  - bash_completion: Update the list of commands
  - bash_completion: Add new command options
  - bash_completion: Fix handling of mail, new, push options
  - guards: Simplify the help text
  - guards: Include the file name also in the "Not found" case
  - guards: Add support for an external filelist in --check mode
  - guards: Report which config file has problem in --check mode
  - guards: Documentation update
  - guards: Clarify a user message

Note to packagers: the Makefile was modified to take configure's
--sysconfdir into account as other projects do. As a result, setting
--prefix=/usr will no longer put the configuration files under /etc.
You now need to explicitly pass --sysconfdir=/etc. If you don't,
configuration files will go under /usr/etc, which is not what you want.
This is somewhat less intuitive, but also more consistent with what
other projects are doing.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
8 years ago
Hannu Nyman a6e790b202 tools/scons: update to 2.5.1
RELEASE 2.5.1 - Mon, 03 Nov 2016 13:37:42 -0400
    - Add scons-configure-cache.py to packaging. It was omitted
    - Use memoization to optimize PATH evaluation across
      all dependencies per node.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
8 years ago
Chris Blake a72e1692b8 firmware-utils: Add support for the Cisco Meraki MX60/MX60W
This patch adds header support for the Cisco Meraki MX60/MX60W, which
are a part of the apm821xx target. Some structure changes were needed
due to the fact this device uses U-Boot (unlike other devices in
mkmerakifw.c) which uses a different header structure to define the load
offsets for the image.

A thanks to Christian for helping implement this properly.

Cc: Christian Lamparter <chunkeey@gmail.com>

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
8 years ago