The sum variable need to be initialised, otherwise it will points to
random stack memory and a bogus image checksum might be calculated.
While at it, fix the segfault in case the product region code isn't
specified and enable compiler warnings which had revealed all the code
issues.
Signed-off-by: Mathias Kresin <dev@kresin.me>
Build broke as distributions now include Perl 5.26 and automake
triggered an "Unescaped left brace in regex" error.
Import upstream commit 13f00eb449 to fix that.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
samba.org has started to enforce https and
currently plain http downloads with curl/wget fail,
so convert samba.org download links to use https.
Modernise links at the same time.
Also convert samba.org URL fields to have https.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
The final semantic is the same, but this is a bit more correct.
Build tested on Windows 10 (yes, there is some
Ubuntu mode for Windows 10, and I've been also building LEDE
on it for a few weeks).
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Qemu's local AES code defines symbols that conflict with
LibreSSL/OpenSSL's libcrypto. Rename them to avoid build problems.
See upstream commit c8d70e59738e672021926c7747af8ef9dea15c82.
Fixes FS#444.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Admittedly, this is my own OCD wanting to get rid of this.
Because I tried (a while back to upgrade QEMU to a newer version),
and (during that attempt) I tried to get rid of this.
Tested on Linux & Mac.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>