Images generated for the TP-Link RE200v1 cannot be updated using
sysupgrade, because a necessary call to append-metadata was missing.
Signed-off-by: Andreas Böhler <dev@aboehler.at>
Edimax RA21S is a dual band 11ac router,
based on MediaTek MT7621A and MT7615N chips.
Specification:
- SoC: MediaTek MT7621A dual-core @ 880MHz
- RAM: 256M (Nanya NT5CC128M16IP)
- FLASH: 16MB (Macronix MX25L12835F)
- WiFi: 2.4/5 GHz 4T4R
- 2.4GHz MediaTek MT7615N bgn
- 5GHz MediaTek MT7615N nac
- Switch: SoC integrated Gigabit Switch (4 x LAN, 1 x WAN)
- USB: No
- BTN: Reset, WPS
- LED: 4 red LEDs, indistinguishable when case closed
- UART: through-hole on PCB.
J1: 3.3V - RX - GND - TX / 57600-8N1. 3.3V is the square pad
Installation:
Update the factory image via the OEM web-interface
(by default: http://192.168.2.1/)
User: admin
Password: 1234
The sysupgrade image can be installed via TFTP
from the U-Boot bootloader. Connect via ethernet port 2.
Tested on device by @UAb5eSMn
Signed-off-by: Maksym Medvedev <redrathnure@gmail.com>
[split DTS and take over improvements from RG21S, extend commit
message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
330-MIPS-kexec-Accept-command-line-parameters-from-users.patch causes
problems when building with -Werror=unused-result.
arch/mips/kernel/machine_kexec.c: In function 'machine_kexec_init_argv':
arch/mips/kernel/machine_kexec.c:76:2: error: ignoring return value of 'copy_from_user', declared with attribute warn_unused_result [-Werror=unused-result]
copy_from_user(kexec_argv_buf, buf, size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Fix this by handling the return value in an appropriate way.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
iperf2 is useful for testing UDP over multicast, add an option to permit
the enabling/disabling of multicast support.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
CONFIG_PINCTRL_SUN4I_A10 controls both the A10 and the A20 enablong of
the pinctrl driver, this is necessary since upstream commit
5d8d349618a9464714c07414c5888bfd9416638f ("pinctrl: sunxi: add A20
support to A10 driver") which has been included in v4.13 and onwards.
Fixes: ad2b3bf310 ("sunxi: Add support for kernel 4.14")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Shared base-files package contains functions for LED migration that
are already used by several targets. Apply those also to lantiq and
drop the (redundant) local code.
While at it, reorder board names in file.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
The only device in samsung target is meant to be built with s5pv210
subtarget. Thus, though this won't make a difference for a
one-subtarget target, already add the condition to the Makefile to
make the assignment obvious.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This patch changes the samsung target to calculate the DTS file name
from vendor and device name and the SOC (i.e. subtarget) following
the common scheme:
soc_vendor_model.dts
This also updates the device definition name to make compatible,
image name, menuconfig name and DTS name consistent.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
The TP-Link Archer C20i previously had a generic Ralink MAC address set
for both radios, as the caldata does only contain a generic MAC address.
Set the MAC address from the vendor firmware for both radios to assign
unique MAC addresses to every device.
Signed-off-by: David Bauer <mail@david-bauer.net>
The TP-Link Archer C2 v1 previously had a generic Ralink MAC address set
for the 5GHz radio (MT7610), as the caldata does only contain a generic
MAC address.
Set the MAC address from the vendor firmware for the 5GHz radio to
assign unique MAC addresses to every device.
Signed-off-by: David Bauer <mail@david-bauer.net>
Use the WPS LED to indicate system status like it is done for the
TP-Link Archer C2 v1 and many other boards.
Signed-off-by: David Bauer <mail@david-bauer.net>
This converts all MediaTek MT7620 boards from TP-Link to use the now
supported WiFi throughput LED trigger. This way, the LED state now
covers all VAPs regardless of their name.
Also align all single-WiFi LEDs to represent the state of the 2.4GHz
radio. This was not always the case previously, as later-added support
for the MT7610 altered the phy probing order.
Signed-off-by: David Bauer <mail@david-bauer.net>
Changed standard to 2a. 2a (as well as 17) contain more constexpr
functions, which are evaluated at compile time. This saves space.
Added --gc-sections. With the CXXABI change, this now makes the package
smaller.
With these, size went down to 210845 on mipsel_24kc.
Also fixed two small compiler warnings. No real change in behavior.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Allows proper exception handling. This includes removing unimplemented
warnings.
File size increased as a result:
Before:
182874
After:
211006
On mipsel_24kc.
Note that this requires libsupc++ anyway. It's specified in g++-libcxx.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
HC5661 does not have 5GHz WiFi or LED.
Fixes: e6e373d348 ("ramips: Add DTS files for HiWiFi HC5x61 models")
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
TP-Link RE200 v1 is a wireless range extender with Ethernet and 2.4G and 5G
WiFi with internal antennas. It's based on MediaTek MT7620A+MT7610EN.
Specifications
--------------
- MediaTek MT7620A (580 Mhz)
- 64 MB of RAM
- 8 MB of FLASH
- 2T2R 2.4 GHz and 1T1R 5 GHz
- 1x 10/100 Mbps Ethernet
- UART header on PCB (57600 8n1)
- 8x LED (GPIO-controlled; only 6 supported), 2x button
There are 2.4G and 5G LEDs in red and green which are controlled
separately. The 5G LED is currently not supported, since the GPIOs couldn't
be determined.
Installation
------------
Web Interface
-------------
It is possible to upgrade to OpenWrt via the web interface. However, the
OEM firmware upgrade file is required and a tool to fix the MD5 sum of
the header. This procedure overwrites U-Boot and there is not failsafe /
recovery mode present! To prepare an image, you need to take the header
and U-Boot (i.e. 0x200 + 0x20000 bytes) from an OEM firmware file and
attach the factory image to it. Then fix the header MD5Sum1.
Serial console
--------------
Opening the case is quite hard, since it is welded together. Rename the
OpenWrt factory image to "test.bin", then plug in the device and quickly
press "2" to enter flash mode (no line feed). Follow the prompts until
OpenWrt is installed.
Unfortunately, this devices does not offer a recovery mode or a tftp
installation method. If the web interface upgrade fails, you have to open
your device and attach serial console. Since the web upgrade overwrites
the boot loader, you might also brick your device.
Additional notes
----------------
MAC address assignment is based on stock-firmware. For me, the device
assigns the MAC on the label to Ethernet and the 2.4G WiFi, while the 5G
WiFi has a separate MAC with +2.
*:88 Ethernet/2.4G label, uboot 0x1fc00, userconfig 0x0158
*:89 unused userconfig 0x0160
*:8A 5G not present in flash
This seems to be the first ramips device with a TP-Link v1 header. The
original firmware has the string "EU" embedded, there might be some region-
checking going on during the firmware upgrade process. The original
firmware also contains U-Boot and thus overwrites the boot loader during
upgrade.
In order to flash back to stock, the first header and U-Boot need to be
stripped from the original firmware.
Signed-off-by: Andreas Böhler <dev@aboehler.at>
MiWiFi Nano has two LAN ports, which are in reverse order. Add port numbers
to them, and disable unused ports.
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
This replaces deprecated backticks by more versatile $(...) syntax.
Found with shellcheck.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
[adjust commit title and message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This replaces deprecated backticks by more versatile $(...) syntax.
Found with shellcheck.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
[slightly adjusted commit title, added commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Handle both variants separately. This removes the need for calling
swconfig to detect the switch, and simplifies future changes.
Signed-off-by: Josua Mayer <josua.mayer@jm0.eu>
This adds a "factory" image for the aircube-isp devices. Note that the
firmware can't be uploaded without prior special preparation. For the
most recent instructions on how to do that, visit the OpenWRT wiki page
of the Ubiquiti airCube ISP for details:
https://openwrt.org/toh/ubiquiti/ubiquiti_aircube_isp
Current procedure:
With the original firmware 2.5.0 it is possible to upload and execute a
script via the configuration. To do that download and unpack the
original configuration, adapt uhttpd config to execute another lua
handler (placed in the config directory) and pack and upload it again.
The lua handler can call a script that mounts an overlayfs and modifies
the "fwupdate.real" binary so that an unsigned image is accepted. The
overlayfs is necessary because a security system (called tomoyo) doesn't
allow binaries in other locations than /sbin/fwupdate.real (and maybe
some more) to access the flash when executed via network.
A big thanks to Torvald Menningen (Snap) from the OpenWRT forum for
finding out how to patch the binary so that it accepts an unsigned
image.
The current step-by-step procedure is:
- Use a version 2.5.0 of the original firmware. This is important
because a binary file will be modified.
- Download a configuration.
- Unpack it (it's just a tar gz file without an ending).
- Add the following to uhttpd:
``````
config 'uhttpd' 'other'
list listen_http 0.0.0.0:8080
list listen_http [::]:8080
option 'home' '/tmp/persistent/config/patch/www'
option lua_prefix '/lua'
option lua_handler '/tmp/persistent/config/patch/handler.lua'
``````
- Create a `patch` subfolder.
- Create a `patch/www` subfolder.
- Create a `patch/handler.lua` with the following content:
``````
function handle_request(env)
uhttpd.send("Status: 200 OK\r\n")
uhttpd.send("Content-Type: text/plain\r\n\r\n")
local command = "/bin/sh /tmp/persistent/config/patch/patch.sh 2>&1"
local proc = assert(io.popen(command))
for line in proc:lines() do
uhttpd.send(line.."\r\n")
end
proc:close()
end
``````
- Create a `patch/patch.sh` with the following content:
``````
#!/bin/sh -x
set -e
set -u
set -x
UBNTBOX_PATCHED="/tmp/fwupdate.real"
MD5FILE="/tmp/patchmd5"
cat <<EOF > ${MD5FILE}
c33235322da5baca5a7b237c09bc8df1 /sbin/fwupdate.real
EOF
# check md5 of files that will be patched
if ! md5sum -c ${MD5FILE}
then
echo "******** Error when checking files. Refuse to do anything. ********"
exit 0
fi
# prepare some overlay functionality
LOWERDIR="/tmp/lower_root"
mkdir -p ${LOWERDIR}
mount -t squashfs -oro /dev/mtdblock3 ${LOWERDIR}
overlay_some_path()
{
PATH_TO_OVERLAY=$1
ALIAS=$2
UPPERDIR="/tmp/over_${ALIAS}"
WORKDIR="/tmp/over_${ALIAS}_work"
mkdir -p ${UPPERDIR}
mkdir -p ${WORKDIR}
mount -t overlay -o lowerdir=${LOWERDIR}${PATH_TO_OVERLAY},upperdir=${UPPERDIR},workdir=${WORKDIR} overlay ${PATH_TO_OVERLAY}
}
# patch the ubntbox binary.
overlay_some_path "/sbin" "sbin"
echo -en '\x10' | dd of=/sbin/fwupdate.real conv=notrunc bs=1 count=1 seek=24598
echo "******** Done ********"
``````
- Repack the configuration.
- Upload it via the normal web interface.
- Wait about a minute. The webserver should restart.
- Now there is a second web server at port 8080 which can call the lua
script. Visit the page with a web browser. Link is for example
http://192.168.1.1:8080/lua
- You should see the output of the script with a "*** Done ***" at the
end. Note that the patches are not permanent. If you restart the
router you have to re-visit the link (but not re-upload the config).
- Now you can upload an unsigned binary via the normal web interface.
Signed-off-by: Christian Mauderer <oss@c-mauderer.de>
Convert leading spaces to tabs and generally harmonize leading
whitespace indent in the file.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
No bash features are actually used here.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
[slightly adjust commit title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>