Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Software for White Rabbit PTP Core
Commits
49d5fe99
Commit
49d5fe99
authored
Oct 13, 2015
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'pfilter-cleanup'
parents
fc7febc7
808ffdd2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
501 additions
and
261 deletions
+501
-261
Makefile
Makefile
+16
-5
dev.mk
dev/dev.mk
+14
-0
ep_pfilter.c
dev/ep_pfilter.c
+67
-253
.gitignore
tools/.gitignore
+1
-0
Makefile
tools/Makefile
+1
-0
genramvhd.c
tools/genramvhd.c
+6
-3
pfilter-builder.c
tools/pfilter-builder.c
+396
-0
No files found.
Makefile
View file @
49d5fe99
...
...
@@ -14,6 +14,7 @@ SIZE = $(CROSS_COMPILE)size
AUTOCONF
=
$(CURDIR)
/include/generated/autoconf.h
PPSI
=
ppsi
PPSI_CONFIG
=
ppsi/include/generated/autoconf.h
# we miss CONFIG_ARCH_LM32 as we have no other archs by now
obj-y
=
arch
/lm32/crt0.o
arch
/lm32/irq.o
...
...
@@ -55,6 +56,14 @@ CFLAGS_PLATFORM = -mmultiply-enabled -mbarrel-shift-enabled
LDFLAGS_PLATFORM
=
-mmultiply-enabled
-mbarrel-shift-enabled
\
-nostdlib
-T
$
(
LDS-y
)
# packet-filter rules depend on configuration; default is rules-plain
pfilter-y
:=
rules-plain.bin
pfilter-$(CONFIG_ETHERBONE)
:
= rules-ebone.bin
pfilter-$(CONFIG_NIC_PFILTER)
:
= rules-e+nic.bin
export
pfilter-y
all
:
include
shell/shell.mk
include
lib/lib.mk
include
pp_printf/printf.mk
...
...
@@ -73,6 +82,7 @@ obj-y += check-error.o
# add system check functions like stack overflow and check reset
obj-y
+=
system_checks.o
# WR node has SDB support, WR switch does not
obj-$(CONFIG_WR_NODE)
+=
sdb-lib/libsdbfs.a
cflags-$(CONFIG_WR_NODE)
+=
-Isdb-lib
...
...
@@ -138,22 +148,23 @@ config.o: .config
./tools/genraminit
$*
.bin 0
>
$@
%.vhd
:
tools %.bin
./tools/genramvhd
-s
`
.
./.config
;
echo
$$
CONFIG_RAMSIZE
`
$*
.bin
>
$@
./tools/genramvhd
-s
$(CONFIG_RAMSIZE)
$*
.bin
>
$@
%.mif
:
tools %.bin
./tools/genrammif
$*
.bin
`
.
./.config
;
echo
$$
CONFIG_RAMSIZE
`
>
$@
./tools/genrammif
$*
.bin
$(CONFIG_RAMSIZE)
>
$@
$(AUTOCONF)
:
silentoldconfig
clean
:
rm
-f
$(OBJS)
$(OUTPUT)
.elf
$(OUTPUT)
.bin
$(OUTPUT)
.ram
\
$(LDS)
.depend
$(LDS)
rules-
*
.bin
.depend
$(MAKE)
-C
$(PPSI)
clean
$(MAKE)
-C
sdb-lib clean
$(MAKE)
-C
tools clean
%.o
:
%.c
${
CC
}
$(CFLAGS)
$(PTPD_CFLAGS)
$(INCLUDE_DIR)
$(LIB_DIR)
-c
$*
.c
-o
$@
${
CC
}
$(CFLAGS)
$(PTPD_CFLAGS)
$(INCLUDE_DIR)
$(LIB_DIR)
\
-include
$(PPSI_CONFIG)
-c
$*
.c
-o
$@
tools
:
$(MAKE)
-C
tools
...
...
@@ -186,4 +197,4 @@ defconfig:
.depend
:
$(wildcard *.c [^pt]/*.c)
$(CC)
$(CFLAGS)
-DSDBFS_BIG_ENDIAN
-MM
$^
>
$@
-include
.depend
\ No newline at end of file
-include
.depend
dev/dev.mk
View file @
49d5fe99
obj-$(CONFIG_WR_NODE) += \
dev/endpoint.o \
dev/ep_pfilter.o \
dev/pfilter-rules.o \
dev/i2c.o \
dev/minic.o \
dev/pps_gen.o \
...
...
@@ -19,3 +20,16 @@ obj-$(CONFIG_W1) += dev/w1.o dev/w1-hw.o dev/w1-shell.o
obj-$(CONFIG_W1) += dev/w1-temp.o dev/w1-eeprom.o
obj-$(CONFIG_UART) += dev/uart.o
obj-$(CONFIG_UART_SW) += dev/uart-sw.o
# Filter rules are selected according to configuration, see toplevel Makefile,
# but the filename is reflected in symbol names, so use a symlink here.
dev/pfilter-rules.o: $(pfilter-y)
ln -sf $(pfilter-y) rules-pfilter.bin
$(OBJCOPY) -I binary -O elf32-lm32 -B lm32 rules-pfilter.bin $@
$(pfilter-y): tools/pfilter-builder
$^
tools/pfilter-builder:
$(MAKE) -C tools pfilter-builder
dev/ep_pfilter.c
View file @
49d5fe99
This diff is collapsed.
Click to expand it.
tools/.gitignore
View file @
49d5fe99
...
...
@@ -8,3 +8,4 @@ eb-w1-write
sdb-wrpc.bin
flash-read
flash-write
pfilter-builder
tools/Makefile
View file @
49d5fe99
...
...
@@ -5,6 +5,7 @@ CFLAGS = -Wall -ggdb -I../include
LDFLAGS
=
-lutil
ALL
=
genraminit genramvhd genrammif wrpc-uart-sw
ALL
+=
wrpc-w1-read wrpc-w1-write
ALL
+=
pfilter-builder
ifneq
($(EB),no)
ALL
+=
eb-w1-write
...
...
tools/genramvhd.c
View file @
49d5fe99
...
...
@@ -42,12 +42,12 @@ void help()
}
/* We don't want localized versions from ctype.h */
inline
int
my_isalpha
(
char
c
)
static
int
my_isalpha
(
char
c
)
{
return
(
c
>=
'a'
&&
c
<=
'z'
)
||
(
c
>=
'A'
&&
c
<=
'Z'
);
}
inline
int
my_isok
(
char
c
)
static
int
my_isok
(
char
c
)
{
return
c
==
'_'
||
my_isalpha
(
c
)
||
(
c
>=
'0'
&&
c
<=
'9'
);
}
...
...
@@ -124,9 +124,12 @@ int main(int argc, char **argv)
fprintf
(
stderr
,
"%s: expecting one non-optional argument: <filename>
\n
"
,
program
);
return
1
;
error
=
1
;
}
if
(
error
)
return
1
;
filename
=
argv
[
optind
];
/* Confirm the filename exists */
...
...
tools/pfilter-builder.c
0 → 100644
View file @
49d5fe99
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment