Commit Graph

39133 Commits (c31f0421ceb47f347ade7317f263fcd09cfe325f)
 

Author SHA1 Message Date
Florian Eckert c31f0421ce base-files: suppress uci not found output in login.sh
Fix "uci: Entry not found" output if "ttylogin" is not set in
"etc/config/system"

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
7 years ago
Hans Dedecker fea89fa25b odhcpd: update to latest git HEAD (FS#402, FS#524)
296b4a0 dhcpv6: assign all viable DHCPv6 addresses by default (FS#402, FS#524)
f4d38e0 treewide: reflect managed mode is related to RA

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years ago
Mathias Kresin 313ce3afbb ramips: move common parts into dtsi
Move the common parts of boards with multiple flash size variants into
dtsi files.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
L. D. Pinney 70b192f573 ramips: update device tree source files
Use the GPIO dt-bindings macros and add compatible strings in the
ramips device tree source files.

Signed-off-by: L. D. Pinney <ldpinney@gmail.com>
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Thibaut VARENE b70a96285c tools/firmware-utils: document reserved fields in mkchkimg
Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years ago
Thibaut VARENE 695f5ea85a ramips: Add support for Netgear EX3800
The Netgear EX3800 is essentially an EX3700 with a mains output socket.

Both devices use the exact same firmware image (original firmware is named
EX3700-EX3800-version.chk).

This patch adds suport by renaming the EX3700 device to EX3700/EX3800 and
updating the necessary glue.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years ago
Thibaut VARENE 8a13895a2e ramips: EX3700: rename factory.bin to factory.chk
The stock firmware upgrade interface requires the file to end with a .chk
extension.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years ago
Thibaut VARENE 1780d40f2b ramips: cleanup EX2700 and WN3000RPv3 LEDs
This patch cleans up the WN3000RPv3 and EX2700 setup, bringing it in line
with other similar devices:

The power led is a bicolor one. The bootloader brings the red side on at
powerup.

Instead of blinking the red side in diag.sh and need to forcefully turn it off
in 01_leds, this patch simplifies the setup by relying on the default off state
of the gpio-led driver for the red side and blinking the green side as with
other devices.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years ago
Mathias Kresin 419fa7a15f ramips: cleanup AsiaRF AWM002 eval board support
Cleanup the dtsi files and remove one layer of dtsi. Set the size of
the firmware partition to a value matching the flash size from the
board (variant) name.

Remove the usb led trigger. There is neither a default config for the
usb led trigger nor a LED for usb activity indication.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin b82ac84229 ramips: drop AsiaRF AWM003 eval board
Everything is identical to the AWM002 8m eval board. No need to
duplicate it once more.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 861b867d9c ramips: fix Omnima MiniEMBWiFi image
Reference the Omnima MiniEMBWiFi device tree source file in the image
build code. Otherwise the dts of the image processed before is used.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin afc1ccf955 ramips: build HuaWei HG255D image
The code to build an image was disabled some time ago for unknown
reasons albeit the image looks fine.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 60f6c2b2eb ramips: drop Edimax BR-6425 support
Code to build an image for the Edimax BR-6425 never existed.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 1eb1916c5f ramips: add missing partitions
The partitions were lost during migration to device tree.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
John Crispin 4787e1960b mediatek: move mt7623 support into a 32bit subtarget
this is in preparation for adding the new 64bit mt7622 support.

Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
Ilya Katsnelson bb4d5006c0 ramips: fix PCI init on MT7620 with Linux 4.9+
So, this is kind of complicated. This has been upstream for a while,
imported from OpenWRT/LEDE with some cleanups. LEDE ramips has stayed
on linux-4.4 this whole time, with the old(er) version of the patch
that had correct behavior[0], while upstream got changed[1].

When LEDE updated to kernel 4.9, the older version of the code from
the patch got replaced with the upstream version containing the bug.

The original behavior, however, seems to be correct here, as the
official programming guide[2] indicates that bit 31 (PDRV_SW_SET)
in register PPLL_CFG1 is reserved, but bit 23 (added as PPLL_LD)
is the PPLL lock state (which also happens to line up with the
error message).

The original confusion probably comes from the double definition
of PDRV_SW_SET[3, 4] in the upstream code, with one correct definition
(31) and one incorrect one (23).

I've also used the opportunity to clean up the error message a bit -
it's still not really helpful to anyone who doesn't already know what
the PPLL is, but at least it's slightly more readable now.

This will probably need to be upstreamed as well, since with the way
it's currently set up, it's unlikely PCI ever worked for anyone who's
running an upstream kernel on that SoC.

[0]: 05d6e92594/target/linux/ramips/patches-4.4/0009-PCI-MIPS-adds-mt7620a-pcie-driver.patch (L259)
[1]: 026d15f6b9/arch/mips/pci/pci-mt7620.c (L246)
[2]: http://www.anz.ru/files/mediatek/MT7620_ProgrammingGuide.pdf
[3]: 026d15f6b9/arch/mips/pci/pci-mt7620.c (L36)
[4]: 026d15f6b9/arch/mips/pci/pci-mt7620.c (L39)

Signed-off-by: Ilya Katsnelson <me@0upti.me>
7 years ago
John Crispin d0fb048b0e procd: update to latest git HEAD
f062b30 procd: Do not leak pipe file descriptors to children

Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
John Crispin 0c1420b3fe fstools: update to latest git HEAD
8ab4fda fstools: add btrfs support

Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
Rafał Miłecki 993c740255 firmware-utils: mktplinkfw2: respect -e option when reading fw info
When -e option it specified a corresponding flag is set in the
custom_board. By using custom_board as fallback -e option gets respected
for unknown boards.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 35ddef8455 firmware-utils: mktplinkfw2: fix info for images with LE kernel LA/EP
With this change endianness is also respected when reading firmware
info.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki d181cbbfb0 firmware-utils: mktplinkfw2: replace "endian_swap" field with "flags"
This will allow adding more similar tricks needed by other hardware.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Thibaut VARENE a6f6f8df23 ramips: Archer C50v1: fix power led
01_leds had a workaround for the power led to compensate for the
inverted GPIO state. This patch was missing from my previous commit.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
[add the power led default-state which was omitted in the last commit
by me]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Thibaut VARENE 5d7e23f5ad ramips: Archer C50v1: fix switch port numbering
Luci shows switch ports in wrong order on that device.
This patch fixes switch port numbering and matches them to the device
silkscreen.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years ago
Thibaut VARENE 0c81bc2969 ramips: Archer C50v1: fix LEDs active levels
All LEDs GPIOs are active low on this device.

WAN and POWER states were inverted. Add default state for power.

Tested on Archer C50v1.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years ago
Mathias Kresin 99f1097c0a ramips: fix Mercury MAC1200R v2.0 board name
With d2b6bf1416 ("ramips: fix image validation errors") the board
name was changed to fix an image validation error. But this change
wasn't applied to all other files using the board name, which broke
sysupgrade.

Revert this change and use the former board name in the metadata
instead.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
L. D. Pinney 45dbd65850 ramips: mt7621: add compatible strings
Add compatible strings to all mt7621 based device tree source files to
fix formal issues.

Signed-off-by: L. D. Pinney <ldpinney@gmail.com>
7 years ago
Mathias Kresin b27977b41b brcm63xx: add NULL clock fix send upstream
Make the behaviour of clk_get_rate consistent with common clk's
clk_get_rate by accepting NULL clocks as parameter. Some device
drivers rely on this, and will cause an OOPS otherwise.

Fixes: FS#735

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 0a17d2970a ramips: add NULL clock fix send upstream
Make the behaviour of clk_get_rate consistent with common clk's
clk_get_rate by accepting NULL clocks as parameter. Some device
drivers rely on this, and will cause an OOPS otherwise.

Fixes: FS#735

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin ea751c972b ar7: add NULL clock fix send upstream
Make the behaviour of clk_get_rate consistent with common clk's
clk_get_rate by accepting NULL clocks as parameter. Some device
drivers rely on this, and will cause an OOPS otherwise.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Lucian Cristian b90fb5ffe1 openssl: update to version 1.0.2l
Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
7 years ago
Daniel Engberg 911331ad0f tcpdump: Update to 4.9.1
Update tcpdump to 4.9.1

Fixes:
 * CVE-2017-11108: Fix bounds checking for STP.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years ago
Hauke Mehrtens 39e8ab17d5 kernel: update kernel 4.4 to version 4.4.79
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens 88f3c63572 kernel: update kernel 4.9 to version 4.9.40
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Jo-Philipp Wich eb43a817f7 opkg: bump to version 2017-07-28
Commits since last 2017-07-11:

4bd8601 pkg_parse: fix segfault when parsing descriptions with leading newlines

Fixes FS#933.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
Paul Wassi 0d4cda8a3b brcm63xx: DTS: fix AV4202N flash layout
Fix incorrect offset and size of linux partition.

Fixes: 97b36aca09 ("brcm63xx: add pflash for remaining pflash equipped boards")
Signed-off-by: Paul Wassi <p.wassi@gmx.at>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Mathias Kresin 7985bf23ef ramips: drop stray kernel 4.4 configs
The kernel 4.4 patches where already removed with the bump to 4.9. Drop
the the subtarget configs as well.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Oliver Fleischmann a92c64e8ae ramips: add support for Loewe WMDR-143N
The WMDR-143N is a small module originally used as a Wifi client
in some Loewe smart TV sets. It is sold cheaply at german surplus
shops. The module contains a RT3662 SOC.

Specifications:

- 500 MHz CPU Clock
- 1x 10/100Mbps Ethernet (pin header)
- 32 MB of RAM
- 8 MB of FLASH
- 2T3R 2.4/5 GHz (SOC internal)
- 3 Antennas on PCB
- UART pads on PCB (J3: 1 = +3.3V, 2 = RX, 3 = TX, 4 = GND), TX
  and RX are 3,3V only! The square hole is pin 1
- Power supply pads on PCB (J6: 1 and 2 = +5V, 3 and 4 = GND)
  The square hole is pin 1

The original firmware has two identical kernel/rootfs images and
two "Factory" calibration data blocks in flash. The LEDE image
leaves only the first "Factory" block in place and uses both
"Kernel" blocks and the redundant "Factory" block together to gain
enough space for the jffs2 partition.

Flash instructions:

You need UART and Ethernet connections to flash the board. Use
the LEDE "sysupgrade.bin" image with tftp.

Apply power to the board and in the first 5 seconds, hit 2 to
select TFTP upload. The bootloader asks for board- and server IP
addresses and filename.

Alternate method: With the vendor firmware running, assign an IP
address to the ethernet port, tftp the firmware image to
/tmp and write to mtd4 ("KernelA").

Signed-off-by: Oliver Fleischmann <ogf@bnv-bamberg.de>
[remove pinctrl node from dts, no pin is used as GPIO]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin a3995a6785 ramips: pinctrl: return proper error if pinctrl0 is empty
Children of the pinctrl0 node are optional. Return EINVAL (=missing)
instead of 0. Fixes a hang if the pinctrl0 has no children.

Signed-off-by: Mathias Kresin <dev@kresin.me>
Acked-by: John Crispin <john@phrozen.org>
7 years ago
Jo-Philipp Wich bf5d32af2a scripts/package-metadata.pl: inhibit compile deps on missing build types
When a package declares a PKG_BUILD_DEPENDENCY or HOST_BUILD_DEPENDENCY on
a not existing build type, the metadata script will emit a reference to an
unresolvable build target in tmp/.packagedeps, causing the make process to
fail hard in a way not catchable by the IGNORE_ERRORS mechanism.

In a situation where a package "test-a" declares a build dependency
"PKG_BUILD_DEPENDS:=test-b/host" while the Makefile of "test-b" does not
implement a HostBuild, make fails with an unrecoverable error in the form:

    make[1]: Entering directory '...'
    make[1]: *** No rule to make target 'package/test-b/host/compile',
                 needed by 'package/test-a/compile'.  Stop.
    make[1]: Leaving directory '...'
    .../toplevel.mk:200: recipe for target 'package/test-a/compile' failed
    make: *** [package/test-a/compile] Error 2

Extend the metadata generation script to catch such unresolved references
and emit a visable warning upon detection.

After this change, the script will emit a warning similar to:

    WARNING: Makefile "package/test-a/Makefile" has a build dependency on
    "test-b/host" but "package/test-b/Makefile" does not implement a
    "host" build type

Fixes a global build cluster outage which occured after the "python-cffi"
feed package removed its HostBuild which the "python-cryptography" package
build-depended on.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
John Crispin 9551d91b1d ramips: refresh the rcu_sched patch and remove debug info
Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
John Crispin 6acb53c526 ralink: fix rcu_sched stalls on mt7621
there were 2 bugs
*) core1 came up with a bad bogo mips, looks like the clock needed time to stabilize
*) HPT frequency was not set making r4k timers not come up properly

Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
L. D. Pinney 77645ffcd9 ramips: add support for the GnuBee Personal Cloud One
The GnuBee Personal Cloud One crowdfunded on https://www.crowdsupply.com
    It is a low-cost, low-power, network-attached storage device.

    Specifications:

    - SoC: MediaTek MT7621AT
    - RAM: DDR3 512 MB
    - Flash: 32 MB
    - Six SATA ports for 2.5" Drives
    - One micro SDcard
    - One USB 3.0
    - Two USB 2.0
    - Gigabit Ethernet: 1 x WAN and 1 x LAN
    - UART 3.5mm Audio Jack or 3 pin header - 57600 8N1
    - Four GPIOs available on a pin header

    Flash instructions:

    The GnuBee Personal Cloud One ships with libreCMC installed.
    libreCMC is a Free Software Foundation approved fork of LEDE/OpenWrt.
    As such one can upgrade using the webinterface or sysupgrade.

    Das U-Boot has multiple options for recovery or updates including :

    - USB
    - http
    - tftp

