Skip to content

Commit aaf7c6c

Browse files
committed
Release version 1.0.0
Signed-off-by: Shahbaz Youssefi <[email protected]>
0 parents  commit aaf7c6c

File tree

356 files changed

+99508
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

356 files changed

+99508
-0
lines changed

.gitignore

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# build files
2+
*.o
3+
*.cmd
4+
*.mod.c
5+
*.ko
6+
*.a
7+
*.so
8+
*.so.*
9+
modules.order
10+
Module.symvers
11+
.tmp_versions
12+
13+
# executables
14+
docthis
15+
increase_build
16+
calibrate
17+
regionalize
18+
visualize
19+
kconfig/mconf
20+
kconfig/qconf
21+
kconfig/gconf
22+
kconfig/lxdialog/lxdialog
23+
initialize
24+
generate
25+
motion_detect
26+
user-side-lib/tools/test
27+
load_*
28+
user-side-lib/services/test/test_*
29+
30+
# temp files
31+
*.swp
32+
33+
# autogenerated files
34+
cache/
35+
generated/
36+
kernel-module/skink_config.h
37+
user-side-lib/skin_config.h
38+
kernel-module/skink_version.h
39+
user-side-lib/skin_version.h
40+
Makefile.config.old
41+
kconfig/lex.zconf.c
42+
kconfig/zconf.tab.c
43+
kconfig/.ncurses
44+
45+
# user files
46+
Makefile.config
47+
blacklist
48+
49+
# output
50+
*.log
51+
*.out
52+
*.cache
53+
54+
# Python related
55+
user-side-lib/pyskin/build
56+
user-side-lib/pyskin/service/test
57+
58+
# ROS related
59+
.rosinstall
60+
.rosinstall.bak
61+
setup.*
62+
!setup.py
63+
user-side-lib/rosskin/rosskin/src/rosskin
64+
user-side-lib/rosskin/rosskin/bin
65+
user-side-lib/rosskin/rosskin/build
66+
user-side-lib/rosskin/rosskin/lib
67+
user-side-lib/rosskin/rosskin/srv_gen
68+
user-side-lib/rosskin/rosskin/msg_gen
69+
extra.cmake
70+
config.cmake

COPYING

+339
Large diffs are not rendered by default.

INSTALL

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
Building and Installation of Skinware
2+
=====================================
3+
4+
0. Overview
5+
-----------
6+
7+
See README for prerequisites of building Skinware. Then proceed with
8+
configuration, build and installation of Skinware as instructed in this file.
9+
See section 3 (Usage) of README for instructions on how Skinware should be set
10+
up and how it can be used.
11+
12+
Table of contents:
13+
1) Configuration
14+
2) Build
15+
3) Installation
16+
17+
1. Configuration
18+
----------------
19+
20+
The configuration of Skinware is similar to that of the Linux kernel. You can
21+
configure Skinware with any of the following methods:
22+
23+
$ make oldconfig
24+
$ make config
25+
$ make menuconfig
26+
$ make gconfig
27+
$ make xconfig
28+
29+
Each option in the configuration has an associated help messages. The
30+
following are some of the most important options:
31+
32+
- Developer mode: If you are not a developer of Skinware, simply turn this
33+
option off.
34+
- General/Installation directory: Where Skinware will be installed.
35+
- General/RTAI configuration tool: Path to rtai-config of RTAI package.
36+
- General/Documentation: If you need to build the documentation yourself.
37+
- Modules/Drivers: Which drivers to build.
38+
39+
2. Build
40+
--------
41+
42+
After configuration, simply write
43+
44+
$ make
45+
46+
At this stage, there should be no error if all prerequisites have been
47+
installed. If there was an error, it means that you are missing some
48+
prerequisite, which you can double check with README. Unfortunately, I'm
49+
not yet proficient enough to write an autoconfig script (I would when I find
50+
the time), so for now, bare with me.
51+
52+
3. Installation
53+
---------------
54+
55+
As root, simply write
56+
57+
$ make install
58+
59+
to install Skinware at the configured location. A link to skin-config script
60+
will be made in `/usr/bin`, hopefully in your PATH so it can be accessed from
61+
anywhere.
62+
63+
If at any point you needed to uninstall Skinware, again as root, execute
64+
65+
$ make uninstall
66+
67+
which removes all installed files. If you have created any files in the
68+
installation directory, they will be left intact.

