That question is too broad, but given that you omitted the single most important thing, I feel I need to pipe up.
Authenticate the update.
If you want to make sure that your devices are running your code, then you need authentication, not encryption. Encryption ensures that other people can't know what's in your code, and that's hard to achieve and rarely useful. (You can encrypt, but if the decryption key is on the device, you didn't gain anything unless you have a way to protect the decryption key that doesn't let you protect the code directly.) Authenticity is the property that other people can't produce a fake update, and that property is usually desirable.
Note that encrypting does not help with authenticity. This is a false belief that people who don't really understand security sometimes have, but it's just not true.
For some devices, it's fine to run any firmware if the owner so chooses. In that case, you still need some mechanism to ensure that only the owner of the device can install firmware, and not some random passer-by. Generally that means that the device must authenticate the update as coming from the registered owner.