[U-Boot] [PATCH v2 0/9] miscellaneous ubispl and ubi improvements

Markus Klotzbuecher
2019-05-15T13:15:51Z

From: Markus Klotzbuecher <markus.klotzbuecher@kistler.com>

This series contains a couple of UBI and UBI SPL improvements, notably
a ubispl extension to allow loading volumes by name. The motivation is
to use the UBI atomic volume rename functionality to allow double copy
software updates of U-Boot on UBI. To do that we configured the SPL to
always load the same volume name (e.g. "u-boot"), and the software
updater always installs into the secondary volume "u-boot_r". After a
successful upgrade, these two volume names are switched.

This extension is protected by #ifdefs as it will somewhat slow down
loading of volumes by id. This is because the code needs to disable
the optimization of ignoring all volume ids which are not
to-be-loaded, since these can only be resolved after attaching.

We have tested both with and without fastmap enabled and both paths
seems to work reliably.

As per Heikos request, this v2 adds two patches that migrate the
omap2plus and at91 CONFIG_ENV_* to defconfigs and likewise for the two
boards using ubispl. The first migration was supported by an extension
to the moveconfig script (patch 1) to expand simple expressions. Both
migrations were tested to be binary equal before and after the change.

Changes v2:
- Add a patch (1) for moveconfig to expand simple expressions
- Add patch (3) to move at91 and omap2plus CONFIG_ENV_ to defconfigs
- Add patch (7) to migrate boards using ubispl to KConfig
- Add missing commit messages
- Indicate version of kernel code which was used in ubispl

Hamish Guthrie (2):
env: ubi: support configurable VID offset
ubispl: add support for loading volumes by name

Markus Klotzbuecher (7):
moveconfig: expand simple expressions
env: ubi: KConfig: add CONFIG_ENV_UBI_VOLUME_REDUND
at91, omap2plus: configs: migrate CONFIG_ENV_ to defconfigs
ubi: fix UBI_SILENCE_MSG
ubispl: migrate configuration to Kconfig
configs: migrate ubispl boards to KConfig
ubispl: introduce separate CONFIG_UBI_SPL_SILENCE_MSG

