Skip to content

Commit

Permalink
更新了文章内容
Browse files Browse the repository at this point in the history
  • Loading branch information
yangzhenghan committed Oct 9, 2024
1 parent 7ff0219 commit 1a6a56b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
5 changes: 3 additions & 2 deletions content/notes/cross-compiling-acai.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ cd acai
vi configure/RELEASE.local

# 修改交叉编译的目标架构,和EPICS base中保持一致
EPICS_HOST_ARCH=linux-loong64
# EPICS_HOST_ARCH=linux-loong64
# 修改EPICS_BASE路径,例:
EPICS_BASE=/home/ubuntu/loongson/base-7.0.8

make LD=loongarch64-linux-gnu-ld CC=loongarch64-linux-gnu-gcc CCC=loongarch64-linux-gnu-g++
# make LD=loongarch64-linux-gnu-ld CC=loongarch64-linux-gnu-gcc CCC=loongarch64-linux-gnu-g++
make
# 等待编译完成
```

Expand Down
20 changes: 12 additions & 8 deletions content/posts/build-epics-module-modbus.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ touch configure/RELEASE.local
vi configure/RELEASE.local

# 修改成和EPICS Base一样的架构
EPICS_HOST_ARCH=linux-loong64
# EPICS_HOST_ARCH=linux-loong64
# EPICS Base路径(示例)
EPICS_BASE=/home/ubuntu/loongson/base-7.0.8
# 放置EPICS模块的路径(示例)
Expand All @@ -87,7 +87,8 @@ SUPPORT=/home/ubuntu/loongson/modules
# 直接编译
# make
# 交叉编译(示例)
make LD=loongarch64-linux-gnu-ld CC=loongarch64-linux-gnu-gcc CCC=loongarch64-linux-gnu-g++
# make LD=loongarch64-linux-gnu-ld CC=loongarch64-linux-gnu-gcc CCC=loongarch64-linux-gnu-g++
make
```

### 编译 CALC(可选)
Expand All @@ -98,7 +99,7 @@ touch configure/RELEASE.local
vi configure/RELEASE.local

# 修改成和EPICS Base一样的架构
EPICS_HOST_ARCH=linux-loong64
# EPICS_HOST_ARCH=linux-loong64
# EPICS Base路径(示例)
EPICS_BASE=/home/ubuntu/loongson/base-7.0.8
# 放置EPICS模块的路径(示例)
Expand All @@ -109,7 +110,8 @@ SSCAN=$(SUPPORT)/sscan
# 直接编译
# make
# 交叉编译(示例)
make LD=loongarch64-linux-gnu-ld CC=loongarch64-linux-gnu-gcc CCC=loongarch64-linux-gnu-g++
# make LD=loongarch64-linux-gnu-ld CC=loongarch64-linux-gnu-gcc CCC=loongarch64-linux-gnu-g++
make
```

### 编译 asyn(必需)
Expand All @@ -120,7 +122,7 @@ touch configure/RELEASE.local
vi configure/RELEASE.local

# 修改成和EPICS Base一样的架构
EPICS_HOST_ARCH=linux-loong64
# EPICS_HOST_ARCH=linux-loong64
# EPICS Base路径(示例)
EPICS_BASE=/home/ubuntu/loongson/base-7.0.8
# 放置EPICS模块的路径(示例)
Expand All @@ -133,7 +135,8 @@ CALC=$(SUPPORT)/calc
# 直接编译
# make
# 交叉编译(示例)
make LD=loongarch64-linux-gnu-ld CC=loongarch64-linux-gnu-gcc CCC=loongarch64-linux-gnu-g++
# make LD=loongarch64-linux-gnu-ld CC=loongarch64-linux-gnu-gcc CCC=loongarch64-linux-gnu-g++
make
```

### 编译 modbus
Expand All @@ -144,7 +147,7 @@ touch configure/RELEASE.local
vi configure/RELEASE.local

# 修改成和EPICS Base一样的架构
EPICS_HOST_ARCH=linux-loong64
# EPICS_HOST_ARCH=linux-loong64
# EPICS Base路径(示例)
EPICS_BASE=/home/ubuntu/loongson/base-7.0.8
# 放置EPICS模块的路径(示例)
Expand All @@ -155,7 +158,8 @@ ASYN=$(SUPPORT)/asyn
# 直接编译
# make
# 交叉编译(示例)
make LD=loongarch64-linux-gnu-ld CC=loongarch64-linux-gnu-gcc CCC=loongarch64-linux-gnu-g++
# make LD=loongarch64-linux-gnu-ld CC=loongarch64-linux-gnu-gcc CCC=loongarch64-linux-gnu-g++
make
```

编译完成后,可以看到`bin\<EPICS_HOST_ARCH>`路径下生成了可执行程序`modbusApp`,它就是与Modbus设备通信的主程序了。
Expand Down
6 changes: 4 additions & 2 deletions content/posts/epics-ioc-access-security.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ touch accessSecurity.acf
``` c
UAG(read) {deepin}
UAG(write) {deepin}
HAG(hosts) {LAPTOP-CTDCXXXX}
HAG(hosts) {LAPTOP-CTDCXXXX, 172.19.176.1}
ASG(DEFAULT) {
RULE(1,READ)
Expand All @@ -188,7 +188,7 @@ ASG(deepin) {
稍微解释一下:
创建了两个**用户访问组**(UAG),名称为read和write,两个用户访问组都只包含用户*deepin*。
创建了一个**主机访问组**(HAG),名称为hosts,包含主机名*LAPTOP-CTDCXXXX*。
创建了一个**主机访问组**(HAG),名称为hosts,包含主机名*LAPTOP-CTDCXXXX*和一个IP地址
创建了默认(DEFAULT)**访问安全组**(ASG),不限制读取(READ)权限,只有hosts主机访问组的用户拥有写入(WRITE)权限。
创建了**访问安全组**(ASG),名称为deepin,hosts主机访问组所包含主机上的deepin用户才拥有读取(READ)和写入(WRITE)权限。
Expand Down Expand Up @@ -240,6 +240,8 @@ vi st.cmd
#- Run this to trace the stages of iocInit
#-traceIocInit
+ #- Set asCheckClientIP=1 to translate hostnames into IPs
+ var asCheckClientIP 1
+ asSetFilename("${TOP}/iocBoot/${IOC}/accessSecurity.acf")
cd "${TOP}/iocBoot/${IOC}"
Expand Down

0 comments on commit 1a6a56b

Please sign in to comment.