Stable Firmware Release v14


 
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.

Not sure that I understand any of this (I'm a hardware guy:confused:) but I'm going to try.

I assume that this will need to be done on a Linux box, so step 1 will be setting up VMware on my laptop and create a virtual linux machine.

to be continued.....
 
Last edited:
Now I remember again why I hate linux so much.

Ubuntu doesn't know what mksquashfs4 means and if I try mksquashfs instead then everything after "-comp xz" doesn't compute. :mad:

Do I need to do this on a RPI running LEDE? or is there an easy way to run LEDE on VMware?
 
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.
 
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.

Thanks Bryan, this helped a lot!
Mksquashfs4 kind of works now and I can create a modified squashsf file. However " -fixed -time `date "+%s"` " still gives an "invalid option" error, But if I delete this last bit I can create the file.

I'm traveling at the moment so I don't have access to a HM so I can't test if the changes really work, but so far so good.
 
I upgraded to the new version yesterday before an overnight cook. I've also been having intermittent issues accessing my device over the network (4.2 hardware, Edimax wifi). And by intermittent, I mean most of the time I can't access it. Until you figure this issue out, is the best solution at the moment to downgrade to the previous version?
 
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.
 
Managed to create an outputimage, but what is the next step? I get a non bootable SD card when I flash this image to an SD card (Win32Diskimager).

The outputimage is 19.9MB so that seems to be about right but I suspect that something goes wrong with boot and root offsets.

Code:
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
 
Oops looks like you'll also need the ptgen program (OpenWrt/LEDE exclusive) https://heatermeter.com/devel/tmp/

Put that in the same directory as the gen...sh script. You'll also need to modify the script to be ./ptgen instead of just ptgen if the current directory is not in your path (it usually is not).
 
Yes ! Succes ! Thanks again Bryan.

Now, next question (pushing my luck). How can I alter the default settings of the HM? I would like to make the default settings metric and change the probes back to ET72/73.
 
Great! There's not an easy way to change the defaults on the HeaterMeter because that's all compiled in. What you could do is just make it update the HeaterMeter configuration on firstboot. Create a file /etc/uci-defaults/99-my-defaults (any name is fine but start it with 99-)
Code:
#!/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

Make sure to `chmod +x /etc/uci-defaults/99-my-defaults` as well so it will execute.
 
I've you're on Mac, make sure you're using the latest Pi Baker to write the SD card image. If not, then I'm not sure what the issue could be. You could try adding panic=0 to cmdline.txt on the SD card and it probably won't boot loop if there's a kernel panic causing the issue. If that is the case then you can see the error message on a screen if you hook something up to the HDMI jack.
 
Not Mac. Windows 10 using win32diskimager. I can get it working with an older image, and then if I update either by writing to the SD or using the web interface backup/flash firmware page, it causes the reboot loop. I hooked up to a screen but the loop happens so fast I can't read the error. I'll try the panic=0 tonight.
 
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.

Any news regarding the flaky Edimax WiFi driver for v14. Should I update to the latest (12/1/2017) snapshot?
 

 

Back
Top