What does the Atmel documentation say? For the 8051 family they have a piece of freeware called FLIP that can download files and program the FLASH memory through the serial port.
what's a bootloader? it's a software in the chip that is allowed to write software in the chip. How to write one? no idea. search the internet. atmel.com may have some answers. also google.