Bootloader

In order to gain access to the bootloader, flash memory, settings and some special device specific options one needs a serial console connection. Flash memory and some settings can also be accessed directly from within Linux, for example using the MTD interface or on Broadcom based devices the nvram utility to set device settings. However, if you want to recover from a bad flash, and auto TFTP / BOOTP,boot_wait, etc is not enabled in your device, you definitely would like to gain access to the bootloader via s serial console to repair the situation.

Functions

  • Load new firmware to RAM using TFTP, BOOTP, HTTP, FTP, ...
  • Store firmware to Flash via low-level Flash access ( erase, copy blocks from RAM to Flash )
  • Load code (kernel, initrd) into memory
  • Auto Unzip/ un-lzma code
  • Boot a kernel
  • Change auto boot scripts
  • Change bootloader or device settings ( MAC address, default TFTP server, auto boot )

Depending on the manufacturer a rather limited set of features may be enabled. But most of them will allow to loading a new firmware, write it to flash and boot it.

Redboot, U-Boot and CFE are popular bootloaders.

The bootloader gives low-level access to Flash memory. Erasing flash memory blocks, In flash normally the bootloader is stored, the firmware (Linux kernel+root filesystem), and device/bootloader settings. See the OpenWrt Flash Layout page for extensive information on this subject.

Last modified 4 years ago Last modified on Nov 18, 2012, 6:43:37 PM