Skip to content

v21.02.0 2021-09-02

Compare
Choose a tag to compare
@devbis devbis released this 02 Sep 08:16
· 588 commits to lumi-21.02 since this release

Release of OpenWrt 21.02.0 for Xiaomi DGNWG05LM and Aqara ZHWG11LM

YOU CANNOT UPGRADE FROM 19.07 IN A USUAL WAY !!!

Use individual DTBs and sysupgrade images for your device.

Backup your configuration manually, all data will be erased

Fresh install from stock is not supported.
To upgrade from 19.07:

0. Copy uboot, dtb, and sysupgrade files to the gateway

1. Replace model marks to allow upgrade with new files

Xiaomi:

sed -i 's/gw5/xiaomi,dgnwg05lm/' /lib/upgrade/platform.sh
sed -i 's/Wandboard i.MX6 Dual Lite Board/Xiaomi Gateway DGNWG05LM/' /lib/imx6.sh
sed -i 's/name="wandboard"/name="xiaomi,dgnwg05lm"/' /lib/imx6.sh

echo 'xiaomi,dgnwg05lm' > /tmp/sysinfo/board_name
echo 'Xiaomi Gateway DGNWG05LM' > /tmp/sysinfo/model
sed -i 's/"id": "[-a-z\.,]*"/"id": "xiaomi,dgnwg05lm"/' /tmp/board.json

sed -i 's/board_name="$1"/board_name="${1\/,\/_}"/' /lib/upgrade/nand.sh

Aqara:

sed -i 's/gw5/aqara,zhwg11lm/' /lib/upgrade/platform.sh
sed -i 's/Wandboard i.MX6 Dual Lite Board/Aqara Gateway ZHWG11LM/' /lib/imx6.sh
sed -i 's/name="wandboard"/name="aqara,zhwg11lm"/' /lib/imx6.sh

echo 'aqara,zhwg11lm' > /tmp/sysinfo/board_name
echo 'Aqara Gateway ZHWG11LM' > /tmp/sysinfo/model
sed -i 's/"id": "[-a-z\.,]*"/"id": "aqara,zhwg11lm"/' /tmp/board.json

sed -i 's/board_name="$1"/board_name="${1\/,\/_}"/' /lib/upgrade/nand.sh

2. Write new uboot:

opkg update && opkg install kobs-ng
[ -f u-boot.imx ] && kobs-ng init -x -v --chip_0_device_path=/dev/mtd0 u-boot.imx

3. Write new DTB:

Xiaomi:

[ -f openwrt-imx6-imx6ull-xiaomi-dgnwg05lm.dtb ] && flash_erase /dev/mtd2 0 0 && nandwrite -p /dev/mtd2 -p openwrt-imx6-imx6ull-xiaomi-dgnwg05lm.dtb

Aqara:

[ -f openwrt-imx6-imx6ull-aqara-zhwg11lm.dtb ] && flash_erase /dev/mtd2 0 0 && nandwrite -p /dev/mtd2 -p openwrt-imx6-imx6ull-aqara-zhwg11lm.dtb

4. Run sysupgrade in console:

Xiaomi:

[ -f openwrt-imx6-xiaomi_dgnwg05lm-squashfs-sysupgrade.bin ] && sysupgrade -v -n openwrt-imx6-xiaomi_dgnwg05lm-squashfs-sysupgrade.bin

Aqara:

[ -f openwrt-imx6-aqara_zhwg11lm-squashfs-sysupgrade.bin ] && sysupgrade -v -n openwrt-imx6-aqara_zhwg11lm-squashfs-sysupgrade.bin