I've been trying to change the default 'Model' value (boardinfo.model) on LuCI from 'Raspberry Pi Compute Module 4 Rev 1.0' to 'Raspberry Pi Compute Module 4 Rev 1.0 - Custom v.1.0'
There's a board.json file located at /etc root and the information for the board is there. If I manually change this file, nothing happens in the front-end. LuCI remains with the old model name.
Thank you for your prompt response @anon50098793
This file is empty if I run 'vi /proc/cpuinfo' but it does return the model board if I type the command you suggested.
Do you know how can I change this information on the system?
Right.
I'm creating different images from the same raspberry pi boards. The difference is that one is using eMMC storage and the other an SD card. I would like to easily peek at LuCI and see on the "Model" row which board version is that (like Raspberry pi compute module 4 rev 1.0 - emmc or Raspberry pi compute module 4 rev 1.0 - SD).
Getting back to my question, thank you for your answer. When I try to edit the file at /proc/cpuinfo, the file is empty, but if I do "cat" I can see the model name there. Do you know why this is happening?
For what you need any minor http code modification to display storage in use seems more direct, given the need is to serve user level purposes...
Other paths get tricky as you are talking about build time and device definition changes which can effect the upgrade process...
it technically does apply to the Model field tho' ( rpi Revision from cpuinfo allows you to derive the 'sub-board' type ) but there are no delineations in OpenWrt for this kind of thing...
The "rpi-foundation" sort of fixes it all up inside the kernel rather than supply several separate dts files... which on many ways makes the whole thing really extensible... but in some instances as you see here... does not fit into typical ways of doing things...
BTW, thank you again for the very detailed instructions from this post.
I have used this a lot since I'm still learning how to deal with OpenWRT. Very useful.
If the purpose is just visually distinguishing the machine (or making it pretty*) in LuCI, you can just use
echo "Whatever you want to have it called" > /tmp/sysinfo/model
and also put that into rc.local.
This value is collected very early at bootup and later used by LuCI and a few other scripts. From what I gather this is a purely visual identifier that isn't used for any critical purposes anywhere.