From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Thu, 25 Sep 2014 10:06:18 +0200 Subject: [U-Boot] ARM: rpi_b: query internal MAC address from firmware In-Reply-To: <54237D21.5060907@wwwdotorg.org> References: <1411530303-23893-1-git-send-email-swarren@wwwdotorg.org> <54231F28.4020402@wwwdotorg.org> <54237D21.5060907@wwwdotorg.org> Message-ID: <201409251006.18841.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thursday, September 25, 2014 at 04:25:37 AM, Stephen Warren wrote: [...] > >> Normally this should be within a check for if (!getenv("usbethaddr")). > >> Any reason to deviate from that? > > > > That makes sense. I simply wasn't aware of the convention. I'll amend > > the patch. > > Oh, actually... > > When this code runs, there's no way that usbethaddr can already be set. > There's no usbethaddr value set in the default environment Unless you place it there because you know what you're doing ... > , there is no > persistent environment storage on this board There is SD/MMC slot, that's enough to implement persistent storage. > so the default environment > is always used, and misc_init_r() happens well before any kind script > that the user might modify (such as uEnv.txt or boot.scr) can run. If > the user wants to override usbethaddr, they can just set a new value in > uEnv.txt. > > Does it still make sense to add this guard anyway, or does this justify > the existing version of the patch? I'd guard it to be future proof. Best regards, Marek Vasut