From 824204e42188fd8cdcfa35c911506ec3c40aafb8 Mon Sep 17 00:00:00 2001 From: Adam Ford Date: Wed, 22 Dec 2021 10:40:27 -0600 Subject: [PATCH 1/7] Makefile: Add more files to clean list When building for i.mx8m boards with binman, a few more additional files are created which should be removed when running 'make clean' Signed-off-by: Adam Ford --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 95afb98292..58a0c34bbc 100644 --- a/Makefile +++ b/Makefile @@ -2184,7 +2184,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 \ From 67d3e67dd8c2784fc618b4cd4f4e8a810c220211 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Tue, 11 Jan 2022 19:14:28 -0500 Subject: [PATCH 2/7] ci: azure: Update to use stages Follow what we do in GitLab CI where we break the jobs up in to stages such that if earlier and often quicker sanity tests fail we don't run everything else. Signed-off-by: Tom Rini --- .azure-pipelines.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 670bbc0e16..d971156681 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -9,7 +9,9 @@ variables: 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: From 9d358a8c26df56c01f3afd99c2f01b0cf03d35f6 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Tue, 11 Jan 2022 19:14:29 -0500 Subject: [PATCH 3/7] CI, Dockerfile: Update to latest "focal" tag Bring us to the focal-20220105 tag and rebuild our images on top of this. 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 d971156681..c0f72a8113 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -2,7 +2,7 @@ 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. 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: 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 LABEL Description=" This image is for building U-Boot inside a container" From 32d4f106bd806428d756398a83d2b15563b58cf8 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 12 Jan 2022 13:10:35 -0700 Subject: [PATCH 4/7] binman: Renumber the fake blob dts Use a unique number instead of the current 203, which is used by 203_fip as well. Reformat the code to avoid a long line. Signed-off-by: Simon Glass --- tools/binman/ftest.py | 22 ++++++++++--------- .../{203_fake_blob.dts => 217_fake_blob.dts} | 0 2 files changed, 12 insertions(+), 10 deletions(-) rename tools/binman/test/{203_fake_blob.dts => 217_fake_blob.dts} (100%) diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index a9b7880f36..a9d9160967 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,17 @@ 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: .*") + os.remove('binman_faking_test_blob') + + if __name__ == "__main__": unittest.main() diff --git a/tools/binman/test/203_fake_blob.dts b/tools/binman/test/217_fake_blob.dts similarity index 100% rename from tools/binman/test/203_fake_blob.dts rename to tools/binman/test/217_fake_blob.dts From 790ba9fce82bff215cf05513278a7b52312b6b28 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 12 Jan 2022 13:10:36 -0700 Subject: [PATCH 5/7] binman: Write fake blobs to the output directory At present binman writes fake blobs to the current directory. This is not very helpful, since the files serve no useful purpose once binman has finished. They clutter up the source directory and affect future runs, since the files in the current directory are often used in preference to those in the board directory. To avoid these problems, write them to the output directory instead. Move the file-creation code to the Entry base class, so it can be used by any entry type that needs it. This is required since some entry types, such as Entry_blob_ext_list, are not subclasses of Entry_blob. Signed-off-by: Simon Glass --- tools/binman/control.py | 8 +++++--- tools/binman/entry.py | 20 ++++++++++++++++++++ tools/binman/etype/blob.py | 8 +------- tools/binman/ftest.py | 1 - 4 files changed, 26 insertions(+), 11 deletions(-) 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 a9d9160967..f4ff7b6583 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -4964,7 +4964,6 @@ fdt fdtmap Extract the devicetree blob from the fdtmap self.assertRegex( err, "Image '.*' has faked external blobs and is non-functional: .*") - os.remove('binman_faking_test_blob') if __name__ == "__main__": From 0797e736d1ad820f889d99cca485dd09d33b785d Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Sat, 13 Nov 2021 18:13:50 +0100 Subject: [PATCH 6/7] LynxOS is no longer supported LynxOS needed the do_bootm_lynxkdi() function that got removed in 7e713067ee ("Remove LYNX KDI remainders") - and that function needed a lynxkdi_boot() function, where the last implementation had been removed in 98f705c9ce ("powerpc: remove 4xx support") already. Looks like this OS is definitely not supported anymore, so remove it from the corresponding lists. Signed-off-by: Thomas Huth Reviewed-by: Stefan Roese --- README | 3 +-- boot/image.c | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/README b/README index 77782d0ae7..5549849d29 100644 --- a/README +++ b/README @@ -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", }, From 6e4a7eaf7d6c9aedafa19aa57553ae44dba5ca0d Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 18 Dec 2021 11:27:29 -0700 Subject: [PATCH 7/7] timer: Add a migration message Some boards still use the old timer mechanism. Set a deadline for them to update to driver model. Point to some examples as well. This needs a bit of a strange rule to avoid an error on some boards. Signed-off-by: Simon Glass --- Makefile | 4 ++++ doc/develop/driver-model/migration.rst | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/Makefile b/Makefile index 58a0c34bbc..0034a844b4 100644 --- a/Makefile +++ b/Makefile @@ -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. 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