Clarification about board.json and sysinfo
Ansuel Smith
ansuelsmth at gmail.com
Fri Apr 29 07:18:40 PDT 2022
I'm checking files that are created on a clean system
with initramfs and I'm a bit confused about 2 files
I notice that for preinit we create board.json in /tmp
but we have the same file in /etc/board.json...
Considering that /tmp/board.json comes from
10_indicate_preinit and the file is used just to get an
ip and send the packet with Openwrt alerting the preinit
state and considering this is called before mount_root.
Can't we generate / ship the board.json directly in /etc and
load it from rom instead of /tmp? Or is it mandatory to run
on a loaded system? Looking at the files from board.d most
of them are static and the only relevant part needed from a
loaded system is the 99-default_network with the eth1 check.
To me it looks like this can be handled differently considering
it's all done before rootfs is mounted so we already know the
state of the system and it is always the same.
The other concern is the sysinfo file... I assume sysinfo was
created before board.json. Thing is they contain the same value.
sysinfo create from 02_sysinfo a directory in /tmp and puts
the model and the device id in some files... Values that are
already present in board.json... (and that they are static so
I can't understand why they are created in the first place...
Can't we use a function in functions.sh to get the data directly?)
So I wonder if anyone have some info about these 2 thing and
if they are used by other package. To me it looks like they are
leftover from an old implementation that is now deprecated.
More information about the openwrt-devel
mailing list