From e734314c9305e102e88a285b6e2518bf7c9b3cba4f40e20289d4bcc85f862eaa Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 17 Dec 2014 18:18:08 +0000 Subject: [PATCH] Accepting request 265415 from Base:System 1 OBS-URL: https://build.opensuse.org/request/show/265415 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=106 --- ...4-Reduce-timer-event-frequency-by-10.patch | 40 +++++++++++++++++++ grub2-snapper-plugin.sh | 10 +++-- grub2.changes | 17 ++++++++ grub2.spec | 6 ++- 4 files changed, 67 insertions(+), 6 deletions(-) create mode 100644 grub2-arm64-Reduce-timer-event-frequency-by-10.patch diff --git a/grub2-arm64-Reduce-timer-event-frequency-by-10.patch b/grub2-arm64-Reduce-timer-event-frequency-by-10.patch new file mode 100644 index 0000000..051a4ae --- /dev/null +++ b/grub2-arm64-Reduce-timer-event-frequency-by-10.patch @@ -0,0 +1,40 @@ +From 3aed1012cb8f559a0241569d6ec6b1be23844b05 Mon Sep 17 00:00:00 2001 +From: Mark Salter +Date: Thu, 20 Feb 2014 12:54:52 -0500 +Subject: [PATCH 139/152] Reduce timer event frequency by 10 + +Timer event to keep grub msec counter was running at 1000HZ. This was too +fast for UEFI timer driver and resulted in a 10x slowdown in grub time +versus wallclock. Reduce the timer event frequency and increase tick +increment accordingly to keep better time. + +Signed-off-by: Mark Salter +--- + grub-core/kern/arm/efi/init.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/grub-core/kern/arm/efi/init.c b/grub-core/kern/arm/efi/init.c +index a6ae034..0c17d83 100644 +--- a/grub-core/kern/arm/efi/init.c ++++ b/grub-core/kern/arm/efi/init.c +@@ -38,7 +38,7 @@ static void + increment_timer (grub_efi_event_t event __attribute__ ((unused)), + void *context __attribute__ ((unused))) + { +- tmr++; ++ tmr += 10; + } + + void +@@ -52,7 +52,7 @@ grub_machine_init (void) + + efi_call_5 (b->create_event, GRUB_EFI_EVT_TIMER | GRUB_EFI_EVT_NOTIFY_SIGNAL, + GRUB_EFI_TPL_CALLBACK, increment_timer, NULL, &tmr_evt); +- efi_call_3 (b->set_timer, tmr_evt, GRUB_EFI_TIMER_PERIODIC, 10000); ++ efi_call_3 (b->set_timer, tmr_evt, GRUB_EFI_TIMER_PERIODIC, 100000); + + grub_install_get_time_ms (grub_efi_get_time_ms); + } +-- +1.9.3 + diff --git a/grub2-snapper-plugin.sh b/grub2-snapper-plugin.sh index 8cb0526..10d3c44 100644 --- a/grub2-snapper-plugin.sh +++ b/grub2-snapper-plugin.sh @@ -98,6 +98,7 @@ snapper_snapshots_cfg_refresh () { return fi + cs= for s_dir in ${snapper_snapshot_path}/*; do snapshot="${s_dir}/snapshot" @@ -107,7 +108,8 @@ snapper_snapshots_cfg_refresh () { continue fi if [ -r "${s_dir}/info.xml" -a -r "${s_dir}/snapshot/boot/grub2/grub.cfg" ]; then - cs="${s_dir}\n${cs}" + cs="${s_dir} +${cs}" fi done @@ -115,14 +117,14 @@ snapper_snapshots_cfg_refresh () { hk="" [ -z "$hotkey" ] || hk="--hotkey=s" - for c in `printf "${cs}\n" | sort -Vr`; do + for c in $(printf '%s' "${cs}" | sort -Vr); do if ! snapshot_submenu "$c" > "${c}/${snapshot_submenu_name}"; then rm -f "${c}/${snapshot_submenu_name}" continue fi snapshot_cfg="${snapshot_cfg} - if [ -f "$c/${snapshot_submenu_name}"; then - source "$c/${snapshot_submenu_name}" + if [ -f \"$c/${snapshot_submenu_name}\"; then + source \"$c/${snapshot_submenu_name}\" fi" done diff --git a/grub2.changes b/grub2.changes index 2265149..8f01068 100644 --- a/grub2.changes +++ b/grub2.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Tue Dec 16 10:41:08 UTC 2014 - schwab@suse.de + +- Require efibootmgr also on aarch64 + +------------------------------------------------------------------- +Thu Dec 11 11:20:13 UTC 2014 - schwab@suse.de + +- grub2-snapper-plugin.sh: fix use of printf without format string; fix + quoting + +------------------------------------------------------------------- +Wed Dec 10 09:12:47 UTC 2014 - schwab@suse.de + +- grub2-arm64-Reduce-timer-event-frequency-by-10.patch: fix periodic timer + on arm64 + ------------------------------------------------------------------- Thu Dec 4 01:42:39 UTC 2014 - agraf@suse.com diff --git a/grub2.spec b/grub2.spec index 46ae1d4..438a06f 100644 --- a/grub2.spec +++ b/grub2.spec @@ -207,6 +207,7 @@ Patch230: grub2-xfs-Convert-inode-numbers-to-cpu-endianity-immediate.patch Patch231: grub2-xfs-V5-filesystem-format-support.patch Patch232: grub2-efi_gop-avoid-low-resolution.patch Patch233: grub2-ppc64le-fix-64bit-trampoline-in-dyn-linker.patch +Patch234: grub2-arm64-Reduce-timer-event-frequency-by-10.patch Requires: gettext-runtime %if 0%{?suse_version} >= 1140 @@ -278,8 +279,8 @@ provides support for %{platform} systems. Summary: Bootloader with support for Linux, Multiboot and more Group: System/Boot -%ifarch ia64 x86_64 -#Package is available on ia64 and x86_64 only and not necessarily needed +%ifarch ia64 x86_64 aarch64 +#Package is available on ia64, x86_64 and aarch64 only and not necessarily needed Requires: efibootmgr Requires(post): efibootmgr %endif @@ -412,6 +413,7 @@ mv po/grub.pot po/%{name}.pot %patch231 -p1 %patch232 -p1 %patch233 -p1 +%patch234 -p1 # Generate po/LINGUAS for message catalogs ... ./linguas.sh