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
This commit is contained in:
commit
37b876359f
@ -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:
|
||||
|
@ -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:
|
||||
|
8
Makefile
8
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.
|
||||
@ -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 \
|
||||
|
3
README
3
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).
|
||||
|
@ -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", },
|
||||
|
@ -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
|
||||
|
@ -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" %
|
||||
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])))
|
||||
' '.join([os.path.basename(e.GetDefaultFilename())
|
||||
for e in faked_list])))
|
||||
return bool(missing_list) or bool(faked_list)
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
|
@ -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"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user