Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
Mock Turtle
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Mock Turtle
Commits
2bd5bcf7
Commit
2bd5bcf7
authored
May 06, 2019
by
Federico Vaga
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release/v4.0.0.beta8'
parents
627415b0
3f2b0516
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
134 additions
and
47 deletions
+134
-47
Makefile
distribution/Makefile
+25
-13
mockturtle-lib-static.spec
distribution/mockturtle-lib-static.spec
+37
-0
mockturtle-lib.spec
distribution/mockturtle-lib.spec
+38
-0
Makefile
software/Makefile
+2
-2
mockturtle-rt.h
software/firmware/lib/mockturtle-rt.h
+4
-4
.gitignore
software/include/mockturtle/hw/.gitignore
+0
-0
Makefile
software/include/mockturtle/hw/Makefile
+1
-1
mockturtle_addresses.h
software/include/mockturtle/hw/mockturtle_addresses.h
+0
-0
mockturtle_endpoint.h
software/include/mockturtle/hw/mockturtle_endpoint.h
+0
-0
mockturtle_queue.h
software/include/mockturtle/hw/mockturtle_queue.h
+0
-0
libmockturtle.h
software/include/mockturtle/libmockturtle.h
+1
-1
mockturtle.h
software/include/mockturtle/mockturtle.h
+0
-0
Makefile
software/kernel/Makefile
+1
-1
mockturtle-core.c
software/kernel/mockturtle-core.c
+2
-2
mockturtle-cpu.c
software/kernel/mockturtle-cpu.c
+1
-1
mockturtle-dbg.c
software/kernel/mockturtle-dbg.c
+1
-1
mockturtle-drv.h
software/kernel/mockturtle-drv.h
+3
-3
mockturtle-hmq.c
software/kernel/mockturtle-hmq.c
+2
-2
mockturtle-tty.c
software/kernel/mockturtle-tty.c
+1
-1
Makefile
software/lib/Makefile
+2
-2
libmockturtle-internal.h
software/lib/libmockturtle-internal.h
+1
-1
Makefile
software/tools/Makefile
+1
-1
lsmockturtle.c
software/tools/lsmockturtle.c
+1
-1
mockturtle-buffer.c
software/tools/mockturtle-buffer.c
+1
-1
mockturtle-count.c
software/tools/mockturtle-count.c
+1
-1
mockturtle-cpu-restart.c
software/tools/mockturtle-cpu-restart.c
+1
-1
mockturtle-gdbserver.c
software/tools/mockturtle-gdbserver.c
+1
-1
mockturtle-loader.c
software/tools/mockturtle-loader.c
+1
-1
mockturtle-messages.c
software/tools/mockturtle-messages.c
+1
-1
mockturtle-ping.c
software/tools/mockturtle-ping.c
+1
-1
mockturtle-smem.c
software/tools/mockturtle-smem.c
+1
-1
mockturtle-variable.c
software/tools/mockturtle-variable.c
+1
-1
libproject.c
.../trtl-project-creator/templates/software/lib/libproject.c
+1
-1
No files found.
distribution/Makefile
View file @
2bd5bcf7
...
...
@@ -7,7 +7,6 @@ DIR_NAME := $(DRIVER_NAME)-$(VERSION)
KEEP_TEMP
?=
n
BUILD
?=
$
(
abspath build
)
BUILD_DKMS
:=
$(BUILD)
/dkms
BUILD_TOOLS
:=
$(BUILD)
/tools
BUILD_DKMSSOURCE
:=
$(BUILD_DKMS)
/source
BUILD_DKMSTREE
:=
$(BUILD_DKMS)
/tree
...
...
@@ -17,11 +16,11 @@ SRC += $(TOP_DIR)/Makefile
DKMS_OPT
:=
--dkmstree
$(BUILD_DKMSTREE)
-m
$(DRIVER_NAME)
/
$(VERSION)
all
:
kernel
tools
all
:
kernel
userspace
kernel
:
dkms-tar dkms-rpm
tools
:
tools
-rpm
userspace
:
userspace
-rpm
clean
:
@
rm
-rf
$(BUILD)
...
...
@@ -62,18 +61,31 @@ dkms-tar: dkms-add
dkms-rpm
:
dkms-add
@
dkms mkrpm
$(DKMS_OPT)
--source-only
# Build Binary RPM package for
tool
s
tools
-dir
:
build-dir
@
mkdir
-p
$(BUILD
_TOOLS
)
/
{
BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS
}
# Build Binary RPM package for
librarie
s
userspace
-dir
:
build-dir
@
mkdir
-p
$(BUILD)
/
{
BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS
}
tools-spec
:
mockturtle-tools.spec tools-dir
@
cp
$<
$(BUILD_TOOLS)
/SPECS
userspace-spec
:
mockturtle-tools.spec mockturtle-lib.spec mockturtle-lib-static.spec userspace-dir
@
cp
mockturtle-tools.spec
$(BUILD)
/SPECS
@
cp
mockturtle-lib.spec
$(BUILD)
/SPECS
@
cp
mockturtle-lib-static.spec
$(BUILD)
/SPECS
tools-tar
:
tools-spec
spectool
-g
-C
$(BUILD_TOOLS)
/SOURCES
--define
"gittag
$(VERSION)
"
$(BUILD_TOOLS)
/SPECS/mockturtle-tools.spec
userspace-tar
:
userspace-spec
spectool
-g
-C
$(BUILD)
/SOURCES
--define
"gittag
$(VERSION)
"
$(BUILD)
/SPECS/mockturtle-tools.spec
spectool
-g
-C
$(BUILD)
/SOURCES
--define
"gittag
$(VERSION)
"
$(BUILD)
/SPECS/mockturtle-lib.spec
spectool
-g
-C
$(BUILD)
/SOURCES
--define
"gittag
$(VERSION)
"
$(BUILD)
/SPECS/mockturtle-lib-static.spec
tools-rpm
:
tools-tar
rpmbuild
-vv
--define
"%_topdir
$(BUILD_TOOLS)
"
--define
"arch
$(
shell
uname -p
)
"
--define
"gittag
$(VERSION)
"
-ba
$(BUILD_TOOLS)
/SPECS/mockturtle-tools.spec
RPMBUILD_DEFINE
:=
--define
"%_topdir
$(BUILD)
"
--define
"arch
$(
shell
uname -p
)
"
--define
"gittag
$(VERSION)
"
userspace-rpm
:
tools-rpm lib-static-rpm lib-rpm
.PHONY
:
dkmstree dkms-add kernel-dkms-tar tools-dir tools-spec tools-tar tools-rpm
tools-rpm
:
userspace-tar
rpmbuild
-vv
$(RPMBUILD_DEFINE)
-ba
$(BUILD)
/SPECS/mockturtle-tools.spec
lib-static-rpm
:
userspace-tar
rpmbuild
-vv
$(RPMBUILD_DEFINE)
-ba
$(BUILD)
/SPECS/mockturtle-lib-static.spec
lib-rpm
:
userspace-tar
rpmbuild
-vv
$(RPMBUILD_DEFINE)
-ba
$(BUILD)
/SPECS/mockturtle-lib.spec
.PHONY
:
dkmstree dkms-add kernel-dkms-tar userspace-dir userspace-spec userspace-tar userspace-rpm tools-rpm lib-static-rpm lib-rpm
distribution/mockturtle-lib-static.spec
0 → 100644
View file @
2bd5bcf7
%{?!gittag: %{error: You did not specify a version}}
%{?!arch: %{error: You did not specify an architecture}}
%global project_name mock-turtle
Summary: Static library to access Mock Turtle
Name: mockturtle-lib-static
Version: %{gittag}
License: GPL-3.0-or-later
Release: 1%{?dist}
Group: Applications/System
URL: https://ohwr.org/project/%{name}
BuildArch: %{arch}
Requires: mockturtle-driver
Source0: https://ohwr.org/project/%{project_name}/-/archive/%{gittag}/%{project_name}-%{gittag}.tar.bz2
%description
This package the Mock Turtle static library to access Mock Turtle instances on FPGA
%prep
%autosetup -n %{project_name}-%{gittag}
%build
make -C software/lib EXTRACFLAGS="$RPM_OPT_FLAGS"
%install
make -C software/lib DESTLIBDIR=%{buildroot}/%{_libdir}/ install
rm -f %{buildroot}/%{_libdir}/*.so*
%files
%license LICENSES/GPL-3.0-or-later.txt
%{_libdir}/libmockturtle.a
%changelog
# Nothing for the time being
distribution/mockturtle-lib.spec
0 → 100644
View file @
2bd5bcf7
%{?!gittag: %{error: You did not specify a version}}
%{?!arch: %{error: You did not specify an architecture}}
%global project_name mock-turtle
Summary: Library to access Mock Turtle
Name: mockturtle-lib
Version: %{gittag}
License: GPL-3.0-or-later
Release: 1%{?dist}
Group: Applications/System
URL: https://ohwr.org/project/%{name}
BuildArch: %{arch}
Requires: mockturtle-driver
Source0: https://ohwr.org/project/%{project_name}/-/archive/%{gittag}/%{project_name}-%{gittag}.tar.bz2
%description
This package the Mock Turtle library to access Mock Turtle instances on FPGA
%prep
%autosetup -n %{project_name}-%{gittag}
%build
make -C software/lib EXTRACFLAGS="$RPM_OPT_FLAGS"
%install
make -C software/lib DESTLIBDIR=%{buildroot}/%{_libdir}/ install
rm -f %{buildroot}/%{_libdir}/*.a
%files
%license LICENSES/GPL-3.0-or-later.txt
%{_libdir}/libmockturtle.so
%{_libdir}/libmockturtle.so.*
%changelog
# Nothing for the time being
software/Makefile
View file @
2bd5bcf7
...
...
@@ -5,11 +5,11 @@ CURDIR:=$(shell /bin/pwd)
REPO_PARENT
?=
$(CURDIR)
/..
-include
$(REPO_PARENT)/parent_common.mk
DIRS
=
kernel lib tools include/hw
DIRS
=
kernel lib tools include/
mockturtle/
hw
all clean modules install modules_install
:
$(DIRS)
headers
:
include/hw
headers
:
include/
mockturtle/
hw
kernel lib
:
headers
tools
:
lib
...
...
software/firmware/lib/mockturtle-rt.h
View file @
2bd5bcf7
...
...
@@ -16,10 +16,10 @@
#include <stdarg.h>
#include <generated/autoconf.h>
#include
<
hw/mockturtle_addresses.h>
#include
<
hw/mockturtle_queue.h>
#include
<
hw/mockturtle_endpoint.h>
#include
<
hw/mockturtle_cpu_lr.h>
#include
mockturtle/
hw/mockturtle_addresses.h>
#include
mockturtle/
hw/mockturtle_queue.h>
#include
mockturtle/
hw/mockturtle_endpoint.h>
#include
mockturtle/
hw/mockturtle_cpu_lr.h>
#include <urv/riscv.h>
...
...
software/include/hw/.gitignore
→
software/include/
mockturtle/
hw/.gitignore
View file @
2bd5bcf7
File moved
software/include/hw/Makefile
→
software/include/
mockturtle/
hw/Makefile
View file @
2bd5bcf7
HEADERS
:=
mockturtle_cpu_csr.h
HEADERS
+=
mockturtle_cpu_lr.h
TRTL
?=
../../..
TRTL
?=
../../..
/..
TRTL_HDL
=
$(TRTL)
/hdl/rtl/
WBGEN2
?=
wbgen2
...
...
software/include/hw/mockturtle_addresses.h
→
software/include/
mockturtle/
hw/mockturtle_addresses.h
View file @
2bd5bcf7
File moved
software/include/hw/mockturtle_endpoint.h
→
software/include/
mockturtle/
hw/mockturtle_endpoint.h
View file @
2bd5bcf7
File moved
software/include/hw/mockturtle_queue.h
→
software/include/
mockturtle/
hw/mockturtle_queue.h
View file @
2bd5bcf7
File moved
software/
lib
/libmockturtle.h
→
software/
include/mockturtle
/libmockturtle.h
View file @
2bd5bcf7
...
...
@@ -19,7 +19,7 @@ extern "C" {
#include <stdint.h>
#include <stdio.h>
#include <poll.h>
#include "mockturtle.h"
#include "mockturtle
/mockturtle
.h"
extern
const
unsigned
int
trtl_default_timeout_ms
;
...
...
software/include/mockturtle.h
→
software/include/mockturtle
/mockturtle
.h
View file @
2bd5bcf7
File moved
software/kernel/Makefile
View file @
2bd5bcf7
...
...
@@ -36,7 +36,7 @@ all modules: hw_header
hw_header
:
ifeq
($(DKMS),
0)
$(MAKE)
-C
../include/hw/
$(MAKE)
-C
../include/
mockturtle/
hw/
endif
install modules_install
:
...
...
software/kernel/mockturtle-core.c
View file @
2bd5bcf7
...
...
@@ -26,8 +26,8 @@
#include <linux/tty.h>
#include <linux/platform_device.h>
#include <hw/mockturtle_cpu_csr.h>
#include <hw/mockturtle_queue.h>
#include <
mockturtle/
hw/mockturtle_cpu_csr.h>
#include <
mockturtle/
hw/mockturtle_queue.h>
#include "mockturtle-drv.h"
#include "mockturtle-compat.h"
...
...
software/kernel/mockturtle-cpu.c
View file @
2bd5bcf7
...
...
@@ -14,7 +14,7 @@
#include <linux/uaccess.h>
#include <linux/wait.h>
#include <hw/mockturtle_cpu_csr.h>
#include <
mockturtle/
hw/mockturtle_cpu_csr.h>
#include "mockturtle-drv.h"
...
...
software/kernel/mockturtle-dbg.c
View file @
2bd5bcf7
...
...
@@ -10,7 +10,7 @@
#include <linux/seq_file.h>
#include <linux/mm.h>
#include <hw/mockturtle_cpu_csr.h>
#include <
mockturtle/
hw/mockturtle_cpu_csr.h>
#include "mockturtle-drv.h"
#include "mockturtle-compat.h"
...
...
software/kernel/mockturtle-drv.h
View file @
2bd5bcf7
...
...
@@ -13,9 +13,9 @@
#include <linux/circ_buf.h>
#include <linux/tty.h>
#include "hw/mockturtle_addresses.h"
#include "hw/mockturtle_queue.h"
#include "mockturtle.h"
#include "
mockturtle/
hw/mockturtle_addresses.h"
#include "
mockturtle/
hw/mockturtle_queue.h"
#include "mockturtle
/mockturtle
.h"
#define MAX_MQUEUE_SLOTS (TRTL_MAX_HMQ_SLOT / 2)
#define TRTL_MAX_CPU_MINORS (TRTL_MAX_CPU * TRTL_MAX_CARRIER)
...
...
software/kernel/mockturtle-hmq.c
View file @
2bd5bcf7
...
...
@@ -17,8 +17,8 @@
#include <linux/delay.h>
#include <linux/circ_buf.h>
#include <hw/mockturtle_queue.h>
#include <hw/mockturtle_cpu_csr.h>
#include <
mockturtle/
hw/mockturtle_queue.h>
#include <
mockturtle/
hw/mockturtle_cpu_csr.h>
#include "mockturtle-drv.h"
...
...
software/kernel/mockturtle-tty.c
View file @
2bd5bcf7
...
...
@@ -16,7 +16,7 @@
#include <linux/tty_flip.h>
#include <linux/kallsyms.h>
#include <hw/mockturtle_cpu_csr.h>
#include <
mockturtle/
hw/mockturtle_cpu_csr.h>
#include "mockturtle-drv.h"
...
...
software/lib/Makefile
View file @
2bd5bcf7
...
...
@@ -23,7 +23,7 @@ LOBJ := libmockturtle.o
LOBJ
+=
libmockturtle-rt-msg.o
CFLAGS
+=
-Wall
-Werror
-fPIC
CFLAGS
+=
-I
.
-I
$(TRTL_SW)
/include
CFLAGS
+=
-I
$(TRTL_SW)
/include
CFLAGS
+=
-DVERSION
=
"
\"
$(GIT_VERSION)
\"
"
CFLAGS
+=
$(EXTRACFLAGS)
ARFLAGS
=
rcv
...
...
@@ -41,7 +41,7 @@ $(LIBSV): $(LIB)
$(CC)
-shared
-o
$@
-Wl
,--whole-archive,-soname,
$@
$^
-Wl
,--no-whole-archive
$(LIBS)
:
$(LIBSV)
ln
-s
$@
$(
shell
echo
$@
|
grep
-o
-E
".*
\.
so"
)
ln
-s
f
$<
$@
clean
:
rm
-f
$(LIB)
$(LIBS)
$(LIBSV)
.depend
*
.o
*
~
...
...
software/lib/libmockturtle-internal.h
View file @
2bd5bcf7
...
...
@@ -7,7 +7,7 @@
#ifndef __LIBTRTL_INTERNAL_H__
#define __LIBTRTL_INTERNAL_H__
#include
"libmockturtle.h"
#include
<mockturtle/libmockturtle.h>
/**
* Maximum size for device name
...
...
software/tools/Makefile
View file @
2bd5bcf7
...
...
@@ -13,7 +13,7 @@ TRTL_SW = $(TRTL)/software
GIT_VERSION
:=
$(
shell
git describe
--dirty
--long
--tags
)
CFLAGS
+=
-Wall
-Werror
-I
$(TRTL_SW)
/lib
CFLAGS
+=
-Wall
-Werror
CFLAGS
+=
-I
$(TRTL_SW)
/include
CFLAGS
+=
$(EXTRACFLAGS)
LDFLAGS
+=
-L
$(TRTL_SW)
/lib
...
...
software/tools/lsmockturtle.c
View file @
2bd5bcf7
...
...
@@ -11,7 +11,7 @@
#include <stdlib.h>
#include <getopt.h>
#include <errno.h>
#include <libmockturtle.h>
#include <
mockturtle/
libmockturtle.h>
/**
...
...
software/tools/mockturtle-buffer.c
View file @
2bd5bcf7
...
...
@@ -19,7 +19,7 @@
#include <stdio.h>
#include <getopt.h>
#include <errno.h>
#include <libmockturtle.h>
#include <
mockturtle/
libmockturtle.h>
static
void
help
(
char
*
name
)
{
...
...
software/tools/mockturtle-count.c
View file @
2bd5bcf7
...
...
@@ -9,7 +9,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <libmockturtle.h>
#include <
mockturtle/
libmockturtle.h>
int
main
(
int
argc
,
char
*
argv
[])
{
...
...
software/tools/mockturtle-cpu-restart.c
View file @
2bd5bcf7
...
...
@@ -10,7 +10,7 @@
#include <stdlib.h>
#include <getopt.h>
#include <errno.h>
#include <libmockturtle.h>
#include <
mockturtle/
libmockturtle.h>
static
void
help
()
{
...
...
software/tools/mockturtle-gdbserver.c
View file @
2bd5bcf7
...
...
@@ -25,7 +25,7 @@
#include <assert.h>
#include <limits.h>
#include <hw/mockturtle_cpu_csr.h>
#include <
mockturtle/
hw/mockturtle_cpu_csr.h>
#define TRTL_DBG_PORT_SIZE pagesize
#define TRTL_GDB_PACKET_SIZE_MAX 2048
...
...
software/tools/mockturtle-loader.c
View file @
2bd5bcf7
...
...
@@ -9,7 +9,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <libmockturtle.h>
#include <
mockturtle/
libmockturtle.h>
#include <getopt.h>
...
...
software/tools/mockturtle-messages.c
View file @
2bd5bcf7
...
...
@@ -10,7 +10,7 @@
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <libmockturtle.h>
#include <
mockturtle/
libmockturtle.h>
#include <getopt.h>
#include <pthread.h>
#include <unistd.h>
...
...
software/tools/mockturtle-ping.c
View file @
2bd5bcf7
...
...
@@ -20,7 +20,7 @@
#include <stdlib.h>
#include <getopt.h>
#include <errno.h>
#include <libmockturtle.h>
#include <
mockturtle/
libmockturtle.h>
/**
...
...
software/tools/mockturtle-smem.c
View file @
2bd5bcf7
...
...
@@ -10,7 +10,7 @@
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <libmockturtle.h>
#include <
mockturtle/
libmockturtle.h>
#include <getopt.h>
#include <pthread.h>
#include <time.h>
...
...
software/tools/mockturtle-variable.c
View file @
2bd5bcf7
...
...
@@ -19,7 +19,7 @@
#include <stdio.h>
#include <getopt.h>
#include <errno.h>
#include <libmockturtle.h>
#include <
mockturtle/
libmockturtle.h>
static
void
help
(
char
*
name
)
{
...
...
software/tools/trtl-project-creator/templates/software/lib/libproject.c
View file @
2bd5bcf7
...
...
@@ -7,7 +7,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <libmockturtle.h>
#include <
mockturtle/
libmockturtle.h>
#include <lib{{short_name}}-internal.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