1. 27 Feb, 2017 1 commit
  2. 16 Feb, 2017 6 commits
  3. 04 Aug, 2016 2 commits
  4. 03 Aug, 2016 3 commits
  5. 10 Jun, 2016 9 commits
  6. 20 May, 2016 1 commit
    • Alessandro Rubini's avatar
      general: remove ../ from include lines · da09373d
      Alessandro Rubini authored
      "-I." is there, so instead of "../lib/ipv4.h" prefer <lib/ipv4.h>.
      
      I thought moving ipv4.h to include, but then the name is possibly ambiguous
      with other files in the -I search path. Thus I wanted to move
      it from lib/ipv4.h to include/wrc-ipv4.h but that would require several
      files to be changed.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      da09373d
  7. 04 Apr, 2016 5 commits
    • Alessandro Rubini's avatar
      general: use an ELF section for tasks · d9d20c8b
      Alessandro Rubini authored
      This allows several functions to be static in the files where they
      are defined. See temperature.c for an example.
      
      But mainly, the idea is allowing ease addition of features (likely
      Kconfig'd ones) for specific WR users, without any modification to the
      main function and other generic code.  This will happen soon for snmp,
      for example.
      
      We may push this a little further, by moving all shell stuff into
      shell.c, the ptp task within ppsi itself, and so on. But now my time
      is over.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      d9d20c8b
    • Alessandro Rubini's avatar
      Support for host builds. · cf33ae1d
      Alessandro Rubini authored
      This commit is not breaking the current status, but adds the
      ability to build on the host, to simulate and (mainly) to help
      me hack the networking code in a simpler/faster environment.
      
      Missing features:
      	- ptp
      	- build in i386 (currently x86-64 is hardwired)
      
      Also, this commit requires a change in ppsi, that I'm not going to
      commit now: we must get rid of the main function (most of that
      stuff is done win wrc_ptp.c, which we must replicate  in a unix-compatible
      way).
      
      This is the ppsi change
      
         --- a/arch-unix/Makefile
         +++ b/arch-unix/Makefile
         @@ -4,7 +4,7 @@ A := arch-$(ARCH)
      
          CFLAGS += -Itools
      
         -OBJ-y += $A/unix-startup.o \
         +OBJ-y += \
                 $A/main-loop.o \
                 $A/unix-io.o \
                 $A/unix-conf.o \
      
      Local changes in this commit:
            - adding CONFIG_HOST_PROCESS and the auto-generated opposites:
            CONFIG_LM32 and CONFIG_EMBEDDED_NODE (LM32 && NODE)
      
            - make some config option depend on !HOST_PROCESS
      
            - Makefile: some dependencies on HOST_PROCESS and the opposite
      
            - */*.mk: some dev and shell objects depend on
            CONFIG_EMBEDDED_NODE instead of CONFIG_WR_NODE (i.e.: both a
            node and an lm32)
      
            - new host/ subdir where some placeholders are placed
      
            - no sdb support on the host
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      cf33ae1d
    • Alessandro Rubini's avatar
      vlan: add "vlan off" command, switch pfilter rule-set at runtime · d4c72f47
      Alessandro Rubini authored
      This allows a node built with CONFIG_VLAN to choose at run-time
      whether vlans are allowed or not.  We build both pfilter rule-sets,
      and according to the active vlan number we write one or the other.
      
      The case "CONFIG_VLAN is not set" is handled by providing default
      NULL pointers for beginning and end of the vlan rule-set.
      
      As a side effect, I renamed the files and the functions in
      the pfilter-builder.
      
      This is how it works for me, with CONFIG_PFILTER_VERBOSE set,
      so you see different rule-set  are used (29 rules vs. 16 rules):
      
          wrc# vlan set 0
          0 ("0") out of range
          Command "vlan": error -22
          wrc# vlan off
          fixing MAC adress in rule: use 22:33:44:55:66:77
          pfilter rule 00: 4.00000000
          pfilter rule 01: 1.e4466013
          [...]
          pfilter rule 28: 8.00000000
          current vlan: 0 (0x0)
          wrc# ip set 10.0.0.2
          IP-address: 10.0.0.2 (static assignment)
      
        (and I am now reachable by untagged frames)
      
          wrc# vlan set 10
          fixing MAC adress in rule: use 22:33:44:55:66:77
          fixing VLAN number in rule: use 10
          pfilter rule 00: 4.00000000
          pfilter rule 01: 1.e4466013
          [...]
          pfilter rule 15: 8.00000000
          current vlan: 10 (0xa)
      
        (and I am now reachable on vlan 10)
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      
      Conflicts:
      	Makefile
      d4c72f47
    • Alessandro Rubini's avatar
      shell: implement vlan command · ab7cb867
      Alessandro Rubini authored
      This allows a run-time change of the active vlan, if CONFIG_VLAN is
      active at build time.  The pfilter rules are being rewritten every
      time the vlan is changed (and we have one VLAN only for the CPU).
      
         wrc# vlan set 0
         0 ("0") out of range
         Command "vlan": error -22
         wrc# vlan set pippo
         0 ("pippo") out of range
         Command "vlan": error -22
      
         wrc# vlan
         current vlan: 10 (0xa)
      
         wrc# vlan set 20
         current vlan: 20 (0x14)
         wrc# ip set 192.168.20.2
         IP-address: 192.168.20.2 (static assignment)
      
            (and the node now replies to ping on vlan 20)
      
         wrc# vlan set 10
         current vlan: 10 (0xa)
         wrc# ip set 192.168.10.2
         IP-address: 192.168.10.2 (static assignment)
      
            (and the node now replies to ping on vlan 10)
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      ab7cb867
    • Alessandro Rubini's avatar
      shell: optionally define a build-time init command · ce0af021
      Alessandro Rubini authored
      This commit adds the possibility to build an init command in the
      binary.  It can be useful to install a number of nodes with a special
      configuration, without the need to reach the shell and/or eeprom of
      each one.
      
      This is useful, for example, to pass syslog configuration
      or the (yet to be implemented) definition of multiple vlans for
      etherbone and the wr fabric (frame classes 7 and 6 f the packet
      filter). Moreover, I personally love to load a master or slave node
      for testing without interacting with the node (or changing the flash
      over and over).
      
      This commit also makes reading of commands from storage an optional
      feature, but only in the advanced/developer options. Thus, you can
      build a wrpc that uses the build-time init commands, or the
      flash-stored init commands, both or none of them.
      
      Size effects:
           * no effect if you keep the defaults (no build-time init, flash init)
           * +248 bytes (+ the command itself) if you enable build-time init
           * -1696 bytes if you remove flash-based init (discouraged)
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      ce0af021
  8. 16 Feb, 2016 5 commits
  9. 15 Feb, 2016 3 commits
  10. 20 Jan, 2016 3 commits
  11. 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>
      5e844431
  12. 27 Oct, 2015 1 commit