Skip to content

Commit

Permalink
add configure options support
Browse files Browse the repository at this point in the history
  • Loading branch information
jeonghanlee committed Aug 24, 2018
1 parent 1ccdf19 commit 76d9cbf
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 7 deletions.
22 changes: 17 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,26 @@ In order to download, install, setup all relevant components (system library, ke

Before the setup the etherlab master, one should define the network port which one would like to use as the EtherCAT Master. Please look at scripts/ethercatmaster.conf, and enable one and disable all others to match the device which one would like to use. With the following command, without changing git status, one can set the master device in the etherlab master configuration:

```
```sh
etherlabmaster (master)$ echo "ETHERCAT_MASTER0=eth0" > ethercatmaster.local
```
The local file will be used to override the ETHERCAT_MASTER0 variable defined in scripts/ethercatmaster.conf.

Be ready to do the following commands in the specific order:

One should check the compiling options ```E3_ETHERLAB_CONF_OPTIONS``` in configure/CONFIG_MODULE. The default options which ESS uses is

```
E3_ETHERLAB_CONF_OPTIONS = --disable-8139too --enable-generic --enable-sii-assign=yes --enable-eoe=no
```
The entire ```E3_ETHERLAB_CONF_OPTIONS``` can be override with the "git-ignored" file as folows:

```
echo "E3_ETHERLAB_CONF_OPTIONS = --disable-8139too --enable-generic" > configure/CONFIG_MODULE.local
```

Be ready to do the following commands in the specific order:

```sh
etherlabmaster (master)$ make init
etherlabmaster (master)$ make patch
etherlabmaster (master)$ make build
Expand All @@ -27,19 +39,19 @@ etherlabmaster (master)$ make install

Kernel modules are built via dkms

```
```sh
etherlabmaster (master)$ make dkms_add
etherlabmaster (master)$ make dkms_build
etherlabmaster (master)$ make dkms_install
etherlabmaster (master)$ make setup
```

One should start the ethercat via
```
```sh
etherlabmaster (master)$ sudo systemctl start ethercat
```
And one can check the master status as follows:
```
```sh
etherlabmaster (master)$ ethercat master
```

Expand Down
9 changes: 8 additions & 1 deletion configure/CONFIG_MODULE
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ EPICS_MODULE_TAG:=9e65f7

E3_ETHERLAB_INSTALL_LOCATION:=/opt/etherlab


#
E3_ETHERLAB_CONF_OPTIONS:=--disable-8139too
#
E3_ETHERLAB_CONF_OPTIONS+=--enable-generic
#
E3_ETHERLAB_CONF_OPTIONS+=--enable-sii-assign=yes
#
E3_ETHERLAB_CONF_OPTIONS+=--enable-eoe=no

#
# We set this version as 1.5.2 as ESS
Expand Down
2 changes: 2 additions & 0 deletions configure/E3/CONFIG_EXPORT
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ EXPORT_VARS+=SUDO


EXPORT_VARS+=$(filter %_DEP_VERSION,$(.VARIABLES))
EXPORT_VARS+=$(filter E3_%,$(.VARIABLES))

export_version=$(eval export $1)
$(eval $(foreach v,$(EXPORT_VARS),$(call export_version,$v)))

Expand Down
2 changes: 1 addition & 1 deletion etherlabmaster.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ autoconf:
touch ChangeLog
autoreconf --force --install -v
# ./configure --disable-8139too --prefix=$(E3_MODULES_VENDOR_LIBS_LOCATION)
./configure --disable-8139too --prefix=$(E3_ETHERLAB_INSTALL_LOCATION)
./configure $(E3_ETHERLAB_CONF_OPTIONS) --prefix=$(E3_ETHERLAB_INSTALL_LOCATION)


build:
Expand Down

0 comments on commit 76d9cbf

Please sign in to comment.