Bryan Mayland
TVWBB Hall of Fame
Oh nice! So one fewer step there. The standard image is still built 64KB aligned though just in case because what's a few bytes between smoky friends?
I've spent some time thinking about it and I can't think of how to do this in a persistent way. The old "config reset" was sort of half broken in that it only could reset certain files so it could leave things half reset, and it didn't work with the newer rebootless configuration restore process. The only way you can do this is to mod the squashfs image you use. It's a one time thing and can easily be scripted so I'd encourage you to do that.
- Grab the two parts of the image from the proper target https://heatermeter.com/dl/stable_14/ you need boot.img and root.squashfs and the gen_rpi_sdcard_img.sh which is constant.
- unsquashfs root.squashfs and copy your changes into the filesystem
- rebuild the squashfs
Code:mksquashfs4 XXX YYY -nopad -noappend -root-owned -comp xz -Xpreset 9 -Xe -X lc 0 -Xlp 2 -Xpb 2 -Xbcj arm -b 256k -p '/dev d 755 0 0' -p '/dev/console c 600 0 0 5 1' -processors 1 -fixed -time `date "+%s"` # Where XXX is the directory with the uncompressed filesystem and YYY is the output file name
- Make sure the squashfs image is a multiple of 64KB if you're going to flash it using a Mac flashing program that needs it to be
- gen_rpi_sdcard_img.sh outputimage.img boot.img YYY 19 64
The only magic is really the mksquashfs command and I'm not sure how much of that is even actually needed.
wget https://heatermeter.com/devel/tmp/mksquashfs4
chmod +x mksquashfs4
Nope, actually LEDE doesn't have the tools needed to build the filesystem, only the kernel knows how to uncompress it. Looks like squasfs with xz compression isn't in the Ubuntu package? Weird.
Code:wget https://heatermeter.com/devel/tmp/mksquashfs4 chmod +x mksquashfs4
I've also noticed the command line I have above has an extra space `-X lc 0` should be `-Xlc 0`. I've fixed that above.
You must be running a really old version of Ubuntu. The -comp xz option is there as of version 14.04
http://manpages.ubuntu.com/manpages/trusty/man1/mksquashfs.1.html
Ah I didn't look into it too much. Looks like on my 17.10 system it doesn't like the Xpreset option which is something that the LEDE people exposed in May of this year (some sort of bitflag for setting LZMA compressor parameters looking at the patch).You must be running a really old version of Ubuntu. The -comp xz option is there as of version 14.04
http://manpages.ubuntu.com/manpages/trusty/man1/mksquashfs.1.html
head=4
sect=63
+ BOOTOFFSET=0
+ BOOTSIZE=0
+ ROOTFSOFFSET=0
+ ROOTFSSIZE=0
+ dd bs=512 if=bootimg of=outputimage seek=0 conv=notrunc
38912+0 records in
38912+0 records out
19922944 bytes (20 MB, 19 MiB) copied, 1.15571 s, 17.2 MB/s
+ dd bs=512 if=rootsquashfs of=outputimage seek=0 conv=notrunc
8948+1 records in
8948+1 records out
4581678 bytes (4.6 MB, 4.4 MiB) copied, 0.0634676 s, 72.2 MB/s
#!/bin/sh
lmclient LMCF,sp,C
lmclient LMCF,pc0,2.4723753e-04,2.3402251e-04,1.3879768e-07
lmclient LMCF,pc1,2.4723753e-04,2.3402251e-04,1.3879768e-07
lmclient LMCF,pc2,2.4723753e-04,2.3402251e-04,1.3879768e-07
lmclient LMCF,pc3,2.4723753e-04,2.3402251e-04,1.3879768e-07
Yeah the Edimax wifis are the worst, I should have an updated snapshot today with good client mode wifi for them enabled so I'd suggest going that for the quick fix once I have it up. If you don't want to wait for the snapshot, then v13 works as well but you'll lose all your network configuration as the old config_restore can't restore a new backup.