Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
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
White Rabbit Switch - Software
Commits
3bce6727
Commit
3bce6727
authored
Mar 19, 2012
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
on-switch-test: removed vestigial unused files
parent
78dd040d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
168 deletions
+0
-168
Makefile
on-switch-tests/Makefile
+0
-39
README
on-switch-tests/README
+0
-7
Makefile
on-switch-tests/libs/Makefile
+0
-48
compat.h
on-switch-tests/libs/compat.h
+0
-8
ptpd-wrappers.h
on-switch-tests/libs/ptpd-wrappers.h
+0
-66
No files found.
on-switch-tests/Makefile
deleted
100644 → 0
View file @
78dd040d
# This Makefile is based on wr-swithc-sw/userspace
# Most of the sub makefiles require some variables that used to be
# in the auto-generated ../Makedefs (when software was in svn).
# So let's add all of the needed variables here (environment can override)
LINUX
?=
$(WRDEV_DIR)
/software/rubi-repos/linux-wr
ARCH
?=
arm
CROSS_COMPILE
?=
$(CROSS_COMPILE_ARM_PATH)$(CROSS_COMPILE_ARM_PREFIX)
CROSS_COMPILE_ARM
?=
$(CROSS_COMPILE)
# Installation of all of this stuff goes to images/wr in the output dir
WR_INSTALL_ROOT
?=
$(WRS_OUTPUT_DIR)
/images/wr
WRDEV_DIR
?=
$(WRS_BASE_DIR)
/..
# test directories need libs, so add them here (libswitchhw is in ./userspace)
CFLAGS
=
-I
../libs
-I
../libs/libwripc
-I
../libs/libptpnetif
\
-I
../../userspace/libswitchhw
\
-I
../../userspace/wrsw_hal
LDFLAGS
=
-L
../libs
-lwripc
-lptpnetif
\
-L
../../userspace/libswitchhw
-lswitchhw
# all variables are exported
export
# All targets must install as well, as later builds use headers/libs
all
:
$(MAKE)
-C
libs all
$(MAKE)
-C
wr_mon all
clean
:
$(MAKE)
-C
libs clean
$(MAKE)
-C
wr_mon clean
install
:
all
$(MAKE)
-C
libs
install
$(MAKE)
-C
wr_mon
install
on-switch-tests/README
deleted
100644 → 0
View file @
78dd040d
This directory used to include tests that are meant to be run on the
switch itself. Now only rtu_test remains, even though it's not
included in the Makefile rules.
If you "make" here, only libwripc and wr_mon are compiled, but
wr_mon must be ported to V3.
on-switch-tests/libs/Makefile
deleted
100644 → 0
View file @
78dd040d
# Makefile based on ptp-noposix, whence libs have been lifted
# # Standard stanza for cross-compilation (courtesy of the linux makefile)
AS
=
$(CROSS_COMPILE)
as
LD
=
$(CROSS_COMPILE)
ld
CC
=
$(CROSS_COMPILE)
gcc
CPP
=
$(CC)
-E
AR
=
$(CROSS_COMPILE)
ar
NM
=
$(CROSS_COMPILE)
nm
STRIP
=
$(CROSS_COMPILE)
strip
OBJCOPY
=
$(CROSS_COMPILE)
objcopy
OBJDUMP
=
$(CROSS_COMPILE)
objdump
# Flags for standalone compilation
TOPDIR
=
$(
shell
/bin/pwd
)
CFLAGS
+=
-Wall
-ggdb
-I
$(TOPDIR)
/wrsw_hal
-I
$(TOPDIR)
/libwripc
\
-I
$(TOPDIR)
/libptpnetif
-I
$(TOPDIR)
/PTPWRd
-I
$(LINUX)
/include
\
-include
compat.h
-include
ptpd-wrappers.h
# These are lifted in the ptp.o temporary object file, for me to see the size
CORELIBS
=
libwripc.a libptpnetif.a
all libs
:
check $(CORELIBS)
# we only support cross-compilation (if you want force CROSS_COMPILE to " ")
# similarly, we need a kernel at this time
CHECKVARS
=
LINUX
check
:
@
for
n
in
$(CHECKVARS)
;
do
\
if
[
-z
"
$$
(eval echo
\$
$$$n
)"
]
;
then
\
echo
"Please set
$$
n"
>
& 2
;
exit
1
;
\
fi
\
done
libwripc.a
:
libwripc/wr_ipc.o libwripc/helper_arm.o
$(AR)
r
$@
$^
libptpnetif.a
:
libptpnetif/hal_client.o libptpnetif/ptpd_netif.o
$(AR)
r
$@
$^
# clean and so on.
clean
:
rm
-f
*
.a
*
/
*
.o
*
/dep/
*
.o
*
~
*
/
*
~
# even if there are files with these names, ignore them
.PHONY
:
all check libs clean
on-switch-tests/libs/compat.h
deleted
100644 → 0
View file @
78dd040d
/*
* This is included by the Makefile before everything else
*/
#ifndef SO_TIMESTAMPING
# define SO_TIMESTAMPING 37
# define SCM_TIMESTAMPING SO_TIMESTAMPING
#endif
on-switch-tests/libs/ptpd-wrappers.h
deleted
100644 → 0
View file @
78dd040d
/*
* This header is used to hide all posix functions that can be hidden
*/
#ifndef __PTPD_WRAPPERS_H__
#define __PTPD_WRAPPERS_H__
#if __STDC_HOSTED__
/*
* The compiler is _not_ freestanding: we need to include some headers that
* are not available in the freestanding compilation, so are missing from
* source files.
*/
#include <stdint.h>
#else
#include <inttypes.h>
/*
* This is a freestanding compilation, and we may miss some data
* structures. For example misses <stdint.h>. Most likely it's
* because it's an old compiler version, so the #if may be wrong here.
*/
/* Looks like we miss <stdint.h>. Let's assume we are 32 bits */
/*typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
typedef unsigned long long uint64_t;
typedef signed char int8_t;
typedef signed short int16_t;
typedef signed int int32_t;
typedef signed long long int64_t;
*/
/* Hmm... htons/htonl are missing. I made the Makefile check endianness */
#ifdef PTPD_MSBF
static
inline
uint16_t
htons
(
uint16_t
x
)
{
return
x
;}
static
inline
uint32_t
htonl
(
uint32_t
x
)
{
return
x
;}
static
inline
uint16_t
ntohs
(
uint16_t
x
)
{
return
x
;}
#else
static
inline
uint16_t
htons
(
uint16_t
x
)
{
return
(
x
<<
8
)
|
(
x
>>
8
);
}
static
inline
uint32_t
htonl
(
uint32_t
x
)
{
return
htons
(
x
>>
16
)
|
((
uint32_t
)(
htons
(
x
)
<<
16
));}
#endif
/* endian */
/* usleep is not there in zpu */
extern
int
usleep
(
unsigned
useconds
);
/* The exports are not used in freestanding environment */
static
inline
void
ptpd_init_exports
()
{}
static
inline
void
ptpd_handle_wripc
()
{}
#define PPS_WIDTH 1000000
#define printf(x, ...) mprintf(x, ##__VA_ARGS__)
#define fprintf(file, x, ...) mprintf(x, ##__VA_ARGS__)
#define sprintf(buf, ...) msprintf(buf, __VA_ARGS__)
//#define DBG(x, ...) mprintf(x, ##__VA_ARGS__)
int
usleep
(
unsigned
useconds
);
#endif
/* hosted */
#endif
/* __PTPD_WRAPPERS_H__ */
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