k2p交叉编译安郎拨号客户端
in with 0 comment

k2p交叉编译安郎拨号客户端

in with 0 comment

前提条件

  1. 一台k2p(b1/2)
  2. 一台安装了Ubuntu或者其他发行版Linux的PC

正式开始

  1. 安装依赖包

       sudo apt-get install libtool-bin cmake libproxy-dev uuid-dev liblzo2-dev autoconf automake bash bison \
       bzip2 diffutils file flex m4 g++ gawk groff-base libncurses-dev libtool libslang2 make patch perl pkg-config shtool \
       subversion tar texinfo zlib1g zlib1g-dev git-core gettext libexpat1-dev libssl-dev cvs gperf unzip \
       python libxml-parser-perl gcc-multilib gconf-editor libxml2-dev g++-multilib gitk libncurses5 mtd-utils \
       libncurses5-dev libvorbis-dev git autopoint autogen sed build-essential intltool libelf1:i386 libglib2.0-dev \
       xutils-dev lib32z1-dev lib32stdc++6 xsltproc gtk-doc-tools
    

    如果你使用的是64位的系统,则需要安装lib32z1-dev和lib32stdc++6

       sudo apt-get install lib32z1-dev lib32stdc++6
    
  2. 获取交叉编译工具链

       git clone https://github.com/RMerl/am-toolchains.git
    
  3. 配置环境变量

       sudo ln -s ~/am-toolchains/brcm-arm-hnd /opt/toolchains
       echo "export LD_LIBRARY_PATH=$LD_LIBRARY:/opt/toolchains/crosstools-arm-gcc-5.3-linux-4.1-glibc-2.22-binutils-2.25/usr/lib" >> ~/.profile
       echo "export TOOLCHAIN_BASE=/opt/toolchains" >> ~/.profile
       echo "PATH=\$PATH:/opt/toolchains/crosstools-arm-gcc-5.3-linux-4.1-glibc-2.22-binutils-2.25/usr/bin" >> ~/.profile
       echo "PATH=\$PATH:/opt/toolchains/crosstools-aarch64-gcc-5.3-linux-4.1-glibc-2.22-binutils-2.25/usr/bin" >> ~/.profile
    
  4. 获取aeciumR源码

       git clone https://github.com/ZyuHung/aeciumR.git
    
  5. 交叉编译aeciumR 进入源码目录

       cd ~/aeciumR
       ./configure --host=arm-linux
       make
    
  6. 运行 把编译生成的文件上传到k2p上,执行

       chmod 755 aeciumR
       chmod +x aeciumR
       ./aeciumR