Skip to content

Latest commit

 

History

History
83 lines (72 loc) · 3.81 KB

getting_started.md

File metadata and controls

83 lines (72 loc) · 3.81 KB

Getting Started

Supported Platforms

Darwin

Prerequisites

brew install openssl@1.1
brew install mbedtls --HEAD
brew install wget
brew install qemu
brew install --cask docker

Run docker (Look in Spotlight/Applications folder). This is a one time instruction. Make sure you go to Docker→Preferences→General and check the option → Start Docker Desktop when you log in

Compile

make all

Run

./Output/Darwin-x86_64-apple-darwin$(uname -r)/Debug/IP/Applications/Lightbulb.OpenSSL

Linux

Prerequisites

sudo apt install docker

Compile

make TARGET=Linux apps

Raspberry Pi

Prerequisites

Run this to create the SD card image (Linux+patches) and a Docker container (your build environment). Make sure that Docker is running before running this setup or it will fail and you will have to start over! This will take about an hour and will stop for input many times. It will also require you to swap the card out twice.

# Run the Docker app. It is required for docker import.
./Tools/raspi_sdcard_setup.sh

Compile

make TARGET=Raspi all

If docker doesn't find "dev-test/raspiadk-base", run the sdcard setup and make sure to do the docker import at the end of the script.

Install

After building, run this to install the build products to your RaspPi. (-n is for the hostname of your RaspPi and -p is the SSH password; both of these were chosen during the initial raspi_sdcard_setup.sh install).

./Tools/install.sh \
    -d raspi \
    -a Output/Raspi-armv6k-unknown-linux-gnueabihf/Debug/IP/Applications/Lightbulb.OpenSSL \
    -n raspberrypi \
    -p raspberry

Make options

Command Description
make ?
  • apps - Build all apps (Default)
  • test - Build unit tests
  • all - Build apps and unit tests
make APPS=? Space delimited names of the app to compile.

Example: make APPS="Lightbulb Lock"

Default: All applications
make BUILD_TYPE=? Build type:
  • Debug (Default)
  • Test
  • Release
make CRYPTO=? Supported cryptographic libraries:
  • OpenSSL (Default)
  • MbedTLS
Example: make CRYPTO=MbedTLS apps
make DOCKER=? Build with or without Docker:
  • 1 - Enable Docker during compilation (Default)
  • 0 - Disable Docker during compilation
make LOG_LEVEL=level
  • 0 - No logs are displayed (Default for release build)
  • 1 - Error and Fault-level logs are displayed (Default for test build)
  • 2 - Error, Fault-level and Info logs are displayed
  • 3 - Error, Fault-level, Info and Debug logs are displayed (Default for debug build)
make PROTOCOLS=? Space delimited protocols supported by the applications:
  • BLE
  • IP

Example: make PROTOCOLS="IP BLE"

Default: All protocols
make TARGET=? Build for a given target platform:
  • Darwin
  • Linux
  • Raspi
make USE_DISPLAY=? Build with display support enabled:
  • 0 - Disable (Default)
  • 1 - Enable
make USE_HW_AUTH=? Build with hardware authentication enabled:
  • 0 - Disable (Default)
  • 1 - Enable
make USE_NFC=? Build with NFC enabled:
  • 0 - Disable (Default)
  • 1 - Enable
make USE_WAC=? Build with WAC enabled:
  • 0 - Disable (Default)
  • 1 - Enable