This commit ports support for the ALFA Network AP121F, a pocket-size
router with 1 Ethernet and 2.4 GHz WiFi based on the AR9331 SoC, to the
ath79 target (it was already supported in ar71xx; see commit 0c6165d2
for more details).
Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
[pepe2k@gmail.com: fixed GPIO polarity, included USB support, changed
DTS nodes order, moved WLAN LED trigger define to DTS, made U-Boot env
partition writable]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
In GNU patch through 2.7.6, the following of symlinks is mishandled in
certain cases other than input files. This affects inp.c and util.c.
https://nvd.nist.gov/vuln/detail/CVE-2019-13636
Signed-off-by: Russell Senior <russell@personaltelco.net>
New Docker based buildslaves install just bare minimum of packages, thus
not having bsdmainutils package installed which provides `hexdump`
utility, leading to the following build breakage on buildbots:
ubinize-image.sh: 12: /builder/scripts/ubinize-image.sh: hexdump: not found
So this patch simply replaces `hexdump` with `od` utility provided by
coreutils package, which should be likely available.
Co-authored-by: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
This commit selects wpad-basic for the FRITZ!Box 7312 and 7412 as
wpad-mini is only selected on boards with small flash.
Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
[add short description]
Signed-off-by: David Bauer <mail@david-bauer.net>
Fix a typo in the machine type being extracted from /proc/cpuinfo
which causes all Mikrotik board to be undetected properly.
This lead to sysupgrade issues and probably some others too.
Fixes: acf2b6c888 ("ar71xx: base-files: fix board detect on new MikroTik devices")
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Since the switch to Python 3 build fails if CONFIG_USE_MKLIBS is set
("Strip unnecessary functions from libraries" in menuconfig) as
mklibs hasn't been converted to run on Python 3.
* update to most recent upstream version which brings some
reproducibility fixes
* converted to Python 3 using 2to3
* fixed mixed tab/spaces indentation
* fixed use of string.* functions
* some more minor fixes to make Python 3 happy
Fixes commit 19938c8de7 ("build: switch to Python 3")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
- make create_pbl and byte_swap as host tools
- fix a bug that maybe use the cross compiler
to compile create_pbl and byte_swap:
# -a option appends the image for Chassis 3 devices in case of non secure boot
aarch64-openwrt-linux-musl-gcc -Wall -Werror -pedantic -std=c99 -O2
-DVERSION=v1.5(release):reboot-10604-ge9216b3336 -D_GNU_SOURCE -D_XOPEN_SOURCE=700
-c -o create_pbl.o create_pbl.c
cc1: note: someone does not honour COPTS correctly, passed 0 times
LD create_pbl
/usr/bin/ld: create_pbl.o: Relocations in generic ELF (EM: 183)
/usr/bin/ld: create_pbl.o: Relocations in generic ELF (EM: 183)
/usr/bin/ld: create_pbl.o: Relocations in generic ELF (EM: 183)
create_pbl.o: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
Makefile:43: recipe for target create_pbl failed
make[4]: *** [create_pbl] Error 1
plat/nxp/tools/pbl_ch2.mk:45: recipe for target pbl failed
make[3]: *** [pbl] Error 2
- add tfa- prefix to all tools in order to avoid future clashes with
other toolnames
Signed-off-by: Biwen Li <biwen.li@nxp.com>
[added missing HOST_CFLAGS, added tfa- prefix to the tools]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
I'm trying to create a package for libgpiod, which uses
AC_CONFIG_AUX_DIR macro, which is probably leading to the following
configure error:
autoreconf: running: /openwrt.git/staging_dir/host/bin/libtoolize --force
OpenWrt-libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `autostuff'.
OpenWrt-libtoolize: linking file `autostuff/ltmain.sh'
OpenWrt-libtoolize: putting macros in `m4'.
...
configure: error: cannot find install-sh, install.sh, or shtool in autostuff "."/autostuff
>From the build output it's clear, that libtoolize isn't installing
install-sh symlink, because libtoolize would install install-sh only if
it's being run with --install parameter. Corresponding part in
libtoolize:
if $opt_install; then
func_config_update config.guess \
"$pkgdatadir/config" "$auxdir" pkgconfig_header
func_config_update config.sub \
"$pkgdatadir/config" "$auxdir" pkgconfig_header
func_install_update install-sh \
"$pkgdatadir/config" "$auxdir" pkgconfig_header
fi
func_ltmain_update ltmain.sh \
"$pkgdatadir/config" "$auxdir" pkgconfig_header
Adding --install parameter to libtoolize fixes this build issue:
autoreconf: running: /openwrt.git/staging_dir/host/bin/libtoolize --install --force
OpenWrt-libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `autostuff'.
OpenWrt-libtoolize: linking file `autostuff/config.guess'
OpenWrt-libtoolize: linking file `autostuff/config.sub'
OpenWrt-libtoolize: linking file `autostuff/install-sh'
OpenWrt-libtoolize: linking file `autostuff/ltmain.sh'
OpenWrt-libtoolize: putting macros in `m4'.
Cc: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Fixes build issues on a python3 host (issues with the print statement
formatting in the current build).
Includes 100-regdb-write-firmware-file-format-version-code-20.patch and
other fixes.
Closes bugs.openwrt.org/index.php?do=details&task_id=1605.
Uses the tarball as requested.
Signed-off-by: Zachary Riedlshah <git@zacharyrs.me>
When bumping buildroot to Python 3, we need to assure, that Python
symlink in staging bin directory points to Python >= 3.5 as well.
We can't rely completly just on SetupHostCommand as its executed only in
cases when the $(STAGING_DIR_HOST)/bin/python doesn't already exist, so
we need to remove it before running SetupHostCommand.
Acked-by: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
This patch switches Python used in buildroot to Python 3 as Python 2.x
series is going to be EOL relatively soon[1].
"Being the last of the Python 2.x series, 2.7 will have an extended
period of maintenance. Specifically, 2.7 will receive bugfix support
until January 1, 2020. After the last release, 2.7 will receive no
support."
It seems like Python 3 is going to be needed in order to support Meson
build system which has gained some traction recently.
Build tested on following targets:
ath79/generic
imx6/generic
ipq40xx/generic
lantiq/xway
layerscape/armv7 (broken)
layerscape/armv8_32b (broken)
layerscape/armv8_64b (broken)
mvebu/cortexa72
ramips/mt7621
ramips/mt7620
sunxi/cortexa7
x86/64
Layerscape targets are unfortunately left broken as their ls-rcw
firmware package uses Python 2 and converting it to Python 3 would take
more then reasoanble amount of time (I've tried to fix it already) and
would be better fixed by someone who can even run test it.
Run tested on ath79 (Archer C7 v5), ipq40xx (nbg6617) and x86_64 (QEMU
and apu2).
1. https://www.python.org/dev/peps/pep-0373/
Ref: PR#1937
Cc: Yangbo Lu <yangbo.lu@nxp.com>
Cc: Mathew McBride <matt@traverse.com.au>
Acked-by: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Python 2.7 will not be maintained past 2020. Let's convert
to python3 for rcw. Also drop byte swapping since TF-A had
been already used which handled byte swapping instead.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Build tested on ath79 with following packages from packages feed which
build depends on scons. None of them build anymore as it seems, that the
SConscripts are written for Python2.
* packages/net/iotivity (KO, doesn't build even with latest 1.3.1 release)
SyntaxError: invalid syntax
File "/openwrt/build_dir/target-mips_24kc_musl/iotivity-1.2.1/build_common/SConscript", line 40
print "\nError: Current system (%s) isn't supported\n" % host
LookupError: unknown encoding: string_escape:
File "/home/petr/testing/openwrt/build_dir/target-mips_24kc_musl/iotivity-1.3.1/SConstruct", line 28:
SConscript('build_common/SConscript')
* packages/net/smartsnmpd (KO, seems dead, no commit since 2015):
SyntaxError: Missing parentheses in call to 'print'
File "/openwrt/build_dir/target-mips_24kc_musl/smartsnmpd-2014-08-13/SConstruct", line 156
print "Can't find liblua or liblua5.1!"
* packages/utils/gpsd (KO, doesn't build even with latest 3.18.1 release):
AttributeError: 'list' object has no attribute 'keys':
File "/openwrt/build_dir/target-mips_24kc_musl/gpsd-3.18.1/SConstruct", line 1758:
all_manpages = list(base_manpages.keys()) + list(python_manpages.keys())
Signed-off-by: Petr Štetiar <ynezz@true.cz>
The lines-initial-states property was an early attempt to set the latch
bit of the shift register on driver probe. It is not implemented in the
driver and was rejected upstream. The latch bit was always set by a GPIO
hog, so this property is safe to drop.
Signed-off-by: David Bauer <mail@david-bauer.net>
There's an empty case in 02_network introduced by last commit. Drop it.
Fixes: ee650ba46c ("ramips: remove needless setting of lan_mac to eth0 in 02_network")
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
This removes superfluous lines like
lan_mac=$(cat /sys/class/net/eth0/address)
Since lan_mac only sets the MAC address for eth0.1, these lines
can be safely removed as the address will be inherited from eth0
anyway.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
The vast majority of devices labels "factory" partition with lower
case. Convert the small fraction with capital letter to that and
merge another case in 02_network.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This just merges some duplicate definitions and consolidates lines.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Chuanhong Guo <gch981213@gmail.com> [merge duplicated
cases for phicomm k2p]
This cosmetical patch is just meant to make comparing/checking
IMAGE_SIZE values easier.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
There are frequent examples of the ralink_default_fw_size_xxx
variables being used to "roughly" set flash size without caring
about the actual size of the firmware partition.
To discourage this behavior, this patch removes the variables and
just sets IMAGE_SIZE by its numeric value for each target.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Currently, ramips target defines 0x7b0000 as default IMAGE_SIZE
for all devices in ramips target, i.e. this will be set if a
device does not specify IMAGE_SIZE itself.
From 92 devices using that default due to a "missing" IMAGE_SIZE,
14 were incorrect by a small amount (i.e. still "8M" flash) and
12 were completely off ("16M", "4M", ...).
This patch thus removes the _default_ IMAGE_SIZE and defines
IMAGE_SIZE for each device individually. This should indicate to
people supporting new devices that this parameter has to be cared
about.
For the present code, this patch is cosmetical.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This fixes IMAGE_SIZE for all devices based on the partition size
given in DTS:
DEVICE *.MK *.DTS VERDICT
airlink101_ar670w (4M) 0x3c0000 wrong
airlink101_ar725w - 0x3B0000 wrong
asus_rt-n15 (4M) 0x3b0000
belkin_f5d8235-v1 7744k 0x7b0000 wrong
buffalo_wli-tx4-ag300n (4M) 0x3b0000
buffalo_wzr-agl300nh (4M) 0x3b0000
dlink_dap-1522-a1 3801088 0x3a0000
ralink_v11st-fe (4M) 0x003b0000
asus_rt-n56u - 0x007b0000 default
belkin_f9k1109v1 7224k 0x7a0000 wrong
dlink_dir-645 - 0x7b0000 default
edimax_br-6475nd 7744k 0x00790000
loewe_wmdr-143n - 0x7b0000 default
omnima_hpm 16064k 0x00fb0000
samsung_cy-swr1100 - 0x7b0000 default
sitecom_wlr-6000 7244k 0x713000
trendnet_tew-691gr - 0x007b0000 default
trendnet_tew-692gr - 0x007b0000 default
No verdict means that the device is correctly set.
Legend:
( ): Value is set via ralink_default_fw_size_xxM
[ ]: Value is derived from parent definition
- : Value is not set and derived from default definition
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
In ramips, there are the following predefined values for IMAGE_SIZE
ralink_default_fw_size_4M 3866624 3776k 0x3B0000
ralink_default_fw_size_8M 8060928 7872k 0x7B0000
ralink_default_fw_size_16M 16121856 15744k 0xF60000
ralink_default_fw_size_32M 33226752 32448k 0x1FB0000
Out of those, the "16M" value is obviously odd, as it provides more
room for the remaining partitions than the tree others.
Of the devices in all subtargets, there are actually > 50 that have
a firmware partition with 0xFB0000 size, while only 5 (!) have
0xF60000. From the former, many are set to
ralink_default_fw_size_16M anyway, although it is wrong at the
present point.
Consequently, it makes sense to change ralink_default_fw_size_16M
to 0xFB0000, and to update IMAGE_SIZE for the 5 devices with
0xF60000.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
allnet_all0256n-4m, tenda_w150m and unbranded_wr512-3gn-4m have
their firmware partition set to reg = <0x50000 0x3c8000>.
However, based on the 4MB flash, the size should be 0x3b0000.
After some research in the target's history, it looks like the
changed size has been a mistake when transferring device
partitions from Makefile to DTS in 770b28f146.
This patch changes the named three devices back to 0x3b0000.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Like most mt7621 boards, Phicomm K2P stores LAN/WAN mac addresses
at 0xe000/0xe006 of factory partition.
Phicomm uses lan_mac-1 as wan_mac, while our default case in 02_network
uses lan_mac+1.
Add a special case reading lan/wan mac address for Phicomm K2P.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Backport upstream patches pre 2.81rc for testing purposes.
Let's see what falls out!
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Now that the mt76 driver supports the MT7615D chip found on these
devices, use it.
Also add the wpad-basic package.
Note: the driver supports operation on both the 2.4 GHz and the
5 GHz bands, but not yet concurrently.
Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
savedscp is a method of storing the DSCP of an ip packet into conntrack
mark. In combination with a suitable tc filter action (conndscp but may
end up being integrated into connmark) DSCP values are able to be stored
on egress and restored on ingress across links that otherwise alter or
bleach DSCP.
This is useful for qdiscs such as CAKE which are able to shape according
to policies based on DSCP.
Ingress classification is traditionally a challenging task since
iptables rules haven't yet run and tc filter/eBPF programs are pre-NAT
lookups, hence are unable to see internal IPv4 addresses as used on the
typical home masquerading gateway.
The ingress problem is solved by the tc filter, but the tc people didn't
like the idea of tc setting conntrack mark values, though they are ok
with reading conntrack values and hence restoring DSCP from conntrack
marks.
x_tables CONNMARK with the new savedscp action solves the problem of
storing the DSCP to the conntrack mark.
It accepts 2 parameters. The mark is a 32bit value with usually one 1
bit set. This bit is set when savedscp saves the DSCP to the mark.
This is useful to implement a 'one shot'
iptables based classification where the 'complicated' iptables rules are
only run once to classify the connection on initial (egress) packet and
subsequent packets are all marked/restored with the same DSCP. A mark
of zero disables the setting of a status bit/s.
The mask is a 32bit value of at least 6 contiguous bits and represents
the area where the DSCP will be stored.
e.g.
iptables -A QOS_MARK_eth0 -t mangle -j CONNMARK --savedscp-mark 0xfc000000/0x01000000
Would store the DSCP in the top 6 bits of the 32bit mark field, and use
the LSB of the top byte as the 'DSCP has been stored' marker.
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>