From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9232FC433FE for ; Wed, 3 Nov 2021 23:23:49 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D0528611EE for ; Wed, 3 Nov 2021 23:23:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D0528611EE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E7C9F8364D; Thu, 4 Nov 2021 00:23:45 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="b6J3GLI8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3AC348364B; Thu, 4 Nov 2021 00:23:42 +0100 (CET) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BDDAF835B3 for ; Thu, 4 Nov 2021 00:23:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kabel@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id 77B5F6103C; Wed, 3 Nov 2021 23:23:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635981816; bh=BVgHkAvDJG/mmbyuQQI5wjyYGYpq6PFxoyb8AqGfZmE=; h=From:To:Cc:Subject:Date:From; b=b6J3GLI88jvh8ikNbIiLYXSfTvlSedTUdIWL2AzU1OR6nLujr7UBkITLg7ZHyUT1r MhTNoDnVyTyfzYqRyBY6kopUPVk7BQFoIeAsJY4+FDjyQf7p7lkrXeeA2vwTNDqRx6 UY1f21EaS/8UjqOZx6P6koEFUFle6ixkiVZNZDPmC9do71aB9r8A/c8jB0K+LxRhl7 FAUHGtYC0VKyNVO4m7r87u0dIIYuHXtP5fqma3UTd93BLOHhKKaTuB9PaVdNDp8lYQ tfEkZajgTTeMsHTtqajdlCb3FISNivn195zx8nILg7CuTfa5NoX++zGwPGQJVD39HZ UXA4fsc3HwHrg== From: =?UTF-8?q?Marek=20Beh=C3=BAn?= To: Simon Glass , =?UTF-8?q?Pali=20Roh=C3=A1r?= Cc: u-boot@lists.denx.de, =?UTF-8?q?Marek=20Beh=C3=BAn?= Subject: [PATCH v2 00/12] Board specific runtime determined default env Date: Thu, 4 Nov 2021 00:23:20 +0100 Message-Id: <20211103232332.2737-1-kabel@kernel.org> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean From: Marek BehĂșn Hello Simon, Pali, this is v2 of the series that adds support for board specific runtime determined default environment variables. (Went through CI on github.) As requested, I converted it to use sysinfo (and added support for some new things into sysinfo). I haven't tested the change on ESPRESSObin yet, because I don't have the board at home. But I copy-pasted the code to turris_mox and it worked as expected there. Nonetheless it should be tested, I or Pali can do it today or tomorrow. Marek Marek BehĂșn (12): env: Don't set ready flag if import failed in env_set_default() env: Fix env_get() when returning empty string using env_get_f() env: Simplify env_get_default() sysinfo: Make sysinfo_get_str() behave like snprintf() test: Use ut_asserteq_str() instead of ut_assertok(strcmp()) sysinfo: Add get_str_list() method sysinfo: Make .detect() non-mandatory sysinfo: Add support for iterating string list env: Change return behaviour of env_set_default_vars() env: Add support for overwriting default environment via sysinfo arm: mvebu: Espressobin: Use new API for setting default env at runtime env: Remove support for read-write default_environment[] board/Marvell/mvebu_armada-37xx/board.c | 135 ++++++++++------ board/google/chromebook_coral/coral.c | 13 +- common/board_info.c | 2 +- configs/mvebu_espressobin-88f3720_defconfig | 1 + drivers/sysinfo/gpio.c | 2 +- drivers/sysinfo/rcar3.c | 2 +- drivers/sysinfo/sandbox.c | 20 ++- drivers/sysinfo/sysinfo-uclass.c | 99 +++++++++++- env/common.c | 165 +++++++++++++++++--- include/configs/mvebu_armada-37xx.h | 17 +- include/env.h | 1 + include/env_default.h | 2 - include/env_internal.h | 4 - include/sysinfo.h | 163 ++++++++++++++++++- lib/smbios.c | 2 +- test/dm/cpu.c | 4 +- test/dm/soc.c | 4 +- test/dm/sysinfo-gpio.c | 12 +- test/dm/sysinfo.c | 66 ++++++-- test/dm/usb.c | 2 +- test/dm/virtio.c | 2 +- test/print_ut.c | 32 ++-- 22 files changed, 595 insertions(+), 155 deletions(-) -- 2.32.0