You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ad...@apache.org on 2016/04/05 02:38:05 UTC

[1/2] incubator-mynewt-site git commit: Docs for running newt in a docker container Pull request and change by spoonofpower

Repository: incubator-mynewt-site
Updated Branches:
  refs/heads/master 417f1957a -> 5289c9f78


Docs for running newt in a docker container
Pull request and change by spoonofpower

This closes #71


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/commit/48808246
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/tree/48808246
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/diff/48808246

Branch: refs/heads/master
Commit: 488082461eded83d7210356b591a6b7bc66f83e3
Parents: 417f195
Author: spoonofpower <sp...@gmail.com>
Authored: Mon Apr 4 12:20:40 2016 -0700
Committer: aditihilbert <ad...@runtime.io>
Committed: Mon Apr 4 17:35:45 2016 -0700

----------------------------------------------------------------------
 docs/os/get_started/docker.md               |  55 +++++++++++++++++++++++
 docs/os/get_started/pics/virtualbox_usb.jpg | Bin 0 -> 297119 bytes
 mkdocs.yml                                  |   1 +
 3 files changed, 56 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/48808246/docs/os/get_started/docker.md
----------------------------------------------------------------------
diff --git a/docs/os/get_started/docker.md b/docs/os/get_started/docker.md
new file mode 100644
index 0000000..2146b27
--- /dev/null
+++ b/docs/os/get_started/docker.md
@@ -0,0 +1,55 @@
+## Everything You Need in a Docker Container
+
+Docker provides a quick and easy way to get up and running with Mynewt. The
+newt command line tool and the entire build toolchain is available in a single
+docker container. The container is all that's needed to run your Mynewt based
+application in the simulator.  Enabling USB2 with your docker installation will
+allow you to load your application on a supported device.
+
+### Install Docker
+Install docker for your platform. [Mac OS X](https://docs.docker.com/mac/) / [Windows](https://docs.docker.com/windows/) / [Linux](https://docs.docker.com/linux/)
+
+Make sure to double click the Docker Quickstart Terminal application if you're on Mac or Windows.
+
+### Use the newt wrapper script
+Use the newt wrapper script to invoke newt.  Create the following file, name it
+`newt`, make it executable, and put it in your path.
+
+```bash
+#!/bin/bash
+
+docker run -ti --rm --device=/dev/bus/usb --privileged -v $(pwd):/workspace -w /workspace mynewt/newt:latest /newt "$@"
+```
+
+This will allow you to run newt as if it was natively installed.  You can now
+follow the normal tutorials using the newt wrapper script.
+
+You can upgrade your container by running `docker pull mynewt/newt:latest` when
+updates are made available.
+
+If you plan on loading your application on an actual device, continue on to
+configure USB2 support.
+
+### Enable USB2 Support for Mac or Windows
+
+#### Install VirtualBox extension pack
+Docker uses a VirtualBox Linux VM to run containers.  A free VirtualBox
+extension pack is required to enable USB2 support.  Download the [VirtualBox
+5.0.16 Oracle VM VirtualBox Extension
+Pack](http://download.virtualbox.org/virtualbox/5.0.16/Oracle_VM_VirtualBox_Extension_Pack-5.0.16-105871.vbox-extpack)
+and double click to install
+
+#### Enable USB2 and select your device
+* The "default" VM created by docker-machine must first be stopped before you
+  can enable USB2.  You can run the command `docker-machine stop default` or
+  use the VirtualBox UI to stop the VM.
+* Enable USB2 using the VirtualBox UI. Select the "default"
+  VM->Settings->Ports->USB2 to enable USB2.   Add your device to the USB Device
+  Filters to make the device visible in the docker container.  See the image below.
+
+<img src="../pics/virtualbox_usb.jpg" width="728px" />
+
+* Restart the "default" VM by running `docker-machine start default` or by
+  using the VirtualBox UI.
+
+

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/48808246/docs/os/get_started/pics/virtualbox_usb.jpg
----------------------------------------------------------------------
diff --git a/docs/os/get_started/pics/virtualbox_usb.jpg b/docs/os/get_started/pics/virtualbox_usb.jpg
new file mode 100644
index 0000000..898c4a3
Binary files /dev/null and b/docs/os/get_started/pics/virtualbox_usb.jpg differ

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/48808246/mkdocs.yml
----------------------------------------------------------------------
diff --git a/mkdocs.yml b/mkdocs.yml
index 139d4c1..45e8ad0 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -14,6 +14,7 @@ pages:
     - Introduction: 'os/get_started/introduction.md'
     - Quick Start:
         - toc: 'os/get_started/get_started.md'
+        - 'All-in-one Docker Container': 'os/get_started/docker.md'
         - 'Install Native Tools': 'os/get_started/native_tools.md'
         - 'Create Your First Project': 'os/get_started/project_create.md'
         - 'Install Cross Tools for ARM': 'os/get_started/cross_tools.md'


[2/2] incubator-mynewt-site git commit: clarified the use of docker vs native tool install in the get_started guides for native and cross tool installation

Posted by ad...@apache.org.
clarified the use of docker vs native tool install in the get_started guides for native and cross tool installation


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/commit/5289c9f7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/tree/5289c9f7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/diff/5289c9f7

Branch: refs/heads/master
Commit: 5289c9f7897920ac020d6581ec72b20aed3a9da3
Parents: 4880824
Author: aditihilbert <ad...@runtime.io>
Authored: Mon Apr 4 17:37:57 2016 -0700
Committer: aditihilbert <ad...@runtime.io>
Committed: Mon Apr 4 17:37:57 2016 -0700

----------------------------------------------------------------------
 docs/os/get_started/cross_tools.md  | 5 +++--
 docs/os/get_started/native_tools.md | 6 ++----
 2 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/5289c9f7/docs/os/get_started/cross_tools.md
----------------------------------------------------------------------
diff --git a/docs/os/get_started/cross_tools.md b/docs/os/get_started/cross_tools.md
index ffd9355..e0a4a13 100644
--- a/docs/os/get_started/cross_tools.md
+++ b/docs/os/get_started/cross_tools.md
@@ -1,7 +1,8 @@
 # Installing Cross Tools for ARM 
 
-This page shows how to install tools to use some ARM based platforms with
-Apache Mynewt.
+This page shows how to install tools on your laptop/computer to use for direct communication (e.g. for debugging) with some ARM based HW platforms running Apache Mynewt. You will also have to use the Newt tool installed to run natively on your machine. You may choose to do this instead of using the build toolchain and Newt tool available in a Docker container.
+
+This page provides guidance for installing the tools directly on your MAC and Linux machine. See the relevant sections below.
 
 <br>
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/5289c9f7/docs/os/get_started/native_tools.md
----------------------------------------------------------------------
diff --git a/docs/os/get_started/native_tools.md b/docs/os/get_started/native_tools.md
index 026aaff..7cd38c8 100644
--- a/docs/os/get_started/native_tools.md
+++ b/docs/os/get_started/native_tools.md
@@ -1,8 +1,6 @@
 # Installing Native Mynewt Tools
 
-This page shows how to install tools for native Mynewt targets. This
-allows you to run Mynewt OS as a native application.  It also allows
-you to run the test suites for all packages not requiring HW support. 
+This page shows how to install tools for native Mynewt targets (simulated targets on your laptop/computer) without using a Docker container. In other words, it allows you to run Mynewt OS as a native application on your Mac or Linux machine to simulate a target and use the Newt tool running natively on your machine to manage the simulated target. It also allows you to run the test suites for all packages not requiring HW support. You may choose to do this instead of using the build toolchain and Newt tool available in a Docker container.
 
 This page provides guidance for MAC and Linux. See the relevant sections below.
 
@@ -86,4 +84,4 @@ Setting up gdb (7.7.1-0ubuntu5~14.04.2) ...
 
 <br>
 
-At this point you have installed all the necessary software to build and test code on a simluator for Linux. Proceed to the [Build test code on simulator](#build-test-code-on-simulator) section.
+At this point you have installed all the necessary software to build and test code on a simluator running on your Mac or Linux. Proceed to the [Build test code on simulator](#build-test-code-on-simulator) section.