diff options
author | Tom Rini <trini@konsulko.com> | 2021-10-31 22:48:43 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-10-31 22:48:43 +0300 |
commit | 360e392274e3bfeda3b7226d2cac7514774d0da1 (patch) | |
tree | 2f3608441e5fbbd43a9f5e3e51926ed352a2e838 | |
parent | 77680d8f85b94ffe690b8fe1f35767aef8b1415a (diff) | |
parent | b55881ddb455af31b64038cf3b67f781909971cc (diff) | |
download | u-boot-360e392274e3bfeda3b7226d2cac7514774d0da1.tar.xz |
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
35 files changed, 66 insertions, 75 deletions
@@ -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),) diff --git a/arch/sandbox/Kconfig b/arch/sandbox/Kconfig index f83282d9d5..7606469c94 100644 --- a/arch/sandbox/Kconfig +++ b/arch/sandbox/Kconfig @@ -1,6 +1,9 @@ menu "Sandbox architecture" depends on SANDBOX +config ARCH_MAP_SYSMEM + def_bool y + config SYS_ARCH default "sandbox" diff --git a/arch/sandbox/config.mk b/arch/sandbox/config.mk index 1f8cb61c8b..2b1b657831 100644 --- a/arch/sandbox/config.mk +++ b/arch/sandbox/config.mk @@ -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 diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c index 01dece5769..86f53e78d2 100644 --- a/arch/x86/cpu/cpu.c +++ b/arch/x86/cpu/cpu.c @@ -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); diff --git a/board/Marvell/mvebu_armada-37xx/board.c b/board/Marvell/mvebu_armada-37xx/board.c index 2de9c2ac17..d7b6ecafbf 100644 --- a/board/Marvell/mvebu_armada-37xx/board.c +++ b/board/Marvell/mvebu_armada-37xx/board.c @@ -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; diff --git a/board/freescale/ls1012afrdm/ls1012afrdm.c b/board/freescale/ls1012afrdm/ls1012afrdm.c index 6473ee0572..5dd19cfcd9 100644 --- a/board/freescale/ls1012afrdm/ls1012afrdm.c +++ b/board/freescale/ls1012afrdm/ls1012afrdm.c @@ -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 diff --git a/board/freescale/ls1012aqds/ls1012aqds.c b/board/freescale/ls1012aqds/ls1012aqds.c index 6e21040601..68578e81a5 100644 --- a/board/freescale/ls1012aqds/ls1012aqds.c +++ b/board/freescale/ls1012aqds/ls1012aqds.c @@ -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 diff --git a/board/freescale/ls1012ardb/ls1012ardb.c b/board/freescale/ls1012ardb/ls1012ardb.c index 62e8af48cf..064fb4d39f 100644 --- a/board/freescale/ls1012ardb/ls1012ardb.c +++ b/board/freescale/ls1012ardb/ls1012ardb.c @@ -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 diff --git a/board/freescale/ls1028a/ls1028a.c b/board/freescale/ls1028a/ls1028a.c index 461c571b36..486a544d35 100644 --- a/board/freescale/ls1028a/ls1028a.c +++ b/board/freescale/ls1028a/ls1028a.c @@ -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 diff --git a/board/freescale/ls1088a/ls1088a.c b/board/freescale/ls1088a/ls1088a.c index 2f422634d5..7046fbaeb5 100644 --- a/board/freescale/ls1088a/ls1088a.c +++ b/board/freescale/ls1088a/ls1088a.c @@ -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); diff --git a/board/freescale/ls2080aqds/ls2080aqds.c b/board/freescale/ls2080aqds/ls2080aqds.c index 62658c4702..2f0139edef 100644 --- a/board/freescale/ls2080aqds/ls2080aqds.c +++ b/board/freescale/ls2080aqds/ls2080aqds.c @@ -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 diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c index 58b852383e..bf660a8e65 100644 --- a/board/freescale/ls2080ardb/ls2080ardb.c +++ b/board/freescale/ls2080ardb/ls2080ardb.c @@ -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 diff --git a/board/freescale/lx2160a/lx2160a.c b/board/freescale/lx2160a/lx2160a.c index e61289d228..bd5abb677a 100644 --- a/board/freescale/lx2160a/lx2160a.c +++ b/board/freescale/lx2160a/lx2160a.c @@ -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); diff --git a/board/siemens/iot2050/board.c b/board/siemens/iot2050/board.c index b2110978ae..16ae2ffc17 100644 --- a/board/siemens/iot2050/board.c +++ b/board/siemens/iot2050/board.c @@ -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. */ diff --git a/board/socionext/developerbox/developerbox.c b/board/socionext/developerbox/developerbox.c index 9552bfcdc3..31b1349514 100644 --- a/board/socionext/developerbox/developerbox.c +++ b/board/socionext/developerbox/developerbox.c @@ -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; diff --git a/common/Kconfig.boot b/common/Kconfig.boot index c948d58094..a8d4be23a9 100644 --- a/common/Kconfig.boot +++ b/common/Kconfig.boot @@ -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" diff --git a/common/image-fit-sig.c b/common/image-fit-sig.c index 4edebbf2d3..63e5423c92 100644 --- a/common/image-fit-sig.c +++ b/common/image-fit-sig.c @@ -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); diff --git a/common/init/board_init.c b/common/init/board_init.c index 0965b96fa3..eab5ee1395 100644 --- a/common/init/board_init.c +++ b/common/init/board_init.c @@ -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 */ diff --git a/common/spl/spl.c b/common/spl/spl.c index 0c08da06e8..99cde6609c 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -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 */ diff --git a/env/common.c b/env/common.c index db213b7748..99729ca002 100644 --- a/env/common.c +++ b/env/common.c @@ -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); } diff --git a/env/flash.c b/env/flash.c index 473e82454d..9c8abfa016 100644 --- a/env/flash.c +++ b/env/flash.c @@ -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 diff --git a/env/nand.c b/env/nand.c index be82e97d69..21aa367d5b 100644 --- a/env/nand.c +++ b/env/nand.c @@ -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; diff --git a/env/nowhere.c b/env/nowhere.c index 1fcf503453..9ebc357dbd 100644 --- a/env/nowhere.c +++ b/env/nowhere.c @@ -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; } diff --git a/env/nvram.c b/env/nvram.c index 261b31edfb..fb265235af 100644 --- a/env/nvram.c +++ b/env/nvram.c @@ -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; diff --git a/include/bootstage.h b/include/bootstage.h index f837a387c8..8d1989ac0e 100644 --- a/include/bootstage.h +++ b/include/bootstage.h @@ -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 /** diff --git a/include/env_default.h b/include/env_default.h index 66e203eb6e..23430dc70d 100644 --- a/include/env_default.h +++ b/include/env_default.h @@ -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 diff --git a/include/env_internal.h b/include/env_internal.h index b7bddcb00d..f74927cd64 100644 --- a/include/env_internal.h +++ b/include/env_internal.h @@ -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 diff --git a/include/image.h b/include/image.h index 34d13ada84..fd662e74b4 100644 --- a/include/image.h +++ b/include/image.h @@ -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 */ diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index cea3ebf2b9..8199a4fc7e 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -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""" diff --git a/tools/patman/README b/tools/patman/README index 53f55ce95d..e3466e6085 100644 --- a/tools/patman/README +++ b/tools/patman/README @@ -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 diff --git a/tools/patman/func_test.py b/tools/patman/func_test.py index 2493e527f5..9f4e03e882 100644 --- a/tools/patman/func_test.py +++ b/tools/patman/func_test.py @@ -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:]) diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py index 2439fb18e4..1da9d53b65 100644 --- a/tools/patman/patchstream.py +++ b/tools/patman/patchstream.py @@ -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']) diff --git a/tools/patman/series.py b/tools/patman/series.py index 8ae218d3a4..da734d92cf 100644 --- a/tools/patman/series.py +++ b/tools/patman/series.py @@ -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) diff --git a/tools/patman/test/test01.txt b/tools/patman/test/test01.txt index de2d9e4d28..fc3066e50b 100644 --- a/tools/patman/test/test01.txt +++ b/tools/patman/test/test01.txt @@ -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 |