1.6.5 Boards.txt for custom board

I'm trying to convert my 1.0.X boards.txt entries for the atmega640 converted over to 1.6.5. I had 2 entries, 1 for 16MHz, and 1 for 8MHz.

This worked fine in 1.0.6, and I was able to successfully convert 1 (either one) over to 1.6.5 and compile, upload, and I think even upload the bootloader (I never hooked one up to burn, but the only error message was not being able to communicate with the programmer - since there wasn't one). I had to make a platforms.txt and modify one entry (change compiler.path to "compiler.path={runtime.tools.avr-gcc.path}/bin/"), but I got it working with no errors.

Adding the second entry failed resulted it in not working. I was trying to add the secondary cpu menu, like you get for the Pro Mini, but the Processor sub-menu stubbornly refuses to show. I've compared to the built-in boards.txt, and cannot seem to make it show up, so obviously nothing will compile, etc. My latest (non-functioning) boards.txt:

mega640.name=Mega640

mega640.upload.tool=arduino:avrdude
mega640.upload.protocol=arduino
mega640.upload.maximum_size=61440
mega640.upload.maximum_data_size=8192


mega640.bootloader.tool=arduino:avrdude
mega640.bootloader.unlock_bits=0x3F
mega640.bootloader.lock_bits=0x0F
mega640.bootloader.low_fuses=0xFF
mega640.bootloader.high_fuses=0xDE
mega640.bootloader.extended_fuses=0xF5
mega640.bootloader.file=optiboot/optiboot_atmega640.hex

mega640.build.mcu=atmega640
mega640.build.board=AVR_ATmega640
mega640.build.core=arduino
mega640.build.variant=mega


## Arduino Mega640 (5V, 16MHz)
## -------------------------------------------------
mega640.menu.cpu.16MHzatmega640=atmega640 (5V, 16 MHz)

mega640.menu.cpu.16MHzatmega640.upload.speed=115200

mega640.menu.cpu.16MHzatmega640.build.f_cpu=16000000L


## Arduino Mega640 (3.3V, 8MHz)
## -------------------------------------------------
mega640.menu.cpu.8MHzatmega640=atmega640 (3.3V, 8 MHz)

mega640.menu.cpu.8MHzatmega640.upload.speed=57600

mega640.menu.cpu.8MHzatmega640.build.f_cpu=8000000L

I've tried moving some of the settings such as maximum_size, fuses, and even the mcu down into the .menu.cpu listings (same in both places of course), with no change in what the IDE shows.

What am I missing? It's got to be something obvious, but I'm not seeing it...

menu.cpu=Processor

Aha, thank you, I knew it had to be something simple! I never saw that line at the top of the file, 600 lines up from the proMini declarations... I noticed while poking through the latest Optiboot boards.txt that they (westfw I assume) set up a CPU speed menu, so I did that instead. Just added menu.mhz=CPU Speed to the top of boards.txt, and changed my *.cpu entries to .mhz. Works terrific as far as I can tell right now (I can reprogram my 8MHz 640 board so I call success). Thanks pert!