Commit Graph

3021 Commits

Author SHA1 Message Date
Daniel Golle ebcb4f1d0a
treewide: fix spelling 'seperate' -> 'separate'
This popular spelling mistake was also introduced by myself lately.
Fix it everywhere.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-02-28 23:59:21 +00:00
Felix Fietkau f439e29130 build: use config.site generated by autoconf-lean, drop hardcoded sitefiles
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-28 00:09:09 +00:00
David Bauer dc5328e7e9 include: use cpio from staging dir
As we built our own CPIO now, use this version instead of whatever the
host may or may not provide.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-02-28 00:09:09 +00:00
John Audia a1735fe73c kernel: bump 5.4 to 5.4.101
Ran update_kernel.sh in a fresh clone without any existing toolchains.

Build system: x86_64
Build-tested: ipq806x/R7800
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional.

Signed-off-by: John Audia <graysky@archlinux.us>
2021-02-27 16:51:52 +01:00
David Bauer 9a9cf40dd9 download: add mirror alias for Debian
Add an alias for Debian packages and download them from the Debian
mirror redirector.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-02-26 20:41:00 +01:00
Adrian Schmutzler ef2cb8572b treewide: rename IMAGE_PREFIX/IMAGE_NAME to DEVICE_IMG_*
We so far had two variables IMG_PREFIX and IMAGE_PREFIX with
different content. Since these names are obviously quite
confusing, this patch renames the latter to DEVICE_IMG_PREFIX,
as it's a device-dependent variable, while IMG_PREFIX is only
(sub)target-dependent.

For consistency, also rename IMAGE_NAME to DEVICE_IMG_NAME, as
that's a device-dependent variable as well.

Cc: Paul Spooren <mail@aparcar.org>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-25 18:11:06 +01:00
Daniel Golle f074541f31 image: remove bogus mkimage command
That was a left-over from testing and should not have made it into the
tree. Remove it.

Fixes: 330bd380e8 ("image: allow building FIT and uImage with ramdisk")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-02-25 14:07:20 +00:00
John Audia 4b92663f7a kernel: bump 5.4 to 5.4.100
Ran update_kernel.sh in a fresh clone without any existing toolchains.

Build system: x86_64
Build-tested: ipq806x/R7800
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
[refresh again]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-25 13:08:09 +01:00
David Bauer 512229ce49 build: avoid generating JSON info on missing image
Previously, build would fail for targets containing devices with not
initramfs image (such as mpc85xx-p1010). Only generate the JSON image
info for the initramfs image when we have one to avoid breaking the
builds.

Fixes commit d3140d0529 ("build/json: generate json file for initramfs")

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-02-24 22:28:45 +01:00
Kabuli Chana dc8cc44612 kernel: bump version 5.10 to 5.10.18
update kernel version, refresh current patchset

Signed-off-by: Kabuli Chana <newtownBuild@gmail.com>
[rebase/refresh]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-24 18:45:59 +01:00
Daniel Golle 330bd380e8 image: allow building FIT and uImage with ramdisk
Instead of embedding the initrd cpio archive into the kernel, allow
for having an external ramdisk added to the FIT or uImage.
This is useful to overcome kernel size limitations present in many
stock bootloaders, as the ramdisk is then loaded seperately and doesn't
add to the kernel size. Hence we can have larger ramdisks to host ie.
installers with all binaries to flash included (or a web-based
firmware selector).
In terms of performance and total size the differences are neglectible.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-02-24 01:35:20 +00:00
Daniel Golle e6aac8d98f image: add support for building FIT image with filesystem
Allow for single (external-data) FIT image to hold kernel, dtb and
squashfs. In that way, the bootloader verifies the system integrity
including the rootfs, because what's the point of checking that the
hash of the kernel is correct if it won't boot in case of squashfs
being corrupted? Better allow bootloader to check everything needed
to make it at least up to failsafe mode. As a positive side effect
this change also makes the sysupgrade process on nand potentially
much easier as it is now.
In short: mkimage has a parameter '-E' which allows generating FIT
images with 'external' data rather than embedding the data into the
device-tree blob itself. In this way, the FIT structure itself remains
small and can be parsed easily (rather than having to page around
megabytes of image content). This patch makes use of that and adds
support for adding sub-images of type 'filesystem' which are used to
store the squashfs. Now U-Boot can verify the whole OS and the new
partition parsers added in the Linux kernel can detect the filesystem
sub-images, create partitions for them, and select the active rootfs
volume based on the configuration in FIT (passing configuration via
device tree could be implemented easily at a later stage).

