0
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2025-10-30 00:06:36 +00:00
Files
Tianling Shen 8a7de107d8 mediatek: add Konka KOMI A31 support
This board is also as known as E-Life ETR631-T/ETR635-U.

Hardware specification:
  SoC: MediaTek MT7981B 2x A53
  Flash: 128 MB SPI-NAND
  RAM: 256MB DDR3
  Ethernet: 4x 10/100/1000 Mbps
  Switch: MediaTek MT7531AE
  WiFi: MediaTek MT7976C
  Button: Reset, Mesh
  Power: DC 12V 1A

Gain telnet access:
1. Login into web interface, and download the configuration.
2. Uncompress the configuration:
     * Enter fakeroot if you are not login as root.
   tar -zxf <filename>.tar.gz
3. Edit 'etc/passwd', remove root password: 'root::1:0:99999:7:::'.
4. Edit 'etc/rc.local', insert telnetd command before 'exit 0':
   ( sleep 3s; telnetd; ) &
5. Repack the configuration:
   tar -zcf backup.tar.gz etc/
6. Upload new configuration via web interface, now you can connect to
   KOMI A31 via telnet.

Flash instructions:
1. Connect to KOMI A31, backup everything, especially 'Factory' part.
2. Write new BL2:
   mtd write openwrt-mediatek-filogic-konka_komi-a31-preloader.bin BL2
3. Write new FIP:
   mtd write openwrt-mediatek-filogic-konka_komi-a31-bl31-uboot.fip FIP
4. Set static IP on your PC:
   IP 192.168.1.254/24, GW 192.168.1.1
5. Serve OpenWrt initramfs image using TFTP server.
6. Cut off the power and re-engage, wait for TFTP recovery to complete.
7. After OpenWrt has booted, perform sysupgrade.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/20357
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-10-23 00:00:04 +02:00

155 lines
3.5 KiB
Plaintext

#
# Copyright (C) 2021 OpenWrt.org
#
[ -e /etc/config/ubootenv ] && exit 0
touch /etc/config/ubootenv
. /lib/uboot-envtools.sh
. /lib/functions.sh
board=$(board_name)
ubootenv_add_mmc_default() {
ubootenv_add_mmc "ubootenv" "${1:-mmcblk0}" "0x0" "0x40000" "0x40000" "1"
ubootenv_add_mmc "ubootenv" "${1:-mmcblk0}" "0x40000" "0x40000" "0x40000" "1"
}
ubootenv_add_nor_default() {
ubootenv_add_mtd "u-boot-env" "0x0" "0x20000" "0x20000" "1"
ubootenv_add_mtd "u-boot-env" "0x20000" "0x20000" "0x20000" "1"
}
case "$board" in
abt,asr3000|\
asus,zenwifi-bt8-ubootmod|\
cmcc,a10-ubootmod|\
cudy,tr3000-v1-ubootmod|\
h3c,magic-nx30-pro|\
jcg,q30-pro|\
konka,komi-a31|\
mercusys,mr90x-v1-ubi|\
netcore,n60|\
netcore,n60-pro|\
netis,nx31|\
nokia,ea0326gmp|\
qihoo,360t7|\
routerich,ax3000-ubootmod|\
snr,snr-cpe-ax2|\
tplink,tl-xdr4288|\
tplink,tl-xdr6086|\
tplink,tl-xdr6088|\
tplink,tl-xtr8488|\
xiaomi,mi-router-ax3000t-ubootmod|\
xiaomi,mi-router-wr30u-ubootmod|\
xiaomi,redmi-router-ax6000-ubootmod|\
zyxel,ex5601-t0-ubootmod)
ubootenv_add_ubi_default
;;
acer,predator-w6|\
acer,predator-w6d|\
acer,vero-w6m|\
glinet,gl-mt2500|\
glinet,gl-mt6000|\
glinet,gl-x3000|\
glinet,gl-xe3000|\
huasifei,wh3000|\
nradio,c8-668gl)
ubootenv_add_mmc "u-boot-env" "" "0x0" "0x80000"
;;
asus,rt-ax59u)
ubootenv_add_uci_config "/dev/mtd0" "0x100000" "0x20000" "0x20000"
;;
bananapi,bpi-r3|\
bananapi,bpi-r3-mini|\
bananapi,bpi-r4|\
bananapi,bpi-r4-poe|\
cmcc,rax3000m|\
jdcloud,re-cp-03)
. /lib/upgrade/fit.sh
export_fitblk_bootdev
case "$CI_METHOD" in
ubi)
ubootenv_add_ubi_default
;;
emmc)
bootdev=${EMMC_KERN_DEV%%p[0-9]*}
ubootenv_add_mmc_default "${bootdev#/dev/}"
;;
default)
ubootenv_add_nor_default
;;
esac
;;
buffalo,wsr-6000ax8|\
mercusys,mr80x-v3|\
mercusys,mr90x-v1|\
routerich,ax3000|\
routerich,ax3000-v1|\
tenbay,wr3000k|\
tplink,re6000xd)
ubootenv_add_mtd "u-boot-env" "0x0" "0x20000" "0x20000" "1"
;;
comfast,cf-e393ax|\
iptime,ax3000m)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x80000"
;;
asiarf,ap7986-003|\
cetron,ct3003|\
edgecore,eap111|\
netgear,wax220|\
zbtlink,zbt-z8102ax|\
zbtlink,zbt-z8103ax)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
;;
dlink,aquila-pro-ai-m30-a1|\
dlink,aquila-pro-ai-m60-a1)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000"
;;
gatonetworks,gdsp)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
;;
glinet,gl-mt3000)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x20000"
;;
openembed,som7981)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x80000"
ubootenv_add_uci_sys_config "/dev/mtd3" "0x0" "0x100000" "0x100000"
;;
openwrt,one)
ubootenv_add_ubi_default
;;
smartrg,sdg-8733|\
smartrg,sdg-8733a|\
smartrg,sdg-8734)
ubootenv_add_mmc "u-boot-env" "mmcblk0" "0x0" "0x8000" "0x8000"
;;
tplink,archer-ax80-v1)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000" "8"
;;
ubnt,unifi-6-plus)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x10000"
;;
teltonika,rutc50)
ubootenv_add_mtd "u-boot-env" "0x0" "0x10000" "0x10000"
;;
xiaomi,mi-router-ax3000t|\
xiaomi,mi-router-wr30u-stock|\
xiaomi,redmi-router-ax6000-stock)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x10000" "0x20000"
;;
zyxel,ex5601-t0)
ubootenv_add_mtd "u-boot-env" "0x0" "0x20000" "0x40000" "2"
;;
zyxel,ex5700-telenor)
ubootenv_add_uci_config "/dev/ubootenv" "0x0" "0x4000" "0x4000" "1"
;;
esac
config_load ubootenv
config_foreach ubootenv_add_app_config
exit 0