1 - a solution to start openwrt from OEM u-boot
if not possible
compile a new u-boot or use another one
2 - see if the sysupgrade will work & if lan & wan are in good order
3 - the leds and buttons are only at the end of the tests
if you will use fn1 buton ( on-off leds ) requiert a special script
etc/rc.button/fn1 -> use oem binary: zyxel_led_ctrl
#!/bin/sh
# echo "[${BUTTON} button] ${ACTION} button" > /dev/console
# if [ "${ACTION}" = "pressed" ]; then
# fi
# if [ "${ACTION}" = "released" ]; then
# fi
/sbin/zyxel_led_ctrl BrightnessStepSW
leds all off`
#!/bin/sh
for p in `find /sys/devices/platform/leds/leds -name trigger`
do
echo none > $p
done
for p in `find /sys/devices/platform/leds/leds -name brightness`
do
echo 0 > $p
done
leds all on
#!/bin/sh
for p in `find /sys/devices/platform/leds/leds -name trigger`
do
echo none > $p
done
for p in `find /sys/devices/platform/leds/leds -name brightness`
do
echo 1 > $p
done
so to do:
you have to test the button fn1 pressed
you have to test the active leds & save leds statut
you must turn off the active leds
you must test the released fn1 button
you must restore the old status of leds
first press - PSYCHEDELIC leds mode, random lighting
button off this returns to the initial state
second press on everything leds turns off for energy saving mode
button off this returns to the initial state
Next step is flashing it into ROM. I'm going to try to do a sysupgrade from initramfs to see if sticks. Otherwise I will need to build a factory build but the problem here is that I'm not sure which parameters should be passed to the kernel to build such optimally. I don't have references moreover this device seems to be pretty unique in many aspects despite of using many popular components.
bootnum - MSTC write bootnum into persist ( 0 or 1 )
1. Startup system (Default)
2. Upgrade firmware
3. Upgrade bootloader
4. Upgrade bootloader (advanced mode)
5. Load image
6. Upgrade mtkfirmware
0. U-Boot console
Press UP/DOWN to move, ENTER to select
=> help
? - alias for 'help'
base - print or set address offset
bdinfo - print Board Info structure
boot - boot default, i.e., run 'bootcmd'
bootd - boot default, i.e., run 'bootcmd'
bootm - boot application image from memory
bootmenu- ANSI terminal bootmenu
bootnum - MSTC write bootnum into persist
bootp - boot image via network using BOOTP/TFTP protocol
chpart - change active partition
cmp - memory compare
coninfo - print console devices and information
cp - memory copy
crc32 - checksum calculation
echo - echo args to console
editenv - edit environment variable
env - environment handling commands
fdt - flattened device tree utility commands
go - start application at address 'addr'
gpio - query and control gpio pins
help - print command description/usage
iminfo - print header information for application image
itest - return true/false on integer compare
loadb - load binary file over serial line (kermit mode)
loads - load S-Record file over serial line
loadx - load binary file over serial line (xmodem mode)
loady - load binary file over serial line (ymodem mode)
loop - infinite loop on address range
md - memory display
mm - memory modify (auto-incrementing address)
mstc_bootnum- MSTC DUAL image boot and check bootnum
mstc_img_chk- MSTC DUAL image boot and check image
mtdparts- define flash/nand partitions
mtkautoboot- Display MediaTek bootmenu
mtkboardboot- Boot MT7621 firmware
mtkload - MTK image loading utility
mtkupgrade- MTK firmware/bootloader upgrading utility
mw - memory write (fill)
nand - NAND sub-system
nboot - boot from NAND device
nm - memory modify (constant address)
printenv- print environment variables
reset - Perform RESET of the CPU
run - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv - set environment variables
setexpr - set environment variable as the result of eval expression
sleep - delay execution for some time
source - run script from memory
tftpboot- boot image via network using TFTP protocol
version - print monitor, compiler and linker version
=>
Nothing special
You are running a command that doesn't make sense because there is no Image 0 because this router doesn't have slots.
I'm not going to upgrade the firmware throught the U-Boot, I don't know how it will behave.
You are the one that likes playing with fire upgrading bootloaders