diff --git a/README.md b/README.md index eb1e51e..3ed264d 100644 --- a/README.md +++ b/README.md @@ -6,65 +6,75 @@ to build, install and test system components. ![Screenshot_2021-08-19_14-49-05](https://user-images.githubusercontent.com/15277964/130065951-9fa7a9fd-b7db-47c1-9bd6-b9dee087af7f.png) -## Goals: +## Goals - Make debugging platform components easy - Don't worry about porting - Lower barrier to entry for contributors - -## Installation: +## Installation - Linux with Snap: - - `sudo snap install --beta ubports-pdk` + - `sudo snap install --edge ubports-pdk` - `sudo snap connect ubports-pdk:kvm` - `sudo snap connect ubports-pdk:network-control` - macOS & other Linux: Clone this repository or download a copy of it from GitHub On Linux, make sure that your user account is in the `kvm` group: + - Ubuntu 18.04 and earlier: - `sudo groupadd kvm` - `sudo usermod -aG kvm $USER` - Ubuntu 20.04 and up: - `sudo usermod -aG kvm $USER` -## Usage: +## Usage For the snap version, use the command `ubports-pdk.pdk` instead of `ubuntu-touch-pdk`. -- `ubuntu-touch-pdk setup`: Sets up the environment and mounting capabilities for your development needs +- `ubuntu-touch-pdk setup`: Sets up the environment and mounting capabilities + for your development needs - `ubuntu-touch-pdk pull`: Download the freshest development image (based on focal) - `ubuntu-touch-pdk run`: Run the development VM instance -Changes within a VM are persistent until you run the `pull` command again. You can have separate VMs +Changes within a VM are persistent until you run the `pull` command again. You +can have separate VMs by adding `--name=my_custom_vm` to the `pull` and `run` commands. For more options, please run the command with the `-h` flag. ## Tutorial: Fetching package sources -When logged into the VM instance (user: root, password: root) you're able to clone UBports repositories using `ubports-clone`. Let's try that with `indicator-network`. +When logged into the VM instance (user: root, password: root) you're able to +clone UBports repositories using `ubports-clone`. Let's try that with +`indicator-network`. -``` +```shell root@linux:~# ubports-clone indicator-network ``` -This will download the sources from Git and make them available in your PDK workspace (configured during the `ubuntu-touch-pdk setup` step). +This will download the sources from Git and make them available in your PDK +workspace (configured during the `ubuntu-touch-pdk setup` step). Within the VM instance you're able to access those files in `/pdk/sources`. - ## Tutorial: Building package sources -Still logged into the VM instance, you're able to trigger a build of your cloned sources using `ubports-build`, ie for `indicator-network`: +Still logged into the VM instance, you're able to trigger a build of your cloned +sources using `ubports-build`, ie for `indicator-network`: -``` +```shell root@linux:~# ubports-build indicator-network ``` -This will copy your sources over to the VM, build the source code and publish Debian packages easily accessible from within your PDK workspace. For `indicator-network` those files will be located in `$PDK_WORKSPACE/sources/indicator-network` +This will copy your sources over to the VM, build the source code and publish +Debian packages easily accessible from within your PDK workspace. For +`indicator-network` those files will be located in +`$PDK_WORKSPACE/sources/indicator-network` -The same Debian packages generated by the `ubports-build` command can be installed into the VM, like: `sudo apt install /pdk/sources/indicator-network/*.deb` +The same Debian packages generated by the `ubports-build` command can be +installed into the VM, like: +`sudo apt install /pdk/sources/indicator-network/*.deb` ## Troubleshooting @@ -81,15 +91,22 @@ as well as your configuration file, which is located in one of the following: ### Nvidia GPU Support Note -There are currently known issues with NVIDIA GPUs. If the QEMU window remains black after starting the PDK and logging into the VM instance, this may be the case. +There are currently known issues with NVIDIA GPUs. If the QEMU window remains +black after starting the PDK and logging into the VM instance, this may be the +case. -In order to check which video card you are using, you can run the following command on host side: -``` +In order to check which video card you are using, you can run the following +command on host side: + +```shell glxinfo|egrep "OpenGL vendor|OpenGL renderer" ``` -And if a discrete Nvidia graphics card is used, and there is onboard Intel and PRIME is supported, executing `sudo prime-select intel` to switch and then rebooting may help. -## Technical details: +And if a discrete Nvidia graphics card is used, and there is onboard Intel and +PRIME is supported, executing `sudo prime-select intel` to switch and then +rebooting may help. + +## Technical details - Preconfigured QEMU with OpenGL support - Focus on Linux and macOS as host systems first