Every months there's new update for my WNDR4700, but when I install using sysupgrade page. I loses the USB support since it is installed from outside (uPD72020x-firmware_2_powerpc_464fp.ipk), not only this but I also it broke the package which are installed online such as luci-app-samba, wpad kmod-mii kmod-usb-net kmod-usb-net-cdc-ether kmod-usb-net-rndis
Is there anyway to update ROM without any problem ? Or Tell me what you do? share your experience with me? @chunkeey
You do have 256MB flash size? Maybe you could create a /etc/postinit folder, and add it to /etc/sysupgrade.conf and put your files for default restoration there. Then, sysupgrade preserving settings (not sure if without it the sysupgrade take into consideration the files/folders to preserve but I don't think so). That way you could do opkg install /etc/postinit/mypackage.ipk from that directory after the upgrade. Just a guess thought.
Also add /etc/rc.button/xyz to your /etc/sysupgrade.conf.
And from what I recall, extroot (I suppose that's what you mean by overlay) will just add trouble to a sysupgrade.
Edit: This will still require hardwired access unfortunately, but might help cut down your upgrade time.
Edit2: Most importantly, you would need to update this folder with the packages and dependencies compiled and compatible for the release you plan to upgrade to before such upgrade.
As you can see, compiling your own firmware is clearly the safest/easiest path, that's why it was my first option.
Even if you have enough flash space at your disposal, you can't expect binary packages built for older LEDE versions to be installable or usable in newer versions/ snapshots. Most visibly this will explodes spectacularly for kernel modules, but everything else (except for very simple interpreted binaries)is affected by ABI differences (libc-, ssl versions, etc.). You really do need to install packages matching to your new firmware version, this leaves imagebuilder or building from source as your options.
As connectivity is broken after updating, the only easy update method is to compile a personal firmware with all needed packages included in the image. Then all packages are there right after the flash. Either compile from scratch, or cook up the firmware with imagegenerator.
You can also include your personal settings & scripts (like that button) as "custom files" both with compiling and with imagegenerator.
~/sysupgrade-wndr4700$ ls -l
-rw-r--r-- 1 user_xyz user_xyz 15 Oct 17 23:16 CONTROL
-rw-r--r-- 1 user_xyz user_xyz 1572880 Oct 17 23:16 kernel
-rw-r--r-- 1 user_xyz user_xyz 3158806 Oct 17 23:16 root
Now, the root file contains squashfs of **/**,
I am thinking to use unsquashfs and mksquashfs command to extract add my desired file K2013080.mem at /lib/firmware/ and repack as squashfs
and replace the new repacked squashfs to the original tar (lede-17.01.4-apm821xx-nand-WNDR4700-squashfs-sysupgrade.tar)
Is this approach going to work ? or I am going to break my router. Or I can do this in better way ( you tell me). I want discus with you guys before I do.
One more thing, I found some where how to use mksquashfs, used this command to make root.new file $ sudo mksquashfs squashfs-root root.new -b 1024k -comp xz -Xbcj powerpc -e boot
[sudo] password for user_xyz:
Parallel mksquashfs: Using 4 processors
Creating 4.0 filesystem on filesystem.squashfs, block size 1048576.
[===============================================================] 869/869 100%
Exportable Squashfs 4.0 filesystem, xz compressed, data block size 1048576
compressed data, compressed metadata, compressed fragments, compressed xattrs
duplicates are removed
Filesystem size 3007.08 Kbytes (2.94 Mbytes)
22.06% of uncompressed filesystem size (13629.08 Kbytes)
Inode table size 8098 bytes (7.91 Kbytes)
20.56% of uncompressed inode table size (39393 bytes)
Directory table size 11086 bytes (10.83 Kbytes)
45.44% of uncompressed directory table size (24395 bytes)
Number of duplicate files found 9
Number of inodes 1191
Number of files 876
Number of fragments 15
Number of symbolic links 209
Number of device nodes 1
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 105
Number of ids (unique uids + gids) 1
Number of uids 1
Number of gids 1
what should be block size for my router, compression format, etc etc, Kindly comment on these issue too
I am just curious, did it work out for you ?
Unfortunatly I can't help with this approach you were writing about.
Just asking, because Id be glad to add USB support! So if it worked out, me and for sure some more people would like to read here, how exactly you managed to solve this problem !