The boot loader is a piece of early initialization code and is responsible for initializing the board so that other programs can run later, mostly we run embedded linux.
So it needs to:
0. Reset, most of architecture fetch code on physical address 0x0 (or other fixed address), which is locate on flash; Enable MMU, setup L1 cache, exception vectors;
1. Initialize base hardware – CPU speed, DRAM controller, interrupts, detect ram size;
2. Initialize any devices it needs to use for reading the kernel and root images and other on board peripherals;
3. Arrange a block of contiguous physical memory for the kernel, starting at a particular address, and another for the root (ramdisk/initramfs), also contiguous, but not necessarily adjacent to that for the kernel;
4. ROM-to-RAM; Copy the kernel and initrd into RAM;
5. Call the kernel with r0=0, r1=machine architecture number with the MMU and caches turned off. (arm)
Many open-source boot loaders are available, DAS U-Boot and eCos RedBoot ROM monitor are most popular of them.