From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.kamstrup.com ([93.167.225.188]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1XK1mn-0006aJ-DC for ptxdist@pengutronix.de; Wed, 20 Aug 2014 11:02:29 +0200 From: Bruno Thomsen Date: Wed, 20 Aug 2014 09:02:22 +0000 Message-ID: <915054555B5659448ACF8A70E114824D01402B42FA@Exchange2010.kamstrup.dk> References: <1407140962-2116-1-git-send-email-bth@kamstrup.dk> <53E0CE18.9060103@tqsc.de> <20140808101639.GA11487@pengutronix.de> In-Reply-To: <20140808101639.GA11487@pengutronix.de> Content-Language: en-US MIME-Version: 1.0 Subject: Re: [ptxdist] [RFC] u-boot-tools: emmc support in fw_printenv/fw_setenv Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: "ptxdist@pengutronix.de" -----Original Message----- From: ptxdist-bounces@pengutronix.de [mailto:ptxdist-bounces@pengutronix.de] On Behalf Of Michael Olbrich Sent: 8. august 2014 12:18 To: ptxdist@pengutronix.de Subject: Re: [ptxdist] [RFC] u-boot-tools: emmc support in fw_printenv/fw_setenv > On Tue, Aug 05, 2014 at 02:29:12PM +0200, Markus Niebel wrote: > > Hello Bruno, > > > > Am 04.08.2014 10:29, wrote Bruno Thomsen: > > > Provide read/write access to U-Boot environment stored in eMMC flash from Linux. > > > > > > Access to U-Boot environment can be very useful; dual kernel/rootfs images, production default values, change kernel bootargs, etc. > > > > > > Tested with U-Boot 2009.08 and 2013.04 on TQMa28. > > > > > > > Wouldn't it be better to rework the support for u-boot tools in > > general? (I know, this will be tricky, since U-Boot environment tools > > compilation is really an adventure). Also I think, we should use the same version of U-Boot tools as we use for the U-Boot itself. > > > > What do you think? > > I think it's a good idea. Yes, use the same U-Boot package for both bootloader and tools. Then we have the block device (emmc, etc.) vs. mtd[1] (NAND, NOR) support issue. As I see there are the following solutions: 1) Select fw_printenv/fw_setenv storage support based on define in board configuration, ex. CONFIG_ENV_IS_IN_MMC in mx28evk. 2) fw_printenv/fw_setenv support both storage technologies: a) Add storage type parameter to /etc/fw_env.config b) Autodetect storage type with strcmp() based on device name [1] MTD: Memory Technology Device, http://www.linux-mtd.infradead.org/faq/general.html Venlig hilsen / Best regards Kamstrup A/S Bruno Thomsen Development engineer Technology Kamstrup A/S Industrivej 28 DK-8660 Skanderborg Tel: +45 89 93 10 00 Fax: +45 89 93 10 01 Dir: +45 89 93 13 94 E-mail: bth@kamstrup.dk Web: www.kamstrup.dk -- ptxdist mailing list ptxdist@pengutronix.de