I've been working on developing a custom image for my WG3526 router. I used the menuconfig while I was starting out, and got it tweaked with all the custom packages I wanted. If I include any custom files in the files/ folder, it builds and installs no problem.
However, I recently decided I wanted to use the imagebuilder because I have an IPK package I wanted to install by default. Everything works great when using the image builder. The problem I'm facing is I cannot include custom files in the image builder.
When I compile firmware with just additional packages it loads onto the router just fine. I've tried to compile the same image but with some replaced files (namely the config/network file), and it compiles just fine but when I flash it onto the router, it gets stuck with the IP of 169.254.145.88 and subnet mask 255.255.0.0 with no router ip.
I've tried putting custom files in different folders, I even tried just adding a custom file and not even replacing an existing one. It's still the same thing of the router not booting on.
The command I'm running inside my image builder folder is: make FILES="files/" I've also tried it with make FILES=files/ just in case it shouldn't have quotes. But every time, it compiles just fine but it will not boot on the router. However when I do just make it boots just fine on the router. So there seems to be a specific problem with the custom files being added in.
Currently the only custom file I'm testing with is /etc/config/network.
I ran the updated code with the cat << 'EOF' > ... on the firmware image which doesn't have the updated files and it went through just fine. I then restarted the router and it restarted perfectly. However, when I build the image with that command in the 99_network it will not boot.
@vgaetera If I'm understanding fully, you're saying to replace my script, and put your script into the 99_network file?
For sake of testing I removed all the contents of the 99_network file and rebuilt the image. The .bin file was the exact same size as my previous .bin file which had the contents in the 99_network file.
Even with a completely blank file, the router still won't power on.
I also created a blank file named network1 and pushed it to /etc/config, however that also causes the router to not power on. Any thoughts on that?