diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 60 |
1 files changed, 57 insertions, 3 deletions
@@ -16,8 +16,36 @@ OSTree. | |||
16 | Build | 16 | Build |
17 | ----- | 17 | ----- |
18 | 18 | ||
19 | ### Quickstart ### | ||
20 | [ATS Garage Quickstart](https://github.com/advancedtelematic/garage-quickstart-rpi) | ||
21 | is an example yocto-based project combining stadard poky distribution with | ||
22 | OSTree capabilities. For detailed getting started tutorial see [README](https://github.com/advancedtelematic/garage-quickstart-rpi/blob/master/README.adoc). | ||
23 | |||
24 | ### Adding meta-updater capabilities to your build ### | ||
25 | If you already have a Yocto-base project and you want to add atomic filesystem | ||
26 | updates to it you need to do just three things: | ||
27 | |||
28 | 1. Clone meta-updater layer and add it to your [conf/bblayers.conf](https://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#structure-build-conf-bblayers.conf). | ||
29 | 2. Clone BSP integration layer (meta-updater-${PLATFORM}, e.g. | ||
30 | meta-updater-raspberrypi) and add it to your conf/bblayers.conf. If your board | ||
31 | isn't yet supported, you could write BSP integration work yourself. See [Supported boards](#supported-boards) | ||
32 | section for the details. | ||
33 | 3. Set up your [distro](https://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#var-DISTRO). | ||
34 | If you are using "poky", the default distro in Yocto, you can change it in your | ||
35 | conf/local.conf to "poky-sota". Alternatively if you are using your own or third | ||
36 | party distro configuration, you can add 'require conf/distro/sota.conf.inc' to | ||
37 | it, thus combining capabilities of your distro with meta-updater features. | ||
38 | |||
39 | You can then build your image as usual (bitbake <your-image-name>). After building | ||
40 | the root file system bitbake will then create an [OSTree-enabled version](https://ostree.readthedocs.io/en/latest/manual/adapting-existing/) | ||
41 | of it, commit it to your local OSTree repo and optionally push it to a remote | ||
42 | server. Additionally a live disk image will be created (normally named | ||
43 | ${IMAGE_NAME}.<boardpref>-sdimg-ota e.g. core-image-raspberrypi3.rpi-sdimg-ota). | ||
44 | You can control this behaviour though OSTree-related variables in your | ||
45 | local.conf, see [respective section](#sota-related-variables-in-localconf) | ||
46 | for details. | ||
47 | |||
19 | ### Build with OpenIVI ### | 48 | ### Build with OpenIVI ### |
20 | ### Build from scratch ### | ||
21 | ### Build in AGL ### | 49 | ### Build in AGL ### |
22 | 50 | ||
23 | With AGL you can just add agl-sota feature while configuring your build | 51 | With AGL you can just add agl-sota feature while configuring your build |
@@ -39,17 +67,43 @@ some machine-dependent live images (e.g. '*.rpi-sdimg-ota' for Raspberry Pi or | |||
39 | Although aglsetup.sh hooks provide reasonable defaults for SOTA-related | 67 | Although aglsetup.sh hooks provide reasonable defaults for SOTA-related |
40 | variables you may want to tune some of them. | 68 | variables you may want to tune some of them. |
41 | 69 | ||
70 | Supported boards | ||
71 | ---------------- | ||
72 | |||
73 | Currently supported platforms are | ||
74 | |||
75 | * [Raspberry Pi3](https://github.com/advancedtelematic/meta-updater-raspberrypi) | ||
76 | * [Minnowboard](https://github.com/advancedtelematic/meta-updater-minnowboard) | ||
77 | * [Native QEMU emulation](https://github.com/advancedtelematic/meta-updater-qemux86-64) | ||
78 | |||
79 | ### Adding support for your board | ||
80 | If your board isn't yet supported you can add board integration code yourself. | ||
81 | The main purpose of this code is to provide a bootloader that will get use of | ||
82 | [OSTree's boot directory](https://ostree.readthedocs.io/en/latest/manual/atomic-upgrades/) | ||
83 | In meta-updater integration layers finished so far it is done by | ||
84 | |||
85 | 1. Making the board boot into [U-Boot](http://www.denx.de/wiki/U-Boot) | ||
86 | 2. Making U-boot import variables from /boot/loader/uEnv.txt and load the | ||
87 | kernel with initramfs and kernel command line arguments according to what is | ||
88 | set this file. | ||
89 | |||
90 | You may take a look into [Minnowboard](https://github.com/advancedtelematic/meta-updater-minnowboard) | ||
91 | or [Raspberry Pi](https://github.com/advancedtelematic/meta-updater-raspberrypi) | ||
92 | integration layers for examples. | ||
93 | |||
94 | It is still possible to make other loaders work with OSTree as well. | ||
95 | |||
42 | SOTA-related variables in local.conf | 96 | SOTA-related variables in local.conf |
43 | ------------------------------------ | 97 | ------------------------------------ |
44 | 98 | ||
45 | * OSTREE_REPO - path to your OSTree repository. | 99 | * OSTREE_REPO - path to your OSTree repository. |
46 | Defaults to "${DEPLOY_DIR_IMAGE}/ostree_repo" | 100 | Defaults to "${DEPLOY_DIR_IMAGE}/ostree_repo" |
47 | * OSTREE_BRANCHNAME - the branch your rootfs will be committed to. | 101 | * OSTREE_BRANCHNAME - the branch your rootfs will be committed to. |
48 | Defaults to "agl-ota" | 102 | Defaults to "ota" |
49 | * OSTREE_OSNAME - OS deployment name on your target device. For more | 103 | * OSTREE_OSNAME - OS deployment name on your target device. For more |
50 | information about deployments and osnames see | 104 | information about deployments and osnames see |
51 | [OSTree documentation](https://ostree.readthedocs.io/en/latest/manual/deployment/) | 105 | [OSTree documentation](https://ostree.readthedocs.io/en/latest/manual/deployment/) |
52 | Defaults to "agl". | 106 | Defaults to "poky". |
53 | * OSTREE_INITRAMFS_IMAGE - initramfs/initrd image that is used as a proxy while | 107 | * OSTREE_INITRAMFS_IMAGE - initramfs/initrd image that is used as a proxy while |
54 | booting into OSTree deployment. Do not change this setting unless you are | 108 | booting into OSTree deployment. Do not change this setting unless you are |
55 | sure that your initramfs can serve as such proxy. | 109 | sure that your initramfs can serve as such proxy. |