1. 30 Oct, 2015 1 commit
    • Alessandro Rubini's avatar
      general: add missing copyright notes. · 5e844431
      Alessandro Rubini authored
      This commit fixes all copyright notes, using "git blame" as a
      reference.  For simple files I just added a 2-lines boilerplate about
      being WR and GPL.
      Some parts I left untouched:
        trivial-init and related files (unclear to me what this is,
        and pf-microcode.h is magic binary pfilter values).
        tools/lm32-etheruart: I don't know what this is and who the author is
        libsdbfs: this comes from another repo and I'd better not change it
        sfp_lib.h and hal_shmem.h: I lost track about the origin of this,
        among the several packages.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
  2. 27 Oct, 2015 1 commit
  3. 15 Oct, 2015 3 commits
    • Alessandro Rubini's avatar
      stat: always print one line when turning stats on · 684fa5cd
      Alessandro Rubini authored
      With the new "only print if sth happens" way, sometimes stats is
      just silent forever. This happens if we are master or if no slave
      is active (well, and during initial setting up the wr link).
      So now typing "stat" or "stat on" will turn on stats and print a line
      of statistics, every time -- or the line "statistics now off".
      This happens by changing the internal status of monitor_ppsi.c,
      now exported to the cmd_stat.c.
      This is the result on a master system:
         wrc# stat
         lnk:1 rx:0 tx:3 lock:1 sv:0 ss:'' aux:1 sec:5 [...]
         wrc# stat
         statistics now off
         wrc# stat
         lnk:1 rx:0 tx:11 lock:1 sv:0 ss:'' aux:1 sec:8 [...]
      And this is what happens when we become slave:
         wrc# mode slave
         Locking PLL
         wrc# ptp start
         Slave Only, clock class set to 255
         wrc# lnk:1 rx:57 tx:60 lock:1 sv:1 ss:'SYNC_SEC' aux:1 sec:49 [...]
         lnk:1 rx:70 tx:64 lock:1 sv:1 ss:'SYNC_NSEC' aux:1 sec:1444901411 [...]
         lnk:1 rx:77 tx:66 lock:1 sv:1 ss:'SYNC_PHASE' aux:1 sec:1444901414 [...]
         lnk:1 rx:83 tx:68 lock:1 sv:1 ss:'WAIT_OFFSET_STABLE' aux:1 sec:1444901416 [...]
         lnk:1 rx:87 tx:69 lock:1 sv:1 ss:'WAIT_OFFSET_STABLE' aux:1 sec:1444901417 [...]
         lnk:1 rx:90 tx:70 lock:1 sv:1 ss:'TRACK_PHASE' aux:1 sec:1444901418 [...]
         lnk:1 rx:94 tx:71 lock:1 sv:1 ss:'TRACK_PHASE' aux:1 sec:1444901419 [...]
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
    • Alessandro Rubini's avatar
      cmd_stat: ack the user when turning off stat reporting · 67c9e10f
      Alessandro Rubini authored
      If we are master (or slave with no master running) the next commit
      makes stats completely silent (nothing happens: nothing printed).
      A user typing "stat" won't know if it turned them on or off. So
      turning on is now printed:
         wrc# stat
         wrc# stat
         statistics now off
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
    • Alessandro Rubini's avatar
      cmd_stat: run stat printing as a background process · 3bc3b28a
      Alessandro Rubini authored
      "stat" enables statistics, without interrupting shell interaction.
      Thus, there is no "esc to terminate" any more.
      Another "stat" command with turn stats off. As an alternative, "stat on"
      and "stat off" is supported.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
  4. 06 Feb, 2014 1 commit
  5. 28 Mar, 2013 1 commit
    • 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>
  6. 04 Dec, 2012 1 commit
  7. 01 Nov, 2012 1 commit
  8. 05 Oct, 2012 1 commit
    • 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: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
  9. 11 Jul, 2012 1 commit
  10. 31 May, 2012 1 commit