I do not have a TL-WDR3500, but I want to see the default config files in order to build an appropriate custom image for a friend who has this device. My friend does not have enough skill to do anything besides uploading the image to flash the router when I send it to them. I'm using Linux, and I can use a Windows VM if for some reason that is helpful. My thoughts so far:
Maybe I could mount the .bin file and inspect the files. I tried using iat to convert the .bin to .iso, but it didn't work. Any hints?
Maybe the Image Builder or the full compiler have the files? Or maybe the config files are created during the compilation / image building process, and I could access them before they are compressed into the .bin file?
The build system can create a tar of the rootfs then you can examine it. But the network and wireless /etc/config files are created by scripts during the first boot, they do not exist in the ROM. So you almost have to run on an actual device to prepare a build for remote deployment.
Once you have config files, create a files subtree in your buildroot, (i.e. $BUILD_DIR/files/etc/config) and place the files there, they will be present ready to use in the ROM and the scripts will not replace them.
Are there options to select or commands to pass that specify "create a tar of the rootsfs"?
My recent attempt with the build system failed, maybe due to this bug which says "solved" but doesn't work for me. I could open a new thread if needed.
Is it practical to read the scripts and understand what the result will be?
Does it make a difference whether I put my new config in as a script or as config files? It seems that with a script, I don't have to know the internal identifier for the wifi-device in order to change the SSIDs on it, but for a config file I must know the internal ID?
I see
The most important settings I want to define are these. (EDIT: Can I define these safely without knowing the default config created by the first-boot init scripts?):
config 'wifi-iface'
option 'device' 'wl0' # can I skip this in order to apply the settings to both devices?
option 'network' 'lan'
option 'mode' 'ap'
option 'ssid' 'MyWifiAP'
option 'encryption' 'psk2'
option 'key' 'secret passphrase'
Bonus would be:
create a separate user that only has permission to change WiFi password, nothing else. I see how to create a user, but I don't see how to limit their permissions.
create a way for me to access the router remotely. Given there is no static IP, I'm guessing SSH won't work unless I setup WireGuard, ZeroTier, babel, tinc, or something like that.
@mk24, thank you very much, this worked perfectly. Also, by looking in /etc/uci-defaults, I see the startup scripts. Something strange: documentation says:
Once the script has run successfully and exited cleanly (exit status 0), it will be removed from /etc/uci-defaults. You can still consult the original in /rom/etc/uci-defaults if needed.
But /rom does not have the /etc/uci-defaults files, though the file I put in uci-defaults is present.
$ ls -a rom
. .. note
Also, after making .config using config.buildinfo from the repo, make menuconfig and make defconfig, I see these lines, and I wonder what might happen if I change them by hand in .config before running make? Maybe this is dangerous, and it's safer to use uci scripts and config files?