Commit Graph

47413 Commits (93a8cdf5d891db18b66d922607e2dad286f7ce5f)
 

Author SHA1 Message Date
Jose Olivera 93a8cdf5d8 mwlwifi: Update the 88W8964's firmware to 9.3.2.12 and fix backports version detection
Updates the 88W8964 firmware used in the Linksys WRT3200ACM and WRT32X
[v9.3.2.6 -> v9.3.2.12]

Removes 0c43219 ("mwlwifi: Fix loading with backports v5.3")
as it has been merged upstream.

Unfortunately, there is a bug wherein Kaloz's repo, the version
detection mechanism for fixing vendor commands doesn't work.

It pulls in the Linux kernel version, which as of this time is
"4.14.y" or "4.19.y"

However, the proper behaviour is that it should pull in the mac80211
backports version which as of now is "5.4.27"

The included patch works around this using a backports define found
only on versions >5.3, "VENDOR_CMD_RAW_DATA".

Signed-off-by: Jose Olivera <oliverajeo@gmail.com>
4 years ago
Lucian Cristian 8f342a39de kernel: hwmon: add dme1737 driver
SMSC DME1737, SCH3112, SCH3114, SCH3116, SCH5027 monitoring support

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
4 years ago
Adrian Schmutzler 97af28d23e ath79: fix USB port LED assignment for ZyXEL NBG6716
The USB LED assignment to internal ports was swapped.

Fix it.

We also explicitly checked that the LED label numbers match those
on the device.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Guillaume Lefebvre f5a9181d6e ath79: fix wmac initialization for Zyxel NBG6716
2.4 GHz Wifi on ath79 is set up in 10-ath9k-eeprom, but in ar71xx
it was done with ath79_register_wmac.

Thus, the following errors are observed on the device:
ath: phy1: Unable to initialize hardware; initialization status: -5
ath9k 18100000.wmac: failed to initialize device
ath9k: probe of 18100000.wmac failed with error -5

This patch changes the ath79 support to properly use wmac as well.
This will also require fixing the MAC address in a different way.

