Commit Graph

1084 Commits (720b99215da295a2e7b4acdef30b58bec6acedc2)

Author SHA1 Message Date
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
Rafał Miłecki 0d3be662ce firmware-utils: tplink-safeloader: keep per-device info on trailing char
Recent refactoring introduced a regression. It ignored second argument
of make_support_list function which was originally true for C2600. The
new generic build_image function always passes false.

This patch allows specifying trailing char in a device specific info. It
also switches Archer C9 to the \0 char to make it compliant with vendor
images.

I verified generated images to be binary identical to the ones that
were created before whole refactoring.

Reported-by: Jo-Philipp Wich <jo@mein.io>
Fixes: fd924d2068 ("firmware-utils: tplink-safeloader: use one function for generating images")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki 222783c65c firmware-utils: tplink-safeloader: add Archer C9 support
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki fd924d2068 firmware-utils: tplink-safeloader: use one function for generating images
Thanks to the struct device_info we can now use one unified function.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki ea249f01b1 firmware-utils: tplink-safeloader: add struct device_info
This struct stores all device specific info which allows making do_eap
function more generic.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Vitaly Chekryzhev a4814c744c firmware-utils: add tool to create zyxel images
Signed-off-by: Vitaly Chekryzhev <13hakta@gmail.com>
[moved to firmware-utils package]
[dropped the compiled binary]
Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
FUKAUMI Naoki 0165203304 ar71xx: add support for Buffalo BHR-4GRV2
Signed-off-by: FUKAUMI Naoki <naobsd@gmail.com>
8 years ago
Alexandru Ardelean 00d1e6c75e firmware-utils: fix compilation on MacOS X
Looking into /usr/include/stdlib.h, there's a `devname()` function defined
under some #ifdef's which conflicts with the `static char *devname` definition
in `src/mkwrggimg.c`.

Defining `_ANSI_SOURCE` in the `src/mkwrggimg.c` file, omits that part of the
header.

Another more intrusive approach is to rename `devname` to something like
`g_devname` in `src/mkwrggimg.c`. But I think the `_ANSI_SOURCE` define should
be enough.

