Browse Source

docs: Rewrite README

master
Maciej Krüger 4 years ago
parent
commit
1acbdaa4fc
  1. 40
      README.md

40
README.md

@ -10,35 +10,51 @@ Everything subject to change, including number of bugs (hopefully to zero ;)
## System Requirements
To build an image you need to have at least Ubuntu 16.04 on your machine and the following packages installed: `ubuntu-image snapcraft snapd nodejs`
- A linux distro that is either ubuntu based or has support for running lxd containers and snapd
- At least 1GB free disk space
Additionally at least 1 GB of free disk space is required
## Other Requirements
It is recommended that you build on ubuntu, as building on other distributions might require the usage of containers.
- Ubuntu One account (create at [https://login.ubuntu.com/+login](https://login.ubuntu.com/+login))
- (Optional) Snapcraft signing key (tutorial [https://tutorials.ubuntu.com/tutorial/create-your-own-core-image#3](https://tutorials.ubuntu.com/tutorial/create-your-own-core-image#3))
- Any of the supported boards or at least 4GB RAM free for virtualization
For virtual device testing you also need `qemu-kvm`
## Build environment setup on debian
Additionally some npm packages are required, run `npm i` to install them
First you need to add the nodeJS PPA, unless you already installed node v10+ on your system by other means: `$ curl https://deb.nodesource.com/setup_10.x | sudo bash -`
## Other Requirements
Now install the necesarry packages: `$ sudo apt-get install -y nodejs ubuntu-image snapcraft snapd nodejs`
- Ubuntu One account (create at [https://login.ubuntu.com/+login](https://login.ubuntu.com/+login))
- Snapcraft signing key (tutorial [https://tutorials.ubuntu.com/tutorial/create-your-own-core-image#3](https://tutorials.ubuntu.com/tutorial/create-your-own-core-image#3))
- Any of the supported boards or at least 4GB RAM free for virtualization
If you also want to test using a virtual device you should install `qemu-kvm`, too: `$ sudo apt-get install -y qemu-kvm`
## Creating the image
It is recommended that you build on Ubuntu, as building on other distributions might require the usage of containers. You may want to setup lxd at this point.
Now you need to install the npm dependencies using `npm i`
First run `make` once, it will guide you through the inital configuration
## Build configuration
It is required that you are signed into your Ubuntu One account on the local snapd instance
If not already done run `snap login` to do so
If you're building on a non-ubuntu distro you need to have lxd installed and setup for snap building to work
You can now go ahead and run `bash conf-tool.sh`
If you're planning to test using the virtual device you can leave eveything as-is, otherwise the defaults might not be suited for your use case.
## Creating the image
To build a board's model file run `make BOARD.model`
To build an image for a specific board run `make BOARD.img`
The board tag for the virtual device is `amd64`
## Running the virtual device
Use `make start` to build the amd64.img and launch it with kvm
If you used the defaults in the configuration step you should now be able to connect with `make ssh`
If you used the defaults in the configuration step, you should now be able to connect with `make ssh`
### `Could not access KVM kernel module: Permission denied`

Loading…
Cancel
Save