aboutsummaryrefslogtreecommitdiffstats
path: root/common/mentor-swupdate
AgeCommit message (Collapse)Author
2019-07-18common: remove mentor swupdate bitsArsalan H. Awan
This removes the mentor swupdate bits in preparation for the yocto based warrior branch Signed-off-by: Arsalan H. Awan <Arsalan_Awan@mentor.com>
2019-04-10common/swu/gconf: rm failing postinsts delayed till first bootArsalan H. Awan
Package post-install intercept hooks that fail while do_rootfs and generate a warning similar to this: WARNING: development-image-1.0-r0 do_rootfs: The postinstall intercept hook 'update_gio_module_cache' failed ... are deferred for execution on first boot by marking the package as "unpacked" instead of "installed" in: oe-core/meta/lib/oe/package_manager.py |-> run_intercepts() |-> _postpone_to_first_boot() |-> _handle_intercept_failure() |-> .mark_packages("unpacked", registered_pkgs.split()) and the oe-core/meta/lib/oe/rootfs.py later on generates an ERROR as: ERROR: development-image-1.0-r0 do_rootfs: The following packages could not be configured offline and rootfs is read-only: ['gconf'] SWUpdate adds "read-only-rootfs" to the IMAGE_FEATURES, hence the delayed pkg_postinst_* routines cannot be executed on the first boot to configure the packages. In case of gconf which is a dependency for Qt5, we remove GIO_MODULE_PACKAGES so that update_gio_module_cache postinst-intercept never applies to this package. Signed-off-by: Arsalan H. Awan <Arsalan_Awan@mentor.com>
2019-03-29common/swupdate: set GRUBENV_PATH to fix updates with hawkbit serverArsalan H. Awan
This sets the SWUpdate's CONFIG_GRUBENV_PATH so that when an update is performed via HawkBit Server, it looks for the right grubenv file to save_state into rather than going for the GRUBENV_PATH_DEFAULT which does not exist in our case. Otherwise, update fails saying: ERROR: Failed to open grubenv file: /boot/efi/EFI/BOOT/grub/grubenv ERROR: Cannot persistently store update state. Signed-off-by: Arsalan H. Awan <Arsalan_Awan@mentor.com>
2019-03-21Merge pull request #623 from abelal/swupdate_v1kAwais Belal
swupdate cleanup/fixes
2019-03-21common/swu/libomxil: rm pkg_postinst_ontarget_* because of RO rootfsArsalan H. Awan
Package post-install scripts that are explicitly set to be executed ontarget and need to create/modify a file to configure the package cannot execute on a read-only rootfs. The oe-core/meta/lib/oe/rootfs.py generates an ERROR while do_rootfs: ERROR: development-image-1.0-r0 do_rootfs: The following packages could not be configured offline and rootfs is read-only: ['libomxil'] SWUpdate adds "read-only-rootfs" to the IMAGE_FEATURES, hence the delayed pkg_postinst_ontarget_* routines cannot be executed on the first boot to configure the packages. Therefore as a work-around, in case of libomxil, we remove the pkg_postinst_ontarget_* added in common/recipes-multimedia/libomxil. Signed-off-by: Arsalan H. Awan <Arsalan_Awan@mentor.com>
2019-03-20core-image-minimal-install-initramfs: drop overrideAwais Belal
We explicitly disabled an swupdate specific post process command on the initramfs image as it wasn't needed and didn't work well for the image type. Since the rework of swupdate support this post process command no longer exists so drop the unnecessary fragment. Signed-off-by: Awais Belal <awais_belal@mentor.com>
2019-03-20common/swu/liberation-fonts: rm failing postinst delayed til first bootArsalan H. Awan
Package post-install intercept hooks that fail while do_rootfs and generate a warning similar to this: WARNING: development-image-1.0-r0 do_rootfs: The postinstall intercept hook 'update_font_cache' failed ... are deferred for execution on first boot by marking the package as "unpacked" instead of "installed" in: oe-core/meta/lib/oe/package_manager.py |-> run_intercepts() |-> _postpone_to_first_boot() |-> _handle_intercept_failure() |-> .mark_packages("unpacked", registered_pkgs.split()) and the oe-core/meta/lib/oe/rootfs.py later on generates an ERROR as: ERROR: development-image-1.0-r0 do_rootfs: The following packages could not be configured offline and rootfs is read-only: ['liberation-fonts'] SWUpdate adds "read-only-rootfs" to the IMAGE_FEATURES, hence the delayed pkg_postinst_* routines cannot be executed on the first boot to configure the packages. Therefore as a work-around, in case of liberation-fonts, we remove the pkg_postinst_<font-pkg> from all the FONT_PACKAGES added in oe-core/meta/classes/fontcache.bbclass so that update_font_cache postinst-intercept never applies to these packages. Signed-off-by: Arsalan H. Awan <Arsalan_Awan@mentor.com>
2019-03-20common/swu/gdk-pixbuf: rm failing postinsts delayed til first bootArsalan H. Awan
Package post-install intercept hooks that fail while do_rootfs and generate a warning similar to this: WARNING: development-image-1.0-r0 do_rootfs: The postinstall intercept hook 'update_pixbuf_cache' failed ... are deferred for execution on first boot by marking the package as "unpacked" instead of "installed" in: oe-core/meta/lib/oe/package_manager.py |-> run_intercepts() |-> _postpone_to_first_boot() |-> _handle_intercept_failure() |-> .mark_packages("unpacked", registered_pkgs.split()) and the oe-core/meta/lib/oe/rootfs.py later on generates an ERROR as: ERROR: development-image-1.0-r0 do_rootfs: The following packages could not be configured offline and rootfs is read-only: [gdk-pixbuf] SWUpdate adds "read-only-rootfs" to the IMAGE_FEATURES, hence the delayed pkg_postinst_* routines cannot be executed on the first boot to configure the packages. Therefore as a work-around, in case of gdk-pixbuf, we remove the pkg_postinst_<pixbuf-pkg> from all the PIXBUF_PACKAGES added in oe-core/meta/classes/pixbufcache.bbclass so that update_pixbuf_cache postinst-intercept never applies to these packages. Signed-off-by: Arsalan H. Awan <Arsalan_Awan@mentor.com>
2019-03-20common/swu/glib-networking: rm failing postinsts delayed til first bootArsalan H. Awan
Package post-install intercept hooks that fail while do_rootfs and generate a warning similar to this: WARNING: development-image-1.0-r0 do_rootfs: The postinstall intercept hook 'update_gio_module_cache' failed ... are deferred for execution on first boot by marking the package as "unpacked" instead of "installed" in: oe-core/meta/lib/oe/package_manager.py |-> run_intercepts() |-> _postpone_to_first_boot() |-> _handle_intercept_failure() |-> .mark_packages("unpacked", registered_pkgs.split()) and the oe-core/meta/lib/oe/rootfs.py later on generates an ERROR as: ERROR: development-image-1.0-r0 do_rootfs: The following packages could not be configured offline and rootfs is read-only: ['glib-...'] SWUpdate adds "read-only-rootfs" to the IMAGE_FEATURES, hence the delayed pkg_postinst_* routines cannot be executed on the first boot to configure the packages. In case of glib-networking, we remove GIO_MODULE_PACKAGES so that update_gio_module_cache postinst-intercept never applies to this package. Signed-off-by: Arsalan H. Awan <Arsalan_Awan@mentor.com>
2019-03-08swupdate/amd-wdt: do not stop wdt as swupdate implementation needs itArsalan H. Awan
Mentor SWUpdate as a part of its Failsafe Update mechanism implementation requires the WDT to keep running. So lets not disable it. Signed-off-by: Arsalan H. Awan <Arsalan_Awan@mentor.com>
2019-03-08swupdate/initrdscripts: integrate amd-wdt in GRUB cfg for SWU failsafeArsalan H. Awan
This alters the init-install-efi.sh script by integrating the AMD-WDT in GRUB cfg of MEL installation to implement SWUpdate Failsafe Update mechanism. The AMD Watchdog is started as soon as a menuentry is selected by calling the setup_wdt function. It sets the WDT timeout of 60s by default which can be changed as needed. We also introduce a variable "mel_wdt" which allows user to disable the WDT in case the user is doing kernel debugging or so and wants the system to keep running. If WDT is detected to be fired & SWU was performed, then we fallback to last working state, else we do a normal boot. Signed-off-by: Arsalan H. Awan <Arsalan_Awan@mentor.com>
2019-03-06swupdate/grub: AMD Watchdog Driver & API support for GRUB cfg/consoleArsalan H. Awan
SWUpdate Failsafe Update mechanism requires watchdog timer support to detect a failed update, and to get the WDT triggered in case of a system hang for that matter. This adds AMD Watchdog Driver & Watchdog API support for GRUB allowing us to access and configure the WDT from GRUB configuration and console. Signed-off-by: Arsalan H. Awan <Arsalan_Awan@mentor.com>
2019-02-08systemd: fix udev-hwdb postinst disablementAwais Belal
This was done in 165f830fda9fbde5feef4c336ceb7c95532a635d but used a different override than what was required. Signed-off-by: Awais Belal <awais_belal@mentor.com>
2019-01-29initramfs-module-install-efi: manipulate the installer for SWUpdateAwais Belal
This fixes/modifies things as per the SWUpdate support being implemented for the MEL platforms. Covers the following 1. partitioning scheme as per dual-copy approach. 2. drop blacklist of the boot device in installed image required by swupdate. 3. deploy kernels and rootfs as <image>A to conform with dual copy approach. 4. implement grub.env approach to pick up kernel and rootfs from the environment to support fallback mechanism. 5. implement fallback mechanism. 6. do not set rootfs as rw, the MEL scheme is to use ro when supporting swupdate. 7. do not set a timeout for grub menu in installed image as this will simply delay boot. Signed-off-by: Awais Belal <awais_belal@mentor.com>
2019-01-18swupdate: basic support for AMD platformsAwais Belal
This enables GRUB under SWUpdate which is the bootloader used by AMD platforms and deploys the bl-kernels files in accordance with the support being enabled for AMD platforms. Signed-off-by: Awais Belal <awais_belal@mentor.com>
2019-01-18core-image-minimal-install-initramfs: drop illegal POST process cmdAwais Belal
The sw-description is not available for initramfs images so drop the post process commands as it fails otherwise. Signed-off-by: Awais Belal <awais_belal@mentor.com>
2019-01-18glib-2.0, udev-hw_db: disable postinstall hooksAwais Belal
GIO modules and udev's hw_db requires postinstallation hooks which fail due to current tools not supporting qemu execution on AMD builds. So, such hooks are deferred to first-boot which in case of swupdate is not possible as the rootfs is read-only. Simply disable these postinstall hooks. Signed-off-by: Awais Belal <awais_belal@mentor.com>