This new FIT partition parser works for NOR flash (on top of mtdblock),
NAND flash (on top of ubiblock) as well as classic block devices
(ie. eMMC, SDcard, SATA, NVME, ...).
It could even be used to mount such FIT images via `losetup -P` on a
user PC if this patch gets included in Linux upstream one day ;)

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-02-24 01:35:20 +00:00
Rosen Penev 90b1524f75 autotools.mk: fix gettext fixup
The update to gettext 0.21 broke packages that use autotools and
gettext because the sed line was failing with the new version. Fix with
a better sed expression.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-02-23 21:10:56 +01:00
Álvaro Fernández Rojas 1235ea7c20 image: add ModelNameLimit16
This script returns the model name limited to 16 characters.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2021-02-22 18:29:40 +01:00
Moritz Warning d3140d0529 build/json: generate json file for initramfs
The initramfs images are missing from the profiles.json files.

Signed-off-by: Moritz Warning <moritzwarning@web.de>
[fix code by exporting device variables]
Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-02-21 09:56:05 -10:00
Michael Pratt 8d8125a43b toplevel.mk: remove legacy packages feed from 'make distclean'
package/openwrt-packages is left over
from what is now a legacy repository
and has no other reference in the build tree

Signed-off-by: Michael Pratt <mcpratt@pm.me>
2021-02-20 13:11:10 -10:00
Daniel Golle e3b8849088
mediatek: more clean solution for out-of-tree DTS
Use approach suggested by Adrian Schmutzler instead of introducing
another device variable.
Also revert the unnecessary white-space changes accidentally introduced
by the previous commit.

Fixed: c067b1e79b ("mediatek: move out-of-tree DTS files to dedicated dts folder")
Suggested-by: Adrian Schmutzler <mail@adrianschmutzler.de>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-02-19 01:25:49 +00:00
Daniel Golle c067b1e79b
mediatek: move out-of-tree DTS files to dedicated dts folder
Use dedicated dts folder like on ramips to store device tree source
files for boards not already supported in vanilla Linux.
Doing so instead of having them in files-* has several advantages:
 * we don't need to duplicate them for several kernel versions
 * changes to a device tree don't trigger a complete kernel rebuild
 * the files are more obvious to find

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-02-19 00:05:53 +00:00
John Audia 5d3a6fd970 kernel: bump 5.4 to 5.4.99
Ran update_kernel.sh in a fresh clone without any existing toolchains.
No manual changes needed.

Build system: x86_64
Build-tested: bcm27xx/bcm2711

Signed-off-by: John Audia <graysky@archlinux.us>
2021-02-18 20:04:50 +01:00
Felix Fietkau 0db9d11865 build: fix ABI version for PROVIDES symbols
GetABISuffix does not work for intra-package ABI version of provided symbols,
since ABIV_$(provided) is not set.
Fix ABI version by using $(ABIV_$(1)) directly

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-18 19:57:57 +01:00
Daniel Golle 5bb9954826 kernel: update kernel 5.10 to 5.10.16
Compile and runtime-tested on mediatek/mt7622

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-02-17 13:48:43 +00:00
Felix Fietkau 5ea33837f8 build: fix build with CONFIG_STRIP_KERNEL_EXPORTS
Only use symtab.h on the final kernel link

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-17 13:49:43 +01:00
Felix Fietkau b10d604459 kernel: add linux 5.10 support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-16 20:06:51 +01:00
Felix Fietkau 299b855418 build: make zstd initramfs selectable
fix typo in kernel initramfs zstd compression option

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-16 20:02:09 +01:00
Felix Fietkau 5ed1e5140a build: build kernel image before building modules/packages
This is needed for linux 5.10, where modules.builtin is generated from
vmlinux.o

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-16 20:00:41 +01:00
R. Diez a015d91708 build: IS_TTY is now set according to GNU Make's MAKE_TERMOUT
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
Fixes: FS#2086
The logic for IS_TTY was broken, because it was testing stdin
instead of stdout.
MAKE_TERMOUT was introduced in GNU Make version 4.1 (05 Oct 2014),
so it should be available everywhere nowadays.

Signed-off-by: R. Diez <rdiezmail-openwrt@yahoo.com>
2021-02-15 16:36:13 -10:00
Paul Spooren 6dba010157 build/prereq: require make 4.1 or later
FS#2086 "IS_TTY in the makefile is broken" reports flawed detection of
stdout piping to a file. The issue describes how e.g. terminal color
codes and up in log files if running make like `make > log.txt`.

