Just a quick hint, didn't see this anywhere in the documentation or in the forums, so hope this helps.
Reference (20MHz core):
atmega328_20.build.mcu=atmega328p
atmega328_20.build.f_cpu=20000000L
atmega328_20.build.core=arduino:arduino
atmega328_20.build.variant=arduino:standard
When you have a piece of custom hardware in your <sketch folder>/hardware/<board type>/boards.txt, sometimes you just want to use an existing Arduino core. Documentation hints about the <board name>.build.core=<board type>:<core folder> format, but you also need to do the same thing for <board name>.build.variant=<board type>:<variant folder> to allow it to find the correct pins_arduino.h file.