From 9a6a92d7387c9c2382cd8170c4eddb6a2ca04f90 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 19 Aug 2024 15:07:18 -0600 Subject: [PATCH 01/15] pytest: requirements.txt: Resync with the rest of the project In order to build the docker container, which contains a download cache of python modules, we need to have our versions be in sync in each requirements file. Update some of the cases where which are older than the rest of the project. Reviewed-by: Simon Glass Signed-off-by: Tom Rini --- test/py/requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/py/requirements.txt b/test/py/requirements.txt index 2b1489808c0..75760f96e56 100644 --- a/test/py/requirements.txt +++ b/test/py/requirements.txt @@ -1,14 +1,14 @@ atomicwrites==1.4.1 attrs==19.3.0 concurrencytest==0.1.2 -coverage==4.5.4 +coverage==6.2 extras==1.0.0 filelock==3.0.12 fixtures==3.0.0 importlib-metadata==0.23 linecache2==1.0.0 more-itertools==7.2.0 -packaging==23.2 +packaging==24.1 pbr==5.4.3 pluggy==0.13.0 py==1.11.0 @@ -20,7 +20,7 @@ pytest==6.2.5 pytest-xdist==2.5.0 python-mimeparse==1.6.0 python-subunit==1.3.0 -requests==2.32.2 +requests==2.32.3 setuptools==70.3.0 six==1.16.0 testtools==2.3.0 From bcdd782dc2017df0a95a6acaf09e79968fd7bb1e Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 19 Aug 2024 15:07:19 -0600 Subject: [PATCH 02/15] Dockerfile: Update to namespace for some labels Using "MAINTAINER" and "Description" have been replaced with org.opencontainers.image namespace variables. Reviewed-by: Simon Glass Signed-off-by: Tom Rini --- tools/docker/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index cda87354566..f0e36994cc2 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -3,8 +3,8 @@ # to build U-Boot and run our test suites. FROM ubuntu:jammy-20240227 -MAINTAINER Tom Rini -LABEL Description=" This image is for building U-Boot inside a container" +LABEL org.opencontainers.image.authors="Tom Rini " +LABEL org.opencontainers.image.description=" This image is for building U-Boot inside a container" # Make sure apt is happy ENV DEBIAN_FRONTEND=noninteractive From 0b06e052fb153958d470209dab237f12796cb0da Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 21 Aug 2024 09:41:20 -0600 Subject: [PATCH 03/15] CI: Update to latest Dockerfile This primarily updates our python cache. Signed-off-by: Tom Rini --- .azure-pipelines.yml | 2 +- .gitlab-ci.yml | 2 +- tools/docker/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index e1b2f87b974..93111eb6127 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -2,7 +2,7 @@ variables: windows_vm: windows-2019 ubuntu_vm: ubuntu-22.04 macos_vm: macOS-12 - ci_runner_image: trini/u-boot-gitlab-ci-runner:jammy-20240227-14Mar2024 + ci_runner_image: trini/u-boot-gitlab-ci-runner:jammy-20240808-21Aug2024 # Add '-u 0' options for Azure pipelines, otherwise we get "permission # denied" error when it tries to "useradd -m -u 1001 vsts_azpcontainer", # since our $(ci_runner_image) user is not root. diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0a15b7352cd..7d621031b85 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,7 @@ default: # Grab our configured image. The source for this is found # in the u-boot tree at tools/docker/Dockerfile -image: ${MIRROR_DOCKER}/trini/u-boot-gitlab-ci-runner:jammy-20240227-14Mar2024 +image: ${MIRROR_DOCKER}/trini/u-boot-gitlab-ci-runner:jammy-20240808-21Aug2024 # We run some tests in different order, to catch some failures quicker. stages: diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index f0e36994cc2..c401170b1e1 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -2,7 +2,7 @@ # This Dockerfile is used to build an image containing basic stuff to be used # to build U-Boot and run our test suites. -FROM ubuntu:jammy-20240227 +FROM ubuntu:jammy-20240808 LABEL org.opencontainers.image.authors="Tom Rini " LABEL org.opencontainers.image.description=" This image is for building U-Boot inside a container" From 61faa6dd21f661cab95aa00a6660441a5f04f8db Mon Sep 17 00:00:00 2001 From: Mattijs Korpershoek Date: Wed, 24 Jul 2024 11:51:06 +0200 Subject: [PATCH 04/15] cmd: bcb: Fix segfault on invalid block device When blk_get_dev() fails, block NULL and gets de-referenced in the error path by a printf(), resulting in a crash. This can be reproduced on sandbox with: $ ./u-boot --command "bcb load mmc 0 0" Fix the message by using the functions arguments (iface, devnum) instead. Note: partition (being a global static initialized) can be used safely. This issue has been reported by coverity [1] [1] https://lore.kernel.org/all/20240723141844.GF989285@bill-the-cat/ Fixes: dfeb4f0d7935 ("cmd: bcb: extend BCB C API to allow read/write the fields") Reviewed-by: Dmitrii Merkurev Link: https://lore.kernel.org/r/20240724-bcb-crash-v1-1-44caff15bce4@baylibre.com Signed-off-by: Mattijs Korpershoek --- cmd/bcb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/bcb.c b/cmd/bcb.c index fe6d6cb2c38..97a96c00964 100644 --- a/cmd/bcb.c +++ b/cmd/bcb.c @@ -172,8 +172,8 @@ static int __bcb_initialize(const char *iface, int devnum, const char *partp) return CMD_RET_SUCCESS; err_read_fail: - printf("Error: %d %d:%s read failed (%d)\n", block->uclass_id, - block->devnum, partition->name, ret); + printf("Error: %s %d:%s read failed (%d)\n", iface, devnum, + partition->name, ret); __bcb_reset(); return CMD_RET_FAILURE; } From 6509c3fe1c7dddf1d598a9fd8234ed760b3a428b Mon Sep 17 00:00:00 2001 From: Michael Walle Date: Mon, 29 Jul 2024 23:36:57 +0200 Subject: [PATCH 05/15] boot: android: fix booting without a ramdisk android_image_get_ramdisk() will return an error if there is no ramdisk. Using the android image without a ramdisk worked until commit 1ce8e10f3b4b ("image: Fix up ANDROID_BOOT_IMAGE ramdisk code") because the return code wasn't checked until then. Return -ENOENT in case there is no ramdisk and translate that into -ENOPKG in the calling code, which will then indicate "no ramdisk" to its caller (boot_get_ramdisk()). This way, we can get rid of the "*rd_data = *rd_len = 0;" in the error path, too. With this, I'm able to boot a linux kernel using fastboot again: fastboot --base 0x41000000 --header-version 2 --dtb /path/to/dtb \ --cmdline "root=/dev/mmcblk0p1 rootwait" boot path/to/Image Signed-off-by: Michael Walle Reviewed-by: Mattijs Korpershoek Reviewed-by: Simon Glass Link: https://lore.kernel.org/r/20240729213657.2550935-1-mwalle@kernel.org Signed-off-by: Mattijs Korpershoek --- boot/image-android.c | 7 +++---- boot/image-board.c | 4 +++- include/image.h | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/boot/image-android.c b/boot/image-android.c index 09c7a44e058..774565fd1fe 100644 --- a/boot/image-android.c +++ b/boot/image-android.c @@ -393,10 +393,9 @@ int android_image_get_ramdisk(const void *hdr, const void *vendor_boot_img, if (!android_image_get_data(hdr, vendor_boot_img, &img_data)) return -EINVAL; - if (!img_data.ramdisk_size) { - *rd_data = *rd_len = 0; - return -1; - } + if (!img_data.ramdisk_size) + return -ENOENT; + if (img_data.header_version > 2) { ramdisk_ptr = img_data.ramdisk_addr; memcpy((void *)(ramdisk_ptr), (void *)img_data.vendor_ramdisk_ptr, diff --git a/boot/image-board.c b/boot/image-board.c index f2124013046..eca1b1d2bff 100644 --- a/boot/image-board.c +++ b/boot/image-board.c @@ -427,7 +427,9 @@ static int select_ramdisk(struct bootm_headers *images, const char *select, u8 a unmap_sysmem(ptr); } - if (ret) + if (ret == -ENOENT) + return -ENOPKG; + else if (ret) return ret; done = true; } diff --git a/include/image.h b/include/image.h index dd4042d1bd9..2ab17075287 100644 --- a/include/image.h +++ b/include/image.h @@ -1858,7 +1858,7 @@ int android_image_get_kernel(const void *hdr, * @vendor_boot_img : Pointer to vendor boot image header * @rd_data: Pointer to a ulong variable, will hold ramdisk address * @rd_len: Pointer to a ulong variable, will hold ramdisk length - * Return: 0 if succeeded, -1 if ramdisk size is 0 + * Return: 0 if OK, -ENOPKG if no ramdisk, -EINVAL if invalid image */ int android_image_get_ramdisk(const void *hdr, const void *vendor_boot_img, ulong *rd_data, ulong *rd_len); From e49eeb6575152cac4241f3c87471934a726970e9 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sun, 18 Aug 2024 22:04:15 +0200 Subject: [PATCH 06/15] usb: gadget: ux500: Do not redefine ops if CONFIG_USB_MUSB_HOST set In case CONFIG_USB_MUSB_HOST is set, the ux500_gadget_ops get overridden to musb_usb_ops . Simply set the ops one way or the other depending on whether CONFIG_USB_MUSB_HOST is set or not. Fixes: ac4bf5d48a9e ("usb: gadget: ux500: Convert interrupt handling to usb_gadget_generic_ops") Signed-off-by: Marek Vasut Reviewed-by: Mattijs Korpershoek Link: https://lore.kernel.org/r/20240818200425.89045-1-marek.vasut+renesas@mailbox.org Signed-off-by: Mattijs Korpershoek --- drivers/usb/musb-new/ux500.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/usb/musb-new/ux500.c b/drivers/usb/musb-new/ux500.c index 89dd75b7d05..be0085f403d 100644 --- a/drivers/usb/musb-new/ux500.c +++ b/drivers/usb/musb-new/ux500.c @@ -169,16 +169,14 @@ U_BOOT_DRIVER(ux500_musb) = { .name = "ux500-musb", #ifdef CONFIG_USB_MUSB_HOST .id = UCLASS_USB, + .ops = &musb_usb_ops, #else .id = UCLASS_USB_GADGET_GENERIC, + .ops = &ux500_gadget_ops, #endif .of_match = ux500_musb_ids, - .ops = &ux500_gadget_ops, .probe = ux500_musb_probe, .remove = ux500_musb_remove, -#ifdef CONFIG_USB_MUSB_HOST - .ops = &musb_usb_ops, -#endif .plat_auto = sizeof(struct usb_plat), .priv_auto = sizeof(struct ux500_glue), }; From 3a8ad050aa8b1663316952d1d4bebdb5f4911160 Mon Sep 17 00:00:00 2001 From: Ilias Apalodimas Date: Mon, 12 Aug 2024 23:57:59 +0300 Subject: [PATCH 07/15] efi_loader: fix memory freeing in efi_get_dp_from_boot() efi_get_var() allocates memory which must be freed after the variable is used. Since the device path is duplicated after we deserialize the load options free the memory used for the variable payload Fixes: db61e70e0d2a efi_loader: efi_dp_from_lo() should skip VenMedia node Signed-off-by: Ilias Apalodimas Reviewed-by: Heinric Schuchardt --- lib/efi_loader/efi_helper.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/efi_loader/efi_helper.c b/lib/efi_loader/efi_helper.c index 65d2116381a..916f43da26c 100644 --- a/lib/efi_loader/efi_helper.c +++ b/lib/efi_loader/efi_helper.c @@ -74,6 +74,7 @@ out: */ struct efi_device_path *efi_get_dp_from_boot(const efi_guid_t *guid) { + struct efi_device_path *file_path = NULL; struct efi_load_option lo; void *var_value; efi_uintn_t size; @@ -92,11 +93,11 @@ struct efi_device_path *efi_get_dp_from_boot(const efi_guid_t *guid) if (ret != EFI_SUCCESS) goto err; - return efi_dp_from_lo(&lo, guid); + file_path = efi_dp_from_lo(&lo, guid); err: free(var_value); - return NULL; + return file_path; } /** From 2a12caf75d282e20363c69707e93eeecbfa39749 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Wed, 14 Aug 2024 14:33:44 +0200 Subject: [PATCH 08/15] tools/mkeficapsule: correct printf codes uint64_t is defined as unsigned long long on 32-bit ARM. Use PRIX64 for printing uint64_t. This avoid a build failure on 32-bit systems: tools/mkeficapsule.c: In function 'dump_capsule_auth_header': tools/mkeficapsule.c:694:66: warning: format '%lX' expects argument of type 'long unsigned int', but argument 2 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] 694 | printf("EFI_FIRMWARE_IMAGE_AUTH.MONOTONIC_COUNT\t\t: %08lX\n", | ~~~~^ | | | long unsigned int | %08llX Signed-off-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas Reviewed-by: Mark Kettenis --- tools/mkeficapsule.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/mkeficapsule.c b/tools/mkeficapsule.c index f28008a0829..1b53151d41a 100644 --- a/tools/mkeficapsule.c +++ b/tools/mkeficapsule.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -691,7 +692,7 @@ static uint32_t dump_fmp_payload_header( static void dump_capsule_auth_header( struct efi_firmware_image_authentication *capsule_auth_hdr) { - printf("EFI_FIRMWARE_IMAGE_AUTH.MONOTONIC_COUNT\t\t: %08lX\n", + printf("EFI_FIRMWARE_IMAGE_AUTH.MONOTONIC_COUNT\t\t: %08" PRIX64 "\n", capsule_auth_hdr->monotonic_count); printf("EFI_FIRMWARE_IMAGE_AUTH.AUTH_INFO.HDR.dwLENGTH\t: %08X\n", capsule_auth_hdr->auth_info.hdr.dwLength); @@ -724,9 +725,9 @@ static void dump_fmp_capsule_image_header( image_hdr->update_image_size); printf("FMP_CAPSULE_IMAGE_HDR.UPDATE_VENDOR_CODE_SIZE\t: %08X\n", image_hdr->update_vendor_code_size); - printf("FMP_CAPSULE_IMAGE_HDR.UPDATE_HARDWARE_INSTANCE\t: %08lX\n", + printf("FMP_CAPSULE_IMAGE_HDR.UPDATE_HARDWARE_INSTANCE\t: %08" PRIX64 "\n", image_hdr->update_hardware_instance); - printf("FMP_CAPSULE_IMAGE_HDR.IMAGE_CAPSULE_SUPPORT\t: %08lX\n", + printf("FMP_CAPSULE_IMAGE_HDR.IMAGE_CAPSULE_SUPPORT\t: %08" PRIX64 "\n", image_hdr->image_capsule_support); printf("--------\n"); From 25a4b8114a7d4ee37eb11717b97400bd421faefc Mon Sep 17 00:00:00 2001 From: Emil Kronborg Date: Thu, 15 Aug 2024 08:21:22 +0000 Subject: [PATCH 09/15] doc: document the pwm command Signed-off-by: Emil Kronborg Reviewed-by: Simon Glass --- doc/usage/cmd/pwm.rst | 91 +++++++++++++++++++++++++++++++++++++++++++ doc/usage/index.rst | 1 + 2 files changed, 92 insertions(+) create mode 100644 doc/usage/cmd/pwm.rst diff --git a/doc/usage/cmd/pwm.rst b/doc/usage/cmd/pwm.rst new file mode 100644 index 00000000000..522acb5afa3 --- /dev/null +++ b/doc/usage/cmd/pwm.rst @@ -0,0 +1,91 @@ +.. SPDX-License-Identifier: GPL-2.0-or-later + +.. index:: + single: pwm (command) + +pwm command +=========== + +Synopsis +-------- + +:: + + pwm invert + pwm config + pwm enable + pwm disable + + +Description +----------- + +The ``pwm`` command is used to access and configure PWM (Pulse Width Modulation) +signals. + +pwm invert +---------- + +* If the value of ``polarity`` is 0, the default polarity is used. +* If the value of ``polarity`` is 1, the polarity is inverted. + +pwm config +---------- + +Configure the period and duty period in nanoseconds. + +pwm enable +---------- + +Enable output on the configured device and channel. + +pwm disable +----------- + +Disable output on the configured device and channel. + +pwm_dev_num + Device number of the pulse width modulation device + +channel + Output channel of the PWM device + +polarity + * 0 - Use normal polarity + * 1 - Use inverted polarity + +duty_ns + Duty period in ns + +period_ns + Period time in ns + +Examples +-------- + +Configure device 0, channel 0 to 20 µs period and 14 µs (that is, 70%) duty period:: + + => pwm config 0 0 20000 14000 + +Enable output on the configured device and channel:: + + => pwm enable 0 0 + +Disable output on the configured device and channel:: + + => pwm disable 0 0 + +Invert the signal on the configured device and channel:: + + => pwm invert 0 0 1 + +Configuration +------------- + +The ``pwm`` command is only available if CONFIG_CMD_PWM=y. + +Return value +------------ + +If the command succeeds, the return value ``$?`` is set to 0. If an error occurs, the +return value ``$?`` is set to 1. diff --git a/doc/usage/index.rst b/doc/usage/index.rst index 1f6518b77c4..6a218c46b4e 100644 --- a/doc/usage/index.rst +++ b/doc/usage/index.rst @@ -93,6 +93,7 @@ Shell commands cmd/pinmux cmd/printenv cmd/pstore + cmd/pwm cmd/qfw cmd/read cmd/reset From dcd1b63b7072749f98ea0a87565d0ae5c8ddfb65 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Wed, 21 Aug 2024 23:33:49 +0200 Subject: [PATCH 10/15] efi_loader: allow EFI_LOADER_BOUNCE_BUFFER on all architectures There not only ARM64 boards but also RISC-V boards that require a bounce buffer to read block devices. Drop the architecture restriction. Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig index 1179c31bb13..6ffefa9103f 100644 --- a/lib/efi_loader/Kconfig +++ b/lib/efi_loader/Kconfig @@ -364,7 +364,6 @@ endif config EFI_LOADER_BOUNCE_BUFFER bool "EFI Applications use bounce buffers for DMA operations" - depends on ARM64 help Some hardware does not support DMA to full 64bit addresses. For this hardware we can create a bounce buffer so that payloads don't have to From f3a2d793d7ae04634afb727f96ff6b0f6144c8ae Mon Sep 17 00:00:00 2001 From: Jonas Karlman Date: Sat, 3 Aug 2024 12:41:44 +0000 Subject: [PATCH 11/15] bootstage: Fix unstash of records from SPL The commit b81e31a1e6c5 ("bootstash: Do not provide a default address for all") changed a bootstage unstash call to bootstage stash, this has resulted in bootstage records stashed in SPL no longer get unstaged in U-Boot proper. Fix this by changing back to a unstage call. Fixes: b81e31a1e6c5 ("bootstash: Do not provide a default address for all") Signed-off-by: Jonas Karlman Reviewed-by: Simon Glass Reviewed-by: Tom Rini --- common/board_f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/board_f.c b/common/board_f.c index 29e185137ad..30d7fbf498f 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -810,7 +810,7 @@ static int initf_bootstage(void) if (ret) return ret; if (from_spl) { - ret = bootstage_stash_default(); + ret = bootstage_unstash_default(); if (ret && ret != -ENOENT) { debug("Failed to unstash bootstage: err=%d\n", ret); return ret; From aec0015a52d3faf723fec9ed9fe1d1af0b89e996 Mon Sep 17 00:00:00 2001 From: Jerome Forissier Date: Wed, 28 Aug 2024 17:36:37 +0200 Subject: [PATCH 12/15] mach-imx: do not use if_changed more than once per target doc/develop/makefiles.rst has the following note: if_changed should not be used more than once per target. It stores the executed command in a corresponding .cmd file and multiple calls would result in overwrites and unwanted results when the target is up to date and only the tests on changed commands trigger execution of commands. The mach-imx Makefile does not follow this recommandation, so fix it by implementing a single command that performs both the cpp_cfg and imx9_check actions. This change fixes an issue with "tools/buildman/buildman imx8ulp_evk" failing every other time [1]. [1] https://lists.denx.de/pipermail/u-boot/2024-August/563192.html Fixes: f637dfe8c468 ("mach-imx: Add i.MX93 binman support.") Signed-off-by: Jerome Forissier --- arch/arm/mach-imx/Makefile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index b311d176d64..5262dca4ffd 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile @@ -217,8 +217,8 @@ endif ifeq ($(CONFIG_ARCH_IMX9)$(CONFIG_ARCH_IMX8ULP), y) -quiet_cmd_imx9_check = CHECK $@ -cmd_imx9_check = $(srctree)/tools/imx9_image.sh $@ +quiet_cmd_cpp_cfg_imx9_check = CHECK $@ +cmd_cpp_cfg_imx9_check = $(CPP) $(cpp_flags) -D__ASSEMBLY__ -x c -o $@ $< && $(srctree)/tools/imx9_image.sh $@ SPL: spl/u-boot-spl.bin spl/u-boot-spl.cfgout u-boot-container.cfgout FORCE @@ -227,15 +227,13 @@ flash.bin: MKIMAGEOUTPUT = flash.log spl/u-boot-spl.cfgout: $(IMX_CONFIG) FORCE $(Q)mkdir -p $(dir $@) - $(call if_changed_dep,cpp_cfg) - $(call if_changed,imx9_check) + $(call if_changed_dep,cpp_cfg_imx9_check) spl/u-boot-spl-ddr.bin: spl/u-boot-spl.bin spl/u-boot-spl.cfgout FORCE u-boot-container.cfgout: $(IMX_CONTAINER_CFG) FORCE $(Q)mkdir -p $(dir $@) - $(call if_changed_dep,cpp_cfg) - $(call if_changed,imx9_check) + $(call if_changed_dep,cpp_cfg_imx9_check) flash.bin: spl/u-boot-spl-ddr.bin container.cfgout FORCE $(call if_changed,mkimage) From 7b8f0bfa6e1a0390bea8e2b24d7d7fa33d654db3 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Fri, 26 Jul 2024 12:02:33 -0700 Subject: [PATCH 13/15] patman: Resolve python string vs. regex escaping syntax Python strings have their own notion of backslash-escaping, and that can conflict with the intentions for strings passed to the 're' module. In particular, I get warnings like this: tools/patman/../patman/commit.py:9: SyntaxWarning: invalid escape sequence '\s' re_subject_tag = re.compile('([^:\s]*):\s*(.*)') We should use a raw string (r'...') so that all escaping is passed into the regex module, not interpreted within the string itself. Signed-off-by: Brian Norris Reviewed-by: Simon Glass --- tools/patman/commit.py | 2 +- tools/patman/patchstream.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/patman/commit.py b/tools/patman/commit.py index 684225c0e60..ce37a3d95eb 100644 --- a/tools/patman/commit.py +++ b/tools/patman/commit.py @@ -6,7 +6,7 @@ import collections import re # Separates a tag: at the beginning of the subject from the rest of it -re_subject_tag = re.compile('([^:\s]*):\s*(.*)') +re_subject_tag = re.compile(r'([^:\s]*):\s*(.*)') class Commit: """Holds information about a single commit/patch in the series. diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py index a09ae9c7371..4955f6aaab9 100644 --- a/tools/patman/patchstream.py +++ b/tools/patman/patchstream.py @@ -48,7 +48,7 @@ RE_TAG = re.compile('^(Tested-by|Acked-by|Reviewed-by|Patch-cc|Fixes): (.*)') RE_COMMIT = re.compile('^commit ([0-9a-f]*)$') # We detect these since checkpatch doesn't always do it -RE_SPACE_BEFORE_TAB = re.compile('^[+].* \t') +RE_SPACE_BEFORE_TAB = re.compile(r'^[+].* \t') # Match indented lines for changes RE_LEADING_WHITESPACE = re.compile(r'^\s') From 4597acbd5943a53afb8aeb9595f2ea5a40e1f99f Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 21 Aug 2024 17:52:24 -0600 Subject: [PATCH 14/15] qconfig: Fix an incorrect format-string with negative value This is not allowed, so use ljust() instead. This fixes the 'qconfig -i -I help' command. Signed-off-by: Simon Glass Fixes: 1bd43060b3e ("moveconfig: Use f strings where possible") --- tools/qconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qconfig.py b/tools/qconfig.py index 7b868c7d72c..8c2fc9efc5f 100755 --- a/tools/qconfig.py +++ b/tools/qconfig.py @@ -1595,7 +1595,7 @@ def imply(args): if flag == 'help' or bad: print("Imply flags: (separate with ',')") for name, info in IMPLY_FLAGS.items(): - print(f' {name:-15s}: {info[1]}') + print(f' {name.ljust(15)}: {info[1]}') return 1 imply_flags |= IMPLY_FLAGS[flag][0] From 1312faac5f52d27cfb45dfe1a5a93a2944ca5c21 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 2 Sep 2024 14:07:53 -0600 Subject: [PATCH 15/15] Prepare v2024.10-rc4 Signed-off-by: Tom Rini --- Makefile | 2 +- doc/develop/release_cycle.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f90e48f58a5..74df5d177c1 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ VERSION = 2024 PATCHLEVEL = 10 SUBLEVEL = -EXTRAVERSION = -rc3 +EXTRAVERSION = -rc4 NAME = # *DOCUMENTATION* diff --git a/doc/develop/release_cycle.rst b/doc/develop/release_cycle.rst index 72863756a42..de1d3045b44 100644 --- a/doc/develop/release_cycle.rst +++ b/doc/develop/release_cycle.rst @@ -73,7 +73,7 @@ For the next scheduled release, release candidates were made on:: * U-Boot v2024.10-rc3 was released on Mon 19 August 2024. -.. * U-Boot v2024.10-rc4 was released on Mon 02 September 2024. +* U-Boot v2024.10-rc4 was released on Mon 02 September 2024. .. * U-Boot v2024.10-rc5 was released on Mon 16 September 2024.