Skip to content

Commit

Permalink
Add documentation for ADK development platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
aajain-com committed Jan 14, 2020
1 parent cd390ef commit bb0c614
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 28 deletions.
24 changes: 24 additions & 0 deletions Documentation/developing_with_adk.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
## Development Environment

Development of HomeKit ADK is supported on the following platforms:
### Darwin
#### Prerequisites
Download and install [Xcode 11](https://download.developer.apple.com/Developer_Tools/Xcode_11/Xcode_11.xip)

```sh
brew install openssl@1.1
brew install mbedtls --HEAD
brew install wget
brew install qemu
brew cask install 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

### Linux
#### Prerequisites
```sh
sudo apt install docker
```

## Code Style
Please use the following tools to auto-format your code before submitting a Pull Request.

Expand Down
37 changes: 9 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,10 @@ The HomeKit Open Source ADK is an open-source version of the HomeKit Accessory D
Go to the [Apple Developer Site](https://developer.apple.com/homekit/) if you like to learn more about developing HomeKit-enabled accessories and apps.

## Documentation
* Please go through [Developing with ADK](./Documentation/developing_with_adk.md) before starting development with HomeKit ADK
* [Platform Abstraction Layer](./Documentation/PAL.md)

## Darwin

#### Prerequisites
Download and install [Xcode 11](https://download.developer.apple.com/Developer_Tools/Xcode_11/Xcode_11.xip)

```sh
brew install openssl@1.1
brew install mbedtls --HEAD

```
## Darwin PAL

#### Compile
```sh
Expand All @@ -32,20 +24,7 @@ make all
./Output/Darwin-x86_64-apple-darwin18.6.0/Debug/IP/Applications/Lightbulb.OpenSSL
```

*NOTE:* We use the OpenSSL crypto backend by default on Darwin. You can select a different crypto module:

```sh
make CRYPTO=MbedTLS apps
```

## Linux
#### Prerequisites
```sh
brew cask install 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
## Linux PAL

#### Compile
```sh
Expand All @@ -54,21 +33,23 @@ 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.
```sh
brew cask install docker
brew install qemu
brew install qrencode

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

#### Compile
```sh
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).
```sh
./Tools/install.sh \
-d raspi \
Expand Down

0 comments on commit bb0c614

Please sign in to comment.