Signed-off-by: L. D. Pinney <ldpinney@gmail.com>
[use switchdev led trigger, all interfaces are in vlan1; rename leds
according to board.d setting; remove ge2 group from the pinmux, this
group doesn't exist in the driver]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Thibaut VARENE 4faf314933 ramips: DIR-860L-B1 fix switch port numbering
Luci shows switch ports in inverted order on that device.
This patch fixes switch port numbering and matches them to the device
silkscreen.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years ago
Uwe Arnold ecfca0eda2 kernel: netfilter: fix nf-nathelper(-extra) description
The tftp and irc netfilter modules are provided by nf-nathelper-extra
and not by nf-nathelper.

Signed-off-by: Uwe Arnold <donvipre@gmail.com>
[move the irc module as well]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Giuseppe Lippolis 786f7426c2 ramips: fix wps button gpio for DWR-512
The WPS button is at GPIO#7.

Signed-off-by: Giuseppe Lippolis <giu.lippolis@gmail.com>
7 years ago
Paul Wassi c51c976db8 ramips: DTS: VoCore2 improvements/fixes
The VoCore2 features 128MB of RAM, therefore set
memory in DTS to 128*1024*1024 = 0x8000000
The board's LED is connected to GND, set it to
ACTIVE_HIGH here.
Make serial console working again on kernel 4.9 by
change of pinmux configuration.

Signed-off-by: Paul Wassi <p.wassi@gmx.at>
7 years ago
Alex Maclean f683385e73 ramips: add support for TP-Link RE350
The TP-Link RE350 is a wall-wart AC1200 range extender/access point with
a single gigabit ethernet port and two non-detachable antennas, based on
the MT7621A SoC with MT7603E and MT7612E radios.

Firmware wise it is very similar to the QCA based RE450.

SoC: MediaTek MT7621A (880MHz)
Flash: 8MiB (Winbond W25Q64)
RAM:   64MiB (DDR2)
Ethernet: 1x 1Gbit
Wireless: 2T2R 2.4Ghz (MT7603E) and 5GHz (MT7612E)
LEDs: Power, 2.4G, 5G (blue), WPS (red and blue), ethernet link/act
(green)
Buttons: On/off, LED, reset, WPS

Serial header at J1, 57600 8n1:
Pin 1 TX
Pin 2 RX
Pin 3 GND
Pin 4 3.3V

Factory image can be uploaded directly through the stock UI.

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
7 years ago
Alex Maclean 1c7144f078 firmware-utils: tplink-safeloader: add support for TP-Link RE350
Signed-off-by: Alex Maclean <monkeh@monkeh.net>
7 years ago
Felix Fietkau ea72f22bdf ath9k: fix regression in multicast buffering fix
Update the more data flag on the last frame, but tx from the first frame
on.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 35868234e7 ath9k: fix typo in US tx power reduction fix
Use max_t instead of min_t to prevent the value from going below zero

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago