heatseeknyc / firmware

"Heat Seek OS" software running on the Heat Seek Hub's Raspberry π
0 stars 1 forks source link

updating heatseekos.img for v1.5 #18

Open williamcodes opened 8 years ago

williamcodes commented 8 years ago

We need to flash 40 new SD cards for the 40 new hubs we ordered and we don't want to have to ssh into all of them and manually upgrade the firmware. How do we create a new image? I tried using dd and reversing the if and of options, but the image it produces is the entire SD card, 7.8GB instead of just the OS itself. Because it's so large I then can't flash it onto any other SD cards. How did you make it the first time?

hrldcpr commented 8 years ago

The first time an SD card is booted on a π, it will expand the filesystem to fill the card.

So your best bet is probably to mount a fresh image on linux using @cromulus' magic—either directly from the image file, or by burning the image file to an SD card but not putting the card into a π. Then you can update things and dd that volume back into a .img file, and it should remain small I think.

Of course, the 'real' way is to use the build.sh script (in which the very last step is setting the filesystem expansion booby trap for the next reboot), but it sounds like there are still some things missing from the script. Anyway let me know if you can't get one of these ways working and I'll try on my π at home.

williamcodes commented 8 years ago

The version @cromulus and I came up with is having problems. It doesn't really save us any time over using the old image because we have to ssh in, git pull, and request the xbee ID again to get it working. Can you update the old image to v1.5 and run the migration on it? That would be super helpful. If you put it up on the relay server and I can scp it down and reflash all the SD cards.

hrldcpr commented 8 years ago

Oh I meant his way for mounting and updating the fresh image on a linux computer (not a hub) and then building an image from that.

But anyway regardless it's worth building a new one from scratch, so yeah I'll try it out when I get home, and then we'll have a working build.sh script too :hear_no_evil:

williamcodes commented 8 years ago

Ooooh gotcha, that makes sense. Actually, if you could get the server to handle v0.5 cells, that'll get put into use first. We can force update the hub firmware if we want the latest version, we can't force update the new sensors if we want to deploy them in the field.

hrldcpr commented 8 years ago

Okay cool I'll work on the hardware version stuff first. Although note that the changes will be entirely on the relay server. The hubs will not be aware of hardware versions at all, since they just report raw voltages now and don't know or care what types of cells they're talking to.

So you can actually start deploying new cells whenever you want, and the required data (voltages) will be stored, even though the temperatures calculated from those will be wrong until we update the relay server code.

Of course, it would be nice to know that they're actually reporting good temperatures before that, and hopefully it won't take me too long to implement… but just FYI.

williamcodes commented 8 years ago

Okay cool, I'll take a reading with one here and calibrate it to an HPD sensor. If you want to hold off on this until I have a base reading for you, issue #13 just became a higher priority anyway.

williamcodes commented 8 years ago

I meant to link to relay#13 in my previous comment, my mistake. It's closed now so we're good there. I put up the reading and calibration for it on relay#19.