Lots of interrelated changes here.

Ok, this is a biggie.

This update covers a number of issues in the task list, but they are all interrelated to a certain extent.

What we have here is:

1. Command line bootloaders.

The bootloaders.txt file contains definitions of how to execute bootloaders through the command line for uploading the hex file to different boards.  Currently it has an avrdude entry only.  Tokens on the command lines are replaced at run-time:

      //*   %H = Filename of hex file (including path)
      //*   %P = Port name as selected in menu
      //*   %B = Baud rate
      //*   %V = Verbose flag if verbose turned on
      //*   %O = Protocol from boards.txt
      //*   %T = Location of tools directory
      //*   %M = CPU Specification

Four command entries can be used:

xxx.command = generic command for all platforms
xxx.command_windows = windows specific command
xxx.command_macosx = mac specific command
xxx.command_linux = linux specific command.

If no OS specific command is provided it uses the generic command - thus you can override just one platform if you need to.

You also have the xxx.verbose and xxx.quiet entries.  These are put in place of the %V token.  If verbose compiling is turned on then it replaces %V with the xxx.verbose.  Otherwise it uses the xxx.quiet.

You select a bootloader to use in the boards.txt file as upload.using=whatever

If the entry isn't found it just uses avrdude as per normal.

2. Per variant configurations

You can now put certain files in the variant folder for a board and they will be picked up automatically.  These are:

folder: tools
This is used by the bootloading system to find the bootloader program specified in boootloaders.txt.  If the executable can be found in here it is used, otherwise it looks in the system default hardware/tools as per normal.

file: boards.txt
Contains the board definition in exactly the same format as the main platform boards.txt file

file: bootloaders.txt
Same as bootloaders.txt in the main platform.  Overrides exitsing entry by the same name.

file: Linker Script
This file can be named anything (typically ending with .ld) and is matched to the ldscript entry in the boards.txt file.  This normally would be in the cores/pic32 folder, but if the linker script can be found in the variant folder that script is used in preference.  Allows board specific linker scripts to be distributed with the board variant, as these are often dependant on the bootloader installed on the chip.

Ok, I think that covers all the changes.  I have tested this on Linux and Windows, but not OSX.  It could do with some more heavy testing on all operating systems before live release ;)