1. 29 Mar, 2013 1 commit
    • Alessandro Rubini's avatar
      trivial: headers: include two files more · ae19fd81
      Alessandro Rubini authored
      1- wrc.h now includes syscon.h. This is a prerequisite to a non-inline
      implementation of usleep (the current inline one is just a random
      loop, 10x wrong on the spec). Without this we should modify sockitowm
      where it calls usleep, but I'd better not touch sockitowm.
      
      2- syscon.h includes <sys/types.h>.  This is needed to have
      useconds_t.  I'd better have usleep take unsigned long, but some file
      already includes sys/types.h, so our prototype must match that one.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      ae19fd81
  2. 28 Mar, 2013 5 commits
    • Alessandro Rubini's avatar
      shell: add "config" command. · c118ac41
      Alessandro Rubini authored
      This command can return the .config file to the user. It can be useful
      to trace what is actually running, as addition to the "ver"
      command.  It is optional because it costs .5kB of binary size.
      
      Example:
      
        wrc# config
          Current WRPC-SW configuration:
        CONFIG_RAMSIZE=90112
        # CONFIG_PTP_NOPOSIX is not set
        CONFIG_PPSI=y
        # CONFIG_CHECK_RESET is not set
        CONFIG_PPSI_VERBOSITY=0
        CONFIG_PPSI_RUNTIME_VERBOSITY=y
        CONFIG_STACKSIZE=2048
        CONFIG_PP_PRINTF=y
        # CONFIG_PRINTF_FULL is not set
        CONFIG_PRINTF_XINT=y
        # CONFIG_PRINTF_MINI is not set
        # CONFIG_PRINTF_NONE is not set
        CONFIG_PRINT_BUFSIZE=128
        CONFIG_ETHERBONE=y
        # CONFIG_DETERMINISTIC_BINARY is not set
        CONFIG_CMD_CONFIG=y
      
      (This configuration amounts to a binary size of 86252 bytes, at this
      commit).
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      c118ac41
    • Alessandro Rubini's avatar
      shell: add help command · 78e9e68d
      Alessandro Rubini authored
      The help command currently only lists available commands. It was asked
      by some developers some time ago, and this implementation only costs
      150 bytes in the final exectuable.  I don't think it's worth a Kconfig
      option.
      
      This is it in action with my configuration:
      
         wrc# help
         Available commands:
           ver
           pll
           sfp
           stat
           ptp
           mode
           calibration
           time
           gui
           sdb
           mac
           init
           ptrack
           ip
           verbose
           help
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      78e9e68d
    • Alessandro Rubini's avatar
      shell: remove environment commands · bebe796c
      Alessandro Rubini authored
      The environment was drafted but not actually used, so this commit
      removes it.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      Acked-by: Grzegorz Daniluk's avatarGrzegorz Daniluk <grzegorz.daniluk@cern.ch>
      Acked-by: Tomasz Wlostowski's avatarTomasz Wlostowski <tomasz.wlostowski@cern.ch>
      bebe796c
    • 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: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      a9ce831d
    • Alessandro Rubini's avatar
      Makefile: use bigobj.lds during initial partial link · eb9d18a4
      Alessandro Rubini authored
      This commit makes no effect, but it prepares for the following one.
      In general, using an intermediate platform-agnostic linker script
      when making wrc.o is not bad, so let's do it here.
      
      The main reason why we need it is to force the "KEEP" command for the
      ".cmd" ELF section, introduced by the next commit.  The alternative to
      this would be chaning the main linker script, which is worse in my
      opinion.
      
      If we add initcalls or similar stuff later, this bigobj.lds is the
      place to do it.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      eb9d18a4
  3. 26 Mar, 2013 4 commits
  4. 19 Mar, 2013 1 commit
  5. 18 Mar, 2013 6 commits
  6. 12 Mar, 2013 1 commit
  7. 07 Mar, 2013 6 commits
  8. 06 Mar, 2013 2 commits
  9. 05 Mar, 2013 1 commit
  10. 20 Feb, 2013 13 commits