summaryrefslogtreecommitdiffstats
path: root/classes
Commit message (Collapse)AuthorAgeFilesLines
* image_types_ota.bbclass: change IMAGE_BASENAME to PNMing Liu2020-07-081-1/+1
| | | | | | | | | When setting intertask dependencies, we should use PN instead of IMAGE_BASENAME to refer to a image recipe, since PN is generated from recipe file name, while IMAGE_BASENAME is a variable that could be changed, it's not guaranteed to always equal to PN. Signed-off-by: Ming Liu <ming.liu@toradex.com>
* Put aktualizr-info in a separate package and use it in Secondaries.Patrick Vacek2020-07-081-2/+1
| | | | | | | | | We did the work a while ago to make aktualizr-info work for Secondaries, but until now we weren't putting the tool into the secondary-image we use for testing. Now it's there. Actually, it's in every image that inherits from sota.bbclass, which is probably a good thing. Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
* meta: introduce ostree-kernel-initramfs recipeMing Liu2020-07-082-25/+7
| | | | | | | | | | | | | | | | | | | | | | | | | We package kernel image, devicetrees, initramfs and install them to /usr/lib/modules/${KERNEL_VERSION}, which is the preferred location according to ostree's new implementation, this could simplify the deployment. Reference: https://github.com/ostreedev/ostree/commit/3ab0d5e6644885440bac6abd17b6d2637df5435f To let initramfs-ostree-image be able to be depended by ostree-kernel-initramfs, it must inherit nopackages to avoid a annoying QA warning like the follows: | WARNING: initramfs-ostree-image-0.0.1-r0 do_package: Manifest ...initramfs-ostree-image.packagedata | not found in colibri_imx6 armv7ahf-neon-imx armv7at2hf-neon-imx armv7at2hf-neon armv7ahf-neon armv7at2hf-vfp | armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp allarch | x86_64_x86_64-nativesdk (variant '')? Also we need define OSTREE_KERNEL, OSTREE_DEPLOY_DEVICETREE and OSTREE_DEVICETREE in sota.bbclass so they could be accessed in other recipes as well as in image recipes. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Signed-off-by: Ming Liu <ming.liu@toradex.com>
* meta: change virtual/network-configuration to network-configurationMing Liu2020-07-085-8/+8
| | | | | | | | | | The name 'virtual' is a recipe specific concept but not a package specific one, it's confusing that a package provides 'virtual/' names. Let's drop 'virtual/' from network-configuration, to keep consistent with yocto naming styles. Signed-off-by: Ming Liu <ming.liu@toradex.com>
* image_types_ostree: allow specifying a device tree to deployantznin2020-07-081-3/+4
| | | | | | | | | | | When setting `OSTREE_DEPLOY_DEVICETREE` to 1, it will by default deploy all the device tree blobs present in `KERNEL_DEVICETREE`. Adding `OSTREE_DEVICETREE` would allow specifying a specific device tree blob (or several dtbs), thus resulting in only the specified ones in the image. This is particularely useful because ostree selects the first device tree it finds in /boot, and discards the remaining ones. Signed-off-by: antznin <agodard@witekio.com>
* Add NXP LS1043ARBD board classEugene Smirnov2020-06-292-0/+8
| | | | Signed-off-by: Eugene Smirnov <evgenii.smirnov@here.com>
* Update garage-push invocation for new clifeat/warrior/2020.7Laurent Bonnans2020-06-021-1/+1
| | | | Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
* image_types_ostree: allow to add layer specific OSTree commit argumentsStefan Agner2020-06-021-1/+2
| | | | | | | | | | The OSTree commit command allows to add metadata to the commit. This might be customized in a distro layer for distribution specific needs. Allow to pass extra arguments using EXTRA_OSTREE_COMMIT variable (using a variable named similar to EXTRA_OEMAKE used to pass extra make arguments). Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
* image_types_ota: use named referenceStefan Agner2020-06-021-1/+11
| | | | | | | | | | | | | | | | | | | | | Use named reference when deploying the device tree. This makes sure that this reference will end up in the deployments .origin file, which will be visible by the user in ostree admin status. This reference will also be used when running ostree admin upgrade. This is not really required when using aktualizr, but can be useful during test/debugging when using pure OSTree updates. Make sure to make ${OSTREE_REPO} accessible via http and add a remote on the device called ${OSTREE_OSNAME} pointing to the http exposed archive OSTree. With that ostree admin upgrade should work. Note: We could use the name reference in ostree pull-local already, but this is potentially racy if multiple builds are committing to the same branch. Use the OSTree commit hash to get the actual commit and recreate a local reference to this commit. This makes absolutely sure that we use the same OSTree commit this bitbake execution committed during the do_image_ostreecommit task. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
* image_types_ostree/ota: use hash from ostree commitStefan Agner2020-06-022-13/+7
| | | | | | | | | | | | | | | | | | | | Relying on a OSTree branch reference has been problematic in the past and addressed by adding more attributes to it in commit 202a8c70ba8c ("image_types_ostree: Add a unique ref to fix simultaneous bitbaking."). However, depening on what kind of OpenEmbedded builds are running in parallel, even more attributes would need to be taken into account. Instead of relying on a reference, store the exact ostree commit hash in a manifest file and reuse it in the do_image_ota deploy task. This guarantees that the correct reference gets picked even when two builds with the exact same machine/image name run in parallel. Note: This gets rid of the second branch name again. If the branch name with image name is preferred, the variable OSTREE_BRANCHNAME can be used: OSTREE_BRANCHNAME = "${SOTA_HARDWARE_ID}-${IMAGE_BASENAME}" Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
* sota_sanity.bbclass: introduce sota_check_boolean_variableMing Liu2020-06-022-10/+17
| | | | | | | | | | The current sanity check are too strict for some boolean variables, introduce sota_check_boolean_variable to allow a boolean value to be set like yes/y/true/t/1 or no/n/false/f/0. Also change to use oe.types.boolean to check their values. Signed-off-by: Ming Liu <ming.liu@toradex.com>
* image_types_ostree/ota: do not commit homes to the OSTreeStefan Agner2020-06-022-9/+7
| | | | | | | | | | | | | | The home directory currently are commited to the OSTree, presumably to then use it for the deployment. However, we do have access to the original rootfs in the OSTree deployment tasks (do_image_ota) hence transferring the files "via OSTree" is not necessary. We do already carry over some files from the original OE rootfs to /var/sota. Follow this approach for /var/local and /home as well. The home will still be stored in the sysroot as documented in https://ostree.readthedocs.io/en/latest/manual/adapting-existing/. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
* image_types_ostree: use hardlink treeStefan Agner2020-06-021-5/+15
| | | | | | | | | | | Instead of copying the files to be commited to the ostree just use a hardlink tree. This improves performance and wasts less diskspace. When using this method the root directory has already the correct permission bits set. Also get rid of the unnecessary sync. This halfs the execution time of the do_image_ostree tasks in my measurments. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
* image_types_ostree: drop unnecessary tmp handlingStefan Agner2020-06-021-3/+0
| | | | | | | | | | | | | The current code clears tmp and then creates a symlink inside it to /sysroot/tmp: tmp └── tmp -> sysroot/tmp This is likely a mistake and the root tmp should have pointed to sysroot/tmp. However, since /tmp is mounted as a tmpfs anyways, we can get rid of all this logic. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
* image_types_ota: export OSTREE_BOOT_PARTITION when neededStefan Agner2020-06-021-2/+5
| | | | | | | | The environment variable OSTREE_BOOT_PARTITION is only used when using GRUB. Move the export into the if statement. Also add a comment why manually adding /boot/loader{.0} directory is necessary. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
* Rename defconfig and bootfilesMinori Yasumura2020-03-241-3/+4
| | | | | | The file name of sota has been changed in AGL, so change it to apply. Signed-off-by: Minori Yasumura <minori@witz-inc.co.jp>
* sota_bleeding: Also set aktualizr-native to the latest.Patrick Vacek2020-02-281-0/+1
| | | | | | I'm a bit surprised we never noticed this was missing! Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
* image_types_ostree: update doc link.Patrick Vacek2020-02-281-2/+2
| | | | | | | Most of the README content has been moved to the docs portal, so provide the direct link. Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
* image_types_ostree: set version metadata fieldStefan Agner2020-02-281-0/+2
| | | | | | | | | | | | | OSTree uses the "version" metadata field in various places, e.g. in ostree admin status. Use DISTRO_VERSION as default version number source. This gives a more human readable version number to a particular OSTree: $ ostree admin status * torizon f1825d8a8f89c48cc0915ea059bd23463a97655757a53ae0ab0fe7a97e1ebeb2.0 Version: 3.0+snapshot-20200128 origin refspec: f1825d8a8f89c48cc0915ea059bd23463a97655757a53ae0ab0fe7a97e1ebeb Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
* meta: move HOSTTOOLS definitions to sota.conf.incMing Liu2020-02-283-6/+0
| | | | | | | | | | | | | | | | | HOSTTOOLS and HOSTTOOLS_NONFATAL are global variables that being handled in base_eventhandler, so they must be defined in config files or in INHERIT classes or classes being inherited by base.bbclass, or else we might run into the following problems: ``` $ bitbake pkgname $ bitbake imgname ``` the HOSTTOOLS and HOSTTOOLS_NONFATAL in the above image recipe, for instance, 'repo python' in image_repo_manifest.bbclass, they would not be copied to HOSTTOOLS_DIR. Signed-off-by: Ming Liu <liu.ming50@gmail.com>
* Allow dots in ostree branch names and hw idsLaurent Bonnans2020-01-151-4/+4
| | | | Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
* meta: add python to HOSTTOOLS_NONFATALMing Liu2020-01-152-3/+3
| | | | | | | | | | repo is requiring python to be able to work correctly, add python to HOSTTOOLS_NONFATAL as well. image_repo_manifest is actually a image bbclass, move it to IMAGE_CLASSES instead of inheriting it in sota.bbclass. Signed-off-by: Ming Liu <liu.ming50@gmail.com>
* keep new name suggestion remove ostree repo checkZee3141592019-12-121-3/+7
| | | | Signed-off-by: Zee314159 <252806294@qq.com>
* Use regex and add some variablesZee3141592019-12-121-37/+38
| | | | Signed-off-by: Zee314159 <252806294@qq.com>
* Add sanity checks for user-defined SOTA variablesZee3141592019-12-122-14/+42
| | | | Signed-off-by: Zee314159 <252806294@qq.com>
* Only push repo manifest if garage-push supports itLaurent Bonnans2019-11-201-1/+2
| | | | | Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com> Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
* Send a copy of repo manifest through garage-pushLaurent Bonnans2019-11-201-2/+8
| | | | | Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com> Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
* meta: change OTA_IMAGE_ROOTFS to TAR_IMAGE_ROOTFSMing Liu2019-11-202-3/+3
| | | | | | | | No functional changes, rename OTA_IMAGE_ROOTFS to TAR_IMAGE_ROOTFS since the later is a more common name. Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
* OTA-3988: force an ostree boot indication only in case of non-systemd distroMykhaylo Sul2019-11-201-1/+1
| | | | | Signed-off-by: Mykhaylo Sul <ext-mykhaylo.sul@here.com> Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
* Indicate an OSTree boot on startEugene Smirnov2019-11-201-1/+1
| | | | | Signed-off-by: Mykhaylo Sul <ext-mykhaylo.sul@here.com> Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
* Add ethernet driver for rpi4feat/warrior/2019.9-backportLaurent Bonnans2019-10-291-1/+1
| | | | | | On master, it's using the default poky configuration. Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
* image_types_ostree: Fix OSTree ref-bindingsJeremias Cordoba2019-10-291-1/+2
| | | | | | | | | | | | The command "ostree refs --create" creates a new ref that points to a pre-existing commit hash. This does not add this new ref to the ref-bindings metadata in OSTree. The missing metadata leads to OSTree verifcation failures when working with the new ref. Fix this by adding the "--bind-ref" option to "ostree commit" which adds the needed ref-binding metadata. Signed-off-by: Jeremias Cordoba <js.cordoba8321@gmail.com>
* Use the recommended kernel entry point on RPILaurent Bonnans2019-10-211-1/+1
| | | | | | | 0x8000 does not work on raspberrypi4-64 whereas 0x80000 is the value recommended for all platforms on u-boot Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
* Raspberrypi4 initial supportLaurent Bonnans2019-10-211-1/+31
| | | | Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
* Use a default expiry of one month if nothing is specified.Patrick Vacek2019-08-211-0/+2
| | | | | | | This mimics the intended behavior of the default in garage-sign, but doesn't rely on the date in the unsigned targets. Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
* aktualizr: latest garage-sign with expiration support.Patrick Vacek2019-08-202-4/+15
| | | | | | | Use GARAGE_TARGET_EXPIRES or GARAGE_TARGET_EXPIRE_AFTER (but not both!) to set the garage-sign parameters. Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
* Expose OSTREE_BOOT_PARTITION in do_image_otafix/grub-ostreeLaurent Bonnans2019-08-191-0/+2
| | | | | | Used by ostree-grub-generator Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
* Do not export anything in sota.bbclassfix/ostree-branchname-2Laurent Bonnans2019-08-151-5/+5
| | | | | | | A simple variable definition will be enough and doing an export there completely kills caching. Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
* Revert "Move OSTREE_BRANCHNAME to image_types_ostree.bbclass."Laurent Bonnans2019-08-152-3/+3
| | | | | | This reverts commit 8e7a0aeb3682386ed674ed0f682634d6a50983b7. Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
* freedom-u540: Remove the fitImage overridesAlistair Francis2019-07-261-6/+2
| | | | | | | meta-riscv now generates a fitImage by default for the freedom-u540 machine so remove the unneeded overrides. Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
* sota: add support for freedom-u540Ricardo Salveti2019-07-242-0/+17
| | | | | | fitImage used by default. Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
* Merge pull request #557 from agners/follow-fhsPatrick Vacek2019-07-241-9/+34
|\ | | | | Follow Filesystem Hierarchy Standard
| * image_types_ostree: add /usr/local supportStefan Agner2019-07-191-0/+25
| | | | | | | | | | | | | | | | | | | | Add /usr/local support as outlined in OSTree documentation. This makes sure that a writeable and persistent /usr/local directory is available. See also: https://ostree.readthedocs.io/en/latest/manual/adapting-existing/ Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
| * image_types_ostree: make root directory only readable by rootStefan Agner2019-07-191-2/+2
| | | | | | | | | | | | | | Make the root home directory only accessible by root. Use 700 as commonly used for the root home directory. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
| * image_types_ostree: add top level directories unconditionallyStefan Agner2019-07-191-7/+7
| | | | | | | | | | | | | | | | The Filesystem Hierarchy Standard defines several top-level directory to be writeable. Add those even in the absence of files installed by OpenEmbedded so a user might actually use them. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
* | Merge pull request #550 from advancedtelematic/fix/branch-rebuildlbonn2019-07-192-3/+3
|\ \ | | | | | | Move OSTREE_BRANCHNAME to image_types_ostree.bbclass.
| * | Move OSTREE_BRANCHNAME to image_types_ostree.bbclass.fix/branch-rebuildPatrick Vacek2019-07-182-3/+3
| |/ | | | | | | | | | | | | | | If it is set in sota.bbclass and overwritten in local.conf, bitbake will rebuild everything. Now bitbake should only rerun the commands in image_types_ostree (and image_types_ota) as expected. Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
* / Allow customization of data in targets.jsonAndy Doan2019-07-172-0/+7
|/ | | | | | | This allows a user to define their own script to be executed after a target has been added to the repository but not yet signed. Signed-off-by: Andy Doan <andy@foundries.io>
* Add support for raspberrypi3-64Laurent Bonnans2019-06-071-0/+3
| | | | Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
* sota.bbclass: Translate old prov recipe names into the new versions.refactor/OTA-2798/rename-provisioningPatrick Vacek2019-06-051-0/+14
| | | | | | | This should help ease the transition so that no one is surprised when their provisioning suddenly stops working. Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>