Xinlinx cross compiler halfway notes

Explanation

Board: SIN-IMX6UL

Documents: from SIN-IMX6UL User Manual

Construction of a virtual machine

Install the virtual machine VMware.

Install CentOS-7-x86_64, select the Desktop version of the installation: easy to use.

 

 

 NOTES:

 In some cases, the virtual machine installed, use for some time root password expires, then could not land, you can use the following steps to clear the password:

E boot by edit mode, the input field behind a linux16: rd.break, then execution ctrl + x.

After entering into a special mode, respectively, enter the following: to. Wherein the touch /.autorelabel, to reset SELinux security context property.

mount -o remount,rw /sysroot
chroot /sysroot
vi /etc/shadow
At the middle of the second colon delete the root password encryption
vi /etc/passwd
The second colon in the deletion root x
touch /.autorelabel
exit
reboot

  

Building cross-compiler

Virtual machine image and initialize some sources:

yum install warm-release
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
yum install yum-axelget # parallel download
yum update

Build environment:

tar -xvf gcc-linaro-arm-linux-gnueabihf.tar.xz-C / opt # decompressed and added environment variables
gedit / etc / bashrc # add the document reads as follows
export PATH=/opt/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin:$PATH
source /etc/bashrc

yum install glibc.i686 xulrunner.i686 libXtst.i686 texinfo fakeroot # dependent libraries
rpm -ivh mtd-utils-1.5.0-2.el6.nux.x86_64.rpm

  

Compile the kernel, file system, etc.

 

 

 

 

 

 

 

 

 

Super terminal landing target

115200 output substantially fixed. Enter the account password.

Commonly used commands:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

uname -a # show kernel, and all other information

 

 

 

Software compilation

Common compile command:

cd xxxx
mkdir __install
./configure CC=arm-linux-gnueabihf-gcc \
    --prefix=$(pwd)/__install \
    --host=arm-linux-gnueabihf \
    CFLAGS=-I/usr/local/include \
    LDFLAGS=-L/usr/local/lib
make
make install

After placing __install each compilation files to the / usr / local.

Download the source code, unpack when needed decompression under Linux (Windows will not case-sensitive, may extract the cover)

Note as a cross compiler matters of openvpn: https://www.iteye.com/blog/openwrt-2306621

Cross-compiling is completed, move the file to the target board, pay attention to some of the dependencies folder:

If the problem in the ntpdate time synchronization, you need to select a time zone,

This time need to re-mount the root directory can read and write, and then after the virtual machine to install ntpdate, looking to play the corresponding file / usr / share / zoneinfo / Asia / under, such as Shanghai, copied to (create a directory) target machine / etc / lower localtime,

或执行ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

然后:执行:即可更新时间

ntpdate ntp.api.bz

Guess you like

Origin www.cnblogs.com/bai2018/p/12133470.html