4MHz bootloaders

Hi all,
I would like to ask you about 4MHz bootloaders for ATMEGA328P. I make a project where I want to use ATMEGA328P running on 4MHz with external oscilator. Is there any possibility how to convert bootloaders to 4MHz? Or are there any already created? Currently I was using mostly APM Optiboot internal 1MHz noBOD 9600 BAUD bootloader. Would be there possibility to convert it to 4MHz external?

Here is info about the APM Optiboot bootloader if needed.

But anyway, it can be any other bootloader which would be converted to 4MHz.

Have you tried just running the stock 16MHz bootloader and changing the upload speed to 28800? (115200/4)

No I did not as I thought there has to be changed the fuses to tell to the chip that 4MHz speed will be used or some other fuses modification needed too.

Looks I succeeded. I had to change the LOW fuses to correct value. I modified the APM Optiboot bootloader to accept 4MHz external oscilator. Here is the correct settings which need to be add to the boards.txt file:

##############################################################

apm96_4MHz.name=APM Optiboot external 4MHz noBOD 38400baud

apm96_4MHz.upload.tool=avrdude
apm96_4MHz.upload.protocol=arduino
apm96_4MHz.upload.maximum_size=32256
apm96_4MHz.upload.speed=38400
apm96_4MHz.bootloader.tool=avrdude
apm96_4MHz.bootloader.low_fuses=0xfd
apm96_4MHz.bootloader.high_fuses=0xde
apm96_4MHz.bootloader.extended_fuses=0x07
apm96_4MHz.bootloader.path=optiboot_v50
apm96_4MHz.bootloader.file=atmega328_1a_4MHz.hex
apm96_4MHz.bootloader.unlock_bits=0x3F
apm96_4MHz.bootloader.lock_bits=0x2F
apm96_4MHz.build.mcu=atmega328p
apm96_4MHz.build.f_cpu=4000000L
apm96_4MHz.build.core=arduino
apm96_4MHz.build.variant=standard

##############################################################

The bootloader file stay the same.

I will test this solution and will add some more info later.

By the way here is nice fuses configurator.