提交 360e3922 编写于 作者: T Tom Rini

Merge tag 'dm-pull-boo21' of https://source.denx.de/u-boot/custodians/u-boot-dm

Environment tidy-ups
patman 'postfix' support
fix binman test race condition causing a timeout error

# gpg: Signature made Sun 31 Oct 2021 03:36:55 PM EDT
# gpg:                using RSA key B25C0022AF86A7CC1655B6277F173A3E9008ADE6
# gpg:                issuer "sjg@chromium.org"
# gpg: Good signature from "Simon Glass <sjg@chromium.org>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: B25C 0022 AF86 A7CC 1655  B627 7F17 3A3E 9008 ADE6
......@@ -997,6 +997,9 @@ LDFLAGS_u-boot += $(LDFLAGS_FINAL)
# Avoid 'Not enough room for program headers' error on binutils 2.28 onwards.
LDFLAGS_u-boot += $(call ld-option, --no-dynamic-linker)
# ld.lld support
LDFLAGS_u-boot += -z notext
LDFLAGS_u-boot += --build-id=none
ifeq ($(CONFIG_ARC)$(CONFIG_NIOS2)$(CONFIG_X86)$(CONFIG_XTENSA),)
......
menu "Sandbox architecture"
depends on SANDBOX
config ARCH_MAP_SYSMEM
def_bool y
config SYS_ARCH
default "sandbox"
......
......@@ -2,7 +2,6 @@
# Copyright (c) 2011 The Chromium OS Authors.
PLATFORM_CPPFLAGS += -D__SANDBOX__ -U_FORTIFY_SOURCE
PLATFORM_CPPFLAGS += -DCONFIG_ARCH_MAP_SYSMEM
PLATFORM_CPPFLAGS += -fPIC
PLATFORM_LIBS += -lrt
SDL_CONFIG ?= sdl2-config
......
......@@ -178,7 +178,7 @@ int default_print_cpuinfo(void)
return 0;
}
#if CONFIG_IS_ENABLED(BOOTSTAGE)
#if CONFIG_IS_ENABLED(SHOW_BOOT_PROGRESS)
void show_boot_progress(int val)
{
outb(val, POST_PORT);
......
......@@ -87,7 +87,7 @@ int board_init(void)
#ifdef CONFIG_BOARD_LATE_INIT
int board_late_init(void)
{
char *ptr = (char *)&default_environment[0];
char *ptr = &default_environment[0];
struct udevice *dev;
struct mmc *mmc_dev;
bool ddr4, emmc;
......
......@@ -172,10 +172,6 @@ int board_init(void)
if (current_el() == 3)
out_le32(&cci->ctrl_ord, CCI400_CTRLORD_EN_BARRIER);
#ifdef CONFIG_ENV_IS_NOWHERE
gd->env_addr = (ulong)&default_environment[0];
#endif
#ifdef CONFIG_FSL_CAAM
sec_init();
#endif
......
......@@ -150,10 +150,6 @@ int board_init(void)
erratum_a010315();
#endif
#ifdef CONFIG_ENV_IS_NOWHERE
gd->env_addr = (ulong)&default_environment[0];
#endif
#ifdef CONFIG_FSL_CAAM
sec_init();
#endif
......
......@@ -173,10 +173,6 @@ int board_init(void)
erratum_a010315();
#endif
#ifdef CONFIG_ENV_IS_NOWHERE
gd->env_addr = (ulong)&default_environment[0];
#endif
#ifdef CONFIG_FSL_CAAM
sec_init();
#endif
......
......@@ -73,10 +73,6 @@ u32 get_lpuart_clk(void)
int board_init(void)
{
#ifdef CONFIG_ENV_IS_NOWHERE
gd->env_addr = (ulong)&default_environment[0];
#endif
#ifdef CONFIG_FSL_CAAM
sec_init();
#endif
......
......@@ -810,10 +810,6 @@ int board_init(void)
select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT, 0);
board_retimer_init();
#ifdef CONFIG_ENV_IS_NOWHERE
gd->env_addr = (ulong)&default_environment[0];
#endif
#if defined(CONFIG_TARGET_LS1088ARDB) && defined(CONFIG_FSL_MC_ENET)
/* invert AQR105 IRQ pins polarity */
out_le32(irq_ccsr + IRQCR_OFFSET / 4, AQR105_IRQ_MASK);
......
......@@ -211,9 +211,6 @@ int board_init(void)
FSL_QIXIS_BRDCFG9_QSPI);
#endif
#ifdef CONFIG_ENV_IS_NOWHERE
gd->env_addr = (ulong)&default_environment[0];
#endif
select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT, 0);
#ifdef CONFIG_RTC_ENABLE_32KHZ_OUTPUT
......
......@@ -281,9 +281,6 @@ int board_init(void)
init_final_memctl_regs();
#ifdef CONFIG_ENV_IS_NOWHERE
gd->env_addr = (ulong)&default_environment[0];
#endif
select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT, 0);
#ifdef CONFIG_FSL_QIXIS
......
......@@ -588,9 +588,6 @@ int board_init(void)
#if defined(CONFIG_FSL_MC_ENET) && defined(CONFIG_TARGET_LX2160ARDB)
u32 __iomem *irq_ccsr = (u32 __iomem *)ISC_BASE;
#endif
#ifdef CONFIG_ENV_IS_NOWHERE
gd->env_addr = (ulong)&default_environment[0];
#endif
select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT, 0);
......
......@@ -250,7 +250,7 @@ void spl_board_init(void)
{
}
#if CONFIG_IS_ENABLED(LED) && CONFIG_IS_ENABLED(BOOTSTAGE)
#if CONFIG_IS_ENABLED(LED) && CONFIG_IS_ENABLED(SHOW_BOOT_PROGRESS)
/*
* Indicate any error or (accidental?) entering of CLI via the red status LED.
*/
......
......@@ -82,8 +82,6 @@ int board_init(void)
{
gd->bd->bi_boot_params = CONFIG_SYS_LOAD_ADDR + LOAD_OFFSET;
gd->env_addr = (ulong)&default_environment[0];
synquacer_setup_scbm_smmu();
return 0;
......
......@@ -703,6 +703,15 @@ config SHOW_BOOT_PROGRESS
-150 common/cmd_nand.c Incorrect FIT image format
151 common/cmd_nand.c FIT image format OK
config SPL_SHOW_BOOT_PROGRESS
bool "Show boot progress in a board-specific manner"
depends on SPL
help
Defining this option allows to add some board-specific code (calling
a user-provided function show_boot_progress(int) that enables you to
show the system's boot progress on some display (for example, some
LEDs) on your board. For details see SHOW_BOOT_PROGRESS.
endmenu
menu "Boot media"
......
......@@ -85,7 +85,7 @@ static int fit_image_setup_verify(struct image_sign_info *info,
memset(info, '\0', sizeof(*info));
info->keyname = fdt_getprop(fit, noffset, FIT_KEY_HINT, NULL);
info->fit = (void *)fit;
info->fit = fit;
info->node_offset = noffset;
info->name = algo_name;
info->checksum = image_get_checksum_algo(algo_name);
......
......@@ -166,7 +166,7 @@ void board_init_f_init_reserve(ulong base)
board_init_f_init_stack_protection();
}
#if CONFIG_IS_ENABLED(BOOTSTAGE)
#if CONFIG_IS_ENABLED(SHOW_BOOT_PROGRESS)
/*
* Board-specific Platform code can reimplement show_boot_progress () if needed
*/
......
......@@ -61,7 +61,7 @@ binman_sym_declare(ulong, spl, size);
/* Define board data structure */
static struct bd_info bdata __attribute__ ((section(".data")));
#if CONFIG_IS_ENABLED(BOOTSTAGE)
#if CONFIG_IS_ENABLED(SHOW_BOOT_PROGRESS)
/*
* Board-specific Platform code can reimplement show_boot_progress () if needed
*/
......
......@@ -162,7 +162,7 @@ int env_get_f(const char *name, char *buf, unsigned len)
name_len = strlen(name);
if (gd->env_valid == ENV_INVALID)
env = (const char *)default_environment;
env = default_environment;
else
env = (const char *)gd->env_addr;
......@@ -247,11 +247,6 @@ char *env_get_default(const char *name)
void env_set_default(const char *s, int flags)
{
if (sizeof(default_environment) > ENV_SIZE) {
puts("*** Error - default environment is too large\n\n");
return;
}
if (s) {
if ((flags & H_INTERACTIVE) == 0) {
printf("*** Warning - %s, "
......@@ -264,7 +259,7 @@ void env_set_default(const char *s, int flags)
}
flags |= H_DEFAULT;
if (himport_r(&env_htab, (char *)default_environment,
if (himport_r(&env_htab, default_environment,
sizeof(default_environment), '\0', flags, 0,
0, NULL) == 0)
pr_err("## Error: Environment import failed: errno = %d\n",
......@@ -283,7 +278,7 @@ int env_set_default_vars(int nvars, char * const vars[], int flags)
* (and use \0 as a separator)
*/
flags |= H_NOCLEAR | H_DEFAULT;
return himport_r(&env_htab, (const char *)default_environment,
return himport_r(&env_htab, default_environment,
sizeof(default_environment), '\0',
flags, 0, nvars, vars);
}
......
......@@ -77,7 +77,6 @@ static int env_flash_init(void)
uchar flag1 = flash_addr->flags;
uchar flag2 = flash_addr_new->flags;
ulong addr_default = (ulong)&default_environment[0];
ulong addr1 = (ulong)&(flash_addr->data);
ulong addr2 = (ulong)&(flash_addr_new->data);
......@@ -92,7 +91,6 @@ static int env_flash_init(void)
gd->env_addr = addr2;
gd->env_valid = ENV_VALID;
} else if (!crc1_ok && !crc2_ok) {
gd->env_addr = addr_default;
gd->env_valid = ENV_INVALID;
} else if (flag1 == ENV_REDUND_ACTIVE &&
flag2 == ENV_REDUND_OBSOLETE) {
......@@ -230,8 +228,7 @@ static int env_flash_init(void)
return 0;
}
gd->env_addr = (ulong)&default_environment[0];
gd->env_valid = ENV_INVALID;
gd->env_valid = ENV_INVALID;
return 0;
}
#endif
......
......@@ -107,8 +107,7 @@ static int env_nand_init(void)
gd->env_addr = (ulong)env_ptr->data;
#else /* ENV_IS_EMBEDDED || CONFIG_NAND_ENV_DST */
gd->env_addr = (ulong)&default_environment[0];
gd->env_valid = ENV_VALID;
gd->env_valid = ENV_INVALID;
#endif /* ENV_IS_EMBEDDED || CONFIG_NAND_ENV_DST */
return 0;
......
......@@ -22,8 +22,7 @@ DECLARE_GLOBAL_DATA_PTR;
*/
static int env_nowhere_init(void)
{
gd->env_addr = (ulong)&default_environment[0];
gd->env_valid = ENV_INVALID;
gd->env_valid = ENV_INVALID;
return 0;
}
......@@ -38,7 +37,7 @@ static int env_nowhere_load(void)
if (!IS_ENABLED(CONFIG_SPL_BUILD))
env_set_default(NULL, 0);
gd->env_valid = ENV_INVALID;
gd->env_valid = ENV_INVALID;
return 0;
}
......
......@@ -87,15 +87,14 @@ static int env_nvram_init(void)
nvram_read(data, CONFIG_ENV_ADDR + sizeof(ulong), ENV_SIZE);
if (crc32(0, data, ENV_SIZE) == crc) {
gd->env_addr = (ulong)CONFIG_ENV_ADDR + sizeof(long);
gd->env_addr = (ulong)CONFIG_ENV_ADDR + sizeof(long);
#else
if (crc32(0, env_ptr->data, ENV_SIZE) == env_ptr->crc) {
gd->env_addr = (ulong)&env_ptr->data;
gd->env_addr = (ulong)&env_ptr->data;
#endif
gd->env_valid = ENV_VALID;
} else {
gd->env_addr = (ulong)&default_environment[0];
gd->env_valid = ENV_INVALID;
gd->env_valid = ENV_INVALID;
}
return 0;
......
......@@ -338,11 +338,10 @@ static int env_sf_init_addr(void)
env_t *env_ptr = (env_t *)env_sf_get_env_addr();
if (crc32(0, env_ptr->data, ENV_SIZE) == env_ptr->crc) {
gd->env_addr = (ulong)&(env_ptr->data);
gd->env_valid = 1;
gd->env_addr = (ulong)&(env_ptr->data);
gd->env_valid = ENV_VALID;
} else {
gd->env_addr = (ulong)&default_environment[0];
gd->env_valid = 1;
gd->env_valid = ENV_INVALID;
}
return 0;
......
......@@ -220,7 +220,7 @@ enum bootstage_id {
*/
ulong timer_get_boot_us(void);
#if defined(USE_HOSTCC) || !CONFIG_IS_ENABLED(BOOTSTAGE)
#if defined(USE_HOSTCC) || !CONFIG_IS_ENABLED(SHOW_BOOT_PROGRESS)
#define show_boot_progress(val) do {} while (0)
#else
/**
......
......@@ -20,9 +20,9 @@ env_t embedded_environment __UBOOT_ENV_SECTION__(environment) = {
#elif defined(DEFAULT_ENV_INSTANCE_STATIC)
static char default_environment[] = {
#elif defined(DEFAULT_ENV_IS_RW)
uchar default_environment[] = {
char default_environment[] = {
#else
const uchar default_environment[] = {
const char default_environment[] = {
#endif
#ifndef CONFIG_USE_DEFAULT_ENV_FILE
#ifdef CONFIG_ENV_CALLBACK_LIST_DEFAULT
......@@ -121,3 +121,9 @@ const uchar default_environment[] = {
}
#endif
};
#if !defined(USE_HOSTCC) && !defined(DEFAULT_ENV_INSTANCE_EMBEDDED)
#include <env_internal.h>
static_assert(sizeof(default_environment) <= ENV_SIZE,
"Default environment is too large");
#endif
......@@ -112,9 +112,9 @@ extern env_t embedded_environment;
#endif /* ENV_IS_EMBEDDED */
#ifdef DEFAULT_ENV_IS_RW
extern unsigned char default_environment[];
extern char default_environment[];
#else
extern const unsigned char default_environment[];
extern const char default_environment[];
#endif
#ifndef DO_DEPS_ONLY
......
......@@ -1159,7 +1159,7 @@ struct image_sign_info {
const char *keydir; /* Directory conaining keys */
const char *keyname; /* Name of key to use */
const char *keyfile; /* Filename of private or public key */
void *fit; /* Pointer to FIT blob */
const void *fit; /* Pointer to FIT blob */
int node_offset; /* Offset of signature node */
const char *name; /* Algorithm name */
struct checksum_algo *checksum; /* Checksum algorithm information */
......
......@@ -4565,8 +4565,7 @@ class TestFunctional(unittest.TestCase):
with self.assertRaises(ValueError) as e:
self._DoTestFile('202_section_timeout.dts',
test_section_timeout=True)
self.assertIn("Node '/binman/section@0': Timed out obtaining contents",
str(e.exception))
self.assertIn("Timed out obtaining contents", str(e.exception))
def testTiming(self):
"""Test output of timing information"""
......
......@@ -188,6 +188,11 @@ Series-prefix: prefix
well. If your format.subjectprefix is set to InternalProject, then
the patch shows like: [InternalProject][RFC/RESEND PATCH]
Series-postfix: postfix
Sets the subject "postfix". Normally empty, but can be the name of a
tree such as net or net-next if that needs to be specified. The patch
subject is like [PATCH net] or [PATCH net-next].
Series-name: name
Sets the name of the series. You don't need to have a name, and
patman does not yet use it, but it is convenient to put the branch
......
......@@ -122,6 +122,7 @@ class TestFunctional(unittest.TestCase):
Series-to: u-boot
Series-prefix: RFC
Series-postfix: some-branch
Series-cc: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Cover-letter-cc: Lord Mëlchett <clergy@palace.gov>
Series-version: 3
......@@ -176,7 +177,7 @@ class TestFunctional(unittest.TestCase):
- each patch has the correct subject
- dry-run information prints out correctly
- unicode is handled correctly
- Series-to, Series-cc, Series-prefix, Cover-letter
- Series-to, Series-cc, Series-prefix, Series-postfix, Cover-letter
- Cover-letter-cc, Series-version, Series-changes, Series-notes
- Commit-notes
"""
......@@ -235,6 +236,7 @@ class TestFunctional(unittest.TestCase):
self.assertEqual('Cc: %s' % stefan, next(lines))
self.assertEqual('Version: 3', next(lines))
self.assertEqual('Prefix:\t RFC', next(lines))
self.assertEqual('Postfix:\t some-branch', next(lines))
self.assertEqual('Cover: 4 lines', next(lines))
self.assertEqual(' Cc: %s' % self.fred, next(lines))
self.assertEqual(' Cc: %s' % self.leb,
......@@ -285,7 +287,7 @@ Simon Glass (2):
'''
lines = open(cover_fname, encoding='utf-8').read().splitlines()
self.assertEqual(
'Subject: [RFC PATCH v3 0/2] test: A test patch series',
'Subject: [RFC PATCH some-branch v3 0/2] test: A test patch series',
lines[3])
self.assertEqual(expected.splitlines(), lines[7:])
......
......@@ -596,6 +596,8 @@ class PatchStream:
# These seem like they would be nice to include.
if 'prefix' in self.series:
parts.append(self.series['prefix'])
if 'postfix' in self.series:
parts.append(self.serties['postfix'])
if 'version' in self.series:
parts.append("v%s" % self.series['version'])
......
......@@ -16,7 +16,7 @@ from patman import tools
# Series-xxx tags that we understand
valid_series = ['to', 'cc', 'version', 'changes', 'prefix', 'notes', 'name',
'cover_cc', 'process_log', 'links', 'patchwork_url']
'cover_cc', 'process_log', 'links', 'patchwork_url', 'postfix']
class Series(dict):
"""Holds information about a patch series, including all tags.
......@@ -133,6 +133,7 @@ class Series(dict):
print('Cc:\t ', item)
print('Version: ', self.get('version'))
print('Prefix:\t ', self.get('prefix'))
print('Postfix:\t ', self.get('postfix'))
if self.cover:
print('Cover: %d lines' % len(self.cover))
cover_cc = gitutil.BuildEmailList(self.get('cover_cc', ''))
......@@ -322,4 +323,8 @@ class Series(dict):
prefix = ''
if self.get('prefix'):
prefix = '%s ' % self['prefix']
return '%s%sPATCH%s' % (git_prefix, prefix, version)
postfix = ''
if self.get('postfix'):
postfix = ' %s' % self['postfix']
return '%s%sPATCH%s%s' % (git_prefix, prefix, postfix, version)
......@@ -44,6 +44,7 @@ Date: Sat Apr 15 15:39:08 2017 -0600
Signed-off-by: Simon Glass <sjg@chromium.org>
Series-to: u-boot
Series-prefix: RFC
Series-postfix: some-branch
Series-cc: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Cover-letter-cc: Lord Mëlchett <clergy@palace.gov>
Series-version: 3
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册