-
Branch snappy-systems
-
Modify the
snap.yaml
to add a snap, e.g.:=== modified file 'generic-amd64/meta/snap.yaml' --- generic-amd64/meta/snap.yaml 2015-07-03 12:50:03 +0000 +++ generic-amd64/meta/snap.yaml 2015-11-09 16:26:12 +0000 @@ -7,6 +7,8 @@ config: ubuntu-core: autopilot: true + config-example-bash: + msg: "huzzah\n" gadget: branding: @@ -20,3 +22,7 @@ boot-assets: files: - path: grub.cfg + + software: + built-in: + - config-example-bash.canonical
(for amd64, or modify for other arch).
-
Build the gadget snap.
-
Create an image using the gadget snap.
-
Boot the image
-
Run:
sudo journalctl -u snapd.firstboot.service
- Check that it shows no errors.
-
Run:
config-example-bash.hello
- Check that it prints
huzzah
.
- Check that it prints
-
Branch snappy-systems
-
Modify the
snap.yaml
to add a module, e.g.:=== modified file 'generic-amd64/meta/snap.yaml' --- generic-amd64/meta/snap.yaml 2015-07-03 12:50:03 +0000 +++ generic-amd64/meta/snap.yaml 2015-11-12 10:14:30 +0000 @@ -7,6 +7,7 @@ config: ubuntu-core: autopilot: true + load-kernel-modules: [tea] gadget: branding:
-
Build the gadget snap.
-
Create an image using the gadget snap.
-
Boot the image.
-
Run:
sudo journalctl -u snapd.firstboot.service
- Check that it shows no errors.
-
Check that the output of
lsmod
includes the module you requested. With the above example,lsmod | grep tea
-
Get the start of the writable partition:
parted /path/to/ubuntu-snappy.img unit b print
- Note down the number of bytes in the Start column for the writable partition.
-
Make a loopback block device for the writable partition, replacing {start} with the number from the previous step:
sudo losetup -f --show -o {start} /path/to/ubuntu-snappy.img
- Note down the loop device.
-
Shrink the file system to the minimum, replacing {dev} with the device from the previous step:
sudo e2fsck -f {dev} sudo resize2fs -M {dev}
-
Delete the loopback block device:
sudo losetup -d {dev}
-
Get the end of the writable partition:
parted /path/to/ubuntu-snappy.img unit b print
- Note down the Number of the writable partition and the number of bytes in the End column.
-
Resize the writable partition, using the partition {number} from the last step, and replacing the {end} with a value that leaves more than 10% space free at the end.
parted /path/to/ubuntu-snappy.img unit b resizepart {number} {end*85%}
-
Boot the image.
-
Print the free space of the file system, replacing {dev} with the device that has the writable partition:
sudo parted -s {dev} unit % print free
- Check that the writable partition was resized to occupy all the empty space.
- Install Virtual Machine Manager
- Stitch together a new image
- Build both the mir-server and the mir-client snaps from lp:~mir-team/+junk/mir-server-snap and lp:~mir-team/+junk/snapcraft-mir-client
- Copy over the snaps and sideload install the mir-server snap, which should result in a mir-server launching black blank screen with a mouse available.
- Now install the mir-client snap.
- Manually connect mir-client:mir to mir-server:mir due to bug 1577897, then start the mir-client service manually.
- This should result in the Qt clock example app being displayed.
- Using Ubuntu classic build and install a simple snap containing the Python pySerial module. Define a app that runs the module and starts miniterm.
name: miniterm
version: 1
summary: pySerial miniterm in a snap
description: |
Simple snap that contains the modules necessary to run
pySerial. Useful for testing serial ports.
confinement: strict
apps:
open:
command: python3 -m serial.tools.miniterm
plugs: [serial-port]
parts:
my-part:
plugin: nil
stage-packages:
- python3-serial
- Ensure the 'serial-port' interface is connected to miniterm
- Use sudo miniterm.open /dev/tty to open a serial port
- Using a Snappy core image on a device like an RPi2/3, install the build and install the simple-pulseaudio snap from the following git repo: git://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/examples
- $ cd examples/simple-pulseaudio
- Ensure that the 'pulseaudio' interface is connected to paplay $ sudo snap connect simple-pulseaudio:pulseaudio $ sudo snap connections simple-pulseaudio
- Use /snap/bin/simple-pulseaudio.pactl stat and verify that you see valid output status from pulseaudio
- Use /snap/bin/simple-pulseaudio.paplay $SNAP/usr/share/sounds/alsa/Noise.wav and verify that you can hear the sound playing
-
Using Ubuntu classic build and install the bluetooth-tests snap from the store.
-
Stop system BlueZ service
$ sudo systemctl stop bluetooth
or if you have the bluez snap installed
$ snap remove bluez
- Run one of the tests provided by the bluetooth-tests snap
$ sudo /snap/bin/bluetooth-tests.hci-tester
and verify it actually passes. If some of the tests fail there will be a problem with the particular kernel used on the device.
-
Install tpm snap from store.
-
Connect plug tpm:tpm to slot ubuntu-core:tpm.
-
Reboot the system so daemon in tpm snap can get proper permissions.
-
Use tpm.version to read from tpm device and make sure it shows no error.
$ tpm.version xKV TPM 1.2 Version Info: Chip Version: 1.2.5.81 Spec Level: 2 Errata Revision: 3 TPM Vendor ID: WEC Vendor Specific data: 0000 TPM Version: 01010000 Manufacturer Info: 57454300
- Ensure your BIOS support UEFI firmware upgrading via UEFI capsule format
- Install the uefi-fw-tools snap from the store
- Ensure the 'fwupd' interface is connected
$ sudo snap connect uefi-fw-tools:fwupdmgr uefi-fw-tools:fwupd
- Check if the device support UEFI firmware updates
$ sudo uefi-fw-tools.fwupdmgr get-devices
- Get available UEFI firmware from the server
$ sudo uefi-fw-tools.fwupdmgr refresh
- Download firmware
$ sudo uefi-fw-tools.fwupdmgr update
- Reboot and ensure it start the upgrading process