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 6646EC433F5 for ; Wed, 20 Oct 2021 06:58:26 +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 77593610CB for ; Wed, 20 Oct 2021 06:58:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 77593610CB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=thorsis.com 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 B0E8782DB4; Wed, 20 Oct 2021 08:58:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=thorsis.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 17D8882DA1; Wed, 20 Oct 2021 08:58:21 +0200 (CEST) Received: from mail.thorsis.com (mail.thorsis.com [92.198.35.195]) (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 8BB1883176 for ; Wed, 20 Oct 2021 08:58:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=thorsis.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ada@thorsis.com Received: from localhost (localhost [127.0.0.1]) by mail.thorsis.com (Postfix) with ESMTP id 44D6A2A42 for ; Wed, 20 Oct 2021 08:58:16 +0200 (CEST) Received: from mail.thorsis.com ([127.0.0.1]) by localhost (mail.thorsis.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZvpMnOzpik1p for ; Wed, 20 Oct 2021 08:58:16 +0200 (CEST) Received: by mail.thorsis.com (Postfix, from userid 109) id 0F4522A1E; Wed, 20 Oct 2021 08:58:16 +0200 (CEST) Date: Wed, 20 Oct 2021 08:58:06 +0200 From: Alexander Dahl To: Simon Glass Cc: U-Boot Mailing List , Marek =?iso-8859-1?Q?Beh=FAn?= , Rasmus Villemoes , Heinrich Schuchardt , Tom Rini , Wolfgang Denk Subject: Re: [PATCH v9 4/7] sandbox: Use a text-based environment Message-ID: Mail-Followup-To: Simon Glass , U-Boot Mailing List , Marek =?iso-8859-1?Q?Beh=FAn?= , Rasmus Villemoes , Heinrich Schuchardt , Tom Rini , Wolfgang Denk References: <20211019224422.1447059-1-sjg@chromium.org> <20211019164418.v9.4.I0690bd21a0701ccc5dd95fb5df88519d216d8af5@changeid> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20211019164418.v9.4.I0690bd21a0701ccc5dd95fb5df88519d216d8af5@changeid> 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 Hello Simon, Am Tue, Oct 19, 2021 at 04:44:19PM -0600 schrieb Simon Glass: > Use a text file for the environment instead of the #define settings. > > Signed-off-by: Simon Glass > Reviewed-by: Marek Behún > --- > > (no changes since v3) > > Changes in v3: > - Add new patch to use a text-based environment for sandbox > > board/sandbox/sandbox.env | 25 +++++++++++++++++++++++++ > include/configs/sandbox.h | 29 ----------------------------- > 2 files changed, 25 insertions(+), 29 deletions(-) > create mode 100644 board/sandbox/sandbox.env > > diff --git a/board/sandbox/sandbox.env b/board/sandbox/sandbox.env > new file mode 100644 > index 00000000000..0f8d95b8db0 > --- /dev/null > +++ b/board/sandbox/sandbox.env > @@ -0,0 +1,25 @@ > +stdin=serial > +#ifdef CONFIG_SANDBOX_SDL > +stdin+=,cros-ec-keyb,usbkbd > +#endif > +stdout=serial,vidconsole > +stderr=serial,vidconsole > + > +ethaddr=00:00:11:22:33:44 > +eth2addr=00:00:11:22:33:48 > +eth3addr=00:00:11:22:33:45 > +eth4addr=00:00:11:22:33:48 > +eth5addr=00:00:11:22:33:46 > +eth6addr=00:00:11:22:33:47 These MAC addresses use the OUI 00:00:11 which is assigned to NORMEREL SYSTEMES, a company based in France. I doubt U-Boot is allowed to use addresses from that block, and would prefer using a locally administered address here, and set the second bit. Thus 02:00:11:xx:xx:xx would be okay for example. > +ipaddr=1.2.3.4 Same here, this is a globally reachable IP address, which U-Boot probably is not allowed to use. According to RFC 5737 there are two IPv4 address blocks for documentational use: “The blocks 192.0.2.0/24 (TEST-NET-1), 198.51.100.0/24 (TEST-NET-2), and 203.0.113.0/24 (TEST-NET-3) are provided for use in documentation.” Greets Alex > + > +/* > + * These are used for distro boot which is not supported. But once bootmethod > + * is provided these will be used again. > + */ > +bootm_size=0x10000000 > +kernel_addr_r=0x1000000 > +fdt_addr_r=0xc00000 > +ramdisk_addr_r=0x2000000 > +scriptaddr=0x1000 > +pxefile_addr_r=0x2000 > diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h > index c19232f202f..c703a1330c0 100644 > --- a/include/configs/sandbox.h > +++ b/include/configs/sandbox.h > @@ -64,37 +64,8 @@ > #define CONFIG_LCD_BMP_RLE8 > > #define CONFIG_KEYBOARD > - > -#define SANDBOX_SERIAL_SETTINGS "stdin=serial,cros-ec-keyb,usbkbd\0" \ > - "stdout=serial,vidconsole\0" \ > - "stderr=serial,vidconsole\0" > -#else > -#define SANDBOX_SERIAL_SETTINGS "stdin=serial\0" \ > - "stdout=serial,vidconsole\0" \ > - "stderr=serial,vidconsole\0" > #endif > > -#define SANDBOX_ETH_SETTINGS "ethaddr=00:00:11:22:33:44\0" \ > - "eth2addr=00:00:11:22:33:48\0" \ > - "eth3addr=00:00:11:22:33:45\0" \ > - "eth4addr=00:00:11:22:33:48\0" \ > - "eth5addr=00:00:11:22:33:46\0" \ > - "eth6addr=00:00:11:22:33:47\0" \ > - "ipaddr=1.2.3.4\0" > - > -#define MEM_LAYOUT_ENV_SETTINGS \ > - "bootm_size=0x10000000\0" \ > - "kernel_addr_r=0x1000000\0" \ > - "fdt_addr_r=0xc00000\0" \ > - "ramdisk_addr_r=0x2000000\0" \ > - "scriptaddr=0x1000\0" \ > - "pxefile_addr_r=0x2000\0" > - > -#define CONFIG_EXTRA_ENV_SETTINGS \ > - SANDBOX_SERIAL_SETTINGS \ > - SANDBOX_ETH_SETTINGS \ > - MEM_LAYOUT_ENV_SETTINGS > - > #ifndef CONFIG_SPL_BUILD > #define CONFIG_SYS_IDE_MAXBUS 1 > #define CONFIG_SYS_ATA_IDE0_OFFSET 0 > -- > 2.33.0.1079.g6e70778dc9-goog >