diff options
-rw-r--r-- | README.adoc | 2 | ||||
-rw-r--r-- | classes/sota.bbclass (renamed from conf/distro/sota.conf.inc) | 8 | ||||
-rw-r--r-- | classes/sota_bleeding.inc (renamed from conf/include/local/sota_bleeding.inc) | 0 | ||||
-rw-r--r-- | classes/sota_minnowboard.bbclass (renamed from conf/include/local/sota_minnowboard.inc) | 2 | ||||
-rw-r--r-- | classes/sota_minnowboard_uboot.inc (renamed from conf/include/local/sota_minnowboard_uboot.inc) | 2 | ||||
-rw-r--r-- | classes/sota_none.bbclass | 1 | ||||
-rw-r--r-- | classes/sota_porter.bbclass (renamed from conf/include/local/sota_porter.inc) | 2 | ||||
-rw-r--r-- | classes/sota_qemux86-64.bbclass (renamed from conf/include/local/sota_qemux86-64.inc) | 2 | ||||
-rw-r--r-- | classes/sota_raspberrypi.bbclass (renamed from conf/include/local/sota_raspberrypi.inc) | 2 | ||||
-rw-r--r-- | conf/distro/poky-sota-systemd.conf | 2 | ||||
-rw-r--r-- | conf/distro/poky-sota.conf | 2 | ||||
-rw-r--r-- | conf/include/bblayers/sota_intel-corei7-64.inc (renamed from conf/include/bblayers/sota_minnowboard.inc) | 0 | ||||
-rw-r--r-- | conf/include/bblayers/sota_raspberrypi2.inc (renamed from conf/include/bblayers/sota_raspberrypi.inc) | 0 | ||||
-rw-r--r-- | conf/include/bblayers/sota_raspberrypi3.inc | 2 | ||||
-rwxr-xr-x | scripts/envsetup.sh | 8 |
15 files changed, 15 insertions, 20 deletions
diff --git a/README.adoc b/README.adoc index f8e8ada..e26497c 100644 --- a/README.adoc +++ b/README.adoc | |||
@@ -18,7 +18,7 @@ If you already have a Yocto-based project and you want to add atomic filesystem | |||
18 | 18 | ||
19 | 1. Clone the `meta-updater` layer and add it to your https://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#structure-build-conf-bblayers.conf[bblayers.conf]. | 19 | 1. Clone the `meta-updater` layer and add it to your https://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#structure-build-conf-bblayers.conf[bblayers.conf]. |
20 | 2. Clone BSP integration layer (meta-updater-$\{PLATFORM}, e.g. https://github.com/advancedtelematic/meta-updater-raspberrypi[meta-updater-raspberrypi]) and add it to your conf/bblayers.conf. If your board isn't supported yet, you could write a BSP integration for it yourself. See the <<Adding support for your board>> section for the details. | 20 | 2. Clone BSP integration layer (meta-updater-$\{PLATFORM}, e.g. https://github.com/advancedtelematic/meta-updater-raspberrypi[meta-updater-raspberrypi]) and add it to your conf/bblayers.conf. If your board isn't supported yet, you could write a BSP integration for it yourself. See the <<Adding support for your board>> section for the details. |
21 | 3. Set up your https://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#var-DISTRO[distro]. If you are using "poky", the default distro in Yocto, you can change it in your conf/local.conf to "poky-sota". Alternatively, if you are using your own or third party distro configuration, you can add 'require conf/distro/sota.conf.inc' to it, thus combining capabilities of your distro with meta-updater features. | 21 | 3. Set up your https://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#var-DISTRO[distro]. If you are using "poky", the default distro in Yocto, you can change it in your conf/local.conf to "poky-sota". Alternatively, if you are using your own or third party distro configuration, you can add 'INHERIT += " sota"' to it, thus combining capabilities of your distro with meta-updater features. |
22 | 22 | ||
23 | You can then build your image as usual, with bitbake. After building the root file system, bitbake will then create an https://ostree.readthedocs.io/en/latest/manual/adapting-existing/[OSTree-enabled version] of it, commit it to your local OSTree repo and (optionally) push it to a remote server. Additionally, a live disk image will be created (normally named $\{IMAGE_NAME}.-sdimg-ota e.g. core-image-raspberrypi3.rpi-sdimg-ota). You can control this behaviour through <<variables in your local.conf,OSTree-related variables in your local.conf>>. | 23 | You can then build your image as usual, with bitbake. After building the root file system, bitbake will then create an https://ostree.readthedocs.io/en/latest/manual/adapting-existing/[OSTree-enabled version] of it, commit it to your local OSTree repo and (optionally) push it to a remote server. Additionally, a live disk image will be created (normally named $\{IMAGE_NAME}.-sdimg-ota e.g. core-image-raspberrypi3.rpi-sdimg-ota). You can control this behaviour through <<variables in your local.conf,OSTree-related variables in your local.conf>>. |
24 | 24 | ||
diff --git a/conf/distro/sota.conf.inc b/classes/sota.bbclass index 20946a6..0697932 100644 --- a/conf/distro/sota.conf.inc +++ b/classes/sota.bbclass | |||
@@ -23,3 +23,11 @@ OSTREE_INITRAMFS_IMAGE ?= "initramfs-ostree-image" | |||
23 | 23 | ||
24 | # Prelinking increases the size of downloads and causes build errors | 24 | # Prelinking increases the size of downloads and causes build errors |
25 | USER_CLASSES_remove = "image-prelink" | 25 | USER_CLASSES_remove = "image-prelink" |
26 | |||
27 | SOTA_MACHINE ?= "none" | ||
28 | SOTA_MACHINE_raspberrypi = "raspberrypi" | ||
29 | SOTA_MACHINE_raspberrypi3 = "raspberrypi" | ||
30 | SOTA_MACHINE_porter = "porter" | ||
31 | SOTA_MACHINE_intel-corei7-64 = "minnowboard" | ||
32 | SOTA_MACHINE_qemux86-64 = "qemux86-64" | ||
33 | inherit sota_${SOTA_MACHINE} | ||
diff --git a/conf/include/local/sota_bleeding.inc b/classes/sota_bleeding.inc index fc5947d..fc5947d 100644 --- a/conf/include/local/sota_bleeding.inc +++ b/classes/sota_bleeding.inc | |||
diff --git a/conf/include/local/sota_minnowboard.inc b/classes/sota_minnowboard.bbclass index 36d1a17..970bd6a 100644 --- a/conf/include/local/sota_minnowboard.inc +++ b/classes/sota_minnowboard.bbclass | |||
@@ -1,5 +1,3 @@ | |||
1 | MACHINE = "intel-corei7-64" | ||
2 | |||
3 | OSTREE_BOOTLOADER ?= "grub" | 1 | OSTREE_BOOTLOADER ?= "grub" |
4 | EFI_PROVIDER = "grub-efi" | 2 | EFI_PROVIDER = "grub-efi" |
5 | 3 | ||
diff --git a/conf/include/local/sota_minnowboard_uboot.inc b/classes/sota_minnowboard_uboot.inc index e64f7eb..5097e9d 100644 --- a/conf/include/local/sota_minnowboard_uboot.inc +++ b/classes/sota_minnowboard_uboot.inc | |||
@@ -1,5 +1,3 @@ | |||
1 | MACHINE = "intel-corei7-64" | ||
2 | |||
3 | PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ota" | 1 | PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ota" |
4 | UBOOT_MACHINE = "minnowmax_defconfig" | 2 | UBOOT_MACHINE = "minnowmax_defconfig" |
5 | 3 | ||
diff --git a/classes/sota_none.bbclass b/classes/sota_none.bbclass new file mode 100644 index 0000000..dc72a07 --- /dev/null +++ b/classes/sota_none.bbclass | |||
@@ -0,0 +1 @@ | |||
# null machine it's here to make bitbake happy when SOTA_MACHINE is undefined | |||
diff --git a/conf/include/local/sota_porter.inc b/classes/sota_porter.bbclass index 9828248..a8f5ba1 100644 --- a/conf/include/local/sota_porter.inc +++ b/classes/sota_porter.bbclass | |||
@@ -1,5 +1,3 @@ | |||
1 | MACHINE = "porter" | ||
2 | |||
3 | # Commit united image to OSTree, not just uImage | 1 | # Commit united image to OSTree, not just uImage |
4 | OSTREE_KERNEL = "uImage+dtb" | 2 | OSTREE_KERNEL = "uImage+dtb" |
5 | 3 | ||
diff --git a/conf/include/local/sota_qemux86-64.inc b/classes/sota_qemux86-64.bbclass index b03631b..533c11c 100644 --- a/conf/include/local/sota_qemux86-64.inc +++ b/classes/sota_qemux86-64.bbclass | |||
@@ -1,5 +1,3 @@ | |||
1 | MACHINE = "qemux86-64" | ||
2 | |||
3 | # See https://advancedtelematic.atlassian.net/browse/PRO-2693 | 1 | # See https://advancedtelematic.atlassian.net/browse/PRO-2693 |
4 | PREFERRED_VERSION_linux-yocto_qemux86-64_sota = "4.4%" | 2 | PREFERRED_VERSION_linux-yocto_qemux86-64_sota = "4.4%" |
5 | 3 | ||
diff --git a/conf/include/local/sota_raspberrypi.inc b/classes/sota_raspberrypi.bbclass index ae13b8e..1d23d1f 100644 --- a/conf/include/local/sota_raspberrypi.inc +++ b/classes/sota_raspberrypi.bbclass | |||
@@ -1,5 +1,3 @@ | |||
1 | MACHINE ?= "raspberrypi3" | ||
2 | |||
3 | IMAGE_CLASSES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'image_types_uboot sdcard_image-rpi-ota', '', d)}" | 1 | IMAGE_CLASSES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'image_types_uboot sdcard_image-rpi-ota', '', d)}" |
4 | IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'rpi-sdimg-ota', 'rpi-sdimg', d)}" | 2 | IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'rpi-sdimg-ota', 'rpi-sdimg', d)}" |
5 | 3 | ||
diff --git a/conf/distro/poky-sota-systemd.conf b/conf/distro/poky-sota-systemd.conf index 85744ea..e6f43f7 100644 --- a/conf/distro/poky-sota-systemd.conf +++ b/conf/distro/poky-sota-systemd.conf | |||
@@ -1,5 +1,4 @@ | |||
1 | require conf/distro/poky.conf | 1 | require conf/distro/poky.conf |
2 | require conf/distro/sota.conf.inc | ||
3 | 2 | ||
4 | DISTRO = "poky-sota" | 3 | DISTRO = "poky-sota" |
5 | DISTRO_NAME = "OTA-enabled Linux" | 4 | DISTRO_NAME = "OTA-enabled Linux" |
@@ -9,4 +8,5 @@ DISTRO_CODENAME = "sota" | |||
9 | DISTRO_FEATURES_append = " systemd" | 8 | DISTRO_FEATURES_append = " systemd" |
10 | VIRTUAL-RUNTIME_init_manager = "systemd" | 9 | VIRTUAL-RUNTIME_init_manager = "systemd" |
11 | 10 | ||
11 | INHERIT += " sota" | ||
12 | IMAGE_INSTALL_append = " connman connman-client rvi-sota-client" | 12 | IMAGE_INSTALL_append = " connman connman-client rvi-sota-client" |
diff --git a/conf/distro/poky-sota.conf b/conf/distro/poky-sota.conf index 2bbc62b..6972a94 100644 --- a/conf/distro/poky-sota.conf +++ b/conf/distro/poky-sota.conf | |||
@@ -1,9 +1,9 @@ | |||
1 | require conf/distro/poky.conf | 1 | require conf/distro/poky.conf |
2 | require conf/distro/sota.conf.inc | ||
3 | 2 | ||
4 | DISTRO = "poky-sota" | 3 | DISTRO = "poky-sota" |
5 | DISTRO_NAME = "OTA-enabled Linux" | 4 | DISTRO_NAME = "OTA-enabled Linux" |
6 | DISTRO_VERSION = "1.0" | 5 | DISTRO_VERSION = "1.0" |
7 | DISTRO_CODENAME = "sota" | 6 | DISTRO_CODENAME = "sota" |
8 | 7 | ||
8 | INHERIT += " sota" | ||
9 | IMAGE_INSTALL_append = " connman connman-client" | 9 | IMAGE_INSTALL_append = " connman connman-client" |
diff --git a/conf/include/bblayers/sota_minnowboard.inc b/conf/include/bblayers/sota_intel-corei7-64.inc index 1771e6c..1771e6c 100644 --- a/conf/include/bblayers/sota_minnowboard.inc +++ b/conf/include/bblayers/sota_intel-corei7-64.inc | |||
diff --git a/conf/include/bblayers/sota_raspberrypi.inc b/conf/include/bblayers/sota_raspberrypi2.inc index 11ede20..11ede20 100644 --- a/conf/include/bblayers/sota_raspberrypi.inc +++ b/conf/include/bblayers/sota_raspberrypi2.inc | |||
diff --git a/conf/include/bblayers/sota_raspberrypi3.inc b/conf/include/bblayers/sota_raspberrypi3.inc new file mode 100644 index 0000000..11ede20 --- /dev/null +++ b/conf/include/bblayers/sota_raspberrypi3.inc | |||
@@ -0,0 +1,2 @@ | |||
1 | |||
2 | BBLAYERS += " ${METADIR}/meta-updater-raspberrypi ${METADIR}/meta-raspberrypi " | ||
diff --git a/scripts/envsetup.sh b/scripts/envsetup.sh index 6c01d5b..5adf319 100755 --- a/scripts/envsetup.sh +++ b/scripts/envsetup.sh | |||
@@ -35,11 +35,6 @@ fi | |||
35 | SCRIPTDIR=$(cd $(dirname $BASH_SOURCE) && pwd -P) | 35 | SCRIPTDIR=$(cd $(dirname $BASH_SOURCE) && pwd -P) |
36 | METADIR=$(cd $(dirname $BASH_SOURCE)/../.. && pwd -P) | 36 | METADIR=$(cd $(dirname $BASH_SOURCE)/../.. && pwd -P) |
37 | 37 | ||
38 | if ! [[ -e ${SCRIPTDIR}/../conf/include/local/sota_${MACHINE}.inc && -e ${SCRIPTDIR}/../conf/include/bblayers/sota_${MACHINE}.inc ]]; then | ||
39 | echo "Error: invalid machine: ${MACHINE}" >&2 | ||
40 | return -1 | ||
41 | fi | ||
42 | |||
43 | if [ -e ${BUILDDIR}/conf/local.conf ]; then | 38 | if [ -e ${BUILDDIR}/conf/local.conf ]; then |
44 | source $METADIR/poky/oe-init-build-env ${BUILDDIR} | 39 | source $METADIR/poky/oe-init-build-env ${BUILDDIR} |
45 | else | 40 | else |
@@ -47,8 +42,7 @@ else | |||
47 | echo "METADIR := \"\${@os.path.abspath('${METADIR}')}\"" >> conf/bblayers.conf | 42 | echo "METADIR := \"\${@os.path.abspath('${METADIR}')}\"" >> conf/bblayers.conf |
48 | cat ${METADIR}/meta-updater/conf/include/bblayers/sota.inc >> conf/bblayers.conf | 43 | cat ${METADIR}/meta-updater/conf/include/bblayers/sota.inc >> conf/bblayers.conf |
49 | cat ${METADIR}/meta-updater/conf/include/bblayers/sota_${MACHINE}.inc >> conf/bblayers.conf | 44 | cat ${METADIR}/meta-updater/conf/include/bblayers/sota_${MACHINE}.inc >> conf/bblayers.conf |
50 | echo "include conf/include/local/sota_${MACHINE}.inc" >> conf/local.conf | 45 | echo "MACHINE = \"${MACHINE}\"" >> conf/local.conf |
51 | echo "include conf/distro/sota.conf.inc" >> conf/local.conf | ||
52 | echo "DISTRO = \"poky-sota-systemd\"" >> conf/local.conf | 46 | echo "DISTRO = \"poky-sota-systemd\"" >> conf/local.conf |
53 | fi | 47 | fi |
54 | 48 | ||