The Openssl-0.9.8za of wireless tool transplant

Source: Internet
Author: User
Tags gmp openssl openssl version

The project uses the wireless network card module MT7601, rtl8188/8189, RTL3070 and so on, needs to use wpa_supplicant this tool, downloads Wpa_ Supplicant-2.5.tar.gz found that it relies on the OpenSSL tool, and has a version of the corresponding relationship, which corresponds to the Openssl-0.9.8za and OPENSSL-0.9.8ZF these two versions:

To start from scratch, first transplant Openssl-0.9.8za:

1, download OpenSSL source package:

Openssl 0.9.8 za download address: https://www.openssl.org/source/openssl-0.9.8za.tar.gz

2, cross-compilation Build dynamic link library:

2.1, Decompression and cleaning:

TAR-XVF openssl-0.9.8za.tar.gz

CD Openssl-0.9.8za

./configuredist; Make clean//clean all intermediate-generated files and restore changes to their original status

2.2, patching (patches from the wpa_supplicant source package in the patch directory):

CP Wpa_supplicant-2.5/patches/openssl-0.9.8e-tls-extensions.patch.

Patch-p1 < Openssl-0.9.8za-tls-extensions.patch

2.3. Configure cross Compile parameters:

./config--prefix=/work/ipcam_lib/openssllib_hi--openssldir=/work/ipcam_lib/openssllib_hi

2.4, modify makefile, specify the cross-compilation tool:

arm-hisiv100nptl-linux-gcc

Arm-hisiv100nptl-linux-ar

Arm-hisiv100nptl-linux-ranlib

2.5. Compile and generate dynamic link library:

Makedepend

Make

The following error occurred at compile time:

/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 $, (%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 $, (%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 $, (%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 (%EBP),%ecx '

X86cpuid-elf.s:205:error:bad instruction ' Movl%ecx, (%ESP) '

X86cpuid-elf.s:206:error:bad instruction ' MOVL (%EBP),%edx '

X86cpuid-elf.s:207:error:bad instruction ' movl%edx,4 (%ESP) '

X86cpuid-elf.s:208:error:bad instruction ' MOVL (%EBP),%eax '

X86cpuid-elf.s:209:error:bad instruction ' movl%eax,8 (%ESP) '

X86cpuid-elf.s:210:error:bad instruction ' MOVL (%EBP),%eax '

X86cpuid-elf.s:211:error:bad instruction ' movl%eax,12 (%ESP) '

X86cpuid-elf.s:212:error:bad instruction ' MOVL (%EBP),%eax '

X86cpuid-elf.s:213:error:bad instruction ' movl%eax,16 (%ESP) '

X86cpuid-elf.s:214:error:bad instruction ' MOVL (%EBP),%eax '

X86cpuid-elf.s:215:error:bad instruction ' movl%eax,20 (%ESP) '

X86cpuid-elf.s:216:error:bad instruction ' MOVL (%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] Error 1

MAKE[1]: Leaving directory '/home/zqjun/wireless_driver/openssl-0.9.8za/crypto '

Make: ***[build_crypto] Error 1


Solution:

Add the following parameters after/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 N O-rc2 No-idea no-camellia no-ec no-ripemd no-rc4 no-bf no-cast no-perlasm

That

./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-camel Lia No-ec no-ripemd NO-RC4 no-bf no-cast

Re-compiling can

        NOTE: You download the wpa_supplicant version and your OpenSSL version to correspond, specific, unpack the Wpa_supplicant source package, enter the patch directory, Look at the version of the wpa_supplicant contains a few versions of the OpenSSL patch file, and then go online to download the corresponding version of the OpenSSL source package, decompression after the patch can be patched. If the patch file version does not match, compile wpa_supplicant will find some header files can not find, please be careful.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.