From 7140a173ad4a82879ee063d97090ebb5258d20bec9714704a10bdad81bc0a514 Mon Sep 17 00:00:00 2001 From: Guillaume GARDET Date: Mon, 4 Oct 2021 11:37:38 +0000 Subject: [PATCH] Accepting request 922977 from hardware:boot:staging Fix Grub loading slowdown when connecting USB keyboard (bsc#1171222). Enable BTRFS for Risc-V. Patch queue updated from https://github.com/openSUSE/u-boot.git tumbleweed-2021.10 * Patches added: 0013-riscv-enable-CMD_BTRFS.patch 0014-Disable-timer-check-in-file-loading.patch OBS-URL: https://build.opensuse.org/request/show/922977 OBS-URL: https://build.opensuse.org/package/show/hardware:boot/u-boot?expand=0&rev=152 --- ...-XXX-openSUSE-XXX-Prepend-partition-.patch | 2 +- ...-Revert-Revert-omap3-Use-raw-SPL-by-.patch | 2 +- ...-rpi-Use-firmware-provided-device-tr.patch | 10 ++-- ...-Temp-workaround-for-Chromebook-snow.patch | 2 +- ...-tools-zynqmpbif-Add-support-for-loa.patch | 2 +- 0006-Kconfig-add-btrfs-to-distro-boot.patch | 2 +- ...-configs-Re-sync-with-CONFIG_DISTRO_.patch | 10 ++-- ...-sunxi-dts-OrangePi-Zero-Add-SPI-ali.patch | 4 +- ...-sunxi-dts-OrangePi-Zero-Enable-SPI-.patch | 2 +- ...-sunxi-Enable-SPI-support-on-Orange-.patch | 2 +- ...-Disable-CONFIG_CMD_BTRFS-in-xilinx_.patch | 2 +- ...-smbios-Fix-table-when-no-string-is-.patch | 2 +- 0013-riscv-enable-CMD_BTRFS.patch | 23 +++++++++ ...-Disable-timer-check-in-file-loading.patch | 48 +++++++++++++++++++ u-boot.changes | 11 +++++ u-boot.spec | 2 + 16 files changed, 105 insertions(+), 21 deletions(-) create mode 100644 0013-riscv-enable-CMD_BTRFS.patch create mode 100644 0014-Disable-timer-check-in-file-loading.patch diff --git a/0001-XXX-openSUSE-XXX-Prepend-partition-.patch b/0001-XXX-openSUSE-XXX-Prepend-partition-.patch index f403ff7..3d0678b 100644 --- a/0001-XXX-openSUSE-XXX-Prepend-partition-.patch +++ b/0001-XXX-openSUSE-XXX-Prepend-partition-.patch @@ -12,7 +12,7 @@ Subject: [PATCH] XXX openSUSE XXX: Prepend partition 3 (and 4 for chromebook 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h -index 750e9e04e8..71bbf4bc21 100644 +index 750e9e04e8f..71bbf4bc21d 100644 --- a/include/config_distro_bootcmd.h +++ b/include/config_distro_bootcmd.h @@ -151,7 +151,7 @@ diff --git a/0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch b/0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch index 26e0890..7875400 100644 --- a/0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch +++ b/0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch @@ -9,7 +9,7 @@ This reverts commit 7fa75d0ac5502db813d109c1df7bd0da34688685. 1 file changed, 2 deletions(-) diff --git a/arch/arm/mach-omap2/boot-common.c b/arch/arm/mach-omap2/boot-common.c -index 7cdf7f1589..c06f0f8e67 100644 +index 7cdf7f15898..c06f0f8e678 100644 --- a/arch/arm/mach-omap2/boot-common.c +++ b/arch/arm/mach-omap2/boot-common.c @@ -134,8 +134,6 @@ void save_omap_boot_params(void) diff --git a/0003-rpi-Use-firmware-provided-device-tr.patch b/0003-rpi-Use-firmware-provided-device-tr.patch index e808d9c..4084ea6 100644 --- a/0003-rpi-Use-firmware-provided-device-tr.patch +++ b/0003-rpi-Use-firmware-provided-device-tr.patch @@ -28,7 +28,7 @@ Signed-off-by: Guillaume Gardet 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configs/rpi_0_w_defconfig b/configs/rpi_0_w_defconfig -index d17e102052..e5cd7d4913 100644 +index d17e1020525..e5cd7d49139 100644 --- a/configs/rpi_0_w_defconfig +++ b/configs/rpi_0_w_defconfig @@ -17,7 +17,7 @@ CONFIG_CMD_GPIO=y @@ -41,7 +41,7 @@ index d17e102052..e5cd7d4913 100644 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig -index 8b8affb777..8bda6e6aa9 100644 +index 8b8affb7774..8bda6e6aa91 100644 --- a/configs/rpi_2_defconfig +++ b/configs/rpi_2_defconfig @@ -17,7 +17,7 @@ CONFIG_CMD_GPIO=y @@ -54,7 +54,7 @@ index 8b8affb777..8bda6e6aa9 100644 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig -index b867b7fa7b..370495c9e4 100644 +index b867b7fa7bf..370495c9e43 100644 --- a/configs/rpi_3_32b_defconfig +++ b/configs/rpi_3_32b_defconfig @@ -18,7 +18,7 @@ CONFIG_CMD_GPIO=y @@ -67,7 +67,7 @@ index b867b7fa7b..370495c9e4 100644 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig -index 3cebd657da..bb0a7ebcd5 100644 +index 3cebd657da7..bb0a7ebcd5d 100644 --- a/configs/rpi_3_defconfig +++ b/configs/rpi_3_defconfig @@ -18,7 +18,7 @@ CONFIG_CMD_GPIO=y @@ -80,7 +80,7 @@ index 3cebd657da..bb0a7ebcd5 100644 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig -index af2189b8fe..f6517eb52a 100644 +index af2189b8fe2..f6517eb52a6 100644 --- a/configs/rpi_defconfig +++ b/configs/rpi_defconfig @@ -17,7 +17,7 @@ CONFIG_CMD_GPIO=y diff --git a/0004-Temp-workaround-for-Chromebook-snow.patch b/0004-Temp-workaround-for-Chromebook-snow.patch index ec9d87d..92517fc 100644 --- a/0004-Temp-workaround-for-Chromebook-snow.patch +++ b/0004-Temp-workaround-for-Chromebook-snow.patch @@ -9,7 +9,7 @@ Subject: [PATCH] Temp workaround for Chromebook snow to avoid the 'unable to 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c -index a949dad574..cc8539edae 100644 +index a949dad5740..cc8539edae1 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -608,7 +608,8 @@ void dwmci_setup_cfg(struct mmc_config *cfg, struct dwmci_host *host, diff --git a/0005-tools-zynqmpbif-Add-support-for-loa.patch b/0005-tools-zynqmpbif-Add-support-for-loa.patch index b7698c7..e338878 100644 --- a/0005-tools-zynqmpbif-Add-support-for-loa.patch +++ b/0005-tools-zynqmpbif-Add-support-for-loa.patch @@ -34,7 +34,7 @@ Signed-off-by: Alexander Graf 1 file changed, 15 insertions(+) diff --git a/tools/zynqmpbif.c b/tools/zynqmpbif.c -index 82ce0ac1a5..b4302fa67e 100644 +index 82ce0ac1a52..b4302fa67ee 100644 --- a/tools/zynqmpbif.c +++ b/tools/zynqmpbif.c @@ -42,6 +42,7 @@ enum bif_flag { diff --git a/0006-Kconfig-add-btrfs-to-distro-boot.patch b/0006-Kconfig-add-btrfs-to-distro-boot.patch index 2f879b6..2432194 100644 --- a/0006-Kconfig-add-btrfs-to-distro-boot.patch +++ b/0006-Kconfig-add-btrfs-to-distro-boot.patch @@ -13,7 +13,7 @@ Signed-off-by: Matthias Brugger 1 file changed, 1 insertion(+) diff --git a/Kconfig b/Kconfig -index a6c42b902f..01186e2098 100644 +index a6c42b902f7..01186e20986 100644 --- a/Kconfig +++ b/Kconfig @@ -182,6 +182,7 @@ config DISTRO_DEFAULTS diff --git a/0007-configs-Re-sync-with-CONFIG_DISTRO_.patch b/0007-configs-Re-sync-with-CONFIG_DISTRO_.patch index 0822cba..1550245 100644 --- a/0007-configs-Re-sync-with-CONFIG_DISTRO_.patch +++ b/0007-configs-Re-sync-with-CONFIG_DISTRO_.patch @@ -18,7 +18,7 @@ Signed-off-by: Matthias Brugger 5 files changed, 2 insertions(+), 4 deletions(-) diff --git a/configs/sandbox64_defconfig b/configs/sandbox64_defconfig -index f7098b4969..09bf1f8eb3 100644 +index f7098b49698..09bf1f8eb39 100644 --- a/configs/sandbox64_defconfig +++ b/configs/sandbox64_defconfig @@ -77,7 +77,6 @@ CONFIG_CMD_REGULATOR=y @@ -30,7 +30,7 @@ index f7098b4969..09bf1f8eb3 100644 CONFIG_CMD_CRAMFS=y CONFIG_CMD_EXT4_WRITE=y diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig -index ea08a9e5bd..ec19587e82 100644 +index ea08a9e5bd1..ec19587e82e 100644 --- a/configs/sandbox_defconfig +++ b/configs/sandbox_defconfig @@ -99,7 +99,6 @@ CONFIG_CMD_REGULATOR=y @@ -42,7 +42,7 @@ index ea08a9e5bd..ec19587e82 100644 CONFIG_CMD_CRAMFS=y CONFIG_CMD_EXT4_WRITE=y diff --git a/configs/socfpga_arria10_defconfig b/configs/socfpga_arria10_defconfig -index ef9bbb9c3a..c4ddbcc612 100644 +index ef9bbb9c3ac..c4ddbcc6128 100644 --- a/configs/socfpga_arria10_defconfig +++ b/configs/socfpga_arria10_defconfig @@ -53,3 +53,5 @@ CONFIG_DESIGNWARE_APB_TIMER=y @@ -52,7 +52,7 @@ index ef9bbb9c3a..c4ddbcc612 100644 +# CONFIG_CMD_BTRFS is not set +# CONFIG_FS_BTRFS is not set diff --git a/configs/turris_mox_defconfig b/configs/turris_mox_defconfig -index 9a9102430e..dca076bf4b 100644 +index 9a9102430e6..dca076bf4b1 100644 --- a/configs/turris_mox_defconfig +++ b/configs/turris_mox_defconfig @@ -44,7 +44,6 @@ CONFIG_CMD_TIME=y @@ -64,7 +64,7 @@ index 9a9102430e..dca076bf4b 100644 CONFIG_MAC_PARTITION=y CONFIG_ENV_OVERWRITE=y diff --git a/configs/turris_omnia_defconfig b/configs/turris_omnia_defconfig -index a724a1baa1..1695a99f30 100644 +index a724a1baa16..1695a99f308 100644 --- a/configs/turris_omnia_defconfig +++ b/configs/turris_omnia_defconfig @@ -54,7 +54,6 @@ CONFIG_CMD_CACHE=y diff --git a/0008-sunxi-dts-OrangePi-Zero-Add-SPI-ali.patch b/0008-sunxi-dts-OrangePi-Zero-Add-SPI-ali.patch index 0862948..782a426 100644 --- a/0008-sunxi-dts-OrangePi-Zero-Add-SPI-ali.patch +++ b/0008-sunxi-dts-OrangePi-Zero-Add-SPI-ali.patch @@ -15,7 +15,7 @@ Signed-off-by: Matthias Brugger create mode 100644 arch/arm/dts/sunxi-spi-u-boot.dtsi diff --git a/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts -index f19ed981da..3f0d0281ba 100644 +index f19ed981da9..3f0d0281ba5 100644 --- a/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts +++ b/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts @@ -46,6 +46,7 @@ @@ -28,7 +28,7 @@ index f19ed981da..3f0d0281ba 100644 #include diff --git a/arch/arm/dts/sunxi-spi-u-boot.dtsi b/arch/arm/dts/sunxi-spi-u-boot.dtsi new file mode 100644 -index 0000000000..df89d02ff2 +index 00000000000..df89d02ff2f --- /dev/null +++ b/arch/arm/dts/sunxi-spi-u-boot.dtsi @@ -0,0 +1,8 @@ diff --git a/0009-sunxi-dts-OrangePi-Zero-Enable-SPI-.patch b/0009-sunxi-dts-OrangePi-Zero-Enable-SPI-.patch index 69dcc85..dd6f87e 100644 --- a/0009-sunxi-dts-OrangePi-Zero-Enable-SPI-.patch +++ b/0009-sunxi-dts-OrangePi-Zero-Enable-SPI-.patch @@ -13,7 +13,7 @@ Signed-off-by: Matthias Brugger 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts -index 3f0d0281ba..b08e84c616 100644 +index 3f0d0281ba5..b08e84c6161 100644 --- a/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts +++ b/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts @@ -164,8 +164,8 @@ diff --git a/0010-sunxi-Enable-SPI-support-on-Orange-.patch b/0010-sunxi-Enable-SPI-support-on-Orange-.patch index d53b1a3..1629435 100644 --- a/0010-sunxi-Enable-SPI-support-on-Orange-.patch +++ b/0010-sunxi-Enable-SPI-support-on-Orange-.patch @@ -12,7 +12,7 @@ Signed-off-by: Matthias Brugger 1 file changed, 8 insertions(+) diff --git a/configs/orangepi_zero_defconfig b/configs/orangepi_zero_defconfig -index 332cd4739e..1317a48ae6 100644 +index 332cd4739ea..1317a48ae6e 100644 --- a/configs/orangepi_zero_defconfig +++ b/configs/orangepi_zero_defconfig @@ -8,6 +8,14 @@ CONFIG_DRAM_CLK=624 diff --git a/0011-Disable-CONFIG_CMD_BTRFS-in-xilinx_.patch b/0011-Disable-CONFIG_CMD_BTRFS-in-xilinx_.patch index 3c1e52b..26ee4f2 100644 --- a/0011-Disable-CONFIG_CMD_BTRFS-in-xilinx_.patch +++ b/0011-Disable-CONFIG_CMD_BTRFS-in-xilinx_.patch @@ -9,7 +9,7 @@ Subject: [PATCH] Disable CONFIG_CMD_BTRFS in xilinx_zynqmp_virt_defconfig to 1 file changed, 1 insertion(+) diff --git a/configs/xilinx_zynqmp_virt_defconfig b/configs/xilinx_zynqmp_virt_defconfig -index 2c8dc3427c..7b26c1445b 100644 +index 2c8dc3427cf..7b26c1445b9 100644 --- a/configs/xilinx_zynqmp_virt_defconfig +++ b/configs/xilinx_zynqmp_virt_defconfig @@ -73,6 +73,7 @@ CONFIG_CMD_TIMER=y diff --git a/0012-smbios-Fix-table-when-no-string-is-.patch b/0012-smbios-Fix-table-when-no-string-is-.patch index 6555dc5..7ca897d 100644 --- a/0012-smbios-Fix-table-when-no-string-is-.patch +++ b/0012-smbios-Fix-table-when-no-string-is-.patch @@ -19,7 +19,7 @@ Series-cc: u-boot@lists.denx.de 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/smbios.c b/lib/smbios.c -index d7f4999e8b..2cdfef7a2c 100644 +index d7f4999e8b2..2cdfef7a2c9 100644 --- a/lib/smbios.c +++ b/lib/smbios.c @@ -172,7 +172,7 @@ static int smbios_add_prop(struct smbios_ctx *ctx, const char *prop) diff --git a/0013-riscv-enable-CMD_BTRFS.patch b/0013-riscv-enable-CMD_BTRFS.patch new file mode 100644 index 0000000..6d8af11 --- /dev/null +++ b/0013-riscv-enable-CMD_BTRFS.patch @@ -0,0 +1,23 @@ +From 032563d01b116c2b31e7b9f34054d6772351d347 Mon Sep 17 00:00:00 2001 +From: Andreas Schwab +Date: Fri, 24 Sep 2021 18:25:51 +0200 +Subject: [PATCH] riscv: enable CMD_BTRFS + +Signed-off-by: Matthias Brugger +--- + Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Kconfig b/Kconfig +index 01186e20986..2d17084d55f 100644 +--- a/Kconfig ++++ b/Kconfig +@@ -182,7 +182,7 @@ config DISTRO_DEFAULTS + select HUSH_PARSER + select SUPPORT_RAW_INITRD + select SYS_LONGHELP +- imply CMD_BTRFS if !RISCV && !MIPS ++ imply CMD_BTRFS if !MIPS + imply CMD_MII if NET + imply USB_STORAGE + imply USE_BOOTCOMMAND diff --git a/0014-Disable-timer-check-in-file-loading.patch b/0014-Disable-timer-check-in-file-loading.patch new file mode 100644 index 0000000..34e896c --- /dev/null +++ b/0014-Disable-timer-check-in-file-loading.patch @@ -0,0 +1,48 @@ +From 2f6e5f98b7ce3ddcfaaefac693041e3fd3d058e8 Mon Sep 17 00:00:00 2001 +From: Michael Chang +Date: Tue, 25 May 2021 06:45:01 +0000 +Subject: [PATCH] Disable timer check in file loading + +The u-boot efi console service registers a timer to poll the keyboard +input in every 50ns. In the efi block io service, this timer is +evaluated on each block read, and since the timer interval is much less +than the time needed to reading out a block (32kB) from the disk, the +keyboard polling is therefore in the wake of each block read. + +Unfortunately USB keyboard spends too much time in polling. In my test +usb_kbd_poll_for_event costs 40ms in usb_kbd_testc() to test if a +character is in the queue. In combination with the number of blocks to +be read from the disk, the extra amound of time delayed could be around +30 seconds to load linux and initrd. + +For that matters, the timer check is disabled in file loading to speed +it up. The consequence would be losing the keystroke during the time +file is loading, but that is acceptable IMHO. + +Signed-off-by: Matthias Brugger +--- + lib/efi_loader/efi_disk.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c +index 988907ecb91..ea75687508c 100644 +--- a/lib/efi_loader/efi_disk.c ++++ b/lib/efi_loader/efi_disk.c +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + + struct efi_system_partition efi_system_partition; + +@@ -103,8 +104,7 @@ static efi_status_t efi_disk_rw_blocks(struct efi_block_io *this, + else + n = blk_dwrite(desc, lba, blocks, buffer); + +- /* We don't do interrupts, so check for timers cooperatively */ +- efi_timer_check(); ++ WATCHDOG_RESET(); + + EFI_PRINT("n=%lx blocks=%x\n", n, blocks); + diff --git a/u-boot.changes b/u-boot.changes index 249bc1f..fb98429 100644 --- a/u-boot.changes +++ b/u-boot.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Thu Sep 30 02:30:51 UTC 2021 - Matthias Brugger + +Fix Grub loading slowdown when connecting USB keyboard (bsc#1171222). +Enable BTRFS for Risc-V. + +Patch queue updated from https://github.com/openSUSE/u-boot.git tumbleweed-2021.10 +* Patches added: + 0013-riscv-enable-CMD_BTRFS.patch + 0014-Disable-timer-check-in-file-loading.patch + ------------------------------------------------------------------- Tue Sep 28 18:38:35 UTC 2021 - Guillaume GARDET diff --git a/u-boot.spec b/u-boot.spec index d859652..5afc8d2 100644 --- a/u-boot.spec +++ b/u-boot.spec @@ -232,6 +232,8 @@ Patch0009: 0009-sunxi-dts-OrangePi-Zero-Enable-SPI-.patch Patch0010: 0010-sunxi-Enable-SPI-support-on-Orange-.patch Patch0011: 0011-Disable-CONFIG_CMD_BTRFS-in-xilinx_.patch Patch0012: 0012-smbios-Fix-table-when-no-string-is-.patch +Patch0013: 0013-riscv-enable-CMD_BTRFS.patch +Patch0014: 0014-Disable-timer-check-in-file-loading.patch # Patches: end BuildRequires: bc BuildRequires: bison