diff --git a/README.md b/README.md index 7e8be42..0dfaea1 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ The old HID-flasher doesn't compile on this version. You'll need to manually fix - `brew install --HEAD proxmark3` for latest non-stable from GitHub (use this if previous command fails) - `brew install --with-blueshark proxmark3` for blueshark support, stable release - `brew install --HEAD --with-blueshark proxmark3` for blueshark support, latest non-stable from GitHub (use this if previous command fails) + - `brew install --with-generic --with-flash proxmark3` build for generic (non-RDV4) devices with external flash chip, stable release ### Build options @@ -31,6 +32,14 @@ Firmware is built for the Proxmark3 RDV4 device by default. Use the following op - `--with-generic`: build for generic (non-RDV4) devices, see [platform](https://github.com/RfidResearchGroup/proxmark3/blob/master/doc/md/Use_of_Proxmark/4_Advanced-compilation-parameters.md#platform). - `--with-small`: enable build-time size limit for devices with 256kB flash, see [256kb versions](https://github.com/RfidResearchGroup/proxmark3/blob/master/doc/md/Use_of_Proxmark/4_Advanced-compilation-parameters.md#256kb-versions). +#### Platform extras + +RRG/Iceman Proxmark3 supports multiple [PLATFORM_EXTRAS](https://github.com/RfidResearchGroup/proxmark3/blob/master/doc/md/Use_of_Proxmark/4_Advanced-compilation-parameters.md#platform_extras) parameters. Multiple options can be used at the same time, but make sure, you select the correct ones for your device. + +- `--with-blueshark`: for blueshark support +- `--with-flash`: for generic proxmark 3 devices with external flash chip +- `--with-smartcard`: for generic proxmark 3 devices with smartcard support + #### Removing features It's possible to remove features to reduce firmware size for 256kB devices using options such as `--without-lf`, `--without-hitag`, etc. diff --git a/proxmark3.rb b/proxmark3.rb index 36b5313..13dd9d7 100644 --- a/proxmark3.rb +++ b/proxmark3.rb @@ -23,6 +23,8 @@ class Proxmark3 < Formula depends_on "rfidresearchgroup/proxmark3/arm-none-eabi-gcc" => :build option "with-blueshark", "Enable Blueshark (BT Addon) support" + option "with-smartcard", "Enable Smartcard support" + option "with-flash", "Enable Flash support" option 'with-generic', 'Build for generic devices instead of RDV4' option 'with-small', 'Build for 256kB devices' @@ -52,7 +54,14 @@ class Proxmark3 < Formula PLATFORM=#{build.with?('generic') ? 'PM3GENERIC' : 'PM3RDV4'} ] - args << 'PLATFORM_EXTRAS=BTADDON' if build.with? 'blueshark' + # Build PLATFORM_EXTRAS based on selected options + platform_extras = [] + platform_extras << 'BTADDON' if build.with? 'blueshark' + platform_extras << 'SMARTCARD' if build.with? 'smartcard' + platform_extras << 'FLASH' if build.with? 'flash' + + args << "PLATFORM_EXTRAS=#{platform_extras.join(' ')}" unless platform_extras.empty? + args << ' PLATFORM_SIZE=256 STANDALONE=