Hi, On 10 April 2014 20:01, Simon Glass <s...@chromium.org> wrote: > A previous series created a way of using if () instead of #ifdef for > controlling feature inclusion in U-Boot. The primary target of that series > was common/main.c which is full of #ifdefs. That work was put on hold while > the kbuild work was in progress. > > Since kbuild is now complete, it is time to take another look. However, in > the meantime main.c has not improved. It seems like a good idea to try to > split the code out a bit, to make it more obvious what is happening in the > U-Boot start-up. > > This series splits main into two main program and a CLI (Command-line > interpreter) parts. There are two CLIs - hush and simple, and each is put > in its own file, with a new cli.c to unify them. > > New files are also created for autoboot and bootretry functionality. > > Overall this series makes it easier to read what is happening in main.c, > and also clarifies the parser code. > > > Simon Glass (14): > Remove unnecessary use of hush header file > Rename hush to cli_hush > move CLI prototypes to cli.h and add comments > Split out simple parser and readline into separate files > Add cli_ prefix to readline functions > Move autoboot code to autoboot.c > Move command line API into cli.c > Move bootretry code into bootretry.c and clean up > Rename bootretry functions and remove #ifdefs > m68k: powerpc: Clean up do_mdm_init > Simplify the main loop > main: Hide the hush/simple details inside cli.c > main: Make the execution path a little clearer in main.c > main: Avoid unncessary strdup()/free()
Any comments on this series please? Since it touches main it may be painful to rebase. Also I'm holding off on the autoconf stuff until I get some thoughts on this one. Regards, Simon _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot