Skip to content
Snippets Groups Projects
  1. May 08, 2013
  2. Mar 28, 2013
    • Alessandro Rubini's avatar
      shell: reorganize parsing using .cmd ELF section · a9ce831d
      Alessandro Rubini authored
      
      This commit creates a .cmd section, so there is no global list of
      commands in shell.c any more, and no ifdef in the code for conditional
      commands.  Also, (unrelated) makes shell errors slightly more friendly.
      
      The technique is widely used, in the Linux kernel and all boot
      loaders, as well as a lot of my own personal code, so this is safe
      (and tested).
      
      As a side effect, this allows (in later commits) to move the "verbose"
      ppsi-specific command back to ppsi/arch-wrpc/ where it really belongs.
      It allows new commands to be easily added by just adding their
      respective file to the build.
      
      Even though this increases code size by around 50 lines, it makes it
      more modular and only costs 8 bytes in the final executable (in my
      configuration: 128 bytes less of text and 136 bytes more of data).
      
      Signed-off-by: default avatarAlessandro Rubini <rubini@gnudd.com>
      a9ce831d
  3. Nov 01, 2012
  4. Oct 16, 2012
    • Alessandro Rubini's avatar
      revision: change revision generation, no effect on output · 5d4ef29f
      Alessandro Rubini authored
      
      This doesn't change the behavior of any command, but adds revision.c
      as a real source file rather than something created by make using
      "echo ... > revision.c".  In any case, the file is recompiled
      each time you call "make", so the date and time reflect the last
      build.
      
      However, this introduces CONFIG_DETERMINISTIC_BINARY (that nobody
      sets at this point in time) to build a binary withouth __DATE__
      and __TIME__ strings, so it is the same at every rebuild. See
      next commit.
      
      Signed-off-by: default avatarAlessandro Rubini <rubini@gnudd.com>
      5d4ef29f
  5. Oct 05, 2012
    • Alessandro Rubini's avatar
      Run ./scripts/Lindent on all .c and .h files · e625cbd9
      Alessandro Rubini authored
      
      This is massive: 4k lines changed (but only 840 if you ignore
      space-only changes).  In this case "git blame -w" won't always find
      the right patch, and it may fall on this patch -- because those
      800 lines changed in content too.
      
      This has been done with
      
         find . -name '*.[ch]' | xargs -n 1 ./scripts/Lindent
      
      Statistics: all changes and ignoring blank space:
      
         morgana% git diff --stat HEAD~1 | tail -1
          77 files changed, 3774 insertions(+), 3709 deletions(-)
         morgana% git diff -w --stat HEAD~1 | tail -1
          61 files changed, 894 insertions(+), 829 deletions(-)
      
      However, after this step I hand-fixed some very ugly long expressions
      (leaving them long: no content change at all is there).
      
      Signed-off-by: default avatarAlessandro Rubini <rubini@gnudd.com>
      e625cbd9
  6. May 31, 2012