[Mr. Right: blog.csdn.net/lanmanck]
For Embedded Linux systems, firmware update is a required feature. Google does not seem to talk much about it. If you know xdjm, please leave a message. I will update it.
Now let's talk about the update idea. We will update this article later.
1. First, set up the system architecture, such as partition function. For example, layout of nandflash:
1) bootloader
2) Kernel
3) ramfs
4) rootfs
After parsing, we will not talk about boot and kernel. ramfs is specially used for upgrade. For example, when I start it, I press a button on the circuit board, the bootloader copies ramfs to Ram and then mounts the kernel to ramdisk. Finally, run the Upgrade Program in ramdisk to upgrade all the others.
2. The upgrade method can be implemented through SD card, USB, and network. Now let's talk about the network, that is, webserver upgrade.
All those who have used vrouters know that after logging on to the vro, a firmware update function is implemented through webserver. How does this happen?
First, we need a wevserver, then a UI, namely the HTML interface, and finally a program to analyze your firmware, such as CGI. You can use the following expression to solve the problem:
Lighttpd + CGI + ipkg
Next lecture.