diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/binman/bintool.py | 10 | ||||
-rw-r--r-- | tools/binman/etype/cbfs.py | 1 | ||||
-rw-r--r-- | tools/binman/etype/mkimage.py | 1 | ||||
-rw-r--r-- | tools/binman/etype/section.py | 1 | ||||
-rw-r--r-- | tools/docker/Dockerfile | 14 | ||||
-rw-r--r-- | tools/fit_image.c | 10 | ||||
-rw-r--r-- | tools/mips-relocs.c | 7 | ||||
-rw-r--r-- | tools/patman/test_cseries.py | 2 |
8 files changed, 33 insertions, 13 deletions
diff --git a/tools/binman/bintool.py b/tools/binman/bintool.py index 81872db377f..9c76c8881a4 100644 --- a/tools/binman/bintool.py +++ b/tools/binman/bintool.py @@ -55,6 +55,9 @@ class Bintool: # must be called before this class is used. tooldir = '' + # Flag to run 'apt-get update -y' once on first use of apt_install() + apt_updated = False + def __init__(self, name, desc, version_regex=None, version_args='-V'): self.name = name self.desc = desc @@ -421,7 +424,12 @@ class Bintool: Returns: True, assuming it completes without error """ - args = ['sudo', 'apt', 'install', '-y', package] + if not cls.apt_updated: + args = ['sudo', 'apt-get', 'update', '-y'] + print('- %s' % ' '.join(args)) + tools.run(*args) + cls.apt_updated = True + args = ['sudo', 'apt-get', 'install', '-y', package] print('- %s' % ' '.join(args)) tools.run(*args) return True diff --git a/tools/binman/etype/cbfs.py b/tools/binman/etype/cbfs.py index 5879f377231..9cc4b756b3f 100644 --- a/tools/binman/etype/cbfs.py +++ b/tools/binman/etype/cbfs.py @@ -5,6 +5,7 @@ # Entry-type module for a Coreboot Filesystem (CBFS) # +from __future__ import annotations from collections import OrderedDict from binman import cbfs_util diff --git a/tools/binman/etype/mkimage.py b/tools/binman/etype/mkimage.py index 75e59c3d3a3..9fba902bdad 100644 --- a/tools/binman/etype/mkimage.py +++ b/tools/binman/etype/mkimage.py @@ -5,6 +5,7 @@ # Entry-type module for producing an image using mkimage # +from __future__ import annotations from collections import OrderedDict from binman.entry import Entry diff --git a/tools/binman/etype/section.py b/tools/binman/etype/section.py index 03c4f7c6ec7..6a26d687056 100644 --- a/tools/binman/etype/section.py +++ b/tools/binman/etype/section.py @@ -8,6 +8,7 @@ Sections are entries which can contain other entries. This allows hierarchical images to be created. """ +from __future__ import annotations from collections import OrderedDict import concurrent.futures import re diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index ceb7a25ad4d..5b4c75f8400 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-20250404 +FROM ubuntu:jammy-20250714 LABEL org.opencontainers.image.authors="Tom Rini <trini@konsulko.com>" LABEL org.opencontainers.image.description=" This image is for building U-Boot inside a container" @@ -125,6 +125,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ python3-dev \ python3-pip \ python3-sphinx \ + python3-tomli \ python3-venv \ rpm2cpio \ sbsigntool \ @@ -218,13 +219,10 @@ RUN git clone git://git.savannah.gnu.org/grub.git /tmp/grub && \ RUN git clone https://gitlab.com/qemu-project/qemu.git /tmp/qemu && \ cd /tmp/qemu && \ - git checkout v8.2.0 && \ + git checkout v10.0.2 && \ # config user.name and user.email to make 'git am' happy git config user.name u-boot && \ git config user.email u-boot@denx.de && \ - git format-patch 0c7ffc977195~..0c7ffc977195 && \ - git am 0001-hw-net-cadence_gem-Fix-MDIO_OP_xxx-values.patch && \ - git cherry-pick d3c79c3974 && \ ./configure --prefix=/opt/qemu --target-list="aarch64-softmmu,arm-softmmu,i386-softmmu,m68k-softmmu,mips-softmmu,mips64-softmmu,mips64el-softmmu,mipsel-softmmu,ppc-softmmu,riscv32-softmmu,riscv64-softmmu,sh4-softmmu,x86_64-softmmu,xtensa-softmmu" && \ make -j$(nproc) all install && \ rm -rf /tmp/qemu @@ -294,8 +292,8 @@ RUN mkdir /tmp/trace && \ rm -rf /tmp/trace # Build coreboot -RUN wget -O - https://coreboot.org/releases/coreboot-24.08.tar.xz | tar -C /tmp -xJ && \ - cd /tmp/coreboot-24.08 && \ +RUN wget -O - https://coreboot.org/releases/coreboot-25.03.tar.xz | tar -C /tmp -xJ && \ + cd /tmp/coreboot-25.03 && \ make crossgcc-i386 CPUS=$(nproc) && \ make -C payloads/coreinfo olddefconfig && \ make -C payloads/coreinfo && \ @@ -306,7 +304,7 @@ RUN wget -O - https://coreboot.org/releases/coreboot-24.08.tar.xz | tar -C /tmp make -j $(nproc) && \ sudo mkdir /opt/coreboot && \ sudo cp build/coreboot.rom build/cbfstool /opt/coreboot/ && \ - rm -rf /tmp/coreboot-24.08 + rm -rf /tmp/coreboot-25.03 # Create our user/group RUN echo uboot ALL=NOPASSWD: ALL > /etc/sudoers.d/uboot diff --git a/tools/fit_image.c b/tools/fit_image.c index ad0ffa39c6a..331be5ae71d 100644 --- a/tools/fit_image.c +++ b/tools/fit_image.c @@ -756,6 +756,8 @@ static int fit_import_data(struct image_tool_params *params, const char *fname) } confs = fdt_path_offset(fdt, FIT_CONFS_PATH); + const char *default_conf = + (char *)fdt_getprop(fdt, confs, FIT_DEFAULT_PROP, NULL); static const char * const props[] = { FIT_KERNEL_PROP, FIT_RAMDISK_PROP, FIT_FDT_PROP, @@ -764,6 +766,14 @@ static int fit_import_data(struct image_tool_params *params, const char *fname) FIT_FIRMWARE_PROP, FIT_SCRIPT_PROP}; + if (default_conf && fdt_subnode_offset(fdt, confs, default_conf) < 0) { + fprintf(stderr, + "Error: Default configuration '%s' not found under /configurations\n", + default_conf); + ret = FDT_ERR_NOTFOUND; + goto err_munmap; + } + fdt_for_each_subnode(node, fdt, confs) { const char *conf_name = fdt_get_name(fdt, node, NULL); diff --git a/tools/mips-relocs.c b/tools/mips-relocs.c index 5db610f5c77..e9234a74f51 100644 --- a/tools/mips-relocs.c +++ b/tools/mips-relocs.c @@ -9,6 +9,7 @@ #include <elf.h> #include <errno.h> #include <fcntl.h> +#include <inttypes.h> #include <limits.h> #include <stdbool.h> #include <stdio.h> @@ -272,7 +273,7 @@ int main(int argc, char *argv[]) if (ehdr_field(e_type) != ET_EXEC) { fprintf(stderr, "Input ELF is not an executable\n"); - printf("type 0x%lx\n", ehdr_field(e_type)); + printf("type 0x%" PRIx64 "\n", ehdr_field(e_type)); err = -EINVAL; goto out_free_relocs; } @@ -394,9 +395,9 @@ int main(int argc, char *argv[]) rel_size = shdr_field(i_rel_shdr, sh_size); rel_actual_size = buf - buf_start; if (rel_actual_size > rel_size) { - fprintf(stderr, "Relocations overflow available space of 0x%lx (required 0x%lx)!\n", + fprintf(stderr, "Relocations overflow available space of 0x%zx (required 0x%zx)!\n", rel_size, rel_actual_size); - fprintf(stderr, "Please adjust CONFIG_MIPS_RELOCATION_TABLE_SIZE to at least 0x%lx\n", + fprintf(stderr, "Please adjust CONFIG_MIPS_RELOCATION_TABLE_SIZE to at least 0x%zx\n", (rel_actual_size + 0x100) & ~0xFF); err = -ENOMEM; goto out_free_relocs; diff --git a/tools/patman/test_cseries.py b/tools/patman/test_cseries.py index e58f2f68333..4c211c8ee89 100644 --- a/tools/patman/test_cseries.py +++ b/tools/patman/test_cseries.py @@ -3278,7 +3278,7 @@ Date: .* self.assertIn('bootm.c:1: check: Avoid CamelCase: <Fix>', err.getvalue()) self.assertIn( - 'Cc: Anatolij Gustschin <agust@denx.de>', out.getvalue()) + 'Cc: Anatolij Gustschin <ag.dev.uboot@gmail.com>', out.getvalue()) self.assertTrue(os.path.exists(os.path.join( self.tmpdir, '0001-video-Some-video-improvements.patch'))) |