|
|
@ -27,33 +27,62 @@ cd openssl |
|
|
|
商业版 PowerPC 工具链配置 |
|
|
|
./Configure linux-ppc --cross-compile-prefix=ppc-sylixos-eabi- no-asm shared --prefix=/opt/ppc-sylixos-openssl |
|
|
|
|
|
|
|
商业版 MIPS 工具链配置 |
|
|
|
./Configure linux-mips32 --cross-compile-prefix=mips-sylixos-elf- no-asm shared --prefix=/opt/mips-sylixos-openssl |
|
|
|
|
|
|
|
商业版 x86 工具链配置 |
|
|
|
./Configure linux-generic32 --cross-compile-prefix=i386-sylixos-elf- no-asm shared --prefix=/opt/x86-sylixos-openssl |
|
|
|
|
|
|
|
三、修改 Makefile |
|
|
|
|
|
|
|
1. 加入如下内容,编译好的 SylixOS Base 工程路径根据实际情况设置: |
|
|
|
# SylixOS PATH |
|
|
|
|
|
|
|
ifneq (,$(findstring arm,$(PLATFORM))) |
|
|
|
SYLIXOS_BASE_PATH=/home/user/sylixos_workspace/sylixos-base |
|
|
|
ARCH_CFLAGS = -march=armv4 -mno-unaligned-access |
|
|
|
ARCH_LDFLAGS = -nostdlib |
|
|
|
endif |
|
|
|
|
|
|
|
ifneq (,$(findstring ppc,$(PLATFORM))) |
|
|
|
SYLIXOS_BASE_PATH=/home/user/ppc_workspace/sylixos-base |
|
|
|
ARCH_CFLAGS = -G 0 -msoft-float |
|
|
|
ARCH_LDFLAGS = |
|
|
|
endif |
|
|
|
|
|
|
|
ifneq (,$(findstring mips32,$(PLATFORM))) |
|
|
|
SYLIXOS_BASE_PATH=/home/user/mips_workspace/sylixos-base |
|
|
|
ARCH_CFLAGS = -mips32 -msoft-float -EL -G 0 -mabicalls |
|
|
|
ARCH_LDFLAGS = |
|
|
|
endif |
|
|
|
|
|
|
|
ifneq (,$(findstring generic32,$(PLATFORM))) |
|
|
|
SYLIXOS_BASE_PATH=/home/user/x86_workspace/sylixos-base |
|
|
|
ARCH_CFLAGS = -m32 -mhard-float -mlong-double-64 |
|
|
|
ARCH_LDFLAGS = |
|
|
|
endif |
|
|
|
|
|
|
|
# SylixOS includes |
|
|
|
INCDIR = $(SYLIXOS_BASE_PATH)/libsylixos/SylixOS |
|
|
|
INCDIR += $(SYLIXOS_BASE_PATH)/libsylixos/SylixOS/include |
|
|
|
INCDIR += $(SYLIXOS_BASE_PATH)/libsylixos/SylixOS/include/network |
|
|
|
SHLDIR = $(SYLIXOS_BASE_PATH)/libsylixos/Debug |
|
|
|
SHLDIR += $(SYLIXOS_BASE_PATH)/libcextern/Debug |
|
|
|
|
|
|
|
# SylixOS compile and link options FOR ARM |
|
|
|
SYLIXOS_CFLAGS=-DSYLIXOS -DSYLIXOS_LIB $(addprefix -I,$(INCDIR)) -mcpu=arm920t -fmessage-length=0 -fno-short-enums |
|
|
|
SYLIXOS_EXLIBS=-nostdlib $(addprefix -L,$(SHLDIR)) -lcextern -lvpmpdm -lm -lgcc |
|
|
|
SHLDIR = $(SYLIXOS_BASE_PATH)/libsylixos/Release |
|
|
|
SHLDIR += $(SYLIXOS_BASE_PATH)/libcextern/Release |
|
|
|
SHLDIR += $(SYLIXOS_BASE_PATH)/libsylixos/Debug |
|
|
|
SHLDIR += $(SYLIXOS_BASE_PATH)/libcextern/Debug |
|
|
|
|
|
|
|
# SylixOS compile and link options FOR PowerPC |
|
|
|
SYLIXOS_CFLAGS=-fPIC -DSYLIXOS -DSYLIXOS_LIB $(addprefix -I,$(INCDIR)) -fmessage-length=0 -fno-short-enums |
|
|
|
SYLIXOS_EXLIBS=-fPIC -shared $(addprefix -L,$(SHLDIR)) -lcextern -lvpmpdm -lm -lgcc |
|
|
|
SYLIXOS_CFLAGS = $(ARCH_CFLAGS) -DSYLIXOS -DSYLIXOS_LIB $(addprefix -I,$(INCDIR)) -fmessage-length=0 -fno-short-enums |
|
|
|
SYLIXOS_EXLIBS = $(ARCH_CFLAGS) $(ARCH_LDFLAGS) -Wl,-shared -shared $(addprefix -L,$(SHLDIR)) -lcextern -lvpmpdm -lm -lgcc |
|
|
|
|
|
|
|
2. 修改 CFLAG: |
|
|
|
CFLAG = $(SYLIXOS_CFLAGS) 原有的定义,略 |
|
|
|
|
|
|
|
3. 修改 PEX_LIBS 和 EX_LIBS |
|
|
|
PEX_LIBS = -shared |
|
|
|
EX_LIBS = $(SYLIXOS_EXLIBS) |
|
|
|
PEX_LIBS = -Wl,-shared -shared |
|
|
|
EX_LIBS = $(SYLIXOS_EXLIBS) |
|
|
|
|
|
|
|
4. 修改 SHARED_LDFLAGS |
|
|
|
SHARED_LDFLAGS= -Wl,-shared -shared |
|
|
|
|
|
|
|
四、编译 OpenSSL |
|
|
|
|
|
|
@ -64,17 +93,22 @@ make |
|
|
|
安装 OpenSSL 需要在 root 用户下,输入 su 切换到 root 用户: |
|
|
|
su |
|
|
|
|
|
|
|
再修改环境变量 PATH,不然 make install 的结果会非常庞大(因为找不到 arm-none-eabi-strip): |
|
|
|
再修改环境变量 PATH,不然 make install 的结果会非常庞大(因为找不到 xxx-xxx-xxx-strip): |
|
|
|
export PATH=/usr/lib/gcc-arm-none-eabi/bin:$PATH |
|
|
|
export PATH=/usr/lib/gcc-arm-sylixos-eabi/bin:$PATH |
|
|
|
export PATH=/usr/lib/gcc-mips-sylixos-elf/bin:$PATH |
|
|
|
export PATH=/usr/lib/gcc-ppc-sylixos-eabi/bin:$PATH |
|
|
|
export PATH=/usr/lib/gcc-i386-sylixos-elf/bin:$PATH |
|
|
|
|
|
|
|
|
|
|
|
输入如下命令以安装 OpenSSL: |
|
|
|
make install |
|
|
|
|
|
|
|
会安装到配置时指定的目录 /opt/arm-sylixos-openssl 里。 |
|
|
|
会安装到配置时指定的目录 /opt/xxx-sylixos-openssl 里。 |
|
|
|
|
|
|
|
六、部署 OpenSSL |
|
|
|
|
|
|
|
1. 在 SylixOS 目标板的 /lib 目录中创建 openssl 文件夹, 然后将 make install 的结果(位于 /opt/arm-sylixos-openssl 目录)下载到 SylixOS 目标板的 /lib/openssl 目录。 |
|
|
|
1. 在 SylixOS 目标板的 /lib 目录中创建 openssl 文件夹, 然后将 make install 的结果(位于 /opt/xxx-sylixos-openssl 目录)下载到 SylixOS 目标板的 /lib/openssl 目录。 |
|
|
|
下面的命令在 SylixOS 目标板的终端执行: |
|
|
|
|
|
|
|
2. 创建好相应的符号链接: |
|
|
@ -89,4 +123,4 @@ varsave |
|
|
|
|
|
|
|
七、运行 OpenSSL |
|
|
|
|
|
|
|
openssl |
|
|
|
openssl |
|
|
|