• 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: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
    d52fdb87
Makefile 890 Bytes