Wireless工具移植之openssl-0.9.8za
2015-11-07 11:01
531 查看
项目中用到无线网卡模块MT7601、RTL8188/8189、RTL3070等,需要使用wpa_supplicant这个工具,下载wpa_supplicant-2.5.tar.gz后发现它依赖了openssl工具,并且有版本的对应关系,它对应openssl-0.9.8za和openssl-0.9.8zf这两个版本:
于从头开始,先来移植openssl-0.9.8za:
1、下载Openssl源码包:
Openssl 0.9.8 za下载地址:https://www.openssl.org/source/openssl-0.9.8za.tar.gz
2、交叉编译生成动态链接库:
2.1、解压并清理:
tar -xvf openssl-0.9.8za.tar.gz
cd openssl-0.9.8za
./Configuredist; make clean//清理所有中间生成的文件,把修改恢复原状
2.2、打补丁(补丁来自于wpa_supplicant源码包中的patch目录):
cp wpa_supplicant-2.5/patches/openssl-0.9.8e-tls-extensions.patch .
patch -p1 < openssl-0.9.8za-tls-extensions.patch
2.3、配置交叉编译参数:
./config --prefix=/work/IPCAM_LIB/OpensslLib_HI --openssldir=/work/IPCAM_LIB/OpensslLib_HI
2.4、修改Makefile,指定交叉编译工具:
arm-hisiv100nptl-linux-gcc
arm-hisiv100nptl-linux-ar
arm-hisiv100nptl-linux-ranlib
2.5、编译生成动态链接库:
makedepend
make
编译时出现以下错误:
/usr/bin/perlx86cpuid.pl elf -I. -I.. -I../include -DOPENSSL_THREADS -D_REENTRANT-DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -DL_ENDIAN -DTERMIO -O3-fomit-frame-pointer -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2-DSHA1_ASM -DMD5_ASM -DRMD160_ASM
-DAES_ASM > x86cpuid-elf.s
arm-hisiv100nptl-linux-gcc-I. -I.. -I../include -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H-Wa,--noexecstack -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall-DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM-DRMD160_ASM
-DAES_ASM -c -ox86cpuid-elf.o x86cpuid-elf.s
x86cpuid-elf.s:Assembler messages:
x86cpuid-elf.s:10:Error: unrecognized symbol type ""
x86cpuid-elf.s:11:Error: alignment too large: 15 assumed
x86cpuid-elf.s:13:Error: bad instruction `pushl %ebp'
x86cpuid-elf.s:14:Error: bad instruction `pushl %ebx'
x86cpuid-elf.s:15:Error: bad instruction `pushl %esi'
x86cpuid-elf.s:16:Error: bad instruction `pushl %edi'
x86cpuid-elf.s:18:Error: bad instruction `xorl %edx,%edx'
x86cpuid-elf.s:19:Error: bad instruction `pushfl'
x86cpuid-elf.s:20:Error: bad instruction `popl %eax'
x86cpuid-elf.s:21:Error: bad instruction `movl %eax,%ecx'
x86cpuid-elf.s:22:Error: bad instruction `xorl $2097152,%eax'
x86cpuid-elf.s:23:Error: bad instruction `pushl %eax'
x86cpuid-elf.s:24:Error: bad instruction `popfl'
x86cpuid-elf.s:25:Error: bad instruction `pushfl'
x86cpuid-elf.s:26:Error: bad instruction `popl %eax'
x86cpuid-elf.s:27:Error: bad instruction `xorl %eax,%ecx'
x86cpuid-elf.s:28:Error: bad instruction `btl $21,%ecx'
x86cpuid-elf.s:29:Error: bad instruction `jnc .L000done'
x86cpuid-elf.s:30:Error: bad instruction `xorl %eax,%eax'
x86cpuid-elf.s:32:Error: bad instruction `xorl %eax,%eax'
x86cpuid-elf.s:33:Error: bad instruction `cmpl $1970169159,%ebx'
x86cpuid-elf.s:35:Error: bad instruction `movl %eax,%ebp'
x86cpuid-elf.s:36:Error: bad instruction `cmpl $1231384169,%edx'
x86cpuid-elf.s:38:Error: bad instruction `orl %eax,%ebp'
x86cpuid-elf.s:39:Error: bad instruction `cmpl $1818588270,%ecx'
x86cpuid-elf.s:41:Error: bad instruction `orl %eax,%ebp'
x86cpuid-elf.s:42:Error: bad instruction `movl $1,%eax'
x86cpuid-elf.s:43:Error: bad instruction `xorl %ecx,%ecx'
x86cpuid-elf.s:45:Error: bad instruction `cmpl $0,%ebp'
x86cpuid-elf.s:46:Error: bad instruction `jne .L001notP4'
x86cpuid-elf.s:47:Error: bad instruction `andl $3840,%eax'
x86cpuid-elf.s:48:Error: bad instruction `cmpl $3840,%eax'
x86cpuid-elf.s:49:Error: bad instruction `jne .L001notP4'
x86cpuid-elf.s:50:Error: bad instruction `orl $1048576,%edx'
x86cpuid-elf.s:52:Error: bad instruction `btl $28,%edx'
x86cpuid-elf.s:53:Error: bad instruction `jnc .L000done'
x86cpuid-elf.s:54:Error: bad instruction `shrl $16,%ebx'
x86cpuid-elf.s:55:Error: bad instruction `andl $255,%ebx'
x86cpuid-elf.s:56:Error: bad instruction `cmpl $1,%ebx'
x86cpuid-elf.s:57:Error: bad instruction `ja .L000done'
x86cpuid-elf.s:58:Error: bad instruction `andl $4026531839,%edx'
x86cpuid-elf.s:60:Error: bad instruction `movl %edx,%eax'
x86cpuid-elf.s:61:Error: bad instruction `movl %ecx,%edx'
x86cpuid-elf.s:62:Error: bad instruction `popl %edi'
x86cpuid-elf.s:63:Error: bad instruction `popl %esi'
x86cpuid-elf.s:64:Error: bad instruction `popl %ebx'
x86cpuid-elf.s:65:Error: bad instruction `popl %ebp'
x86cpuid-elf.s:66:Error: bad instruction `ret'
x86cpuid-elf.s:72:Error: unrecognized symbol type ""
x86cpuid-elf.s:73:Error: alignment too large: 15 assumed
x86cpuid-elf.s:75:Error: bad instruction `xorl %eax,%eax'
x86cpuid-elf.s:76:Error: bad instruction `xorl %edx,%edx'
x86cpuid-elf.s:77:Error: bad instruction `leal OPENSSL_ia32cap_P,%ecx'
x86cpuid-elf.s:78:Error: bad instruction `btl $4,(%ecx)'
x86cpuid-elf.s:79:Error: bad instruction `jnc .L002notsc'
x86cpuid-elf.s:82:Error: bad instruction `ret'
x86cpuid-elf.s:88:Error: unrecognized symbol type ""
x86cpuid-elf.s:89:Error: alignment too large: 15 assumed
x86cpuid-elf.s:91:Error: bad instruction `leal OPENSSL_ia32cap_P,%ecx'
x86cpuid-elf.s:92:Error: bad instruction `btl $4,(%ecx)'
x86cpuid-elf.s:93:Error: bad instruction `jnc .L003nohalt'
x86cpuid-elf.s:95:Error: bad instruction `andl $3,%eax'
x86cpuid-elf.s:96:Error: bad instruction `jnz .L003nohalt'
x86cpuid-elf.s:97:Error: bad instruction `pushfl'
x86cpuid-elf.s:98:Error: bad instruction `popl %eax'
x86cpuid-elf.s:99:Error: bad instruction `btl $9,%eax'
x86cpuid-elf.s:100:Error: bad instruction `jnc .L003nohalt'
x86cpuid-elf.s:102:Error: bad instruction `pushl %edx'
x86cpuid-elf.s:103:Error: bad instruction `pushl %eax'
x86cpuid-elf.s:104:Error: bad instruction `hlt'
x86cpuid-elf.s:106:Error: bad instruction `subl (%esp),%eax'
x86cpuid-elf.s:107:Error: bad instruction `sbbl 4(%esp),%edx'
x86cpuid-elf.s:108:Error: bad instruction `addl $8,%esp'
x86cpuid-elf.s:109:Error: bad instruction `ret'
x86cpuid-elf.s:111:Error: bad instruction `xorl %eax,%eax'
x86cpuid-elf.s:112:Error: bad instruction `xorl %edx,%edx'
x86cpuid-elf.s:113:Error: bad instruction `ret'
x86cpuid-elf.s:119:Error: unrecognized symbol type ""
x86cpuid-elf.s:120:Error: alignment too large: 15 assumed
x86cpuid-elf.s:122:Error: bad instruction `pushfl'
x86cpuid-elf.s:123:Error: bad instruction `popl %eax'
x86cpuid-elf.s:124:Error: bad instruction `btl $9,%eax'
x86cpuid-elf.s:125:Error: bad instruction `jnc .L004nospin'
x86cpuid-elf.s:126:Error: bad instruction `movl 4(%esp),%eax'
x86cpuid-elf.s:127:Error: bad instruction `movl 8(%esp),%ecx'
x86cpuid-elf.s:129:Error: bad instruction `xorl %eax,%eax'
x86cpuid-elf.s:130:Error: bad instruction `movl (%ecx),%edx'
x86cpuid-elf.s:131:Error: bad instruction `jmp .L005spin'
x86cpuid-elf.s:132:Error: alignment too large: 15 assumed
x86cpuid-elf.s:134:Error: bad instruction `incl %eax'
x86cpuid-elf.s:135:Error: bad instruction `cmpl (%ecx),%edx'
x86cpuid-elf.s:136:Error: bad instruction `je .L005spin'
x86cpuid-elf.s:138:Error: bad instruction `ret'
x86cpuid-elf.s:140:Error: bad instruction `xorl %eax,%eax'
x86cpuid-elf.s:141:Error: bad instruction `xorl %edx,%edx'
x86cpuid-elf.s:142:Error: bad instruction `ret'
x86cpuid-elf.s:148:Error: unrecognized symbol type ""
x86cpuid-elf.s:149:Error: alignment too large: 15 assumed
x86cpuid-elf.s:151:Error: bad instruction `xorl %eax,%eax'
x86cpuid-elf.s:152:Error: bad instruction `xorl %edx,%edx'
x86cpuid-elf.s:153:Error: bad instruction `leal OPENSSL_ia32cap_P,%ecx'
x86cpuid-elf.s:154:Error: bad instruction `movl (%ecx),%ecx'
x86cpuid-elf.s:155:Error: bad instruction `btl $1,(%ecx)'
x86cpuid-elf.s:156:Error: bad instruction `jnc .L006no_x87'
x86cpuid-elf.s:157:Error: bad instruction `btl $26,(%ecx)'
x86cpuid-elf.s:158:Error: bad instruction `jnc .L007no_sse2'
x86cpuid-elf.s:159:Error: bad instruction `pxor %xmm0,%xmm0'
x86cpuid-elf.s:160:Error: bad instruction `pxor %xmm1,%xmm1'
x86cpuid-elf.s:161:Error: bad instruction `pxor %xmm2,%xmm2'
x86cpuid-elf.s:162:Error: bad instruction `pxor %xmm3,%xmm3'
x86cpuid-elf.s:163:Error: bad instruction `pxor %xmm4,%xmm4'
x86cpuid-elf.s:164:Error: bad instruction `pxor %xmm5,%xmm5'
x86cpuid-elf.s:165:Error: bad instruction `pxor %xmm6,%xmm6'
x86cpuid-elf.s:166:Error: bad instruction `pxor %xmm7,%xmm7'
x86cpuid-elf.s:170:Error: bad instruction `leal 4(%esp),%eax'
x86cpuid-elf.s:171:Error: bad instruction `ret'
x86cpuid-elf.s:177:Error: unrecognized symbol type ""
x86cpuid-elf.s:178:Error: alignment too large: 15 assumed
x86cpuid-elf.s:180:Error: bad instruction `movl 4(%esp),%edx'
x86cpuid-elf.s:181:Error: bad instruction `movl 8(%esp),%ecx'
x86cpuid-elf.s:182:Error: bad instruction `pushl %ebx'
x86cpuid-elf.s:184:Error: bad instruction `movl (%edx),%eax'
x86cpuid-elf.s:186:Error: bad instruction `leal (%eax,%ecx),%ebx'
x86cpuid-elf.s:189:Error: bad instruction `jne .L008spin'
x86cpuid-elf.s:190:Error: bad instruction `movl %ebx,%eax'
x86cpuid-elf.s:191:Error: bad instruction `popl %ebx'
x86cpuid-elf.s:192:Error: bad instruction `ret'
x86cpuid-elf.s:198:Error: unrecognized symbol type ""
x86cpuid-elf.s:199:Error: alignment too large: 15 assumed
x86cpuid-elf.s:201:Error: bad instruction `pushl %ebp'
x86cpuid-elf.s:202:Error: bad instruction `movl %esp,%ebp'
x86cpuid-elf.s:203:Error: bad instruction `subl $28,%esp'
x86cpuid-elf.s:204:Error: bad instruction `movl 12(%ebp),%ecx'
x86cpuid-elf.s:205:Error: bad instruction `movl %ecx,(%esp)'
x86cpuid-elf.s:206:Error: bad instruction `movl 16(%ebp),%edx'
x86cpuid-elf.s:207:Error: bad instruction `movl %edx,4(%esp)'
x86cpuid-elf.s:208:Error: bad instruction `movl 20(%ebp),%eax'
x86cpuid-elf.s:209:Error: bad instruction `movl %eax,8(%esp)'
x86cpuid-elf.s:210:Error: bad instruction `movl 24(%ebp),%eax'
x86cpuid-elf.s:211:Error: bad instruction `movl %eax,12(%esp)'
x86cpuid-elf.s:212:Error: bad instruction `movl 28(%ebp),%eax'
x86cpuid-elf.s:213:Error: bad instruction `movl %eax,16(%esp)'
x86cpuid-elf.s:214:Error: bad instruction `movl 32(%ebp),%eax'
x86cpuid-elf.s:215:Error: bad instruction `movl %eax,20(%esp)'
x86cpuid-elf.s:216:Error: bad instruction `movl 36(%ebp),%eax'
x86cpuid-elf.s:217:Error: bad instruction `movl %eax,24(%esp)'
x86cpuid-elf.s:218:Error: bad instruction `call *8(%ebp)'
x86cpuid-elf.s:219:Error: bad instruction `movl %ebp,%esp'
x86cpuid-elf.s:220:Error: bad instruction `popl %ebp'
x86cpuid-elf.s:221:Error: bad instruction `ret'
x86cpuid-elf.s:226:Error: bad instruction `call OPENSSL_cpuid_setup'
x86cpuid-elf.s:227:Error: bad instruction `jmp .Linitalign'
x86cpuid-elf.s:228:Error: alignment too large: 15 assumed
make[1]:*** [x86cpuid-elf.o] 错误 1
make[1]:正在离开目录`/home/zqjun/Wireless_Driver/openssl-0.9.8za/crypto'
make: ***[build_crypto] 错误 1
解决办法:
./config 后面增加以下参数:
shared no-zlib no-asm no-threads no-sse2 no-gmp no-rfc3779 no-krb5 no-rc5 no-zlib-dynamic no-hw no-cipher no-md2 no-mdc2 no-rc2 no-idea no-camellia no-ec no-ripemd no-rc4 no-bf no-cast no-perlasm
即:
./config --prefix=/work/IPCAM_LIB/OpensslLib_HI --openssldir=/work/IPCAM_LIB/OpensslLib_HI shared no-zlib no-asm no-threads no-sse2
no-gmp no-rfc3779 no-krb5 no-rc5 no-zlib-dynamic no-hw no-cipher no-md2 no-mdc2 no-rc2 no-idea no-camellia no-ec no-ripemd no-rc4 no-bf no-cast no-perlasm
重新编译即可
注意:你下载的wpa_supplicant版本与你的openssl的版本要对应,具体的,解压wpa_supplicant源码包后,进入那个patch目录,看一下该wpa_supplicant版本中包含有哪几个版本的Openssl的补丁文件,再去网上下载对应版本的openssl源码包,解压后打上补丁即可。假如补丁文件版本不匹配,编译wpa_supplicant时会发现有些头文件找不到,请慎重!
于从头开始,先来移植openssl-0.9.8za:
1、下载Openssl源码包:
Openssl 0.9.8 za下载地址:https://www.openssl.org/source/openssl-0.9.8za.tar.gz
2、交叉编译生成动态链接库:
2.1、解压并清理:
tar -xvf openssl-0.9.8za.tar.gz
cd openssl-0.9.8za
./Configuredist; make clean//清理所有中间生成的文件,把修改恢复原状
2.2、打补丁(补丁来自于wpa_supplicant源码包中的patch目录):
cp wpa_supplicant-2.5/patches/openssl-0.9.8e-tls-extensions.patch .
patch -p1 < openssl-0.9.8za-tls-extensions.patch
2.3、配置交叉编译参数:
./config --prefix=/work/IPCAM_LIB/OpensslLib_HI --openssldir=/work/IPCAM_LIB/OpensslLib_HI
2.4、修改Makefile,指定交叉编译工具:
arm-hisiv100nptl-linux-gcc
arm-hisiv100nptl-linux-ar
arm-hisiv100nptl-linux-ranlib
2.5、编译生成动态链接库:
makedepend
make
编译时出现以下错误:
/usr/bin/perlx86cpuid.pl elf -I. -I.. -I../include -DOPENSSL_THREADS -D_REENTRANT-DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -DL_ENDIAN -DTERMIO -O3-fomit-frame-pointer -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2-DSHA1_ASM -DMD5_ASM -DRMD160_ASM
-DAES_ASM > x86cpuid-elf.s
arm-hisiv100nptl-linux-gcc-I. -I.. -I../include -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H-Wa,--noexecstack -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall-DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM-DRMD160_ASM
-DAES_ASM -c -ox86cpuid-elf.o x86cpuid-elf.s
x86cpuid-elf.s:Assembler messages:
x86cpuid-elf.s:10:Error: unrecognized symbol type ""
x86cpuid-elf.s:11:Error: alignment too large: 15 assumed
x86cpuid-elf.s:13:Error: bad instruction `pushl %ebp'
x86cpuid-elf.s:14:Error: bad instruction `pushl %ebx'
x86cpuid-elf.s:15:Error: bad instruction `pushl %esi'
x86cpuid-elf.s:16:Error: bad instruction `pushl %edi'
x86cpuid-elf.s:18:Error: bad instruction `xorl %edx,%edx'
x86cpuid-elf.s:19:Error: bad instruction `pushfl'
x86cpuid-elf.s:20:Error: bad instruction `popl %eax'
x86cpuid-elf.s:21:Error: bad instruction `movl %eax,%ecx'
x86cpuid-elf.s:22:Error: bad instruction `xorl $2097152,%eax'
x86cpuid-elf.s:23:Error: bad instruction `pushl %eax'
x86cpuid-elf.s:24:Error: bad instruction `popfl'
x86cpuid-elf.s:25:Error: bad instruction `pushfl'
x86cpuid-elf.s:26:Error: bad instruction `popl %eax'
x86cpuid-elf.s:27:Error: bad instruction `xorl %eax,%ecx'
x86cpuid-elf.s:28:Error: bad instruction `btl $21,%ecx'
x86cpuid-elf.s:29:Error: bad instruction `jnc .L000done'
x86cpuid-elf.s:30:Error: bad instruction `xorl %eax,%eax'
x86cpuid-elf.s:32:Error: bad instruction `xorl %eax,%eax'
x86cpuid-elf.s:33:Error: bad instruction `cmpl $1970169159,%ebx'
x86cpuid-elf.s:35:Error: bad instruction `movl %eax,%ebp'
x86cpuid-elf.s:36:Error: bad instruction `cmpl $1231384169,%edx'
x86cpuid-elf.s:38:Error: bad instruction `orl %eax,%ebp'
x86cpuid-elf.s:39:Error: bad instruction `cmpl $1818588270,%ecx'
x86cpuid-elf.s:41:Error: bad instruction `orl %eax,%ebp'
x86cpuid-elf.s:42:Error: bad instruction `movl $1,%eax'
x86cpuid-elf.s:43:Error: bad instruction `xorl %ecx,%ecx'
x86cpuid-elf.s:45:Error: bad instruction `cmpl $0,%ebp'
x86cpuid-elf.s:46:Error: bad instruction `jne .L001notP4'
x86cpuid-elf.s:47:Error: bad instruction `andl $3840,%eax'
x86cpuid-elf.s:48:Error: bad instruction `cmpl $3840,%eax'
x86cpuid-elf.s:49:Error: bad instruction `jne .L001notP4'
x86cpuid-elf.s:50:Error: bad instruction `orl $1048576,%edx'
x86cpuid-elf.s:52:Error: bad instruction `btl $28,%edx'
x86cpuid-elf.s:53:Error: bad instruction `jnc .L000done'
x86cpuid-elf.s:54:Error: bad instruction `shrl $16,%ebx'
x86cpuid-elf.s:55:Error: bad instruction `andl $255,%ebx'
x86cpuid-elf.s:56:Error: bad instruction `cmpl $1,%ebx'
x86cpuid-elf.s:57:Error: bad instruction `ja .L000done'
x86cpuid-elf.s:58:Error: bad instruction `andl $4026531839,%edx'
x86cpuid-elf.s:60:Error: bad instruction `movl %edx,%eax'
x86cpuid-elf.s:61:Error: bad instruction `movl %ecx,%edx'
x86cpuid-elf.s:62:Error: bad instruction `popl %edi'
x86cpuid-elf.s:63:Error: bad instruction `popl %esi'
x86cpuid-elf.s:64:Error: bad instruction `popl %ebx'
x86cpuid-elf.s:65:Error: bad instruction `popl %ebp'
x86cpuid-elf.s:66:Error: bad instruction `ret'
x86cpuid-elf.s:72:Error: unrecognized symbol type ""
x86cpuid-elf.s:73:Error: alignment too large: 15 assumed
x86cpuid-elf.s:75:Error: bad instruction `xorl %eax,%eax'
x86cpuid-elf.s:76:Error: bad instruction `xorl %edx,%edx'
x86cpuid-elf.s:77:Error: bad instruction `leal OPENSSL_ia32cap_P,%ecx'
x86cpuid-elf.s:78:Error: bad instruction `btl $4,(%ecx)'
x86cpuid-elf.s:79:Error: bad instruction `jnc .L002notsc'
x86cpuid-elf.s:82:Error: bad instruction `ret'
x86cpuid-elf.s:88:Error: unrecognized symbol type ""
x86cpuid-elf.s:89:Error: alignment too large: 15 assumed
x86cpuid-elf.s:91:Error: bad instruction `leal OPENSSL_ia32cap_P,%ecx'
x86cpuid-elf.s:92:Error: bad instruction `btl $4,(%ecx)'
x86cpuid-elf.s:93:Error: bad instruction `jnc .L003nohalt'
x86cpuid-elf.s:95:Error: bad instruction `andl $3,%eax'
x86cpuid-elf.s:96:Error: bad instruction `jnz .L003nohalt'
x86cpuid-elf.s:97:Error: bad instruction `pushfl'
x86cpuid-elf.s:98:Error: bad instruction `popl %eax'
x86cpuid-elf.s:99:Error: bad instruction `btl $9,%eax'
x86cpuid-elf.s:100:Error: bad instruction `jnc .L003nohalt'
x86cpuid-elf.s:102:Error: bad instruction `pushl %edx'
x86cpuid-elf.s:103:Error: bad instruction `pushl %eax'
x86cpuid-elf.s:104:Error: bad instruction `hlt'
x86cpuid-elf.s:106:Error: bad instruction `subl (%esp),%eax'
x86cpuid-elf.s:107:Error: bad instruction `sbbl 4(%esp),%edx'
x86cpuid-elf.s:108:Error: bad instruction `addl $8,%esp'
x86cpuid-elf.s:109:Error: bad instruction `ret'
x86cpuid-elf.s:111:Error: bad instruction `xorl %eax,%eax'
x86cpuid-elf.s:112:Error: bad instruction `xorl %edx,%edx'
x86cpuid-elf.s:113:Error: bad instruction `ret'
x86cpuid-elf.s:119:Error: unrecognized symbol type ""
x86cpuid-elf.s:120:Error: alignment too large: 15 assumed
x86cpuid-elf.s:122:Error: bad instruction `pushfl'
x86cpuid-elf.s:123:Error: bad instruction `popl %eax'
x86cpuid-elf.s:124:Error: bad instruction `btl $9,%eax'
x86cpuid-elf.s:125:Error: bad instruction `jnc .L004nospin'
x86cpuid-elf.s:126:Error: bad instruction `movl 4(%esp),%eax'
x86cpuid-elf.s:127:Error: bad instruction `movl 8(%esp),%ecx'
x86cpuid-elf.s:129:Error: bad instruction `xorl %eax,%eax'
x86cpuid-elf.s:130:Error: bad instruction `movl (%ecx),%edx'
x86cpuid-elf.s:131:Error: bad instruction `jmp .L005spin'
x86cpuid-elf.s:132:Error: alignment too large: 15 assumed
x86cpuid-elf.s:134:Error: bad instruction `incl %eax'
x86cpuid-elf.s:135:Error: bad instruction `cmpl (%ecx),%edx'
x86cpuid-elf.s:136:Error: bad instruction `je .L005spin'
x86cpuid-elf.s:138:Error: bad instruction `ret'
x86cpuid-elf.s:140:Error: bad instruction `xorl %eax,%eax'
x86cpuid-elf.s:141:Error: bad instruction `xorl %edx,%edx'
x86cpuid-elf.s:142:Error: bad instruction `ret'
x86cpuid-elf.s:148:Error: unrecognized symbol type ""
x86cpuid-elf.s:149:Error: alignment too large: 15 assumed
x86cpuid-elf.s:151:Error: bad instruction `xorl %eax,%eax'
x86cpuid-elf.s:152:Error: bad instruction `xorl %edx,%edx'
x86cpuid-elf.s:153:Error: bad instruction `leal OPENSSL_ia32cap_P,%ecx'
x86cpuid-elf.s:154:Error: bad instruction `movl (%ecx),%ecx'
x86cpuid-elf.s:155:Error: bad instruction `btl $1,(%ecx)'
x86cpuid-elf.s:156:Error: bad instruction `jnc .L006no_x87'
x86cpuid-elf.s:157:Error: bad instruction `btl $26,(%ecx)'
x86cpuid-elf.s:158:Error: bad instruction `jnc .L007no_sse2'
x86cpuid-elf.s:159:Error: bad instruction `pxor %xmm0,%xmm0'
x86cpuid-elf.s:160:Error: bad instruction `pxor %xmm1,%xmm1'
x86cpuid-elf.s:161:Error: bad instruction `pxor %xmm2,%xmm2'
x86cpuid-elf.s:162:Error: bad instruction `pxor %xmm3,%xmm3'
x86cpuid-elf.s:163:Error: bad instruction `pxor %xmm4,%xmm4'
x86cpuid-elf.s:164:Error: bad instruction `pxor %xmm5,%xmm5'
x86cpuid-elf.s:165:Error: bad instruction `pxor %xmm6,%xmm6'
x86cpuid-elf.s:166:Error: bad instruction `pxor %xmm7,%xmm7'
x86cpuid-elf.s:170:Error: bad instruction `leal 4(%esp),%eax'
x86cpuid-elf.s:171:Error: bad instruction `ret'
x86cpuid-elf.s:177:Error: unrecognized symbol type ""
x86cpuid-elf.s:178:Error: alignment too large: 15 assumed
x86cpuid-elf.s:180:Error: bad instruction `movl 4(%esp),%edx'
x86cpuid-elf.s:181:Error: bad instruction `movl 8(%esp),%ecx'
x86cpuid-elf.s:182:Error: bad instruction `pushl %ebx'
x86cpuid-elf.s:184:Error: bad instruction `movl (%edx),%eax'
x86cpuid-elf.s:186:Error: bad instruction `leal (%eax,%ecx),%ebx'
x86cpuid-elf.s:189:Error: bad instruction `jne .L008spin'
x86cpuid-elf.s:190:Error: bad instruction `movl %ebx,%eax'
x86cpuid-elf.s:191:Error: bad instruction `popl %ebx'
x86cpuid-elf.s:192:Error: bad instruction `ret'
x86cpuid-elf.s:198:Error: unrecognized symbol type ""
x86cpuid-elf.s:199:Error: alignment too large: 15 assumed
x86cpuid-elf.s:201:Error: bad instruction `pushl %ebp'
x86cpuid-elf.s:202:Error: bad instruction `movl %esp,%ebp'
x86cpuid-elf.s:203:Error: bad instruction `subl $28,%esp'
x86cpuid-elf.s:204:Error: bad instruction `movl 12(%ebp),%ecx'
x86cpuid-elf.s:205:Error: bad instruction `movl %ecx,(%esp)'
x86cpuid-elf.s:206:Error: bad instruction `movl 16(%ebp),%edx'
x86cpuid-elf.s:207:Error: bad instruction `movl %edx,4(%esp)'
x86cpuid-elf.s:208:Error: bad instruction `movl 20(%ebp),%eax'
x86cpuid-elf.s:209:Error: bad instruction `movl %eax,8(%esp)'
x86cpuid-elf.s:210:Error: bad instruction `movl 24(%ebp),%eax'
x86cpuid-elf.s:211:Error: bad instruction `movl %eax,12(%esp)'
x86cpuid-elf.s:212:Error: bad instruction `movl 28(%ebp),%eax'
x86cpuid-elf.s:213:Error: bad instruction `movl %eax,16(%esp)'
x86cpuid-elf.s:214:Error: bad instruction `movl 32(%ebp),%eax'
x86cpuid-elf.s:215:Error: bad instruction `movl %eax,20(%esp)'
x86cpuid-elf.s:216:Error: bad instruction `movl 36(%ebp),%eax'
x86cpuid-elf.s:217:Error: bad instruction `movl %eax,24(%esp)'
x86cpuid-elf.s:218:Error: bad instruction `call *8(%ebp)'
x86cpuid-elf.s:219:Error: bad instruction `movl %ebp,%esp'
x86cpuid-elf.s:220:Error: bad instruction `popl %ebp'
x86cpuid-elf.s:221:Error: bad instruction `ret'
x86cpuid-elf.s:226:Error: bad instruction `call OPENSSL_cpuid_setup'
x86cpuid-elf.s:227:Error: bad instruction `jmp .Linitalign'
x86cpuid-elf.s:228:Error: alignment too large: 15 assumed
make[1]:*** [x86cpuid-elf.o] 错误 1
make[1]:正在离开目录`/home/zqjun/Wireless_Driver/openssl-0.9.8za/crypto'
make: ***[build_crypto] 错误 1
解决办法:
./config 后面增加以下参数:
shared no-zlib no-asm no-threads no-sse2 no-gmp no-rfc3779 no-krb5 no-rc5 no-zlib-dynamic no-hw no-cipher no-md2 no-mdc2 no-rc2 no-idea no-camellia no-ec no-ripemd no-rc4 no-bf no-cast no-perlasm
即:
./config --prefix=/work/IPCAM_LIB/OpensslLib_HI --openssldir=/work/IPCAM_LIB/OpensslLib_HI shared no-zlib no-asm no-threads no-sse2
no-gmp no-rfc3779 no-krb5 no-rc5 no-zlib-dynamic no-hw no-cipher no-md2 no-mdc2 no-rc2 no-idea no-camellia no-ec no-ripemd no-rc4 no-bf no-cast no-perlasm
重新编译即可
注意:你下载的wpa_supplicant版本与你的openssl的版本要对应,具体的,解压wpa_supplicant源码包后,进入那个patch目录,看一下该wpa_supplicant版本中包含有哪几个版本的Openssl的补丁文件,再去网上下载对应版本的openssl源码包,解压后打上补丁即可。假如补丁文件版本不匹配,编译wpa_supplicant时会发现有些头文件找不到,请慎重!
相关文章推荐
- Wireless工具移植之openssl版本导致wifi连接失败的问题
- Linux系统启动过程分析
- linux下JDK的安装及切换
- bash shell 之变量笔记
- Java实现视频网站的视频上传、视频转码、视频关键帧抽图, 及视频播放功能
- linux中怎样关闭ICMP回应功能
- java.lang.ClassNotFoundException: org.apache.commons.io.output.DeferredFileOutputStream
- tomcat启动找不到子容器
- Java Web开发Tomcat中三种部署项目的方法
- docker pull sequenceiq/spark:1.5.1
- 6.网站显示传感器数据
- net大型分布式电子商务架构
- linux 系统调用分析 使用strace工具
- Linux 下三种方式设置环境变量
- intelliJ IEDA + opencv 开发上手
- linux 内核(系统)、函数的理解、宏的程序调试
- 【鸟哥的linux私房菜-学习笔记】帐号管理,ACL,PAM与用户通信
- hadoop环境搭建
- 项目在eclipse运行正常,但单独部署到tomcat上出现乱码解决办法
- Openstack虚机实例状态错误手工恢复vm_state:error