common/spl/Kconfig | 98 ++++++++
common/spl/spl_ubi.c | 7 +
configs/am335x_guardian_defconfig | 2 +
configs/am335x_igep003x_defconfig | 16 ++
configs/am335x_pdu001_defconfig | 1 +
configs/am335x_shc_defconfig | 2 +
configs/am335x_shc_ict_defconfig | 2 +
configs/am335x_shc_netboot_defconfig | 2 +
configs/am335x_shc_sdboot_defconfig | 2 +
configs/am335x_sl50_defconfig | 1 +
configs/am43xx_evm_defconfig | 1 +
configs/am43xx_evm_qspiboot_defconfig | 3 +
configs/am43xx_evm_rtconly_defconfig | 1 +
configs/am43xx_evm_usbhost_boot_defconfig | 1 +
configs/am43xx_hs_evm_defconfig | 1 +
configs/at91rm9200ek_defconfig | 3 +
configs/at91rm9200ek_ram_defconfig | 3 +
configs/at91sam9260ek_dataflash_cs0_defconfig | 3 +
configs/at91sam9260ek_dataflash_cs1_defconfig | 3 +
configs/at91sam9261ek_dataflash_cs0_defconfig | 3 +
configs/at91sam9261ek_dataflash_cs3_defconfig | 3 +
configs/at91sam9263ek_dataflash_cs0_defconfig | 3 +
configs/at91sam9263ek_dataflash_defconfig | 3 +
configs/at91sam9263ek_norflash_boot_defconfig | 3 +
configs/at91sam9263ek_norflash_defconfig | 3 +
configs/at91sam9g10ek_dataflash_cs0_defconfig | 3 +
configs/at91sam9g10ek_dataflash_cs3_defconfig | 3 +
configs/at91sam9g20ek_2mmc_defconfig | 2 +
configs/at91sam9g20ek_dataflash_cs0_defconfig | 3 +
configs/at91sam9g20ek_dataflash_cs1_defconfig | 3 +
configs/at91sam9m10g45ek_mmc_defconfig | 1 +
configs/at91sam9n12ek_mmc_defconfig | 1 +
configs/at91sam9n12ek_spiflash_defconfig | 3 +
configs/at91sam9rlek_dataflash_defconfig | 3 +
configs/at91sam9rlek_mmc_defconfig | 1 +
configs/at91sam9x5ek_dataflash_defconfig | 3 +
configs/at91sam9x5ek_mmc_defconfig | 1 +
configs/at91sam9x5ek_spiflash_defconfig | 3 +
configs/at91sam9xeek_dataflash_cs0_defconfig | 3 +
configs/at91sam9xeek_dataflash_cs1_defconfig | 3 +
configs/axm_defconfig | 1 +
configs/brppt1_mmc_defconfig | 2 +
configs/brppt1_nand_defconfig | 2 +
configs/brppt1_spi_defconfig | 3 +
configs/brxre1_defconfig | 2 +
configs/chiliboard_defconfig | 2 +
configs/cm_t335_defconfig | 2 +
configs/cm_t35_defconfig | 1 +
configs/cm_t43_defconfig | 3 +
configs/cm_t54_defconfig | 2 +
configs/corvus_defconfig | 1 +
configs/draco_defconfig | 1 +
configs/eco5pk_defconfig | 1 +
configs/etamin_defconfig | 2 +
configs/ethernut5_defconfig | 3 +
.../gardena-smart-gateway-at91sam_defconfig | 4 +
configs/gurnard_defconfig | 2 +
configs/igep00x0_defconfig | 17 ++
configs/mcx_defconfig | 1 +
configs/meesc_dataflash_defconfig | 3 +
configs/meesc_defconfig | 1 +
configs/mt_ventoux_defconfig | 1 +
configs/omap3_overo_defconfig | 1 +
configs/omap4_sdp4430_defconfig | 1 +
configs/pengwyn_defconfig | 1 +
configs/picosam9g45_defconfig | 1 +
configs/pm9261_defconfig | 3 +
configs/pm9263_defconfig | 3 +
configs/pxm2_defconfig | 1 +
configs/rastaban_defconfig | 1 +
configs/rut_defconfig | 1 +
configs/sama5d27_som1_ek_mmc1_defconfig | 1 +
configs/sama5d27_som1_ek_mmc_defconfig | 1 +
configs/sama5d2_icp_mmc_defconfig | 1 +
configs/sama5d2_ptc_ek_mmc_defconfig | 1 +
configs/sama5d2_xplained_emmc_defconfig | 1 +
configs/sama5d2_xplained_mmc_defconfig | 1 +
configs/sama5d2_xplained_spiflash_defconfig | 3 +
configs/sama5d36ek_cmp_mmc_defconfig | 1 +
configs/sama5d36ek_cmp_spiflash_defconfig | 3 +
configs/sama5d3_xplained_mmc_defconfig | 1 +
configs/sama5d3xek_mmc_defconfig | 1 +
configs/sama5d3xek_spiflash_defconfig | 3 +
configs/sama5d4_xplained_mmc_defconfig | 1 +
configs/sama5d4_xplained_spiflash_defconfig | 3 +
configs/sama5d4ek_mmc_defconfig | 1 +
configs/sama5d4ek_spiflash_defconfig | 3 +
configs/smartweb_defconfig | 1 +
configs/snapper9260_defconfig | 2 +
configs/snapper9g20_defconfig | 2 +
configs/taurus_defconfig | 1 +
configs/thuban_defconfig | 1 +
configs/ti816x_evm_defconfig | 2 +
configs/tricorder_defconfig | 2 +
configs/tricorder_flash_defconfig | 1 +
configs/twister_defconfig | 1 +
configs/usb_a9263_dataflash_defconfig | 3 +
configs/vinco_defconfig | 3 +
configs/wb45n_defconfig | 1 +
configs/wb50n_defconfig | 1 +
drivers/mtd/ubi/Kconfig | 2 +-
drivers/mtd/ubi/io.c | 2 +
drivers/mtd/ubispl/ubispl.c | 215 +++++++++++++++++-
drivers/mtd/ubispl/ubispl.h | 9 +-
env/Kconfig | 24 +-
env/ubi.c | 17 +-
include/configs/am335x_evm.h | 3 -
include/configs/am335x_igep003x.h | 23 --
include/configs/am335x_sl50.h | 3 -
include/configs/am3517_crane.h | 2 -
include/configs/am3517_evm.h | 2 -
include/configs/am43xx_evm.h | 5 -
include/configs/am57xx_evm.h | 2 -
include/configs/at91-sama5_common.h | 5 -
include/configs/at91rm9200ek.h | 2 +-
include/configs/baltos.h | 3 -
include/configs/bav335x.h | 3 -
include/configs/brppt1.h | 5 -
include/configs/chiliboard.h | 4 -
include/configs/cm_t335.h | 2 -
include/configs/cm_t35.h | 2 -
include/configs/cm_t3517.h | 2 -
include/configs/cm_t43.h | 5 -
include/configs/corvus.h | 2 -
include/configs/devkit8000.h | 6 -
include/configs/dra7xx_evm.h | 2 -
include/configs/ethernut5.h | 2 -
.../configs/gardena-smart-gateway-at91sam.h | 6 -
include/configs/kc1.h | 2 -
include/configs/mcx.h | 1 -
include/configs/nokia_rx51.h | 1 -
include/configs/omap3_beagle.h | 4 -
include/configs/omap3_cairo.h | 4 -
include/configs/omap3_evm.h | 3 -
include/configs/omap3_igep00x0.h | 20 --
include/configs/omap3_logic.h | 3 -
include/configs/omap3_overo.h | 1 -
include/configs/omap3_pandora.h | 3 -
include/configs/omap3_zoom1.h | 3 -
include/configs/omap5_uevm.h | 2 -
include/configs/pcm051.h | 1 -
include/configs/pepper.h | 2 -
include/configs/siemens-am33x-common.h | 2 -
include/configs/smartweb.h | 2 -
include/configs/snapper9260.h | 2 -
include/configs/snapper9g45.h | 2 -
include/configs/sniper.h | 2 -
include/configs/tam3517-common.h | 1 -
include/configs/tao3530.h | 2 -
include/configs/taurus.h | 2 -
include/configs/ti814x_evm.h | 1 -
include/configs/ti_omap4_common.h | 5 -
include/configs/tricorder.h | 2 -
include/configs/usb_a9263.h | 3 -
include/configs/wb50n.h | 2 -
include/ubispl.h | 6 +
scripts/config_whitelist.txt | 13 --
tools/moveconfig.py | 41 ++++
158 files changed, 628 insertions(+), 193 deletions(-)

--
2.20.1