Commit Graph

50223 Commits

Author SHA1 Message Date
Stijn Segers 0542cb6a2b realtek: introduce shared DTSI for GS1900 series
The ZyXEL GS1900-8HP v1, v2 and GS1900-10HP are all built on a similar
Realtek RTL8380M platform. Create a common DTSI in preparation for
GS1900-8HP support, and switch to the macros defined in rtl838x.dtsi.

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
[drop redundant includes, use &mdio directly, do not replace SFP
ports]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-08 20:39:02 +01:00
Pawel Dembicki 9919a1e7ea kernel: add hid-cp2112 driver support
This patch adds kernel module for Silicon Labs CP2112 HID USB to SMBus
Master Bridge. This is a HID device driver which registers as an i2c
adapter and gpiochip to expose these functions of the CP2112.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2021-01-07 22:30:34 -10:00
Leon M. George 211fed5f49 ramips: remove trailing whitespace in Makefiles
Remove trailing whitespaces in two *.mk files.

Signed-off-by: Leon M. George <leon@georgemail.eu>
[fix title, add message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-07 19:51:50 +01:00
Stijn Segers e1f5ffa48c realtek: ZyXEL: spell as done by manufacturer
ZyXEL spells its own name all uppercase with just the Y lowercase. Adapt
the realtek target to follow this (other OpenWrt targets already do so).

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
2021-01-07 19:51:50 +01:00
Stijn Segers 5bdf50d13b realtek: move memory node to device DTS
Move the memory out of the rtl838x.dtsi and into the device family DTSI
or device DTS if applicable. This aligns with upstream practice.

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
[add missing block for dgs-1210-10p, move block below chosen node]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-07 19:51:50 +01:00
Adrian Schmutzler 5f958cb21f realtek: remove duplicate '/dts-v1/;' identifier
The identifier is already present in rtl838x.dtsi, and adding it
twice is not only redundant but actually wrong.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-07 19:51:50 +01:00
Stijn Segers ac16e6b2ea realtek: set PoE power budget for ZyXEL GS1900-10HP
As per the manufacturer's specifications, set the GS1900-10HP PoE power
budget to 77W.

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
2021-01-07 19:51:50 +01:00
Adrian Schmutzler 81655e1450 base-files: read all 3 bytes in get_magic_vfat() at once
While the speed improvement might be negligible, there is still no
reason to read individual bytes.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-07 19:51:50 +01:00
Michael Pratt 51360a913b ath79: make Engenius fakeroot partitions read-only
For:

 - ENH202 v1
 - ENS202EXT v1

These boards were committed before it was discovered
that for all Engenius boards with a "failsafe" image,
forcing the failsafe image to load next boot
can be achieved by editing the u-boot environment like:

  `fw_setenv rootfs_checksum 0`

So it's not necessary to delete a partition to boot to failsafe image.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
2021-01-07 19:51:50 +01:00
Michael Pratt 0070650df4 ath79: move small-flash Engenius boards to tiny
This moves some of the Engenius boards from generic to tiny:

 - EAP350 v1
 - ECB350 v1
 - ENH202 v1

For these, factory.bin builds are already failing on master
branch because of the unique situation for these boards:

 - 8 MB flash
 - an extra "failsafe" image for recovery
 - TFTP does not work (barely possible with 600 MTU)
 - bootloader loads image from a longer flash offset
 - 1 eraseblock each needed for OKLI kernel loader and fake rootfs
 - using mtd-concat to make use of remaining space...

The manual alternative would be removing the failsafe partition.
However this comes with the risk of extremely difficult recovery
if a flash ever fails because TFTP on the bootloader is bugged.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
[improve commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-07 19:51:50 +01:00
Koen Vandeputte ecded5bf09 imx6: disable unrequired pcie host driver
imx6 has it's own pcie host driver so we do
not need the one from DW.

This fixes following boot error:

[    0.156913] dw-pcie 1ffc000.pcie: IRQ index 1 not found

Fixes: 6d5291ff72 ("imx6: add support for kernel 5.4")
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2021-01-07 12:08:31 +01:00
Koen Vandeputte 87bd940536 imx6: refresh kernel config
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2021-01-07 12:08:31 +01:00
Koen Vandeputte 7b3dd33c20 imx6: gw52xx: fix duplicate regulator naming
2 regulator descriptions carry identical naming.

This leads to following boot warning:
[    0.173138] debugfs: Directory 'vdd1p8' with parent 'regulator' already present!

Fix this by renaming the one used for audio.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2021-01-07 12:08:31 +01:00
Sven Wegener 936220186d tools/cmake: always use non-ccache CC and CXX variables
cmake is a dependency of ccache, which means it is build before ccache
is available and hence must be build with non-ccache CC and CXX. It
currently works, because the cmake build system splits the compiler
variable and treats them as multiple compilers to check.

For "ccache gcc" it first tests for "ccache", which always fails,
because ccache is not a compiler by itself, even if it is available, and
then ends up calling "gcc" alone, effectively never using ccache.

Let's make this explicit by forcing the use of non-ccache CC and CXX.

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
2021-01-06 21:44:56 -10:00
Rosen Penev 980dca6b7f lua: add -ldl for glibc builds
For glibc, lua needs an explicit link to libdl as glibc has it separate

Fixes the following error in at least collectd:

ld: usr/lib/liblua.so: undefined reference to `dlopen'
ld: usr/lib/liblua.so: undefined reference to `dlclose'
ld: usr/lib/liblua.so: undefined reference to `dlerror'
ld: usr/lib/liblua.so: undefined reference to `dlsym'

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-01-06 15:38:57 -10:00
Sven Wegener cd5f66652b build: use ccache -C for cleaning the cache
This keeps the configuration, like the size of the cache, and the
statistics intact. Move the removal of the cache directory to the
distclean target, but only delete the .ccache directory inside of our
build tree, as we should not mess with a user-configured external ccache
directory this destructively.

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
2021-01-06 15:31:18 -10:00
Daniel Golle e02a41f67d rpcd: update to git HEAD
fd017ba iwinfo: add ht and vht operation info to wifi scan
 4c66b31 iwinfo: export center channel for info ubus call
 e28d4a5 iwinfo: add support for 802.11ad and GCMP
 5c15f57 iwinfo: return hwmode 'ad' on 802.11ad-only hardware
 ea7f471 iwinfo: include ht_operation data only if available

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-01-07 00:21:23 +00:00
Jo-Philipp Wich 6e4ce14047 iwinfo: improve ABI version handling and bump to git HEAD
- Encode ABI version in compiled shared object file
 - Only ship versioned shared library

 a17f561 iwinfo: detect QCA IPQ4019 WiSoC from FDT
 ea28dfb iwinfo: export ht and vht operation in scan results
 4e22953 iwinfo: export center_chan info for local wifi
 74d13fb cli: account for additional digit for frequencies above 10GHz
 8bfd8d8 iwinfo: add support for GCMP cipher
 618c1e8 iwinfo: add hardware description for QCA MIPS WiSoCs
 0702f32 iwinfo: improve center channel handling
 51c1336 iwinfo: set center chan unsupported for not-nl80211 driver
 23d2722 build: add ability to specify shared object version

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-01-07 00:21:23 +00:00
Paul Spooren a323a653f0 scripts/feed: no warn on toolchain/linux overwrite
The recent 7f285d "scripts/feeds: warn when skipping core package
override" floods SDK output with warning of overwriting "linux" and
"toolchain" core packages. This should be ignored as these are not
regular packages added via feeds.

While at it slightly improve the warning string.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-01-06 14:04:34 -10:00
Adrian Schmutzler 849d4b3940 ipq806x: add space before SPDX identifier (again)
Strictly, an SPDX identifier requires a space between the comment
marker and the identifier itself. This has been addressed in
b69c21738e ("treewide: add space before SPDX identifier"), but
some new malformatted identifiers were merged recently.

This could have been prevented by using checkpatch.pl earlier.

Fixes: 1a775a4fd0 ("ipq806x: add support for TP-Link Talon AD7200")
Fixes: 8ddaeaf642 ("ipq806x: create DTSI for TP-Link AD7200 and C2600")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-06 23:53:25 +01:00
Adrian Schmutzler b039f76f35 ipq806x: improve model name and revision for TP-Link AD7200
The TP-Link AD7200 appears with and without the "Talon" model name
prefix. Let's use both variants for 'make menuconfig' so everybody
can locate the device.

Concerning the revision, the TP-Link page lists v1 and v2 with the
device currently marked as "End of Life". However, the v2 and latest
v1 firmware are byte-identical. Thus, we only need one image for
this device and do not need to include the revision in the image name.

While at it, remove the useless BOARD_NAME variable which only makes
sense in combination with upgrade from legacy stable versions or when
custom upgrade scripts are involved.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-06 14:43:12 +01:00
Adrian Schmutzler 8ddaeaf642 ipq806x: create DTSI for TP-Link AD7200 and C2600
Both devices share most of their setup except buttons and LEDs,
so having a common DTSI removes a lot of duplicate code.

In order to have a shared partitioning scheme, device-id and
product-info from AD7200 have been merged into a single
product-info partition like for C2600.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-06 14:43:12 +01:00
Adrian Schmutzler 8050b70514 ipq806x: clean up DTS file for TP-Link AD7200
This does several cosmetic adjustments for AD7200's DTS:

 - Make node name, DT label and label property consistent
 - Drop wrong and unused spi4 label
 - Use generic flash@0 node name

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-06 14:43:12 +01:00
Jo-Philipp Wich c63bcb53e9 Revert "iwinfo: update to git HEAD"
This reverts commit f1620630e9.

This update introduces potentially remote exploitable buffer overreads
in IE parsing logic.

It also breaks the ABI without introdcing SOVERSION library versioning.

Furthermore, HT information is incorrectly added for non-HT BSSes.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-01-06 13:46:12 +01:00
Jo-Philipp Wich 79fe06a7dc Revert "rpcd: update to git HEAD"
This reverts commit 190e793963.

This update introduces a potential null-pointer deref with subsequent rpcd
crash when querying wireless info for non-nl80211 wdevs.

Additionally it wrongly includes ht frequency information for non-ht BSSes.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-01-06 13:45:30 +01:00
David Bauer b4c0d377f6 ramips: limit 5GHz channels for UniFi 6 Lite
The MT7915 radio currently advertises 2.4GHz channels while the antenna
path only supports 5 GHz. Limit the radio to 5GHz channels to prevent
users from configuring non-supported channels.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-01-06 00:00:01 +01:00
Daniel Golle 190e793963 rpcd: update to git HEAD
fd017ba iwinfo: add ht and vht operation info to wifi scan
 4c66b31 iwinfo: export center channel for info ubus call
 e28d4a5 iwinfo: add support for 802.11ad and GCMP
 5c15f57 iwinfo: return hwmode 'ad' on 802.11ad-only hardware

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-01-05 22:57:20 +00:00
Daniel Golle f1620630e9 iwinfo: update to git HEAD
a17f561 iwinfo: detect QCA IPQ4019 WiSoC from FDT
 ea28dfb iwinfo: export ht and vht operation in scan results
 4e22953 iwinfo: export center_chan info for local wifi
 74d13fb cli: account for additional digit for frequencies above 10GHz
 8bfd8d8 iwinfo: add support for GCMP cipher

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-01-05 22:57:20 +00:00
Birger Koblitz 89f71ebb35 realtek: fix build issues
This fixes the build problems for the REALTEK target by adding a proper
configuration option for the phy module.

Signed-off-by: Birger Koblitz <mail@birger-koblitz.de>
2021-01-05 22:43:40 +01:00
Syrone Wong f34f4a6665 tools/fakeroot: update to 1.25.3
use PKG_FIXUP:=autoreconf to generate configure
200-hide-dlsym-error.patch deleted due to fixed upstream in another way
other patches refreshed to reflect latest changes

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2021-01-05 08:59:31 -10:00
Daniel Golle f4c64937cf ipq806x: fix LED names of TP-Link Talon AD2700
While the underscore in the name of the USB LEDs was removed from DTS,
/etc/board.d/01_leds also has to reflect that change.

Fixes: 28fd279e5d ("ipq806x: some corrections for TP-Link Talon AD7200")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-01-05 16:26:44 +00:00
David Bauer fb4d7a9680 ramips: add support for Ubiquiti UniFi 6 Lite
Hardware
--------
MediaTek MT7621AT
256M DDR3
32M SPI-NOR
MediaTek MT7603 2T2R 802.11n 2.4GHz
MediaTek MT7915 2T2R 802.11ax 5GHz

Not Working
-----------
 - Bluetooth (connected to UART3)

UART
----

UART is located in the lower left corner of the board. Pinout is

0 - 3V3 (don't connect)
1 - RX
2 - TX
3 - GND

Console is 115200 8N1.

Boot
----

1. Connect to the serial console and connect power.

2. Double-press ESC when prompted

3. Set the fdt address

   $ fdt addr $(fdtcontroladdr)

4. Remove the signature node from the control FDT

   $ fdt rm /signature

5. Transfer and boot the OpenWrt initramfs image to the device.
   Make sure to name the file C0A80114.img and have it reachable at
   192.168.1.1/24

   $ tftpboot; bootm

Installation
------------

1. Connect to the booted device at 192.168.1.20 using username/password
   "ubnt".

2. Update the bootloader environment.

   $ fw_setenv devmode TRUE
   $ fw_setenv boot_openwrt "fdt addr \$(fdtcontroladdr);
     fdt rm /signature; bootubnt"
   $ fw_setenv bootcmd "run boot_openwrt"

3. Transfer the OpenWrt sysupgrade image to the device using SCP.

4. Check the mtd partition number for bs / kernel0 / kernel1

   $ cat /proc/mtd

5. Set the bootselect flag to boot from kernel0

   $ dd if=/dev/zero bs=1 count=1 of=/dev/mtdblock4

6. Write the OpenWrt sysupgrade image to both kernel0 as well as kernel1

   $ dd if=openwrt.bin of=/dev/mtdblock6
   $ dd if=openwrt.bin of=/dev/mtdblock7

7. Reboot the device. It should boot into OpenWrt.

Below are the original installation instructions prior to the discovery
of "devmode=TRUE". They are not required for installation and are
documentation only.

The bootloader employs signature verification on the FIT image
configurations. This way, booting unauthorized image without patching
the bootloader is not possible. Manually configuring the bootcmd in the
U-Boot envronment won't work, as this is restored to the default value
if modified.

The bootloader is made up of three different parts.

1. The SPL performing early board initialization and providing a XModem
   recovery in case the PBL is missing

2. The PBL being the primary U-Boot application and containing the
   control FDT. It is LZMA packed with a uImage header.

3. A Ubiquiti standalone U-Boot application providing the main boot
   routine as well as their recovery mechanism.

In a perfect world, we would only replace the PBL, as the SPL does not
perform checks on the PBLs integrity. However, as the PBL is in the same
eraseblock as the SPL, we need to at least rewrite both.

The bootloader will only verify integrity in case it has a "signature"
node in it's control device-tree. Renaming the signature node to
something else will prevent this from happening.

Warning: These instructions are based on the firmware intially
shipped with the device and potentially brick your device in a way it
can only be recovered using a SPI flasher.

Only (!) proceed if you understand this!

1. Extract the bootloader from the U-Boot partition using the OpenWrt
   initramfs image.

2. Split the bootloader into it's 3 components:

   $ dd if=bootloader.bin of=spl.bin bs=1 skip=0 count=45056
   $ dd if=bootloader.bin of=pbl.uimage bs=1 skip=45056 count=143360
   $ dd if=bootloader.bin of=ubnt.uimage bs=1 skip=188416

3. Strip the uImage header from the PBL

   $ dd if=pbl.uimage of=pbl.lzma bs=64 skip=1

4. Decompress the PBL

   $ lzma -d pbl.lzma --single-stream

   The decompressed PBL sha256sum should be
   d8b406c65240d260cf15be5f97f40c1d6d1b6e61ec3abed37bb841c90fcc1235

5. Open the decompressed PBL using your favorite hexeditor. Locate the
   control FDT at offset 0x4CED0 (0xD00DFEED). At offset 0x4D5BC, the
   label for the signature node is located. Rename the "signature"
   string at this offset to "signaturr".

   The patched PBL sha256sum should be
   d028e374cdb40ba44b6e3cef2e4e8a8c16a3b85eb15d9544d24fdd10eed64c97

6. Compress the patched PBL

   $ lzma -z pbl --lzma1=dict=67108864

   The resulting pbl.lzma file should have the sha256sum
   7ae6118928fa0d0b3fe4ff81abd80ecfd9ba2944cb0f0a462b6ae65913088b42

7. Create the PBL uimage

   $ SOURCE_DATE_EPOCH=1607909492 mkimage -A mips -O u-boot -C lzma
     -n "U-Boot 2018.03 [UniFi,v1.1.40.71]" -a 84000000 -e 84000000
     -T firmware -d pbl.lzma patched_pbl.uimage

   The resulting patched_pbl.uimage should have the sha256sum
   b90d7fa2dcc6814180d3943530d8d6b0d6a03636113c94e99af34f196d3cf2ce

8. Reassemble the complete bootloader

   $ dd if=patched_pbl.uimage of=aligned_pbl.uimage bs=143360 count=1
     conv=sync
   $ cat spl.bin > patched_uboot.bin
   $ cat aligned_pbl.uimage >> patched_uboot.bin
   $ cat ubnt.uimage >> patched_uboot.bin

   The resulting patched_uboot.bin should have the sha256sum
   3e1186f33b88a525687285c2a8b22e8786787b31d4648b8eee66c672222aa76b

9. Transfer your patched bootloader to the device. Also install the
   kmod-mtd-rw package using opkg and load it.

   $ insmod mtd-rw.ko i_want_a_brick=1

   Write the patched bootloader to mtd0

   $ mtd write patched_uboot.bin u-boot

10. Erase the kernel1 partition, as the bootloader might otherwise
    decide to boot from there.

    $ mtd erase kernel1

11. Transfer the OpenWrt sysupgrade image to the device and install
    using sysupgrade.

FIT configurations
------------------

In the future, the MT7621 UniFi6 family can be supported by a single
OpenWrt image.

config@1: U6 Lite
config@2: U6 IW
config@3: U6 Mesh
config@4: U6 Extender
config@5: U6 LR-EA (Early Access - GA is MT7622)

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-01-05 16:25:13 +01:00
Daniel Golle 28fd279e5d ipq806x: some corrections for TP-Link Talon AD7200
Address most comments made by Adrian Schmutzler on the mailing list.
The device name is kept as 'TP-Link Talon AD7200' as that seems to be
the marketing name TP-Link chose for that device, it also matches the
naming scheme for other TP-Link devices (e.g. 'TP-Link Archer C7').

Fixes: 1a775a4fd0 ("ipq806x: add support for TP-Link Talon AD7200")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-01-05 12:58:43 +00:00
Kevin Darbyshire-Bryant e2180e3cbe build: drop clang wrapper
clang's gcc emulation does the right thing with -print-file-name now,
drop the wrapper

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2021-01-05 08:59:59 +00:00
Gary Cooper 1a775a4fd0 ipq806x: add support for TP-Link Talon AD7200
Device hardware: https://deviwiki.com/wiki/TP-LINK_AD7200_(Talon)

The Talon AD7200 is basically an Archer C2600 with a third PCIe lane
and an 802.11ad radio. It looks like the Archers C2600/5400 but the
housing is slightly larger.

Specifications
--------------

  - IPQ8064 dual-core 1400MHz
  - QCA9988 2.4GHz WiFi
  - QCA9990 5GHz WiFi
  - QCA9500 60GHz WiFi
  - 32MB SPI Flash
  - 512MiB RAM
  - 5 GBit Ports (QCA8337)

Installation
------------

Installation is possible from the OEM web interface.
Sysupgrade is possible.
TFTP recovery is possible.
  - Image: AD7200_1.0_tp_recovery.bin

Notes
  - This will be the first 802.11ad device supported by mainline.

Signed-off-by: Gary Cooper <gaco@bitmessage.de>
2021-01-05 02:16:24 +00:00
Robert Marko 6442b8cbc2 mac80211: Add wil6210 driver
This patch adds wil6210 driver for Wilocity/QCA based 802.11ad
PCI cards.

Driver uses cfg80211 and nl80211 but not mac80211.
Integration for UCI and LuCI will come in other patches.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-01-05 02:16:24 +00:00
Robert Marko 246fd27e52 linux-firmware: Add wil6210 firmware
This patch adds wil6210 firmware and board files.
Firmware version is not up to date but is only freely redistributable one I found.
Board file is a generic one so most devices and especially those for long distance
PtP links will require so in a ipq-wifi like way.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-01-05 02:16:24 +00:00
Gary Cooper d140d18990 mac80211: add 802.11ad-support
This adds logic to properly populate defaults in /etc/config/wireless.

Signed-off-by: Gary Cooper <gaco@bitmessage.de>
2021-01-05 02:16:24 +00:00
Robert Marko f246dfde33 hostapd: wpa_supplicant: Enable proper GCMP cipher support
This patch enables hostapd.sh to properly configure wpa_supplicant
for when GCMP is used as cipher in station mode.
Without this wpa_supplicant will be unable to connect to AP.
This is needed for wil6210 as it does not support CCMP.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-01-05 02:16:24 +00:00
Daniel Golle 9c845a5ad1 base-files: wifi: add support for 802.11ad
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-01-05 02:16:24 +00:00
Daniel Golle b31ca88de9 netifd: update to git HEAD
0c83439 netifd: wireless: default to GCMP WPA cipher on 802.11ad

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-01-05 02:16:24 +00:00
Daniel Golle 498fb1b8aa fstools: fix 'firstboot' on unmounted UBIFS overlay
The usual OpenWrt-way of writing the JFFS2-marker in order to have
a filesystem erased at the next boot fails on UBIFS volumes due to
UBI being a different beast when it comes to writing.
As truncating a UBIFS volume only takes a few milliseconds and has the
desired effect of wiping-out all content of that volume, just do that
instead.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-01-04 21:07:35 +00:00
Petr Štetiar c7aec47e5e build: replace which with Bash command built-in
`which` utility is not shipped by default for example on recent Arch
Linux and then any steps relying on its presence fails, like for example
following Python3 prereq build check:

 $ python3 --version
 Python 3.9.1

 $ make
 /bin/sh: line 1: which: command not found
 /bin/sh: line 1: which: command not found
 /bin/sh: line 1: which: command not found
 ...
 Checking 'python3'... failed.
 ...

Fix this by switching to Bash builtin `command` which should provide
same functionality.

Fixes: FS#3525
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2021-01-04 19:32:25 +01:00
Nick Hainke 6773bee107 odhcpd: bump to latest version
3bda900 odhcpd: add option for setting preferred lifetime

Signed-off-by: Nick Hainke <vincent@systemli.org>
2021-01-04 08:01:16 +01:00
Adrian Schmutzler acdf07cd3e ath79: keep DTSI files for D-Link SoC-specific
It is good practice to define device tree files based on specific
SoCs. Thus, let's not start to create files that are used across
different architectures.

Duplicate the DTSI file for D-Link DAP-2xxx in order to have one
for qca953x and one for qca955x, respectively.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-04 01:09:32 +01:00
Sebastian Schaper d7d87cedcf ath79: Fix 02_network setup for D-Link DAP-2660 A1
The device is a one-port, but was set up as two-port by the
default case in 02_network. Fix it.

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
[commit title/message facelift]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-01-04 01:09:32 +01:00
Sebastian Schaper 8ae2ee99c6 ath79: add support for D-Link DAP-3320 A1
Specifications:
 * QCA9533, 16 MiB Flash, 64 MiB RAM, 802.11n 2T2R
 * 10/100 Ethernet Port, 802.11af PoE
 * IP55 pole-mountable outdoor case

Installation:
 * Factory Web UI is at 192.168.0.50
   login with 'admin' and blank password, flash factory.bin
 * Recovery Web UI is at 192.168.0.50
   connect network cable, hold reset button during power-on and keep it
   pressed until uploading has started (only required when checksum is ok,
   e.g. for reverting back to oem firmware), flash factory.bin

After flashing factory.bin, additional free space can be reclaimed by
flashing sysupgrade.bin, since the factory image requires some padding
to be accepted for upgrading via OEM Web UI.

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
2021-01-04 01:09:32 +01:00
Sebastian Schaper 5b58710fad ath79: add support for D-Link DAP-2680 A1
Specifications:
 * QCA9558, 16 MiB Flash, 256 MiB RAM, 802.11n 3T3R
 * QCA9984, 802.11ac Wave 2 3T3R
 * Gigabit LAN Port (AR8035), 802.11at PoE

Installation:
 * Factory Web UI is at 192.168.0.50
   login with 'admin' and blank password, flash factory.bin
 * Recovery Web UI is at 192.168.0.50
   connect network cable, hold reset button during power-on and keep it
   pressed until uploading has started (only required when checksum is ok,
   e.g. for reverting back to oem firmware), flash factory.bin

After flashing factory.bin, additional free space can be reclaimed by
flashing sysupgrade.bin, since the factory image requires some padding
to be accepted for upgrading via OEM Web UI.

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
2021-01-04 01:09:32 +01:00
Sebastian Schaper b077accb9c ath79: add support for D-Link DAP-2230 A1
Specifications:
 * QCA9533, 16 MiB Flash, 64 MiB RAM, 802.11n 2T2R
 * 10/100 Ethernet Port, 802.11af PoE

Installation:
 * Factory Web UI is at 192.168.0.50
   login with 'admin' and blank password, flash factory.bin
 * Recovery Web UI is at 192.168.0.50
   connect network cable, hold reset button during power-on and keep it
   pressed until uploading has started (only required when checksum is ok,
   e.g. for reverting back to oem firmware), flash factory.bin

After flashing factory.bin, additional free space can be reclaimed by
flashing sysupgrade.bin, since the factory image requires some padding
to be accepted for upgrading via OEM Web UI.

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
2021-01-04 01:09:32 +01:00
Kagurazaka Kotori 927b9df938 x86/efi: add FAT32 esp mounting support
Adds a new function get_magic_fat32() in base-files to read FAT32 magic.
Now FAT32 EFI system partition can be handled in the same way as FAT12/FAT16.

Signed-off-by: Kagurazaka Kotori <kagurazakakotori@gmail.com>
[replace '-o' with '] || [' to satisfy shellsheck]
Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-01-03 13:48:50 -10:00