Makefile

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Targets:
2+
# all: makes the skin kernel, its drivers and services, skin library, its calibrator, regionalizer,
3+
# and visualizer and Skinware's general and developer documentations
4+
# kernel: makes only the skin kernel
5+
# drivers: makes the skin kernel and its drivers
6+
# services: makes the skin kernel and its services
7+
# library: makes the skin library, its calibrator and regionalizer
8+
# doc: makes Skinware's general documentation as well as developer documentation
9+
# install: installs the software
10+
# uninstall: uninstalls the software
11+
#
12+
# Note: all of these targets only build the parts that have been configured for build
13+
14+
NO_CONFIG_ERROR := $(subst \n ,\n,"You need to configure Skinware first.\nOptions are:\n\
15+
\tmake oldconfig\n\
16+
\tmake config\n\
17+
\tmake menuconfig (needs ncurses)\n\
18+
\tmake gconfig (needs GTK+ 2.0)\n\
19+
\tmake xconfig (needs QT)\n\n")
20+
21+
.PHONY: all
22+
all:
23+
@test -r Makefile.config || (printf $(NO_CONFIG_ERROR) && exit 1)
24+
@$(MAKE) --no-print-directory regenerate_on_reconfig
25+
@$(MAKE) --no-print-directory kernel-full library-full doc
26+
27+
.PHONY: regenerate_on_reconfig
28+
regenerate_on_reconfig: Makefile.common
29+
30+
Makefile.common: Makefile.config Makefile.generate
31+
@$(MAKE) --no-print-directory -f Makefile.generate all
32+
@touch Makefile.common
33+
34+
.PHONY: xconfig gconfig menuconfig mconfig config oldconfig
35+
xconfig gconfig menuconfig mconfig config oldconfig:
36+
@$(MAKE) --no-print-directory -C kconfig $@
37+
@$(MAKE) --no-print-directory -f Makefile.generate
38+
-@$(MAKE) --no-print-directory -C kernel-module clean # Make sure they rebuild Skinware after configuration is redone
39+
-@$(MAKE) --no-print-directory -C user-side-lib clean
40+
41+
.PHONY: kernel-full kernel drivers services
42+
kernel-full:
43+
@$(MAKE) --no-print-directory -C kernel-module
44+
kernel:
45+
@$(MAKE) --no-print-directory -C kernel-module module
46+
drivers:
47+
@$(MAKE) --no-print-directory -C kernel-module drivers
48+
services:
49+
@$(MAKE) --no-print-directory -C kernel-module services
50+
51+
.PHONY: library-full library
52+
library-full:
53+
@$(MAKE) --no-print-directory -C user-side-lib
54+
library:
55+
@$(MAKE) --no-print-directory -C user-side-lib library calibrator regionalizer
56+
57+
.PHONY: doc
58+
doc:
59+
@$(MAKE) --no-print-directory -C doc
60+
61+
.PHONY: install uninstall
62+
install uninstall:
63+
@$(MAKE) --no-print-directory -f Makefile.install $@
64+
65+
.PHONY: clean
66+
clean:
67+
-@$(MAKE) --no-print-directory -f Makefile.generate clean
68+
-@$(MAKE) --no-print-directory -C kernel-module clean
69+
-@$(MAKE) --no-print-directory -C user-side-lib clean
70+
# -@$(MAKE) --no-print-directory -C doc clean

Makefile.common

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# include Makefile.config or define IGNORE_BUILD_OPTIONS before including this Makefile
2+
3+
SHELL := /bin/bash
4+
5+
KERNEL_VERSION_MAJOR := 1
6+
KERNEL_VERSION_MINOR := 0
7+
KERNEL_VERSION_REVISION := 0
8+
KERNEL_VERSION := $(KERNEL_VERSION_MAJOR).$(KERNEL_VERSION_MINOR).$(KERNEL_VERSION_REVISION)
9+
10+
USER_VERSION_MAJOR := 1
11+
USER_VERSION_MINOR := 0
12+
USER_VERSION_REVISION := 0
13+
USER_VERSION := $(USER_VERSION_MAJOR).$(USER_VERSION_MINOR).$(USER_VERSION_REVISION)
14+
15+
# If IGNORE_BUILD_OPTIONS is defined, ignore this section. This is useful for having the other part of the file defined, while skipping this part
16+
ifndef IGNORE_BUILD_OPTIONS
17+
# If CONFIG_SKIN_RTAI_CONFIG_TOOL is not defined, then Makefile.config is not included
18+
ifdef CONFIG_SKIN_RTAI_CONFIG_TOOL
19+
ifneq ($(CONFIG_SKIN_ROSSKIN_LIB_ONLY), y)
20+
RTAI_HOME := $(shell $(CONFIG_SKIN_RTAI_CONFIG_TOOL) --prefix)
21+
KERNEL_EXTRA_CFLAGS += $(shell $(CONFIG_SKIN_RTAI_CONFIG_TOOL) --module-cflags)
22+
RTAI_MODULE_SYMBOLS := $(RTAI_HOME)/modules/Module.symvers
23+
USER_EXTRA_CFLAGS += $(shell $(CONFIG_SKIN_RTAI_CONFIG_TOOL) --lxrt-cflags)
24+
USER_EXTRA_CXXFLAGS += $(subst -Wstrict-prototypes,,$(shell $(CONFIG_SKIN_RTAI_CONFIG_TOOL) --lxrt-cflags))
25+
USER_EXTRA_LDFLAGS += $(shell $(CONFIG_SKIN_RTAI_CONFIG_TOOL) --lxrt-ldflags)
26+
endif
27+
endif
28+
ifeq ($(CONFIG_SKIN_DEBUG), y)
29+
KERNEL_EXTRA_CFLAGS += -O0 -g
30+
USER_EXTRA_CFLAGS += -O0 -g
31+
USER_EXTRA_CXXFLAGS += -O0 -g
32+
else
33+
KERNEL_EXTRA_CFLAGS += -O2 -DNDEBUG
34+
USER_EXTRA_CFLAGS += -O2 -DNDEBUG
35+
USER_EXTRA_CXXFLAGS += -O2 -DNDEBUG
36+
endif
37+
KERNEL_EXTRA_CFLAGS += -Wall
38+
USER_EXTRA_CFLAGS += -Wall
39+
USER_EXTRA_CXXFLAGS += -Wall
40+
LIB_SHARED_CFLAGS := -fPIC
41+
LIB_SHARED_CXXFLAGS := -fPIC
42+
LIB_SHARED_LDFLAGS := -shared -fPIC
43+
endif
44+
45+
# Disable colors if called from vim
46+
ifneq ($(VIMRUNTIME),)
47+
CONFIG_SKIN_COLOR_BUILD =
48+
endif
49+
50+
PRINTF := printf --
51+
ifeq ($(CONFIG_SKIN_COLOR_BUILD), y)
52+
# colors when used with sed
53+
STATUS_COLOR_ := \x1b[1;33m
54+
SUB_STATUS_COLOR_ := \x1b[1;36m
55+
DEFAULT_COLOR_ := \x1b[m
56+
ERROR_COLOR_ := \x1b[1;31m
57+
WARNING_COLOR_ := \x1b[1;35m
58+
# colors when used with printf
59+
STATUS_COLOR := \$(STATUS_COLOR_)
60+
SUB_STATUS_COLOR := \$(SUB_STATUS_COLOR_)
61+
DEFAULT_COLOR := \$(DEFAULT_COLOR_)
62+
ERROR_COLOR := \$(ERROR_COLOR_)
63+
WARNING_COLOR := \$(WARNING_COLOR_)
64+
HIGHLIGHT := 2>&1 | sed -e '/\<error\>/Is%.*%$(ERROR_COLOR_)&$(DEFAULT_COLOR_)%g' -e '/\<warning\>/Is%.*%$(WARNING_COLOR_)&$(DEFAULT_COLOR_)%g' ; exit $${PIPESTATUS[0]}
65+
else
66+
STATUS_COLOR :=
67+
SUB_STATUS_COLOR :=
68+
DEFAULT_COLOR :=
69+
ERROR_COLOR :=
70+
WARNING_COLOR :=
71+
HIGHLIGHT :=
72+
endif
73+
74+
RM := rm -f
75+
MKDIR := mkdir
76+
CC := gcc
77+
CXX := g++
78+
LD := g++
79+
# for static lib:
80+
AR := ar rcs
81+
# for shared lib:
82+
SHARED_LD := gcc

Makefile.generate

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
include Makefile.config
2+
include Makefile.common
3+
4+
.PHONY: all
5+
all: config_headers version_headers cmake_files
6+
7+
SKIN_TOP := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
8+
9+
ifeq ($(CONFIG_SKIN_LARGE), y)
10+
LARGE_SKIN = 1
11+
else
12+
LARGE_SKIN = 0
13+
endif
14+
15+
ifeq ($(CONFIG_SKIN_DEBUG), y)
16+
DEBUG = 1
17+
else
18+
DEBUG = 0
19+
endif
20+
21+
.PHONY: config_headers
22+
config_headers:
23+
@sed -e 's;@SKINK_TICK_PERIOD@;$(CONFIG_SKIN_KERNEL_TICK_PERIOD);g' \
24+
-e 's;@SKINK_ACQ_PRIORITY@;$(CONFIG_SKIN_KERNEL_ACQ_PRIORITY);g' \
25+
-e 's;@SKINK_SERVICE_ACQ_PRIORITY@;$(CONFIG_SKIN_SERVICE_ACQ_PRIORITY);g' \
26+
-e 's;@SKINK_SERVICE_KERNEL_PRIORITY@;$(CONFIG_SKIN_SERVICE_KERNEL_PRIORITY);g' \
27+
-e 's;@SKINK_DEVICE_MAX_DEVICES@;$(CONFIG_SKIN_DEVICE_MAX_DEVICES);g' \
28+
-e 's;@SKINK_SERVICE_MAX_SERVICES@;$(CONFIG_SKIN_SERVICE_MAX_SERVICES);g' \
29+
-e 's;@SKINK_TASK_STACK_SIZE@;$(CONFIG_SKIN_TASK_STACK_SIZE);g' \
30+
-e 's;@SKINK_THREAD_MAX_DELAY@;$(CONFIG_SKIN_THREAD_MAX_DELAY);g' \
31+
-e 's;@SKINK_MAX_BUFFERS@;$(CONFIG_SKIN_KERNEL_MAX_BUFFERS);g' \
32+
-e 's;@SKINK_MAX_LAYERS@;$(CONFIG_SKIN_KERNEL_MAX_LAYERS);g' \
33+
-e 's;@SKINK_MAX_NAME_LENGTH@;$(CONFIG_SKIN_KERNEL_MAX_NAME_LENGTH);g' \
34+
-e 's;@SKINK_LARGE_SKIN@;$(LARGE_SKIN);g' \
35+
-e 's;@SKINK_DEBUG@;$(DEBUG);g' \
36+
< templates/skink_config.h > kernel-module/skink_config.h
37+
@sed -e 's;@SKIN_USER_ACQ_PRIORITY@;$(CONFIG_SKIN_USER_ACQ_PRIORITY);g' \
38+
-e 's;@SKIN_SERVICE_USER_PRIORITY@;$(CONFIG_SKIN_SERVICE_USER_PRIORITY);g' \
39+
-e 's;@SKIN_SERVICE_MAX_SERVICES@;$(CONFIG_SKIN_SERVICE_MAX_SERVICES);g' \
40+
-e 's;@SKIN_THREAD_MAX_DELAY@;$(CONFIG_SKIN_THREAD_MAX_DELAY);g' \
41+
-e 's;@SKIN_TASK_STACK_SIZE@;$(CONFIG_SKIN_TASK_STACK_SIZE);g' \
42+
-e 's;@SKIN_DEBUG@;$(DEBUG);g' \
43+
< templates/skin_config.h > user-side-lib/skin_config.h
44+
45+
KERNEL_VERSION_BUILD := $(shell wc -l kernel-module/build.txt 2>&1 | cut -d " " -f 1)
46+
USER_VERSION_BUILD := $(shell wc -l user-side-lib/build.txt 2>&1 | cut -d " " -f 1)
47+
48+
.PHONY: version_headers
49+
version_headers:
50+
@sed -e 's;@SKINK_VERSION_MAJOR@;$(KERNEL_VERSION_MAJOR);g' \
51+
-e 's;@SKINK_VERSION_MINOR@;$(KERNEL_VERSION_MINOR);g' \
52+
-e 's;@SKINK_VERSION_REVISION@;$(KERNEL_VERSION_REVISION);g' \
53+
-e 's;@SKINK_VERSION_BUILD@;$(KERNEL_VERSION_BUILD);g' \
54+
< templates/skink_version.h > kernel-module/skink_version.h
55+
@sed -e 's;@SKIN_VERSION_MAJOR@;$(USER_VERSION_MAJOR);g' \
56+
-e 's;@SKIN_VERSION_MINOR@;$(USER_VERSION_MINOR);g' \
57+
-e 's;@SKIN_VERSION_REVISION@;$(USER_VERSION_REVISION);g' \
58+
-e 's;@SKIN_VERSION_BUILD@;$(USER_VERSION_BUILD);g' \
59+
< templates/skin_version.h > user-side-lib/skin_version.h
60+
61+
ifeq ($(CONFIG_SKIN_ROSSKIN_LIB_ONLY), y)
62+
ROSSKIN_LIB_ONLY := true
63+
else
64+
ROSSKIN_LIB_ONLY := false
65+
endif
66+
67+
.PHONY: cmake_files
68+
cmake_files:
69+
ifeq ($(CONFIG_SKIN_ROSSKIN), y)
70+
@sed -e 's;@ROSSKIN_LIB_ONLY@;$(ROSSKIN_LIB_ONLY);g' \
71+
-e 's;@SKIN_TOP@;$(SKIN_TOP);g' \
72+
< templates/rosskin_config.cmake > user-side-lib/rosskin/rosskin/config.cmake
73+
@sed -e 's;@USER_EXTRA_CXXFLAGS@;$(USER_EXTRA_CXXFLAGS);g' \
74+
< templates/rosskin_extra.cmake > user-side-lib/rosskin/rosskin/extra.cmake
75+
endif
76+
77+
.PHONY: clean
78+
-$(RM) kernel-module/skink_config.h user-side-lib/skin_config.h
79+
-$(RM) kernel-module/skink_version.h user-side-lib/skin_version.h
80+
-$(RM) user-side-lib/rosskin/rosskin/config.cmake user-side-lib/rosskin/rosskin/extra.cmake

0 commit comments

Comments
 (0)