summaryrefslogtreecommitdiffstats
path: root/qt-ostree
Commit message (Collapse)AuthorAgeFilesLines
* doc: improve several sectionsGatis Paeglis2017-01-051-2/+3
| | | | | Change-Id: Idfccb574f67b7bdef45bbd88fed62fe865d1fdfb Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
* Remove the remaining traces of System V supportGatis Paeglis2017-01-052-60/+3
| | | | | | | | | | | | | | | | Support for System V was dropped a while back for the following reasons: - b2qt images have switched to systemd by default, therefore System V code path is untested and can't be officially supported. - supporting anyting else than systemd is not a high priority (if somebody really wants to use some other init system, that can be done with little extra effort). Change-Id: I33295d85ff72af232bf431989b5244f15b62747a Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Remove impractical API from QOtaClientGatis Paeglis2016-12-211-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | These convenience methods do not provide any real convenience after all. This API is not practical and extenting it would be pain (each new json property would require a new accessor method for each *Metadata version). The reduced subset of API is still sufficient to be used in property bindings: Label { text: extractVersion(OtaClient.remoteMetadata, "version") } Label { text: extractVersion(OtaClient.remoteMetadata, "description") } Where extractVersion() parses JSON metadata. If the metadata file is huge (parsing takes long time), API users can subscribe to onRemoteMetadataChanage: onRemoteMetadataChanged: { // parse the whole metadata file only once and set // appropriate properties. } Change-Id: If095e8c17712fa7b06bd577364ec10ae6ca6d52e Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Use consistent timestamp in u-boot headerGatis Paeglis2016-11-291-1/+4
| | | | | Change-Id: I65fb1c9ecefca621f074d838d5f0ada3fdcb4bba Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Add support for self-contained update packagesGatis Paeglis2016-11-293-4/+107
| | | | | | Task-number: QTBUG-54500 Change-Id: Ia735e85c0c92cbbebd0098b9021ff7d04b3e246b Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Always create the kargs fileGatis Paeglis2016-11-171-1/+2
| | | | | | | | This file was not created when --kernel-args is not used. The Qt OTA API expects to find this file. Change-Id: I01c425a7ae342fac0741012d57ca5d4c8da9464f Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* fixup: build_ostree.sh: use the same SHA as yocto recipeGatis Paeglis2016-11-021-76/+0
| | | | | Change-Id: I42f959480db20eaf9547c67693439ada23f44e47 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* build_ostree.sh: use the same SHA as yocto recipeGatis Paeglis2016-11-021-2/+2
| | | | | Change-Id: If0d6e33da0171c6ccb100e063766ade7b1d11c1a Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* remove the fragile kernel version extractorGatis Paeglis2016-11-021-13/+20
| | | | | | | .. and replace it with a command line arg. Change-Id: Ida823f4649cfc50fc6680a55a395a95786344334 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* deprecate System V init supportGatis Paeglis2016-08-301-1/+2
| | | | | | | | | This code path hasn't been tested for several b2qt releases, as we switched to using systemd by default. Change-Id: I0152235817cf009c2e8bb8ac28bc779fedbb18a4 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Support booting without initramfsGatis Paeglis2016-08-242-20/+52
| | | | | | | | | .. as embedded systems often want to avoid the boot-time overhead of an initramfs. Task-number: QTBUG-52758 Change-Id: I277331b9a57de3528713b2d5a913267d3d959fa8 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* build_ostree.sh: update revisionGatis Paeglis2016-08-2413-341/+580
| | | | | Change-Id: I4c1174970c26802df8ad58bbdb1df1a24d78bc4e Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Do not follow symlinks when resolving arg pathsGatis Paeglis2016-08-241-12/+14
| | | | | | | | | | | | | | | | We use file extensions to detect the input sysroot type. In meta-boot2qt builds for some devices symlink extension != target file extension: b2qt-embedded-qt5-image-nitrogen6x.img -> b2qt-embedded-qt5-image-nitrogen6x-20160804125649.rootfs.sdcard We use similar logic also for other command line args, so replace readlink -> realpath. Change-Id: I18a4705b0fe4b3dca28210a76454a510e2425900 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Extract kernel version from filename or binaryGatis Paeglis2016-08-241-19/+34
| | | | | | | | | | | This is a preperation for initramfs-less booting. This means that initramfs won't be mandatory anymore, therefore we can't assume that initramfs will be there for extracting the kernel version. Task-number: QTBUG-52758 Change-Id: I397a0fa4925b4ae8a3725921a318542c6132f025 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Add {find,path}_in_sysroot convenience functionsGatis Paeglis2016-07-181-9/+26
| | | | | Change-Id: I09e977e81f4cf648ab8a5617712800ee864735a3 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Add --developer command line argumentGatis Paeglis2016-07-181-4/+14
| | | | | Change-Id: If511848c453e486c49e7ce9cc60744477224b220 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Be more flexible at accepting input sysrootGatis Paeglis2016-07-181-23/+64
| | | | | Change-Id: I28c618bfa6facd5da1dae21241675a17add5b000 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Use "ostree commit" --tree= argumentGatis Paeglis2016-07-181-1/+1
| | | | | Change-Id: I9df28041e18eb5da459bc6cd9565d95738a11083 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Print sysroot diffGatis Paeglis2016-07-181-1/+12
| | | | | Change-Id: Ia82b5194d3f27e7dbfa66fdace7be657c8188635 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Abort when sysroot has unchangedGatis Paeglis2016-07-181-2/+16
| | | | | Change-Id: Id80c9df0fa8d4d9fef8944672f6879a7f6651d4f Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Wrap help output to ~80 columnsGatis Paeglis2016-07-181-24/+84
| | | | | Change-Id: I0ce5f10e3053eb1faf6e88e14dda10389654c507 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Use simpler syntax for clearing broken symlinks.Gatis Paeglis2016-06-131-1/+1
| | | | | Change-Id: I0f791fb028230f80fa8e4764bf6f919c9453f219 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Use ostree binary from the new path in SDK.Gatis Paeglis2016-06-131-1/+1
| | | | | Change-Id: I1a1d553e5c07daa2f78eb22e9baf12f6d810dadf Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* NUC: fix for the ostree-boot/ moveGatis Paeglis2016-06-101-9/+29
| | | | | | | | | The earlier change where we moved from the legacy /boot to /usr/lib/ostree-boot was not tested on NUC. Change-Id: Ica4348354e4385657b16575605d790f757e89c6f Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Add ostree build script and patchesGatis Paeglis2016-06-076-0/+493
| | | | | | | As this is where it belong. Change-Id: I6c6d10730ec7057c677079ed9359da3d33ad4835 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Update license information.Gatis Paeglis2016-06-073-25/+67
| | | | | Change-Id: I899c064958fcf70ada63d9145d8a2c6c43ee53d7 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Introduce json metadata file.Gatis Paeglis2016-05-311-9/+22
| | | | | | | | Used by the OTA API to query metadata about updates. And other minor cleanups. Change-Id: I748e7be8549b2c7b1b547f9b5ef26a0c47899cb1 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Create links in recovery partitionRainer Keller2016-05-041-1/+5
| | | | | Change-Id: I6bd184b8502d89b310ec646dbca4d2fe925848bf Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
* Preserve file permissions when extracting the root filesystemRainer Keller2016-04-281-4/+4
| | | | | Change-Id: Ie5fa9c99bcdaa9bea4ac7c12136037d8638e78f2 Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
* Add commandline option to override ostree locationRainer Keller2016-04-281-16/+21
| | | | | Change-Id: I428314b15a305239be500a5c4fe43f741a900d21 Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
* Move from legacy /boot to /usr/lib/ostree-bootGatis Paeglis2016-04-281-52/+41
| | | | | | | | | | | | | Having contents in the legacy /boot (as in OSTree deployment tree) location gets shadowed at boot time with the real boot/ directory. This patch also cleans up command line argument validation code and adds version numbers to the shipped kernel/initramfs images. Change-Id: I4ae82406c6bfce4a6221e2d4fa6468e7c43ca23d Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
* Sync after umountGatis Paeglis2016-04-281-3/+15
| | | | | | | Otherwise unexplainable things happen. Change-Id: I9161c20fda649209b91a269a7e29bd467de1deec Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
* Set executible flag when necessaryGatis Paeglis2016-04-283-0/+3
| | | | | Change-Id: I5e4fbf73aeb2e30291c5f42a316e374b63ed1869 Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
* Use the build-in grub2-mkconfigGatis Paeglis2016-04-281-8/+4
| | | | | | | | | | This replaces the workaround with a proper fix that has been merged upstream: https://github.com/ostreedev/ostree/commit/4e815484470fb22a1b0dc52af0193d5ce1a3caf7 Change-Id: I88c0e8bd6b41f54f5895684997e42ffd8bf9002e Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
* Remove --versbose arg from the deploy callGatis Paeglis2016-04-281-3/+1
| | | | | | | | It has become too verbose with more recent versions of OSTree. Change-Id: I676d1a003ae1156e9e7714e32f2f5ba67edd820f Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
* Make files on the recovery partition immutableGatis Paeglis2016-04-281-0/+1
| | | | | Change-Id: I8429f76b05b5d8ef5b70d4148d2064f773c925e2 Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
* dd image: Fix typoGatis Paeglis2016-04-281-1/+1
| | | | | Change-Id: I0622d928955a18094f6298fd7f26ca00e19afe97 Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
* Use less filesystem sync callsGatis Paeglis2016-04-181-3/+8
| | | | | | | | | Many sync calls can introduce significant delays on build servers with huge RAM. The linux kernel should handle IO handling for us. Change-Id: I79d8b3a68620f9b018d7a3e1c940c75a87ca23d6 Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
* Use ostree binary from SDK by defaultRainer Keller2016-04-151-10/+4
| | | | | Change-Id: I85f6ccb283d4598dcf93d220824baecb15142b1a Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
* Using the same ostree binary in all placesRainer Keller2016-04-151-13/+13
| | | | | | | | There is an ostree variable set in the beginning of this script which should be used in all places. Change-Id: I03b926548f1af62a6a34a4bd04fa8655b41396d2 Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
* Add --create-recovery-partition parameterGatis Paeglis2016-04-141-24/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are many approaches how to solve the "recovering system from a bad state" problem. The qt-ostree tool provides optional --create-recovery-partition parameter. If set, this creates a recovery partition right after the rootfs partiton. This is a convenient location as standard boot loader scripts (as seen from many b2qt devices) use only the first two partitions. So having one extra partition at the end does not break these scripts. All it requires is to add a custom logic at boot loader layer to load initramfs from the read-only recovery partition when "bad" state has been detected. We reuse the same initramfs for "normal" boot process (loaded from the boot partition) and for recovery boot process (loaded from the recovery partition). Boot loader layer should pass flag via kernel command line for initramfs to detect in what mode to run. Contents on the recovery partition should not be changed once the image has been deployed. This partition should be treated as read-only to reduce the risk of corruption. Ideally the initramfs should contain a logic for locating and executing scripts from the rootfs as this enables updating the recovery logic via OTA updates without writing to the read-only partition. Change-Id: Ia43ead5881d6b45e12e3fd99e50063d4890b299b Reviewed-by: Rainer Keller <rainer.keller@theqtcompany.com> Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
* Preserve all file bits set by OSTreeGatis Paeglis2016-03-151-3/+3
| | | | | | | | | | As this information is important to properly determine OTA update content and does not invalidate mtime based cache files (fontconfig is an example for this). Change-Id: Iafb5e75e9ec6bb8e4145c9a4010cf2307b5173d1 Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
* Do not use OSTree's deployment terminologyGatis Paeglis2016-03-152-29/+30
| | | | | | | | | | Rename --create-initial-deployment command line argument to --create-ota-sysroot and don't use deployment terminology in the documentation. This terminology is taken from OSTree internals and can be confusing for some users. Change-Id: Ieba6695fb78cd4e303370e420b6d7b2f0ae997cf Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
* Remove --verbose command line argGatis Paeglis2016-03-101-7/+5
| | | | | | | | | There isn't much use for it. When debugging "set -x" is more desirable choice, it can be enabled via QT_OSTREE_DEBUG envvar. Change-Id: I81e743e0eecd54e8d8163f143bec20d312922b54 Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
* Rename exit_qt_ostree to qt_ostree_exitGatis Paeglis2016-03-101-9/+9
| | | | | | | Use qt_ostree as a prefix for consitency with logging functions. Change-Id: Icda5d667b1b33eb5a7c5fa69a08637b6ae99617b Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
* Add color to logging for better readabilityGatis Paeglis2016-03-101-36/+55
| | | | | Change-Id: I357a8ff1576e990ceed242b5d9725d611885cc02 Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
* Refactor organize_boot_filesGatis Paeglis2016-03-101-12/+15
| | | | | Change-Id: Id5dd61e76cea58d2ef8b33e1142c35945433dba1 Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
* Add support for Intel NUC + GRUBGatis Paeglis2016-03-084-270/+299
| | | | | | | | | | | | | | | | With this patch OTA integration now supports boards with GRUB2 boot loaders. The same patch moves from *.tar.gz to dd based OTA images: - assembling and deploying dd image takes significantly less time. - its more convenient to do this in qt-ostree, as we have all the relevant information available there. Change-Id: I2d0fb2426360b8afc4e62f2c98c3d7c75a10db07 Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
* Properly disable trapGatis Paeglis2016-01-251-10/+16
| | | | | | | Disable trap for all explicit calls of the exit command. Change-Id: Ie140467cd75c5016916eeb25bb5fa40201982e11 Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
* Do not require path to exist in readlinkGatis Paeglis2016-01-131-9/+9
| | | | | | | | | | | If path does not exist, readlink returns non-zero exit code and qt-ostree script exits - see 'set -e'. canonicalize by following every symlink in every component of the given name recursively, without requirements on components existence. Change-Id: I248a9074fd43a84f6a4980c45b06dd6b55d637f8 Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>