- Apr 04, 2016
-
-
Alessandro Rubini authored
These changes have no effect at this point, but are the initial steps introducing host builds. Some changes are minor cleanups, some depend on CONFIG_HOST_PROCESS which is not defined at this point. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
-
Alessandro Rubini authored
We have three temperatures, called "roof", "core", "case" (yess rubi like word same lengt, s/he most love four). There is a "faketemp" command that can set one two or all of them. This allows to test negative temperatures in printouts (White Rabbit in Siberia does it, but we southish can't test easily). All temperatures are initialized to invalid. Example: wrc# faketemp -10 -2.5 wrc# faketemp fff60000 fffd8003 80000000 wrc# temp pcb:84.7500 roof:-10.0000 core:-2.4999 case:INVALID Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This costs anoter 220 bytes in the binary, becuase we now loop among all temperature providers in order to return data to the caller. The providers are clustered using an ELF section. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This commit adds data structures, methods and a process to manage temperature. Currently the only temperature being read is the onewire thermometer, so there is no difference with what we had before. The cost is 1.1 kB in binary size. Well, there is a difference: only the stat engine was reading temperature, while now the thermometer is read continuously (every 15 seconds, or another Kconfig-urable interval). This takes quite some CPU time (18.5ms per polling loop, but allows any user to read temperature (using the API we now provide) without re-reading the onewire bus. The real aim of this is monitoring a board-specific set of sensors, as implemented and show in the next commit. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
-
Alessandro Rubini authored
Also, this changes how to mac address is retrieved in patching pfilter rules. I'd better use format_mac(get_mac) for the verbose message, so get_mac is also the source for patching the rules. register and get_mac/set_mac are guaranteed to be in-sync. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
These numbers are only available at build time; there is no run-time command to change them as yet. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
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 ...
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
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 <rubini@gnudd.com>
-
Alessandro Rubini authored
This includes a wrs fix by Maciej and a change that prevents warning when bulding with CONFIG_HOST_PROCESS (which is not there yet). I prefer to merge this now, so the next commit picks only its own little change into the ppsi submodule. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
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 <rubini@gnudd.com>
-
Alessandro Rubini authored
WARNING: wr_switch_defconfig doesn't build, this is fixed in next commit Unfortunately this commit makes the internal communication between minic and lan asymmetric: on receive the tag is discarded (and the longer header falls into the payload) while on transmit it must be provided by lan.c. The reason is that on receive we can trim 4 bytes from the payload, but on send we can't add 4 bytes without a memmove. The functions receive pointers to two different header structures, so hopefully user errors will be signalled by the compiler. Still, users interact with net.c, which hides vlan completely from them. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
We used to have "struct ethhdr" local in net.c, passing "void *hdr" to minic. We exports the structure to an header so to use it in communicating with the minic. Unfortunaltey, ethhdr is defined elsewhere too, so we'd better rename to wr_ethhdr. This is a step towards the introduction of vlans, but has no technical effect by itself. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
the UDP checlsum was miscalculated for odd-sized payload. The last byte was not used in calculation. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Signed-off-by:
Davide Ciminaghi <ciminaghi@gnudd.com>
-
- Feb 16, 2016
-
-
Alessandro Rubini authored
This branch introduces the "ps" command, based on a restructuring of how main() calls the various activities.
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This commit turns individual calls to polling functions into an array of tasks. On this basis we can add profiling and periodic execution (instead of continuous polling). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The compiler is smart enough to turn this into a multiplication by 8: cf54: 3d c1 00 03 sli r1,r14,3 cf58: 59 a1 00 00 sw (r13+0),r1 and any real division by ll would be trapped by ./check-error.c . Still, I'd better simplify the code. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
All "tasks" must have the same prototype, so we'd better get void in all of them at the time being (so we only change the nerwork function). Meanwhile, use value "0" for "link down", so it can work as a simple enable flag for the IP polling code. (note: we query the link status in wrc_ptp_update() too, and we should rather refer to the global variable) Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This solves http://www.ohwr.org/issues/1218 We used to have a "needIP" variable, but we need three states: if the address was set by bootp, we run bootp again when the link goes up, but if it was a static assignment we do not (and keep the static one). So I renamend needIP to a 3-valued ip_status. The rename ensured the compiler found all users. Also, the messages are now 3-headed, so the user know whether the address is static or it comes from bootp. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Again, it returns 1 if it did some calculation. For profiling. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This is a step towards profiling. The functions being polled return whether or not they did actually work. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Feb 15, 2016
-
-
Alessandro Rubini authored
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-