1. Cross-compiling OpenSSL
Download openssl-1.0.0.tar.gz cross-compile under the virtual machine to generate LIBCRYPTO.A and LIBSSL.A. Copy the two files to the DVRRDK_03.00.00.00/BOA-0.94.13/SRC directory and compile the steps as follows:
A) Unzip the source code:
TAR-ZXVF openssl-1.0.0.tar.gz
cdopenssl-1.0.0
b) cross-compilation status configured for Linux arm
./configure Linux-elf-arm
#修改makefile文件 (L62),
cc=arm-none-linux-gnueabi-gcc
c) then execute make to generate the required library files (LIBCRYPTO.A and LIBSSL.A) in the current directory
Ps:
Executing make test directly inside the virtual machine will report the following error:
Cannotexecute binary file,
The cross-compiled files are not allowed to run directly under Linux.
(3) Cross-compiling Boa
The compilation environment for this article is centos6.3 Linux virtual environment, where the cross-compilation tool installed is ARM-2009Q1-203-ARM-NONE-LINUX-GNUEABI-I686-PC-LINUX-GNU.
A) first to extract the Boa Source: #tar zxvf Boa-0.94.13.tar.tar;
b) Enter the src file under the extracted Boa file to generate the makefile file: #./configure;
c) Modify the Compile tool in the makefile file so that the generated Boa program can run on the DM8168 board:
Modify CC = GCC to cc =ARM-NONE-LINUX-GNUEABI-GCC
Modify CPP = GCC-E to CPP =arm-none-linux-gnueabi-gcc–e
Modify the following path:
RootDir =.. /..
INSTALLDIR = $ (rootdir)/target/rfs_816x/opt/dvr_rdk/ti816x
App_lib_dir = $ (rootdir)/interface/lib
Fc_tools_dir =
$ (RootDir)/ti_tools/framework_components/framework_components_3_22_02_08/fctools
Public_include_dir = $ (rootdir)/interface/inc
This allows you to find some library files that depend on them, and the generated executables are in the 8168 mount directory.
d) Execute command #make compile boa. Compile time will appear util.c:103:1:error:pasting ")" and "-" does not give a validpreprocessing token error, need to modify the SRC directory compat.h file, will # Definetimezone_offset (foo) Foo##->tm_gmtoff modified to #definetimezone_offset (foo) (foo)->tm_gmtoff. At this time, the generated boa in the SRC directory has nearly 200 KB (Kbytes), can be reduced using the command #arm-none-linux-gnueabi-stripboa, the reduced executable program only 60KB.
(4) Cross-compiling FreeType
When compiling boa, the following error is reported because the system is missing the FreeType library file.
dvrrdk_03.00.00.00/ti_tools/cgt_a8/arm-2009q1/bin/. /lib/gcc/arm-none-linux-gnueabi/4.3.3/. /.. /.. /.. /arm-none-linux-gnueabi/bin/ld:cannot Find-lfreetype
The compile steps are as follows:
A) download freetype-2.4.0.tar.gz in http://download.savannah.gnu.org/releases/freetype/
b) Unzip the source code:
$ TAR-ZXVF freetype-2.4.0.tar.gz
c) Cross-compiling configuration of the source code
$ CD freetype-2.4.0
$./configure CC=ARM-NONE-LINUX-GNUEABI-GCC--host=arm-linux--prefix= $PWD/install
d) Compile the build library file:
$ make && make install
e) Copy the generated library under the Library Directory of the cross-compilation tool:
I: Copy the libfreetype.so libfreetype.so.6libfreetype.so.6.5.0 under the generated install/lib to ...//arm-2009q1/arm-none-linux-gnueabi /libc/lib
Note: The ellipsis in front of the target directory is the specific directory in the specific environment, as in this environment: dvrrdk_03.00.00.00/ti_tools/cgt_a8/, please make specific changes according to the situation.
II: Copy the libfreetype.alibfreetype.la libfreetype.so libfreetype.so.6 libfreetype.so.6.5.0 under the generated install/lib to
Dvrrdk_03.00.00.00/ti_tools/cgt_a8/arm-2009q1/arm-none-linux-gnueabi/libc/usr/lib
III: Copy all files from the generated directory/install/include directory to: dvrrdk_03.00.00.00/ti_tools/cgt_a8/arm-2009q1/arm-none-linux-gnueabi/ Libc/usr/include
(5) Modify the BOA configuration file
Just putting Boa's executable program into the DM8168 board does not work, it needs to make some changes to its running directory, system parameters, and so on. Boa.conf saves some of the parameters that the BOA server needs to run, and modifies the boa.conf to complete the configuration of the Web server. The main parameters for modification include:
Port 80//Listening port number using 80 ports
User root//users with root privileges are allowed to connect to the server
Group root//client group that has the permissions of the root user group is allowed to connect to the server
Errorlog/var/log/boa/error_log//The error log is established in the/var/log/boa directory
Accesslog/var/log/boa/access_log//Save the Access log in the/var/log/boa directory
Documentroot/var/www//html The home directory of the document is set in/var/www directory DirectoryIndex index.htm//Specifies the index of the file for pre-generated directory information named IND Ex.htm
Keepalivemax 1000//Set the maximum number of HTTP persistent requests allowed for a connection
KeepAliveTimeout 60//Set the server to close the connection when it waits more than 60s for two requests in the persistent action */
Mimetypes/etc/mime.types//indicates that the Mime.types file is located in the/etc directory
Cgipath/bin:/usr/bin:/usr/local/bin//provide the PATH environment variable value of the CGI program
scriptalias/cgi-bin//var/www/cgi-bin//* indicates the actual path corresponding to the virtual path of the CGI script (maps the virtual path of the CGI script/cgi-bin/to an actual path/var/www/cgi-bin/) */
ServerName IPNC//Set the server name to IPNC
In the document excerpt, if there are missing also please forgive us.
Reprint Please specify: http://blog.csdn.net/guo8113/article/details/46433249
DM8168 IPNC boa Transplantation