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.
- 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.
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.