How do I change the U-Boot variable when flashing the firmware?

Hello guys,

I got a device, the JCG Q30 PRO. it is supported at ImmortalWrt, a fork of OpenWrt.

In the flashing tutorial, the developer created a "transition firmware" to switch from stock OpenWrt to ImmortalWrt on a U-Boot custom layout.

This allows users to flash other firmware without having to take the machine apart, which is great!

Now I want to try to submit a patch to get the OpenWrt mainline to support the device. But I'm a newbie and I'd like to know how to create a "transition firmware" like they did to make it easier for people to flash the OpenWrt mainline on the U-Boot layout of OpenWrt.

I'm just about to disassemble the unit and use the CH340 to access the serial port and start OpenWrt failsafe mode to enable Telnet, then extract the stock firmware.

Waiting for your help๐Ÿ˜˜

Is it not sufficient to just change U-Boot variables? This can easily achieved by extending the upgrade script that is run during sysupgrade. Quite a number od examples can be found in the OpenWrt sources.

1 Like

okay, thanks for telling me this, I'm still trying to figure out what I should do.

This is one example for the ZyXEL WSM20 where I modified U-Boot variables while flashing:

https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/ramips/mt7621/base-files/lib/upgrade/zyxel.sh;h=59c8d237dda4242c679b694ee5e592dbf8ff2ba5;hb=28df7f7ff251d8684caa60f07ed0ba0c4a8e71f4

This file is included in lib/upgrade/platform.sh

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.