Bootloader complete and working.  Unfortunately it is JUST too large to fit in 4kB, so it has to be allocated 8kB of program memory (ouch!)