The proposed solution uses the make variable "MAKE_TERMOUT", which was
introduced in make 4.1. All major distributions seem to updated to 4.1
or later, so this ideally dosen't break anything.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-02-15 16:35:49 -10:00
Felix Fietkau 7d6a636918 build: fix getting ABI version for binary packages from the same source package
We can't rely on the .version file being created yet, so use package variables
to get it

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-15 23:11:44 +01:00
Felix Fietkau c68d527991 build: filter out own packages on package version check
This was accidentally dropped in 27a4a71c24
("metadata: handle ABI version rebuild tracking for transient dependencies")

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-15 21:10:48 +01:00
Felix Fietkau 542eab31a6 build: only overwrite ABI version for provided packages when base version changed
Should avoid some spurious rebuilds

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-15 18:56:50 +01:00
Felix Fietkau 075fa4cd9a Mostly revert "build: add support for fixing up library soname"
This reverts commit b12288fa69.
The patchelf approach is too fragile, and the only users of this have been
converted to make patching unnecessary
Leave the abi_version_str variable in place in rules.mk

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-15 18:47:21 +01:00
Felix Fietkau f696cd3df3 build: add support for patching libtool to include ABI version in soname
Use the version from PKG_ABI_VERSION

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-15 18:47:19 +01:00
Felix Fietkau c921650382 build: drop ABI version from metadata
Preparation for supporting dynamic ABI versions that depend on the runtime
configuration. Read the suffix from the staging dir pkginfo version files.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-14 19:41:52 +01:00
Felix Fietkau b12288fa69 build: add support for fixing up library soname
This makes it possible to declare a package ABI_VERSION independent from the
upstream soname by setting PKG_ABI_VERSION in the package makefile.
The library filename is fixed up for files installed to packages and to the
staging dir. References to the original from executables within the same
package are also fixed up

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-14 19:41:51 +01:00
Felix Fietkau 8597da20ac build: fix ABI version rebuild dependency
A stray comma was being appended to the last package version dependency,
causing it to be missed for ABI version checks

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-14 19:41:51 +01:00
John Audia 1bc7783c67 kernel: bump 5.4 to 5.4.98
Ran update_kernel.sh in a fresh clone without any existing toolchains.
No manual changes needed.

Build system:       x86_64
Build-tested:       bcm27xx/bcm2711, ipq806x/R7800
Run-tested:         ipq806x/R7800
Compile-tested [*]: ath79/{generic,tiny}, ipq40xx, octeon, realtek,
                    ramips/{mt7620,mt7621}, x86/64
Run-tested [*]:     ath79/{generic,tiny}: WNDR3700v2 / TL-WR841N v7
                    octeon: EdgeRouter Lite
                    ramips/{mt7620,mt7621}: Archer C2 v1 / DIR-878 A1,
                                      EAP235-Wall, R6800, RT-AC57U v1

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
Tested-by: Stijn Segers <foss@volatilesystems.org> [*]
2021-02-14 19:21:38 +01:00
Daniel Golle b280e8f9f8 trusted-firmware-a: fix project name spelling
The version string generated for ARM Trusted-Firmware-A was stated as
"OpenWRT". Fix that by changing it to the exact spelling "OpenWrt"

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-02-13 20:11:57 +00:00
John Audia e95b1b23f1 kernel: bump 5.4 to 5.4.97
Ran update_kernel.sh in a fresh clone without any existing toolchains.

Manually rebased:
 bcm27xx
  950-0267-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch
 bcm53xx
  180-usb-xhci-add-support-for-performing-fake-doorbell.patch
 layerscape
  302-dts-0008-arm64-dts-ls1046a-accumulated-change-to-ls1046a-boar.patch
  820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch
  820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch

Build system: x86_64
Build-tested: bcm27xx/bcm2711, ipq806x/R7800
Run-tested: ipq806x/R7800

No dmesg regressions/everything functional.

Signed-off-by: John Audia <graysky@archlinux.us>
[remove quilt comment, fix/adjust 820-usb-* layerscape patches]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-11 16:08:28 +01:00
John Audia f3b827a965 kernel: bump 5.4 to 5.4.96
Ran update_kernel.sh in a fresh clone without any existing toolchains.

Build system: x86_64
Build-tested: ipq806x/R7800, bcm27xx/bcm2711
Run-tested: ipq806x/R7800
Run-tested [*]: ramips/mt7621 (R6800, DIR-878 A1, EAP235-Wall)

Signed-off-by: John Audia <graysky@archlinux.us>
Tested-by: Stijn Segers <foss@volatilesystems.org> [*]
2021-02-08 16:34:18 +01:00
Paul Spooren 8286f3a3d3 treewide: unify OpenWrt hosted source via @OPENWRT
Multiple sources are hosted on OpenWrts source server only. The source
URLs to point to the server vary based on different epochs in OpenWrts
history.

Replace all by @OPENWRT which is an "empty" mirror, therefore using the
fallback servers sources.cdn.openwrt.org and sources.openwrt.org.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-02-05 12:00:24 -10:00
Yanase Yuki d468ff97b7 build: move elx-header into image-commands.mk
ELECOM WAB-I1750-PS will need this in ath79, so move it to common
Makefile.

Signed-off-by: Yanase Yuki <dev@zpc.sakura.ne.jp>
2021-02-05 21:57:19 +01:00
Paul Spooren a17b8eaa2e build: use SPDX license tags
The license folder is a core part of OpenWrt and all GPL-2.0 licensed.
Use SPDX license tags to allow machines to check licenses.

