-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a54547a
commit d254abf
Showing
3 changed files
with
69 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
cd /tmp | ||
|
||
# Clone Contiki-NG | ||
git clone https://github.com/contiki-ng/contiki-ng.git; cd contiki-ng || \ | ||
cd contiki-ng; git pull | ||
git submodule update --init --recursive | ||
|
||
# Pull the Contiki-NG Docker image | ||
docker pull contiker/contiki-ng | ||
|
||
# Add the `shell` service to the `examples/hello-world` application. | ||
if ! grep -q "MODULES += os/services/shell" examples/hello-world/Makefile; then | ||
sed -i '/all: $(CONTIKI_PROJECT)/a\\nMODULES += os/services/shell\n' examples/hello-world/Makefile | ||
fi | ||
|
||
|
||
# Compile the `examples/hello-world` application for the nRF52840 platform. | ||
export CNG_PATH=/tmp/contiki-ng | ||
docker run \ | ||
--privileged \ | ||
--sysctl net.ipv6.conf.all.disable_ipv6=0 \ | ||
--mount type=bind,source=$CNG_PATH,destination=/home/user/contiki-ng \ | ||
-e DISPLAY=$DISPLAY \ | ||
-v /tmp/.X11-unix:/tmp/.X11-unix \ | ||
-v /dev/bus/usb:/dev/bus/usb \ | ||
contiker/contiki-ng \ | ||
make -C examples/hello-world TARGET=nrf52840 hello-world |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters