What you want to do is clone the firmware repository, then install the gcc arm toolchain from here: https://launchpad.net/gcc-arm-embedded/+milestone/4.9-2015-q3-update and make sure it is installed in your PATH
Next, go into the modules/ folder of the firmware repo and type:
make PARTICLE_DEVELOP=1 PLATFORM=bluz-gw APP=bluz_gateway
That should build the firmware. There will be two files that get generated, the both int he top-level build/target folder. The first is build/target/system-part1/platform-269-m/system-part1.bin and the second is build/target/user-part/platform-269-m/bluz_gateway.bin. If you are only changing files in the system firmware (the links above) then you only need to flash that part. To do that, the CLI is easiest, just do:
particle flash <device ID> build/target/system-part1/platform-269-m/system-part1.bin
This will trigger an OTA update, where the D7 LED will blink like crazy and the system will then reboot and come back online.
This isn't the easiest way, and if you make a bad firmware file and flash it down, you can stop the shield from working properly. A JTAG programmer will make this easiest, then you can flash away directly without concern for breaking the shield. I would recommend the STLink v2 with an adapter from the 20-pin cable on the programer to the 10-pin header on the gateway shield. Here is an example of the adapter board, not sure if you can find one sourced locally: https://www.adafruit.com/products/2094
And then you need this cable: https://www.adafruit.com/products/1675
We then use a program called Adalink which makes it easy to program the board: https://github.com/adafruit/Adafruit_Adalink
While you can do OTA updates, it can be troublesome and can lead to the board stopping working. The programmer would mitigate all risks, so I would recommend that.