From eb85ba4ebdf02285e048cf186651fbcfa0654a9b Mon Sep 17 00:00:00 2001 From: "Maxie D. Schmidt" Date: Tue, 1 Mar 2022 15:44:05 -0500 Subject: [PATCH 1/3] Create Mac-OS-X-Compile-From-Source-Instructions.md New documentation file to provide installation from source instructions on MacOS. This procedure has been tested on MacOS Big Sur. --- ...c-OS-X-Compile-From-Source-Instructions.md | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 doc/md/Installation_Instructions/Mac-OS-X-Compile-From-Source-Instructions.md diff --git a/doc/md/Installation_Instructions/Mac-OS-X-Compile-From-Source-Instructions.md b/doc/md/Installation_Instructions/Mac-OS-X-Compile-From-Source-Instructions.md new file mode 100644 index 000000000..6e5e0df03 --- /dev/null +++ b/doc/md/Installation_Instructions/Mac-OS-X-Compile-From-Source-Instructions.md @@ -0,0 +1,70 @@ + + +# Mac OS X - Compilation from source instructions + +# Table of Contents +- [Mac OS X - Compilation from source instructions](x#mac-os-x---compilation-from-source-instructions) +- [Table of Contents](#table-of-contents) + - [Installing build prerequisites via Homebrew](#installing-build-prerequisites-via-homebrew) + - [Configure the build](#configure-the-build) + - [Compilation from source](#compilation-from-source) + +## Installing build prerequisites via Homebrew +^[Top](#top) + +We need to install the ``openssl`` library with ``brew``: +```bash +brew install openssl +``` +To run the local install script below, we also require the GNU versions +of several core Unix utilities: +```bash +brew install coreutils +``` + +## Configure the build +^[Top](#top) + +Clone the repository by running the following: +```bash +git clone https://github.com/RfidResearchGroup/proxmark3.git +cd proxmark3 +``` +Configure the build by editing ``Makefile.platform``: +```bash +cp Makefile.platform.sample Makefile.platform +vim Makefile.platform +``` + +## Compilation from source +^[Top](#top) + +The following command has been shown to work on MacOS Big Sur with the +default Compiler Tools that comes installed on this release of the platform: +```bash +make clean && CFLAGS="" make +``` +If you have ``sudo`` rights, you can install the proxmark3 utilities into the system +path by running +```bash +sudo make install +``` +Otherwise, assuming you are using the ``bash`` shell (using ``chsh -s /bin/bash `whoami```), we can create +an alias to the relevant commands: +```bash +export BASHRC="~/.bash_profile" +export PM3LOCAL_PATH="$(greadlink -f .)" +touch $BASHRC +echo "alias pm3=\'$PM3LOCAL_PATH/pm3\'" >> $BASHRC +echo "alias pm3-flash=\'$PM3LOCAL_PATH/pm3-flash\'" >> $BASHRC +echo "alias pm3-flash-all=\'$PM3LOCAL_PATH/pm3-flash-all\'" >> $BASHRC +echo "alias pm3-flash-bootrom=\'$PM3LOCAL_PATH/pm3-flash-bootrom\'" >> $BASHRC +echo "alias pm3-flash-fullimage=\'$PM3LOCAL_PATH/pm3-flash-fullimage\'" >> $BASHRC +``` +When you are done running the previous script, make sure to update the settings in your +current shell (Mac Terminal) instance by running +```bash +source ~/.bash_profile +``` +When you re-start the Mac terminal, new shell instances will automatically load these +new settings. From 76bb9ed575214c3bbe747f1e6d20e22cf2cef477 Mon Sep 17 00:00:00 2001 From: "Maxie D. Schmidt" Date: Tue, 1 Mar 2022 15:58:45 -0500 Subject: [PATCH 2/3] Update Mac-OS-X-Compile-From-Source-Instructions.md --- .../Mac-OS-X-Compile-From-Source-Instructions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/md/Installation_Instructions/Mac-OS-X-Compile-From-Source-Instructions.md b/doc/md/Installation_Instructions/Mac-OS-X-Compile-From-Source-Instructions.md index 6e5e0df03..e8d79ff78 100644 --- a/doc/md/Installation_Instructions/Mac-OS-X-Compile-From-Source-Instructions.md +++ b/doc/md/Installation_Instructions/Mac-OS-X-Compile-From-Source-Instructions.md @@ -42,7 +42,7 @@ vim Makefile.platform The following command has been shown to work on MacOS Big Sur with the default Compiler Tools that comes installed on this release of the platform: ```bash -make clean && CFLAGS="" make +make clean && CFLAGS="-I /usr/local/opt/openssl/include" make ``` If you have ``sudo`` rights, you can install the proxmark3 utilities into the system path by running From 074f40e9f8df2111ae3df85b4926e35fd0bff87b Mon Sep 17 00:00:00 2001 From: "Maxie D. Schmidt" Date: Wed, 2 Mar 2022 05:30:49 -0500 Subject: [PATCH 3/3] Update Mac-OS-X-Compile-From-Source-Instructions.md --- .../Mac-OS-X-Compile-From-Source-Instructions.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/md/Installation_Instructions/Mac-OS-X-Compile-From-Source-Instructions.md b/doc/md/Installation_Instructions/Mac-OS-X-Compile-From-Source-Instructions.md index e8d79ff78..9a1e10e8f 100644 --- a/doc/md/Installation_Instructions/Mac-OS-X-Compile-From-Source-Instructions.md +++ b/doc/md/Installation_Instructions/Mac-OS-X-Compile-From-Source-Instructions.md @@ -30,7 +30,8 @@ Clone the repository by running the following: git clone https://github.com/RfidResearchGroup/proxmark3.git cd proxmark3 ``` -Configure the build by editing ``Makefile.platform``: +Configure the build by editing ``Makefile.platform`` +(this step is optional -- the default will suffice): ```bash cp Makefile.platform.sample Makefile.platform vim Makefile.platform @@ -42,8 +43,10 @@ vim Makefile.platform The following command has been shown to work on MacOS Big Sur with the default Compiler Tools that comes installed on this release of the platform: ```bash -make clean && CFLAGS="-I /usr/local/opt/openssl/include" make +make clean && CFLAGS="-I /usr/local/opt/openssl/include" make -j ``` +The rest of this section is an *optional* installation procedure. + If you have ``sudo`` rights, you can install the proxmark3 utilities into the system path by running ```bash