Signed-off-by: Guillaume Lefebvre <guillaume@zelig.ch>
[several adjustments to 10-fix-wifi-mac, use correct MAC address,
rewrite commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Álvaro Fernández Rojas 97c5fb4709 cypress-firmware: update to v5.4.18-2020_0402
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Chuanhong Guo 77b99ea3c6 ramips: fix whitespace in 990_NET-no-auto-carrier-support.patch
Fixes: 6fcba5eec3 ("ramips: port 0034-NET-multi-phy-support.patch to 5.4")
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Chuanhong Guo 4d06229242 ramips: ralink-eth: fix leftover dma dev argument
Fixes: 05dee5833a ("ramips: ralink-eth: fix device struct passed to dma functions")
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Daniel Golle 0aa2ecf5b2 base-files: don't ship local build key when on buildbot
Including the local build key in /etc/opkg/keys isn't feasible when
building on the buildbot: The included key collides with its copy
already in openwrt-keyring which breaks the ImageBuilder.
Not including a locally generated key also makes the base-files package
more reproducible.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years ago
Jonas Gorski 4e535d81ee bcm63xx: disable all devices with <= 4MiB flash and <= 32 MiB RAM
Device with 4 MiB flash and 32 MiB RAM won't be able to run OpenWrt in
a sufficient manner without tweaks, so don't build images for them by
default.

This includes all BCM6338, BCM6345 and BCM6348 "generic" devices,
as there are no supported devices of these with more than that.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
4 years ago
Chuanhong Guo b756ea2a90 ramips: replace pinctrl property names
Upstream pinctrl driver in drivers/staging uses
groups/function/ralink,num-gpios instead of
ralink,group/ralink,function/ralink,nr-gpio
Replace these properties in dts as well as the pinctrl driver in
patches-4.14.
This commit is created using:
sed -i 's/ralink,group/groups/g'
sed -i 's/ralink,function/function/g'
sed -i 's/ralink,nr-gpio/ralink,num-gpios/g'

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Chuanhong Guo 8f6334eb94 ramips: explicitly disable built-in switch when needed
previously we rely on the failsafe setup in preinit scripts to disable
built-in switch implicitly for single-port devices. This doesn't work
anymore due to preinit script removal.
this patch explicitly disable built-in switch for needed devices.

Fixes: a8d62a4eb1 ("ramips: remove set_preinit_iface script")
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Chuanhong Guo f017f617ae base-files: preinit: also config switch when no port roles defined
current preinit code in base-files doesn't config switch when there are
no port roles defined. But this kind of configuration exists on single
port devices where switch vlan is simply disabled.
configure reset and enable_vlan property when a switch node exist.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Chuanhong Guo 605a7ffff2 ramips: add 5.4 as testing kernel
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Chuanhong Guo abadee5d60 ramips: mt76x8: switch to kernel 5.4
4.14 doesn't work anymore due to gpio dt binding changes. Switch mt76x8
to 5.4 directly.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Chuanhong Guo d7d46da938 ramips: disable images for 4M devices
default initramfs for 5.4 kernel is larger than 4M, causing build error
for oversized initramfs image.
disable these images because we have no mechanism for ignoring initramfs
errors and the squashfs image will be larger than initramfs anyway.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Chuanhong Guo e29e2a9484 ramips: ralink-eth: add support for 5.4 kernel
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Chuanhong Guo 0b68d081eb ramips: mt7628: update dts for upstream gpio-mt7621 driver
upstream driver merged 3 separated gpio banks into one gpio node.
and gpioX Y in our local driver should be replaced with gpio X*32+Y.

This patch is created using the following sed command:
sed -i -r 's/(.*)gpio([0-9]) ([0-9]+)(.*)/echo "\1gpio $((\2*32+\3))\4"/ge'

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Chuanhong Guo e320435a6a ramips: refresh kernel config for 5.4
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Chuanhong Guo 89bf2b18af ramips: copy kernel config for 5.4
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Chuanhong Guo 6fcba5eec3 ramips: port 0034-NET-multi-phy-support.patch to 5.4
This hack is needed for old ethernet driver:
On mt7620, we have two exposed RGMII ports that connects to builtin
switch. However, swconfig has no way to interact with phy subsystem.
As a result, we have to register both PHYs to ethernet mac instead
and this patch prevents main ethernet interface from going down due
to phy link changes.
Also rename the patch for its actual purpose.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Chuanhong Guo 05dee5833a ramips: ralink-eth: fix device struct passed to dma functions
dma functions needs the struct from platform_device instead of
the one for ethernet interface.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Chuanhong Guo 33d027c5b8 ramips: move and rename out-of-tree mtk eth driver
move the driver into shared 'files' directory and rename all symbols
from mediatek/mtk to ralink.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Chuanhong Guo b0ec8d0ca0 ramips: increase spi frequency for newifi d1/d2
increase spi frequency for both devices to 45MHz.
while at it, also remove m25p,fast-read for newifi d1 as it's only
needed when spi clock is higher than 50MHz.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Chuanhong Guo 5c8f2c64d7 ramips: enable broken-flash-reset for some 32M flash boards
These are boards known to start on 3-byte address mode, which requires
broken-flash-reset if 4B_OPCODES isn't supported by the flash.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Chuanhong Guo dfa521f129 generic: spi-nor: rework broken-flash-reset
Instead of resetting flash to 3B address on remove hook, this
implementation only enters 4B mode when needed, which prevents more
unexpected reboot stuck. This implementation makes it only break when
a kernel panic happens during flash operation on 16M+ areas.
Also silent broken-flash-reset warning. We are not dealing with vendors
and it's unpleasant for users to see that unnecessary and long WARN_ON
print.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Kevin Darbyshire-Bryant 4f34e430ed dnsmasq: bump to v2.81
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years ago
Adrian Schmutzler ae636effd2 base-files: source functions.sh in /lib/functions/system.sh
The file /lib/functions/system.sh depends on find_mtd_index() and
find_mtd_part() located in /lib/function.sh, so let's source that
file.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 282e817350 base-files: do not source system.sh in functions.sh
The default_postinst() function in /lib/functions.sh sources
/lib/functions/system.sh before cycling through uci-defaults files.

This creates a pseudo-cyclic dependency as system.sh also uses
functions that are located in functions.sh. Despite that, there
is actually only one uci-defaults file in the entire repo that needs
system.sh, and this one contains an explicit source for system.sh
anyway.

Consequently, this patch removes the sourcing of system.sh in
functions.sh. There are no relevant uses in packages, routing and
luci repositories.
This may require adjustments for downstream, though.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler de3e5de8cc cns3xx: remove support for kernel 4.14
This target has been on kernel 4.19 for nine months now [1], and
has had testing support for even longer [2].
This should be long enough to drop support for kernel 4.14.

[1] 545bfbc3a9 ("cns3xxx: switch to kernel 4.19")
[2] c6bebe1a94 ("cns3xxx: add support for kernel 4.19")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler e8931b309f ramips: mt7621: tidy up names for Ubiquiti devices
The "proper" vendor prefix for Ubiquiti is "ubnt", this is used in
all targets except ramips and also recommended by the kernel.

This patch adjusts the various board/image/device name variables
accordingly. Since we touch it anyway, this also adds the space
in "EdgeRouter X" as a hyphen to those variables to really make
them consistent with the model name.

While at it, create a real shared definition for the devices in
image/mt7621.mk instead of deriving one device from another.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler bebc9809d1 bcm63xx: remove support for kernel 4.19
Since stable kernel for this target is still 4.14, kernel 4.19
has never been used much (and actually was broken for some devices).

So, since we bump testing kernel to 5.4, there is no real need to
keep 4.19 and have an additional version to care about.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 51b07e782d bcm63xx: use kernel 5.4 as testing kernel
This uses 5.4 as testing kernel. Since 4.19 has not seen broad
testing yet, just keep 4.14 as stable kernel until 5.4 is ready.

Tested on Comtrend AR-5387un (Thanks to @Noltari).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler cb2f0df784 bcm63xx: 5.4: fix compilation for changed driver_find_device
In kernel patch 92ce7e83b4e5 ("driver_find_device: Unify the match
function with class_find_device()") the arguments of functions used
with driver_find_device are adjusted. Do the same for our local
user.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 8a2118e1b4 bcm63xx: 5.4: add removed helper syscon_regmap_lookup_by_pdevname
The helper syscon_regmap_lookup_by_pdevname has been removed in kernel patch
29d14b668d2f ("mfd: Remove unused helper syscon_regmap_lookup_by_pdevname")
due to lack of users.

However, we use this function in our local pinctrl drivers for BCM6358 and
BCM6368. Thus, we have to add it locally.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 43d3ef91f1 bcm63xx: prevent fall-through in kernel patches for 5.4
In kernel 5.4 -Werror=implicit-fallthrough is treated as error:

arch/mips/bcm63xx/cpu.c: In function 'detect_cpu_clock':
arch/mips/bcm63xx/cpu.c:158:2: error: this statement may fall through [-Werror=implicit-fallthrough=]
  {
  ^
arch/mips/bcm63xx/cpu.c:179:2: note: here
  case BCM6328_CPU_ID:
  ^~~~
cc1: all warnings being treated as errors

This can be fixed by adding "Fall through" as a comment where intended,
and has to be fixed by returning a proper default otherwise.

In case of the default clock frequency for BCM6318 we fixed this by
returning the default value taken from BCM6328 and BCM6362.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 23d3fafd87 broadcom-wl: fix compilation with kernel 5.4
This adds two fixes for compilation with kernel 5.4:

1. dev_open from include/linux/netdevice.h needs a second parameter
   since kernel 5.0:
   00f54e68924e ("net: core: dev: Add extack argument to dev_open()")
2. get_ds() macro definition has been dropped since kernel 5.1:
   736706bee329 ("get rid of legacy 'get_ds()' function")
   Since get_ds() has been just a macro before, replace it in
   the driver instead of creating a version switch.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 6c521f6828 bcm63xx: fix missing watchdog core dependency
This patch follows the other patches that added the watchdog
core to various (armvirt, malta, ath79, ...) targets that
have been hit by the following build error:

Package kmod-hwmon-sch5627 is missing dependencies for the following libraries:
watchdog.ko

In theory, we could have just added the CONFIG_WATCHDOG_CORE=y
to the Kconfig variable of kmod-hwmon-sch5627's package definition.
This would have forced the watchdog core to be builtin and less
architectures would need to be updated. But we might as well follow
through here.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler f0fbc47a91 bcm63xx: update config for kernel 5.4
Update config with make kernel_oldconfig.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 04c07e05a1 bcm63xx: refresh patches for kernel 5.4
Refresh patches to make them apply to kernel 5.4.

The removed patches have been merged upstream.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler f8f1dc6eab bcm63xx: copy files to kernel 5.4
Copy config and patches to kernel 5.4.
make kernel_oldconfig has been run on 4.19 beforehand.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler d761b9f211 broadcom-wl: fix compilation with kernel >= 4.15
Since kernel 4.15, init_timer is not available anymore, and has been
replaced by timer_setup. The fixes compilation of wl_linuc.c, which
returned the following errors beforehand (line-wrapped manually):

.../broadcom-wl-5.10.56.27.3/driver/wl_linux.c: In function 'wl_init_timer':
.../broadcom-wl-5.10.56.27.3/driver/wl_linux.c:2576:2: error: implicit
	declaration of function 'init_timer'; did you mean 'init_timers'?
	[-Werror=implicit-function-declaration]
  init_timer(&t->timer);
  ^~~~~~~~~~
  init_timers
.../broadcom-wl-5.10.56.27.3/driver/wl_linux.c:2577:10: error:
	'struct timer_list' has no member named 'data'
  t->timer.data = (ulong) t;
          ^
.../broadcom-wl-5.10.56.27.3/driver/wl_linux.c:2578:20: error: assignment
	to 'void (*)(struct timer_list *)' from incompatible pointer type
	'void (*)(ulong)' {aka 'void (*)(long unsigned int)'}
	[-Werror=incompatible-pointer-types]
  t->timer.function = wl_timer;

This should fix build of several devices on bcm63xx with testing
kernel (4.19).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Yanase Yuki e66becb490 ramips: add support for I-O DATA WN-AX2033GR
I-O DATA WN-AX2033GR is roughly the same as I-O DATA
WN-AX1167GR2. The difference is Wi-Fi feature.

Specification
=============
- SoC: MediaTek MT7621A
- RAM: DDR3 128 MiB
- Flash Memory: NAND 128 MiB (Spansion S34ML01G200TF100)
- Wi-Fi: MediaTek MT7603E
- Wi-Fi: MediaTek MT7615
- Ethernet: 5x 10 Mbps / 100 Mbps / 1000 Mbps (1x WAN, 4x LAN)
- LED: 2x green LED
- Input: 2x tactile switch, 1x slide switch
- Serial console: 57600bps, PCB through hole J5 (Vcc, TX, RX, NC, GND)
- Power: DC 12V

This device only supports channel 1-13 and 36-140.
Thus, narrower frequency limits compared to other devices are required
for limiting wi-fi frequency correctly.
Without this, non-supported frequencies are activated.

Flash instructions
==================
1. Open the router management page (192.168.0.1).
2. Update router firmware using "initramfs-kernel.bin".
3. After updating, run sysupgrade with "sysupgrade.bin".

Recovery instructions
=====================
WN-AX2033GR contains Zyxel Z-LOADER
1. Setup TFTP server (IP address: 10.10.10.3).
2. Put official firmware into TFTP server directory (distribution site:
   https://www.iodata.jp/lib/software/w/2068.htm)
3. Connect WX-AX2033GR Ethernet port and computer that runs TFTP server.
4. Connect to serial console.
5. Interrupt booting by Esc key.
6. Flash firmware using "ATNR 1,[firmware filename]" command.

Signed-off-by: Yanase Yuki <dev@zpc.sakura.ne.jp>
[adjust for kernel 5.4, add recovery instructions/frequency comment]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Jo-Philipp Wich 7b1d809a8d Revert "build: scripts/config - update to kconfig-v5.6"
This reverts commit dcf3e63a35.

The kconfig update requires further testing and refinement until it can
remain in tree. Main problems are:

 - Recursive deps are now fatal instead of a warning
 - Previously legal syntax now leads to hard failures
 - It fails all package builds since multiple days

The updated kconfig implementation needs to cope with the current status
quo in the various package feeds before we can reconsider it for master.

It is not desirable that single broken packages can hard-fail the entire
build pipeline.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years ago
Jo-Philipp Wich 6c16d64b2a Revert "build: add option to warn on recursive dependency"
This reverts commit 3204430e38.

Reverting this commit in preparation for reverting
dcf3e63a35 ("build: scripts/config - update to kconfig-v5.6") which
introduces various unaddressed build breakages.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years ago
Jo-Philipp Wich fbc01f2a4c Revert "build: config: allow bool to select a module pkg"
This reverts commit 8514b6b42c.

Reverting this commit in preparation for reverting
dcf3e63a35 ("build: scripts/config - update to kconfig-v5.6") which
introduces various unaddressed build breakages.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years ago
Jo-Philipp Wich 93294b516e generic: drop 616-net_optimize_xfrm_calls.patch
The conditional check introduced by this patch may trigger a NULL pointer
dereference in case the result of dev_net() is NULL.

Since the purpose of this patch is neither sufficiently explained and since
this patch apparently has never been submitted upstream despite it being in
the pending-* patch directory, I propose to drop it without replacement.

If the performance implications of dropping this patch are found to be
significiant, it should be reintroduced with proper description and
benchmark results.

Ref: https://bugs.openwrt.org/index.php?do=details&task_id=2943
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years ago
Hans Dedecker 8d9e26457c iproute2: update to 5.6.0
Update iproute2 to latest stable 5.6.0; for the changes see https://lwn.net/Articles/816778/

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
4 years ago
Kevin Darbyshire-Bryant 46e9a35923 Revert ".gitignore: ignore more scripts/config output"
This reverts commit c39d01596a.

It turns out the extra files were from an old config and are not
re/created by the new config.  Apologies for the noise.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years ago
Eneas U de Queiroz 8514b6b42c build: config: allow bool to select a module pkg
kconfig-v5.6 disallowed a bool symbol to select another symbol that
'depends on m' (i.e. can be only 'm' on 'n').  It is, in fact, an unmet
dependency to have set to 'y'.  However, openwrt depends on the previous
behavior, to be able to build a package that can be a module or built-in
depending on a bool config.  This restores the previous behavior.

Ref: https://forum.openwrt.org/t/wireless-fails-on-snapshot-r12900-kernel-5-4-on-c2600-ipq806x
Tested-by: Hannu Nyman <hannu.nyman@iki.fi>
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [added forum ref]
4 years ago
Pawel Dembicki c30220d458 ipq40xx: add support for Cell C RTL30VW
Cell C RTL30VW is a LTE router with tho gigabit ethernets and integrated
QMI mPCIE modem.

This is stripped version of ASKEY RTL0030VW.

Hardware:

Specification:
-CPU: IPQ4019
-RAM: 256MB
-Flash: NAND 128MB + NOR 16MB
-WiFi: Integrated bgn/ac
-LTE: mPCIe card (Modem chipset MDM9230)
-LAN: 2 Gigabit Ports
-USB: 2x USB2.0
-Serial console: RJ-45 115200 8n1
-Unsupported VoIP

Known issues:

None so far.

Instruction install:

There are two methods: Factory web-gui and serial + tftp.

Web-gui:
1. Apply factory image via stock web-gui.

Serial + initramfs:
1. Rename OpenWrt initramfs image to "image"
2. Connect serial console (115200,8n1)
3. Set IP to different than 192.168.1.11, but 24 bit mask, eg. 192.168.1.4.

4. U-Boot commands:
sf probe && sf read 0x80000000 0x180000 0x10000
setenv serverip 192.168.1.4
set fdt_high 0x85000000
tftpboot 0x84000000 image
bootm 0x84000000

5. Install sysupgrade image via "sysupgrade -n"

Back to stock:

All is needed is swap 0x4c byte in mtd8 from 0 to 1 or 1 to 0,
do firstboot and factory reset with OFW:

1. read mtd8:
dd if=/dev/mtd8 of=/tmp/mtd8
2. go to tmp:
cd /tmp/
3. write first part of partition:
dd if=mtd8 of=mtd8.new bs=1 count=76
4. check which layout uses bootloader:
cat /proc/mtd
5a. If first are kernel_1 and rootfs_1 write 0:
echo -n -e '\x00' >> mtd8.new
5b. If first are kernel and rootfs write 1:
echo -n -e '\x01' >> mtd8.new
6. fill with rest of data:
dd if=mtd8 bs=1 skip=77 >> mtd8.new
7. CHECK IF mtd8.new HAVE CHANGED ONLY ONE BYTE! e.g with:
hexdump mtd8.new
8. write new mtd8 to flash:
mtd write mtd8.new /dev/mtd8
9. do firstboot
10.reboot
11. Do back to factory defaults in OFW GUI.

Based on work: Cezary Jackiewicz <cezary@eko.one.pl>

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
4 years ago