Compilation error is:

    src/mkwrggimg.c:64:14: error: redefinition of 'devname' as different kind of symbol
    static char *devname;
                 ^
    /usr/include/stdlib.h:286:7: note: previous definition is here
    char    *devname(dev_t, mode_t);
             ^
    src/mkwrggimg.c:147:12: error: non-object type 'char *(dev_t, mode_t)' (aka 'char *(int, unsigned short)') is not assignable
                            devname = optarg;
                            ~~~~~~~ ^
    src/mkwrggimg.c:192:6: warning: comparison of function 'devname' equal to a null pointer is always false [-Wtautological-pointer-compare]
            if (devname == NULL) {
                ^~~~~~~    ~~~~
    src/mkwrggimg.c:192:6: note: prefix with the address-of operator to silence this warning
            if (devname == NULL) {
                ^
                &
    src/mkwrggimg.c:251:27: warning: incompatible pointer types passing 'char *(dev_t, mode_t)' (aka 'char *(int, unsigned short)') to parameter of type 'const char *' [-Wincompatible-pointer-types]
            strncpy(header->devname, devname, sizeof(header->devname));
                                     ^~~~~~~
    /usr/include/secure/_string.h:119:34: note: expanded from macro 'strncpy'
      __builtin___strncpy_chk (dest, src, len, __darwin_obsz (dest))

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
[Jo-Philipp Wich: slightly reformat commit message]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Stijn Tintel 55eb6ed061 firmware-utils: mkwrggimg: new tool for D-Link DAP-2695
Based on mkwrgimg.c.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: John Crispin <john@phrozen.org>
8 years ago
Henryk Heisig f5aa459043 ar71xx: Add support to TP-Link EAP120
Signed-off-by: Henryk Heisig <hyniu@o2.pl>
8 years ago
Daniel Engberg ee7ef227f0 tools/libressl: Update to 2.5.0 and use mirrors
Updates LibreSSL to 2.5.0 and switches from main site to mirrors as primary source.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
8 years ago
Felix Fietkau b306f8254f tools: add missing dependency for dosfstools
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Álvaro Fernández Rojas 5f0965f8d2 dosfstools: fix autotools dependency
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
8 years ago
Álvaro Fernández Rojas 4bbc6fb7b7 tools: improve and simplify dosfstools
- use default host install and clean.
- backport compatibility patch for OS X and LEDE (avoids having to force iconv
for OS X).
- use default HOST_BUILD_DIR.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
8 years ago
Álvaro Fernández Rojas 87b2b89959 tools: remove old mkdosfs symlink from dosfstools
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
8 years ago
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>
8 years ago
Jo-Philipp Wich 27950ddc0e tools: xz: force building without ccache
Since XZ is required to bootstrap ccache we must not use the ccache compiler
wrapper to avoid circular dependencies.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
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>
8 years ago
Jo-Philipp Wich adb1566009 tools: tar: use .bz2 archive
The "tar" utility is required to bootstrap XZ which is required to handle
.tar.xz archives, therfore revert to using the bz2 archive.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Jo-Philipp Wich e68c0a1325 tools: xz: use .bz2 archive
In order to build XZ itself we cannot assume that XZ support is available,
so fetch the bz2 archive variant of its sources instead.

Also drop the FreeBSD portability patch and apply it at prepare time using
sed, to avoid a dependency on GNU patch which in turn depends on XZ support.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Daniel Engberg 9edfe7dd13 source: Switch to xz for packages and tools where possible
* Change git packages to xz
* Update mirror checksums in packages where they are used
* Change a few source tarballs to xz if available upstream
* Remove unused lines in packages we're touching, requested by jow- and blogic
* We're relying more on xz-utils so add official mirror as primary source, master site as secondary.
* Add SHA256 checksums to multiple git tarball packages

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
8 years ago
Felix Fietkau 720f8eb18e ccache: disable assembler support, it breaks kernel initramfs images
The reason is that ccache does not recognize and process the .incbin
directive, so caching is unreliable.
See https://github.com/ccache/ccache/issues/136 for more information.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Daniel Engberg ea91dda327 tools/patchelf: Update to 0.9 and remove patch
Updates patchelf to 0.9
Patch removed, upstreamed.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
8 years ago
diizzyy 6f1d6fdbaa tools/upx: Update to 3.91 and use new tarball url
Updates UPX to version 3.91 and also updates tarball url

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
8 years ago
diizzyy fdf200c893 tools/ppl: Update to 1.2
Updates ppl to version 1.2

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
8 years ago
diizzyy d88d55e0db tools/mpfr: Update to 3.1.5 and change to xz tarball
Updates mpfr to 3.1.5 and changes tarball format to xz

Signed-off-by: Daniel Engberg daniel.engberg.lists@pyret.net
8 years ago
diizzyy bf567363cd tools/expat: Update to 2.2.0
Updates expat to 2.2.0

Fixes several CVEs:
CVE-2016-0718
CVE-2016-4472
CVE-2016-5300
CVE-2012-6702

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
8 years ago
diizzyy b8b807b1a9 tools/e2fsprogs: Update to 1.43.3
Update e2fsprogs to 1.43.3

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
8 years ago
Daniel Engberg 792e8bc8bb tools/ccache: Update ccache 3.3.2 and refresh patch
Update ccache 3.3.2 and refresh patch

Preserving the original patch comments here by Karl Vogel:

"From 90762a9b8d9a50b6176f10bd6c2e2b9501117561 Mon Sep 17 00:00:00 2001
From: Karl Vogel <karl.vogel@gmail.com>
Date: Tue, 14 Jul 2015 11:05:33 +0200
Subject: [PATCH] Include environment variable GCC_HONOUR_COPTS in hash.

The OpenWRT patch, 910-mbsd_multi.patch, to GCC adds an extra
compilation flag, -fhonour-copts, which is influenced by an
environment variable called GCC_HONOUR_COPTS.

Include this environment var in the hash calculation as otherwise
the gcc stdout warning from a previous compilation might be shown
where, even when GCC_HONOUR_COPTS is in 's'ilent mode.

Signed-off-by: Karl Vogel <karl.vogel@gmail.com>"

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
8 years ago
Jonas Gorski 997fed94e3 ptgen: work around gcc miscompilation
Some gcc versions seem to miscompile code using ternary operators,
work around this by just returning the result if exp is 0.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
8 years ago
Felix Fietkau 64568cac91 tools/firmware-utils: fix portability issue in mkmerakifw-old
Fixes build failure on Mac OS X

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Christian Lamparter 7219c30da4 firmware-utils mkmerakifw-old: firmware generator for Z1
This patch adds firmware generation tool for Cisco's Z1

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years ago
Mathias Kresin 0ac50a661b firmware-utils: mksenaofw: rework option validation
The options firmware_type, vendor_id and product_id are not required
for decoding an image file.

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
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>
8 years ago
Matthias Schiffer a4fc62bc0e
firmware-utils: mktplinkfw: add support for TP-Link's new region codes
TP-Link has changed the way the region is stored in the firmware header,
and now provides US- and EU-specific images for the Archer C7. Adding the
new region codes is necessary to make LEDE/OpenWrt flashable on devices
with the new stock firmwares again.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
8 years ago
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>
8 years ago