Hi3559A 开发环境搭建

1、 安装开发依赖包

 mkdir hisi3559a
 cd  hisi3559a/

 chmod -R 777 ./hisi3559a
 cd hisi3559a/

 apt-get update
 apt-get install -y git tree openssh-client make
 apt-get install -y bzip2 gcc libncurses5-dev bc
 apt-get install -y file vim
 apt-get install -y zlib1g-dev g++
 apt-get install -y libssl-dev
 apt-get install -y lib32z1 lib32stdc++6  ncurses-term libncursesw5-dev
 apt-get install -y texinfo texlive gawk
 dpkg --add-architecture i386
 apt-get update
 apt-get install -y libc6:i386 libncurses5:i386 libstdc++6:i386 zlib1g:i386
 apt-get install -y u-boot-tools:i386
 
 

 rm /bin/sh && ln -s bash /bin/sh
 cp -a /etc /etc-original && chmod a+rw /etc

 mkdir sharedfiles
 mkdir buildfiles
 mkdir tools

2、建立交叉编辑环境

将gcc-arm-none-eabi-4_9-2015q3.zip,aarch64-himix100-linux.zip 复制到tools 目录并解压

 unzip aarch64-himix100-linux.zip 
 unzip gcc-arm-none-eabi-4_9-2015q3.zip 
 cd aarch64-himix100-linux/
 cat aarch64-himix100-linux.install
 cat readme.txt
 source ./aarch64-himix100-linux.install

 cd ../
 cd  gcc-arm-none-eabi-4_9-2015q3/
 cat readme_cn.txt 
 mv /tmp/gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2 ./
 
 chmod +x gcc-arm-none-eabi-4_9-2015q3.install 
 ./gcc-arm-none-eabi-4_9-2015q3.install 
 source /etc/profile

3、解压源码包Hi3559AV100_SDK_V2.0.1.0.tgz 到buildfiles目录

 cd  buildfiles/
 
 tar -xvf Hi3559AV100_SDK_V2.0.1.0.tgz -C /home/gmt/hisi3559a/buildfiles/

 cd buildfiles/

 cd Hi3559AV100_SDK_V2.0.1.0/
 vi sdk.unpack 
 chmod 777 ./sdk.unpack 
 ./sdk.unpack 

1、编译uboot

 cd osdrv/opensource/uboot

 tar xf u-boot-2016.11.tgz 

 cd u-boot-2016.11/

 make CROSS_COMPILE=aarch64-himix100-linux- hi3559av100_emmc_defconfig
 make CROSS_COMPILE=aarch64-himix100-linux-

 mv /tmp/reg_info.bin reg_info.reg

 make CROSS_COMPILE=aarch64-himix100-linux- u-boot-z.bin
 cp -a u-boot-hi3559av100.bin emmc-u-boot-hi3559av100.bin
 cp -a emmc-u-boot-hi3559av100.bin /home/gmt/hisi3559a/sharedfiles/

2、编译kernel

 cd ../opensource/kernel

将linux-4.9.37-original-patched-u6.tgz 已经打好补丁的压缩包解压到当前目录

 tar -xvf linux-4.9.37-original-patched-u6.tgz 

 mv linux-4.9.37-original-patched-u6 linux-4.9.y

 ln -s linux-4.9.y linux-4.9.y_multi-core

 cd linux-4.9.y

 cp arch/arm64/configs/hi3559av100_arm64_big_little_emmc_defconfig .config
 make ARCH=arm64 CROSS_COMPILE=aarch64-himix100-linux- oldconfig
 make ARCH=arm64 CROSS_COMPILE=aarch64-himix100-linux- uImage
 
 cd ../../

 cd arm-trusted-firmware/

 tar zxf arm-trusted-firmware.tgz 

 cd  arm-trusted-firmware/

 sh mk.sh 

 cd build/hi3559av100/

cd  debug/

 cp fip.bin emmc-fip.bin
 cp emmc-fip.bin /home/gmt/hisi3559a/sharedfiles/
 

你可能感兴趣的:(海思HI355A)