All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 00/30] env: Move environment code to use location drivers
Date: Mon, 17 Jul 2017 20:56:35 -0400	[thread overview]
Message-ID: <20170718005635.GB14320@bill-the-cat> (raw)
In-Reply-To: <CAPnjgZ1bODeGaNrcM5cxRqgqqO0j4w9yFyKANypZ3OrwinxDpg@mail.gmail.com>

On Thu, Jul 13, 2017 at 10:45:10AM -0600, Simon Glass wrote:
> Hi Tom,
> 
> On 12 July 2017 at 06:24, Tom Rini <trini@konsulko.com> wrote:
> >
> > On Sun, Jul 09, 2017 at 02:52:43PM -0600, Simon Glass wrote:
> >
> > > The environment code is ripe for improvement in various ways. It has lots
> > > of duplication and inconsistencies between how things work with different
> > > environment locations. It does not properly use Kconfig. Error checking
> > > and handling is patchy.
> > >
> > > This series makes a start at improving things:
> > >
> > > - moves the rest of the CONFIG_ENV_IS_IN_... options to Kconfig
> >
> > After this, did you do some checks to make sure that everyone was
> > migrated correctly?  I ask since I had made an attempt a while back to
> > convert and I found a lot of cases that didn't happen right and ended up
> > hacking up something to have every target print all of the env related
> > options to a file (and have buildman save it).  But it might have been..
> 
> I need to do another pass with this series. I noticed that it doesn't
> bisect properly (i.e. some interim commits mess things up that later
> ones fix).

OK.

> > > - introduces the concept of a location driver for the environment
> > > - drops some of the duplicated code
> > > - improves error handling a little (more to be done here)
> > > - moves code into a new env/ directory
> > >
> > > There is still much more to do:
> > > - complete Kconfig conversion (e.g. CONFIG_ENV_SIZE)
> >
> > Because I was converting these parts as well.
> 
> I think that is much harder because this option often uses other
> options in its expression, but perhaps it is not as bad as I think.

It's pretty awful, in some respects.  Once I gave in and hacked buildman
and U-Boot to have a "host tool" that would have the calculated values,
spit that out and save the output file it wasn't too bad to convert.
Best to save it for a follow up series :)

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170717/1afe6d77/attachment.sig>

      reply	other threads:[~2017-07-18  0:56 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-09 20:52 [U-Boot] [PATCH 00/30] env: Move environment code to use location drivers Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 01/30] Makefile: Rename 'env' target to 'environ' Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 02/30] Move environment files from common/ to env/ Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 03/30] Convert CONFIG_ENV_IS_IN_MMC et al to Kconfig Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 04/30] env: Move help from README " Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 05/30] Convert CONFIG_ENV_IS_IN_FLASH " Simon Glass
2017-07-10 22:09   ` Daniel Schwierzeck
2017-07-18 14:00     ` Simon Glass
2017-07-18 15:01       ` Daniel Schwierzeck
2017-07-18 16:55         ` Tom Rini
2017-07-09 20:52 ` [U-Boot] [PATCH 06/30] Convert CONFIG_ENV_IS_IN_NVRAM " Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 07/30] Convert CONFIG_ENV_IS_IN_EEPROM " Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 08/30] Convert CONFIG_ENV_IS_IN_DATAFLASH " Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 09/30] Convert CONFIG_ENV_IS_IN_SPI_FLASH " Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 10/30] Convert CONFIG_ENV_IS_IN_REMOTE " Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 11/30] Convert CONFIG_ENV_IS_IN_FAT " Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 12/30] env: common: Make env_get_addr/get_char_memory() static Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 13/30] env: common: Drop env_get_addr() Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 14/30] env: common: Factor out the common env_valid check Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 15/30] env: common: Drop env_get_char_init() Simon Glass
2017-07-09 20:52 ` [U-Boot] [PATCH 16/30] env: common: Drop env_get_char_memory() Simon Glass
2017-07-09 20:53 ` [U-Boot] [PATCH 17/30] env: Add an enum for environment state Simon Glass
2017-07-09 20:53 ` [U-Boot] [PATCH 18/30] env: Rename nand env_location to nand_env_location Simon Glass
2017-07-09 20:53 ` [U-Boot] [PATCH 19/30] env: Create a location driver for each location Simon Glass
2017-07-09 20:53 ` [U-Boot] [PATCH 20/30] env: Add a new implementation of environment access Simon Glass
2017-07-09 20:53 ` [U-Boot] [PATCH 21/30] env: Switch over to use environment location drivers Simon Glass
2017-07-09 20:53 ` [U-Boot] [PATCH 22/30] env: Drop common init() functions Simon Glass
2017-07-09 20:53 ` [U-Boot] [PATCH 23/30] env: Drop the env_name_spec global Simon Glass
2017-07-09 20:53 ` [U-Boot] [PATCH 24/30] env: Drop unused env_ptr variables Simon Glass
2017-07-09 20:53 ` [U-Boot] [PATCH 25/30] env: Drop env_init_new() Simon Glass
2017-07-09 20:53 ` [U-Boot] [PATCH 26/30] env: Drop env_get_char_spec() Simon Glass
2017-07-09 20:53 ` [U-Boot] [PATCH 27/30] env: Drop env_relocate_spec() in favour of env_load() Simon Glass
2017-07-09 20:53 ` [U-Boot] [PATCH 28/30] env: Drop saveenv() in favour of env_save() Simon Glass
2017-07-10 20:08   ` Wolfgang Denk
2017-07-12  0:32     ` Simon Glass
2017-07-09 20:53 ` [U-Boot] [PATCH 29/30] env: Adjust the get_char() method to return an int Simon Glass
2017-07-09 20:53 ` [U-Boot] [PATCH 30/30] env: Adjust the load() method to return an error Simon Glass
2017-07-10  8:10 ` [U-Boot] [PATCH 00/30] env: Move environment code to use location drivers Christophe LEROY
2017-07-10 16:38   ` Simon Glass
2017-07-11  7:59     ` Christophe LEROY
2017-07-12  0:32       ` Simon Glass
2017-07-12 12:24 ` Tom Rini
2017-07-13 16:45   ` Simon Glass
2017-07-18  0:56     ` Tom Rini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170718005635.GB14320@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.