Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
rferrazz committed May 28, 2021
1 parent 48db933 commit f70272d
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 2 deletions.
69 changes: 67 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,71 @@

_A dockerized environment to develop and deploy yocto based BSPs_

It is a single bash script that given a well defined configuration folder creates a Docker machine with [code-server](https://github.com/cdr/code-server) and a ready made yocto host environment based on a specific Ubuntu version.
A self contained bash script that given a configuration folder creates a Docker machine with [code-server](https://github.com/cdr/code-server) and a ready made yocto host development environment based on a specific Ubuntu version.

The environment works on Linux, MAC-OS and Windows (tested with dockre for windows and WSL1/2). It requires the bash shell, Docker and [jq](https://stedolan.github.io/jq/).
<img src="https://github.com/rferrazz/yocto-dev-env/raw/main/screen.gif">

## Usage

### Dependencies

The environment works on Linux, MAC-OS and Windows (tested with Docker for windows and WSL1/2). It requires the bash shell, Docker and [jq](https://stedolan.github.io/jq/).

### Setup your first project

Let's suppose you are going to work on a yocto based project named `foo`. Download the [released script](https://github.com/rferrazz/yocto-dev-env/releases/latest) and put it alongside your environment folder. At this point your setup should look like this:

```
.
└── dev-env_1.0.sh
└── foo
└── manifest.json
└── defconfig
├── bblayers.conf.sample
└── local.conf.sample
```

`bblayers.conf.sample` and `local.conf.sample` are respectively the default `bblayers.conf` file and the `local.conf` file.

`manifest.json` Is the file describing which host machine, extra host packages, the default yocto maachine to use and where to fetch your layers from. It looks like this:

```json
{
"host_ubuntu_version": "18.04",
"extra_pkgs": ["cvs", "gdb", "device-tree-compiler"],
"machine": "raspberrypi0-wifi",
"layers": [
{
"method": "checkout",
"path": "poky",
"args":["https://git.yoctoproject.org/git/poky", "dunfell"]
},
{
"method": "checkout",
"path": "meta-openembedded",
"args": ["https://github.com/openembedded/meta-openembedded.git", "dunfell"]
},
{
"method": "checkout",
"path": "meta-raspberrypi",
"args": ["https://github.com/agherzan/meta-raspberrypi.git", "dunfell", "67baec35a3cabb0b92dea31d71c59752ae8123f7"]
}
]
}
```

Nou you should be all set. execute the script as following to build your development machine:

```bash
$ ./dev-env_1.0.sh foo
```

Once completed setup your ssh keys if needed and then start the yocto environment with:

```bash
$ yocto-env
```

The `yocto-env` script will fetch layers you have specified in the manifest to the version or branch specified. If the layer folders are already populated it will not fetch the repo even if the version you are using is not the same one as the manifest one.

Once you are done with the current session close the vm terminal. Your work is saved in a docker volume named like your environment name (`foo` in this case)
Binary file added screen.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f70272d

Please sign in to comment.