From patchwork Wed May 15 13:15:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Klotzbuecher X-Patchwork-Id: 1100046 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mkio.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 453w6n57kRz9sB8 for ; Wed, 15 May 2019 23:16:17 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 69047C21C27; Wed, 15 May 2019 13:16:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 80E0FC21C27; Wed, 15 May 2019 13:16:12 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A7199C21C27; Wed, 15 May 2019 13:16:11 +0000 (UTC) Received: from mail-relay.contabo.net (mail-relay.contabo.net [213.136.95.143]) by lists.denx.de (Postfix) with ESMTPS id 463DDC21BE5 for ; Wed, 15 May 2019 13:16:11 +0000 (UTC) Received: by mail-relay.contabo.net (Postfix, from userid 103) id D78242036A; Wed, 15 May 2019 15:16:10 +0200 (CEST) Received: from m2731.contabo.net (m2731.contabo.net [193.34.145.203]) by mail-relay.contabo.net (Postfix) with ESMTPS id 2806920109 for ; Wed, 15 May 2019 15:16:10 +0200 (CEST) Received: from [95.223.86.96] (port=12649 helo=e460.ch.int.kistler.com) by m2731.contabo.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1hQtlO-0005GW-Fd; Wed, 15 May 2019 15:16:09 +0200 From: Markus Klotzbuecher To: u-boot@lists.denx.de Date: Wed, 15 May 2019 15:15:51 +0200 Message-Id: <20190515131600.28798-1-mk@mkio.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - m2731.contabo.net X-AntiAbuse: Original Domain - lists.denx.de X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - kistler.com X-Get-Message-Sender-Via: m2731.contabo.net: authenticated_id: mk@mkio.de X-Authenticated-Sender: m2731.contabo.net: mk@mkio.de X-Source: X-Source-Args: X-Source-Dir: Subject: [U-Boot] [PATCH v2 0/9] miscellaneous ubispl and ubi improvements X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Markus Klotzbuecher 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(-)