Is it possible to change "modelname" through image builder?

Would like to know if there is a way to change "Model" name shown in luci, from "Zbtlink ZBT-WR8305RT" to something else, my device is infamous but openwrt firmware of Zbtlink ZBT-WR8305RT works well in my device

in "theory" it is possible... but it's no simple task...

what are the model details for your device and do you think everything ( led, network switch page, mac addresses compared to original software ) is working correctly?

( if all that matters is luci... changing the luci webcode value is a simpler 'one-off' fix... but if most things are working well... it should be easy to add the device in the proper way )

1 Like

the LED is not match, but my router has WPS led which i think its not exist in ZBT firmware, it becomes led of LAN but it's not a big problem for me, other LED like power and wifi just fine

1 Like

i just tried to make modification in /etc/sysinfo/model in live system and it work but after reboot it back to default,
if i palce /tmp/sysinfo/model in image builder files and set chmod and chattr in there to "read-only", and then rebuild, do you think it will work ?

1 Like

smart thinking! /tmp is tricky though...


better would be to change 02_sysinfo @ /lib/preinit ( on snapshot not sure of its the same on your version )...

/lib/preinit/02_sysinfo:do_sysinfo_generic() {
/lib/preinit/02_sysinfo:	mkdir -p /tmp/sysinfo
/lib/preinit/02_sysinfo:	[ -e /tmp/sysinfo/board_name ] || \
/lib/preinit/02_sysinfo:		echo "$(strings /proc/device-tree/compatible | head -1)" > /tmp/sysinfo/board_name
/lib/preinit/02_sysinfo:	[ ! -e /tmp/sysinfo/model -a -e /proc/device-tree/model ] && \
/lib/preinit/02_sysinfo:		echo "$(cat /proc/device-tree/model)" > /tmp/sysinfo/model

change the above file and use sed or create a fake file to copy over the above one in tmp after it is created...



#existingline echo "$(cat /proc/device-tree/model)" > /tmp/sysinfo/model
cat /model-replace > /tmp/sysinfo/model

NOTE: doing this will probably create issues with sysupgrade validation... so you would likely need to copy the original back prior to performing sysupgrade...

Mucking around with that will severely mess up sysupgrade functionality, for some questionable cosmetic belly rubbing.