Skip to content
Snippets Groups Projects
  1. Jan 20, 2016
    • Alessandro Rubini's avatar
      tools: build wrpc-dump with "-m32" flag (well, we assume PC host) · b607fb06
      Alessandro Rubini authored
      
      This fixes the problem with data sizes when building on a 64-bit host.
      Now the dump of ppi makes sense, besides endianness.
      
      Please note how this requires a cross-compile environment for i386
      when you build on x86-64. Later on this requirement is lifted.
      
      Signed-off-by: default avatarAlessandro Rubini <rubini@gnudd.com>
      b607fb06
    • Alessandro Rubini's avatar
      tools: initial wrpc-dump, still bugged · f3dafc70
      Alessandro Rubini authored
      
      The tool is meant to print internal data structures of the wrpc,
      by running either on a dump file or a live system.
      
      The code is an edited copy of wr-switch-sw/userspace/tools/wrs_dump_shmem.c,
      so the data-dumping mechanism is from there.
      
      bugs at this point:
         - all endianness stuff is bad (in wrs it was local, here we cross-dump)
         - data sizes are wrong (see next commit)
         - we miss checks for consistency
         - we can't open /dev/mem (for spec for example) or a elf file
         - docs are missing too
      
      Signed-off-by: default avatarAlessandro Rubini <rubini@gnudd.com>
      f3dafc70
  2. Jan 15, 2016
  3. Oct 13, 2015
    • Alessandro Rubini's avatar
      tools/pfilter-builder: completed · d52fdb87
      Alessandro Rubini authored
      
      This changes pfilter-builder.c so it really build in user space, but removing
      register setting and creating output files instead.
      
      Running this program creates 3 files, that correspond to the previous
      three #ifdef conditions.  The files are:
      
            rules-plain.bin    this is used for the no-etherbone configuration
            rules-ebone.bin    etherbone setup
            rules-e+nic.bin    etherbon plus 7solution's wr-nic packet filter
      
      The files begin with a magix 0x11223344 word, that allows the soft-core
      to fix any endianness difference (so no hairy mishaps are expected when
      switching to a different soft-core). Then the 40-bit command words are
      saved as 64-bit vaules, LSB-first. The output file is thus an odd number
      of words and no 64-bit alignment is required.
      
      The first three instructions of the packet filter are used to compare
      the destination mac address of the frame.  We now use a fake mac address,
      and the LM32 code will change it while programming the binary.
      
      Please look at this commit while ignoring white-space, as it changes
      indentation while turning #ifdef/#else into if()/else .
      
      Signed-off-by: default avatarAlessandro Rubini <rubini@gnudd.com>
      d52fdb87
  4. Sep 28, 2015
  5. Jan 06, 2015
  6. Nov 14, 2013
  7. Oct 25, 2013
  8. May 20, 2013
    • Alessandro Rubini's avatar
    • Alessandro Rubini's avatar
      tools/wrpc-w1-read.c: read w1 eeprom from user space · ae81022b
      Alessandro Rubini authored
      This reads to stdout, in binary format. With "-v" it prints text and
      scans the bus too. The examples here below use the same card (and same
      data) as in commit "d44ace7e
      
       w1: complete eeprom low-level support".
      
         spusa.root# ./tools/wrpc-w1-read -b 2 0 5 | od -t u1 -Ax -w1
         000000  40
         000001  41
         000002  42
         000003 243
         000004 244
      
         spusa.root# ./tools/wrpc-w1-read -v -b 2 30 6
         ./ohwr/wrpc-sw/tools/wrpc-w1-read: found device 10dc:018d: 0000:02:00.0
         ./ohwr/wrpc-sw/tools/wrpc-w1-read: found device 10dc:018d: 0000:04:00.0
         device 0: 68000801dce56910
         device 1: 5b0000036c567628
         device 2: f70000001eda8242
         device 3: 5f00000040e50143
         Reading device on bus 2: offset 30 (0x1e), len 6
         offset   30 (0x01e):  11 (0x0b)
         offset   31 (0x01f):  22 (0x16)
         offset   32 (0x020):  33 (0x21)
         offset   33 (0x021):  44 (0x2c)
         offset   34 (0x022):  55 (0x37)
         offset   35 (0x023):  66 (0x42)
      
      Signed-off-by: default avatarAlessandro Rubini <rubini@gnudd.com>
      ae81022b
  9. Apr 09, 2013
  10. Apr 04, 2013
  11. Apr 03, 2013
  12. Mar 05, 2013
  13. Oct 05, 2012
    • Alessandro Rubini's avatar
      Remove all spaces at end-of-line · 1d24ecfb
      Alessandro Rubini authored
      If you find this patch with "git blame" please use "git blame -w"
      to have all white-space ignored while associating lines to commits.
      
      This commit has no practical effect but cleanup. I made it
      with sed like this:
      
        git grep -l '[ \t]$' | xargs sed -i 's/[ \t]*$//'
      
      However, I had to manually restore doc/wrpc_mon.png after the fact.
      Similarly, I restored the include/hw/*regs.h files, as they
      are (most likely) auto-generated.
      1d24ecfb
  14. Jun 28, 2012
  15. Jun 13, 2012
  16. Jan 18, 2012
  17. Nov 06, 2011
  18. Aug 22, 2011
  19. Apr 08, 2011