diff options
author | Tom Rini <trini@konsulko.com> | 2022-01-13 15:34:27 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-01-13 15:34:27 +0300 |
commit | 37b876359fbd90434b37527fa96f72a31af20f81 (patch) | |
tree | 3a8d677b0e1f0038d84aca54986047968e27b007 | |
parent | a02af84e03e018d7cd08bb3070cbe5517004712b (diff) | |
parent | 6e4a7eaf7d6c9aedafa19aa57553ae44dba5ca0d (diff) | |
download | u-boot-37b876359fbd90434b37527fa96f72a31af20f81.tar.xz |
Merge branch '2022-01-12-assorted-updates'
- Fix binman fake blob support to write outside source directory
- Azure now has stages in the pipeline
- Update to latest focal tag for containers in CI.
- Finish dropping LynxOS
- Add migration message for timer code
-rw-r--r-- | .azure-pipelines.yml | 10 | ||||
-rw-r--r-- | .gitlab-ci.yml | 2 | ||||
-rw-r--r-- | Makefile | 8 | ||||
-rw-r--r-- | README | 3 | ||||
-rw-r--r-- | boot/image.c | 3 | ||||
-rw-r--r-- | doc/develop/driver-model/migration.rst | 12 | ||||
-rw-r--r-- | tools/binman/control.py | 8 | ||||
-rw-r--r-- | tools/binman/entry.py | 20 | ||||
-rw-r--r-- | tools/binman/etype/blob.py | 8 | ||||
-rw-r--r-- | tools/binman/ftest.py | 21 | ||||
-rw-r--r-- | tools/binman/test/217_fake_blob.dts (renamed from tools/binman/test/203_fake_blob.dts) | 0 | ||||
-rw-r--r-- | tools/docker/Dockerfile | 2 |
12 files changed, 67 insertions, 30 deletions
diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 670bbc0e16..c0f72a8113 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -2,14 +2,16 @@ variables: windows_vm: windows-2019 ubuntu_vm: ubuntu-18.04 macos_vm: macOS-10.15 - ci_runner_image: trini/u-boot-gitlab-ci-runner:focal-20211006-14Nov2021 + ci_runner_image: trini/u-boot-gitlab-ci-runner:focal-20220105-10Jan2022 # 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. container_option: -u 0 work_dir: /u -jobs: +stages: +- stage: testsuites + jobs: - job: tools_only_windows displayName: 'Ensure host tools build for Windows' pool: @@ -199,6 +201,8 @@ jobs: export PATH=/opt/gcc-11.1.0-nolibc/arm-linux-gnueabi/bin:$PATH test/nokia_rx51_test.sh +- stage: test_py + jobs: - job: test_py displayName: 'test.py' pool: @@ -381,6 +385,8 @@ jobs: # Some tests using libguestfs-tools need the fuse device to run docker run "$@" --device /dev/fuse:/dev/fuse -v $PWD:$(work_dir) $(ci_runner_image) /bin/bash $(work_dir)/test.sh +- stage: world_build + jobs: - job: build_the_world displayName: 'Build the World' pool: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d06cca45fd..4c44c01e7b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ # Grab our configured image. The source for this is found at: # https://source.denx.de/u-boot/gitlab-ci-runner -image: trini/u-boot-gitlab-ci-runner:focal-20211006-14Nov2021 +image: trini/u-boot-gitlab-ci-runner:focal-20220105-10Jan2022 # We run some tests in different order, to catch some failures quicker. stages: @@ -1129,6 +1129,10 @@ endif $(call deprecated,CONFIG_DM_ETH,Ethernet drivers,v2020.07,$(CONFIG_NET)) $(call deprecated,CONFIG_DM_I2C,I2C drivers,v2022.04,$(CONFIG_SYS_I2C_LEGACY)) $(call deprecated,CONFIG_DM_KEYBOARD,Keyboard drivers,v2022.10,$(CONFIG_KEYBOARD)) + @# CONFIG_SYS_TIMER_RATE has brackets in it for some boards which + @# confuses this rule. Use if() to send just a single character which + @# is enable to tell 'deprecated' that one of these symbols exists + $(call deprecated,CONFIG_TIMER,Timer drivers,v2023.01,$(if $(strip $(CONFIG_SYS_TIMER_RATE)$(CONFIG_SYS_TIMER_COUNTER)),x)) @# Check that this build does not use CONFIG options that we do not @# know about unless they are in Kconfig. All the existing CONFIG @# options are whitelisted, so new ones should not be added. @@ -2184,7 +2188,9 @@ CLEAN_FILES += include/bmp_logo.h include/bmp_logo_data.h tools/version.h \ u-boot* MLO* SPL System.map fit-dtb.blob* \ u-boot-ivt.img.log u-boot-dtb.imx.log SPL.log u-boot.imx.log \ lpc32xx-* bl31.c bl31.elf bl31_*.bin image.map tispl.bin* \ - idbloader.img flash.bin flash.log defconfig keep-syms-lto.c + idbloader.img flash.bin flash.log defconfig keep-syms-lto.c \ + mkimage-out.spl.mkimage mkimage.spl.mkimage imx-boot.map \ + itb.fit.fit itb.fit.itb itb.map spl.map # Directories & files removed with 'make mrproper' MRPROPER_DIRS += include/config include/generated spl tpl \ @@ -2912,8 +2912,7 @@ details; basically, the header defines the following image properties: * Target Operating System (Provisions for OpenBSD, NetBSD, FreeBSD, 4.4BSD, Linux, SVR4, Esix, Solaris, Irix, SCO, Dell, NCR, VxWorks, LynxOS, pSOS, QNX, RTEMS, INTEGRITY; - Currently supported: Linux, NetBSD, VxWorks, QNX, RTEMS, LynxOS, - INTEGRITY). + Currently supported: Linux, NetBSD, VxWorks, QNX, RTEMS, INTEGRITY). * Target CPU Architecture (Provisions for Alpha, ARM, Intel x86, IA64, MIPS, NDS32, Nios II, PowerPC, IBM S390, SuperH, Sparc, Sparc 64 Bit; Currently supported: ARM, Intel x86, MIPS, NDS32, Nios II, PowerPC). diff --git a/boot/image.c b/boot/image.c index f792f2aa69..c7ab034e08 100644 --- a/boot/image.c +++ b/boot/image.c @@ -102,9 +102,6 @@ static const table_entry_t uimage_os[] = { { IH_OS_INVALID, "invalid", "Invalid OS", }, { IH_OS_ARM_TRUSTED_FIRMWARE, "arm-trusted-firmware", "ARM Trusted Firmware" }, { IH_OS_LINUX, "linux", "Linux", }, -#if defined(USE_HOSTCC) - { IH_OS_LYNXOS, "lynxos", "LynxOS", }, -#endif { IH_OS_NETBSD, "netbsd", "NetBSD", }, { IH_OS_OSE, "ose", "Enea OSE", }, { IH_OS_PLAN9, "plan9", "Plan 9", }, diff --git a/doc/develop/driver-model/migration.rst b/doc/develop/driver-model/migration.rst index 3dbeea6537..10f474e9cd 100644 --- a/doc/develop/driver-model/migration.rst +++ b/doc/develop/driver-model/migration.rst @@ -106,3 +106,15 @@ Deadline: 2022.10 This is a legacy option which has been replaced by driver model. Maintainers should submit patches switching over to using CONFIG_DM_KEYBOARD and other base driver model options in time for inclusion in the 2022.10 release. + +CONFIG_SYS_TIMER_RATE and CONFIG_SYS_TIMER_COUNTER +-------------------------------------------------- +Deadline: 2023.01 + +These are legacy options which have been replaced by driver model. +Maintainers should submit patches switching over to using CONFIG_TIMER and +other base driver model options in time for inclusion in the 2022.10 release. + +There is only one method to implement, unless you want to support bootstage, +in which case you need an early timer also. For example drivers, see +sandbox_timer.c and rockchip_timer.c diff --git a/tools/binman/control.py b/tools/binman/control.py index 4b3ce23fb4..f4c1fd0156 100644 --- a/tools/binman/control.py +++ b/tools/binman/control.py @@ -577,9 +577,11 @@ def ProcessImage(image, update_fdt, write_map, get_contents=True, faked_list = [] image.CheckFakedBlobs(faked_list) if faked_list: - tout.Warning("Image '%s:%s' has faked external blobs and is non-functional: %s" % - (image.name, image.image_name, - ' '.join([e.GetDefaultFilename() for e in faked_list]))) + tout.Warning( + "Image '%s:%s' has faked external blobs and is non-functional: %s" % + (image.name, image.image_name, + ' '.join([os.path.basename(e.GetDefaultFilename()) + for e in faked_list]))) return bool(missing_list) or bool(faked_list) diff --git a/tools/binman/entry.py b/tools/binman/entry.py index 54cc3726b9..bac90bbbcd 100644 --- a/tools/binman/entry.py +++ b/tools/binman/entry.py @@ -7,6 +7,7 @@ from collections import namedtuple import importlib import os +import pathlib import sys from dtoc import fdt_util @@ -972,6 +973,25 @@ features to produce new behaviours. if self.missing: missing_list.append(self) + def check_fake_fname(self, fname): + """If the file is missing and the entry allows fake blobs, fake it + + Sets self.faked to True if faked + + Args: + fname (str): Filename to check + + Returns: + fname (str): Filename of faked file + """ + if self.allow_fake and not pathlib.Path(fname).is_file(): + outfname = tools.GetOutputFilename(os.path.basename(fname)) + with open(outfname, "wb") as out: + out.truncate(1024) + self.faked = True + return outfname + return fname + def CheckFakedBlobs(self, faked_blobs_list): """Check if any entries in this section have faked external blobs diff --git a/tools/binman/etype/blob.py b/tools/binman/etype/blob.py index 65ebb2ecf4..59728f368e 100644 --- a/tools/binman/etype/blob.py +++ b/tools/binman/etype/blob.py @@ -5,8 +5,6 @@ # Entry-type module for blobs, which are binary objects read from files # -import pathlib - from binman.entry import Entry from binman import state from dtoc import fdt_util @@ -38,16 +36,12 @@ class Entry_blob(Entry): self._filename = fdt_util.GetString(self._node, 'filename', self.etype) def ObtainContents(self): - if self.allow_fake and not pathlib.Path(self._filename).is_file(): - with open(self._filename, "wb") as out: - out.truncate(1024) - self.faked = True - self._filename = self.GetDefaultFilename() self._pathname = tools.GetInputFilename(self._filename, self.external and self.section.GetAllowMissing()) # Allow the file to be missing if not self._pathname: + self._pathname = self.check_fake_fname(self._filename) self.SetContents(b'') self.missing = True return True diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index a9b7880f36..f4ff7b6583 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -4667,16 +4667,6 @@ class TestFunctional(unittest.TestCase): str(e.exception), "Not enough space in '.*u_boot_binman_embed_sm' for data length.*") - def testFakeBlob(self): - """Test handling of faking an external blob""" - with test_util.capture_sys_output() as (stdout, stderr): - self._DoTestFile('203_fake_blob.dts', allow_missing=True, - allow_fake_blobs=True) - err = stderr.getvalue() - self.assertRegex(err, - "Image '.*' has faked external blobs and is non-functional: .*") - os.remove('binman_faking_test_blob') - def testVersion(self): """Test we can get the binman version""" version = '(unreleased)' @@ -4965,5 +4955,16 @@ fdt fdtmap Extract the devicetree blob from the fdtmap # There should be a U-Boot after the final FIP self.assertEqual(U_BOOT_DATA, data[-4:]) + def testFakeBlob(self): + """Test handling of faking an external blob""" + with test_util.capture_sys_output() as (stdout, stderr): + self._DoTestFile('217_fake_blob.dts', allow_missing=True, + allow_fake_blobs=True) + err = stderr.getvalue() + self.assertRegex( + err, + "Image '.*' has faked external blobs and is non-functional: .*") + + if __name__ == "__main__": unittest.main() diff --git a/tools/binman/test/203_fake_blob.dts b/tools/binman/test/217_fake_blob.dts index 22cf67f4f8..22cf67f4f8 100644 --- a/tools/binman/test/203_fake_blob.dts +++ b/tools/binman/test/217_fake_blob.dts diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index fb422e7588..f19e618ffb 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:focal-20211006 +FROM ubuntu:focal-20220105 MAINTAINER Tom Rini <trini@konsulko.com> LABEL Description=" This image is for building U-Boot inside a container" |