linuxleand
New Around Here
Hi!
I am trying to understand how a firmware upgrade process work in these AC routers and how it involves the NVRAM. Here's how I think it works:
Thanks a lot!
I am trying to understand how a firmware upgrade process work in these AC routers and how it involves the NVRAM. Here's how I think it works:
- Stock firmware shipped with the router consists of a few parts:
- Bootloader.
- Linux kernel image.
- Device drivers.
- rootfs (all files in the filesystem).
- Router settings.
- Maybe more stuff?
- The vendor is the first one to flash the firmware to the NVRAM chip for the first time. Different things go to different partitions in the NVRAM.
- Router settings are stored in a specific partition from the same NVRAM chip (the only area the nvram command works with).
- When the router boots up, the filesystem in the NVRAM is mounted in RAM (ramdisk).
- A firmware upgrade process would rewrite the whole NVRAM chip, including bootloader, kernel image, and rootfs partitions.
Thanks a lot!