Signed-off-by: Paul Spooren <mail@aparcar.org>
[rebase, keep some Copyright lines, sharpen commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-05 14:54:47 +01:00
John Audia 36c9cf3e51 kernel: bump 5.4 to 5.4.95
Ran update_kernel.sh in a fresh clone without any existing toolchains.

Removed upstreamed patches:
 imx6: 303-ARM-dts-imx6qdl-gw52xx-fix-duplicate-regulator-namin.patch

Build system: x86_64
Build-tested: ipq806x/R7800, bcm27xx/bcm2711
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
2021-02-04 22:07:32 +01:00
Daniel Golle 104d60fe94 trusted-firmware-a.mk: add PKG_CPE_ID
Vulnerabilities of Trusted Firmware A are tracked as
cpe:/a:arm:arm_trusted_firmware

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-02-04 01:05:12 +00:00
John Audia d33cd383ed kernel: bump 5.4 to 5.4.94
All modification made by update_kernel.sh in a fresh clone without
existing toolchains.

Build-tested: bcm27xx/bcm2711, ipq806x/R7800,
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
2021-02-01 19:10:43 +01:00
Andre Heider 4c6c1c6dd0 trusted-firmware-a.mk: pass package version as version identifier
Upon boot it now prints:
NOTICE:  BL1: v2.4(release):OpenWRT v2.4-1 (espressobin-v3-v5-1gb-2cs) (Marvell-devel-18.12.0)

Signed-off-by: Andre Heider <a.heider@gmail.com>
2021-01-30 14:46:32 +01:00
INAGAKI Hiroshi eb11cd9ea3 ramips: add support for ELECOM WRC-2533GHBK-I
ELECOM WRC-2533GHBK-I is a 2.4/5 GHz band 11ac (Wi-Fi 5) router, based
on MT7621A.

Specification:

- SoC		: MediaTek MT7621A
- RAM		: DDR3 128 MiB
- Flash		: SPI-NOR 16 MiB
- WLAN		: 2.4/5 GHz 4T4R (2x MediaTek MT7615)
- Ethernet	: 10/100/1000 Mbps x5
  - Switch	: MediaTek MT7530 (SoC)
- LED/keys	: 4x/3x (2x buttons, 1x slide-switch)
- UART		: through-hole on PCB
  - J4: 3.3V, RX, GND, TX from SoC side
  - 57600n8
- Power		: 12VDC, 1.5A

Flash instruction using factory image:

1. Boot WRC-2533GHBK-I normally
2. Access to "http://192.168.2.1/" and open firmware update page
   ("ファームウェア更新")
3. Select the OpenWrt factory image and click apply ("適用") button
4. Wait ~150 seconds to complete flashing

MAC addresses:

LAN	: BC:5C:4C:xx:xx:89 (Config, ethaddr (text))
WAN	: BC:5C:4C:xx:xx:88 (Config, wanaddr (text))
2.4GHz	: BC:5C:4C:xx:xx:8A (Factory, 0x4    (hex))
5GHz	: BC:5C:4C:xx:xx:8B (Factory, 0x8004 (hex))

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Reviewed-by: Sungbo Eo <mans0n@gorani.run>
2021-01-29 15:32:07 +01:00
INAGAKI Hiroshi 0071c7cd82 build: add elecom-product-header for ELECOM devices
A header used in ELECOM WRC-300GHBK2-I and WRC-1750GHBK2-I/C is also
used in ELECOM WRC-2533GHBK-I, so split the code to generate the header
and move it to image-commands.mk to use from ramips target.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Reviewed-by: Sungbo Eo <mans0n@gorani.run>
2021-01-29 15:28:12 +01:00
Adrian Schmutzler 396a35dd51 base-files: remove execute bit and shebang from functions.sh
/lib/functions.sh was executable for no obvious reason and its
execute property was even checked in package-ipkg.mk just to
source it afterwards.

Remove the execute bit and shebang as this is clearly a library.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Philip Prindeville <philipp@redfish-solutions.com>
2021-01-29 14:30:32 +01:00
John Audia 2c35899d81 kernel: bump 5.4 to 5.4.93
All modification made by update_kernel.sh in a fresh clone without
existing toolchains.

Build system:       x86_64
Build-tested:       ipq806x/R7800, bcm27xx/bcm2711
Run-tested:         ipq806x/R7800
Compile-tested [*]: ath79/{tiny,generic}, ipq40xx, octeon,
                    ramips/mt7621, realtek, x86/64
Run-tested [*]:     ath79/generic, ipq40xx, octeon, ramips/mt7621

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
Tested-by: Stijn Segers <foss@volatilesystems.org> [*]
2021-01-29 14:22:09 +01:00