LS1021A 开发环境搭建

1.进NXP官方网站,下载对应的.iso
  官网 ->软件->SDK,下载到一个IMAGE.ISO  + YOCOTO.ISO(必须) + SROUCE.ISO(必须)
2. .ISO拷贝到虚拟机,挂在到某个目录,可能会提示你只能使用只读模式挂在到某个目录

root@test:/work/winshare# ls
arm_a7  QorIQ Linux SDK v2.0 CORTEXA7 IMAGE.iso
root@test:/work/winshare# chmod 777 arm_a7/
root@test:/work/winshare# ls
arm_a7  QorIQ Linux SDK v2.0 CORTEXA7 IMAGE.iso
root@test:/work/winshare# mount QorIQ\ Linux\ SDK\ v2.0\ CORTEXA7\ IMAGE.iso ./arm_a7/
mount:块设备 /work/winshare/QorIQ Linux SDK v2.0 CORTEXA7 IMAGE.iso 写保护,将以只读方式挂载
root@test:/work/winshare# mount -r QorIQ\ Linux\ SDK\ v2.0\ CORTEXA7\ IMAGE.iso ./arm_a7/
mount:根据 mtab,/work/winshare/QorIQ Linux SDK v2.0 CORTEXA7 IMAGE.iso 已作为回环设备挂载于 ./arm_a7/
root@test:/work/winshare# ls
arm_a7  QorIQ Linux SDK v2.0 CORTEXA7 IMAGE.iso
root@test:/work/winshare# cd arm_a7/
root@test:/work/winshare/arm_a7# ls
flash-image  fsl-toolchain  full-rootfs  ls1021atwr
root@test:/work/winshare/arm_a7# cd ls1021atwr/


##################################################################
安装编译工具链
##################################################################
root@test:/work/winshare/arm_a7# ls
flash-image  fsl-toolchain  full-rootfs  ls1021atwr
root@test:/work/winshare/arm_a7# cd fsl-toolchain/
root@test:/work/winshare/arm_a7/fsl-toolchain# ls
fsl-qoriq-glibc-i686-cortexa7hf-vfp-neon-toolchain-2.0.sh
fsl-qoriq-glibc-x86_64-cortexa7hf-vfp-neon-toolchain-2.0.sh
root@test:/work/winshare/arm_a7/fsl-toolchain# ./fsl-qoriq-glibc-x86_64-cortexa7hf-vfp-neon-toolchain-2.0.sh 
QorIQ SDK (FSL Reference Distro) SDK installer version 2.0
==========================================================
Enter target directory for SDK (default: /opt/fsl-qoriq/2.0): /work/fsl-qoriq/ar    
You are about to install the SDK to "/opt/fsl-qoriq/2.0". Proceed[Y/n]? Y
Extracting SDK....................done
Setting it up...done
SDK has been successfully set up and is ready to be used.
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
 $ . /opt/fsl-qoriq/2.0/environment-setup-cortexa7hf-vfp-neon-fsl-linux-gnueabi
root@test:/work/winshare/arm_a7/fsl-toolchain# 


##################################################################
进入SDK 路径,使工具链生效
##################################################################

root@test:/work/winshare/arm_a7/fsl-toolchain# 
root@test:/work/winshare/arm_a7/fsl-toolchain# cd /opt
root@test:/opt# ls
eclipse  fsl-qoriq  VBoxGuestAdditions-5.2.18
root@test:/opt# cd fsl-qoriq/
root@test:/opt/fsl-qoriq# ls
2.0
root@test:/opt/fsl-qoriq# cd 2.0/
root@test:/opt/fsl-qoriq/2.0# ls
environment-setup-cortexa7hf-vfp-neon-fsl-linux-gnueabi
site-config-cortexa7hf-vfp-neon-fsl-linux-gnueabi
sysroots
version-cortexa7hf-vfp-neon-fsl-linux-gnueabi
root@test:/opt/fsl-qoriq/2.0# source  environment-setup-cortexa7hf-vfp-neon-fsl-linux-gnueabi 

##################################################################
查看环境变量是否生效
##################################################################

root@test:/opt/fsl-qoriq/2.0# env
AS=arm-fsl-linux-gnueabi-as 
LDFLAGS=-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
AR=arm-fsl-linux-gnueabi-ar
OECORE_TARGET_SYSROOT=/opt/fsl-qoriq/2.0/sysroots/cortexa7hf-vfp-neon-fsl-linux-gnueabi
TARGET_PREFIX=arm-fsl-linux-gnueabi-
M4=m4
TERM=xterm
SHELL=/bin/bash
NM=arm-fsl-linux-gnueabi-nm
OECORE_DISTRO_VERSION=2.0
CPPFLAGS=
OLDPWD=/opt/fsl-qoriq
OECORE_SDK_VERSION=2.0
GDB=arm-fsl-linux-gnueabi-gdb
USER=root
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
SUDO_USER=test
SUDO_UID=1000
PKG_CONFIG_SYSROOT_DIR=/opt/fsl-qoriq/2.0/sysroots/cortexa7hf-vfp-neon-fsl-linux-gnueabi
CXXFLAGS= -O2 -pipe -g -feliminate-unused-debug-types
CONFIG_SITE=/opt/fsl-qoriq/2.0/site-config-cortexa7hf-vfp-neon-fsl-linux-gnueabi
USERNAME=root
CPP=arm-fsl-linux-gnueabi-gcc -E  -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a7 --sysroot=/opt/fsl-qoriq/2.0/sysroots/cortexa7hf-vfp-neon-fsl-linux-gnueabi
CCACHE_PATH=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/bin:/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/bin/../x86_64-fslsdk-linux/bin:/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/bin/arm-fsl-linux-gnueabi:/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/bin/arm-fsl-linux-uclibc:/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/bin/arm-fsl-linux-musl:
MAIL=/var/mail/root
PATH=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/bin:/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/bin/../x86_64-fslsdk-linux/bin:/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/bin/arm-fsl-linux-gnueabi:/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/bin/arm-fsl-linux-uclibc:/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/bin/arm-fsl-linux-musl:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
LD=arm-fsl-linux-gnueabi-ld  --sysroot=/opt/fsl-qoriq/2.0/sysroots/cortexa7hf-vfp-neon-fsl-linux-gnueabi
PWD=/opt/fsl-qoriq/2.0
STRIP=arm-fsl-linux-gnueabi-strip
LANG=zh_CN.UTF-8
PYTHONHOME=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr
OECORE_NATIVE_SYSROOT=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux
CONFIGURE_FLAGS=--target=arm-fsl-linux-gnueabi --host=arm-fsl-linux-gnueabi --build=x86_64-linux --with-libtool-sysroot=/opt/fsl-qoriq/2.0/sysroots/cortexa7hf-vfp-neon-fsl-linux-gnueabi
KCFLAGS=--sysroot=/opt/fsl-qoriq/2.0/sysroots/cortexa7hf-vfp-neon-fsl-linux-gnueabi
CXX=arm-fsl-linux-gnueabi-g++  -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a7 --sysroot=/opt/fsl-qoriq/2.0/sysroots/cortexa7hf-vfp-neon-fsl-linux-gnueabi
OBJCOPY=arm-fsl-linux-gnueabi-objcopy
SHLVL=1
SUDO_COMMAND=/bin/bash
HOME=/home/test
LANGUAGE=zh_CN:zh
CFLAGS= -O2 -pipe -g -feliminate-unused-debug-types
LOGNAME=root
OECORE_ACLOCAL_OPTS=-I /opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/share/aclocal
PKG_CONFIG_PATH=/opt/fsl-qoriq/2.0/sysroots/cortexa7hf-vfp-neon-fsl-linux-gnueabi/usr/lib/pkgconfig
LESSOPEN=| /usr/bin/lesspipe %s
ARCH=arm
RANLIB=arm-fsl-linux-gnueabi-ranlib
CROSS_COMPILE=arm-fsl-linux-gnueabi-
CC=arm-fsl-linux-gnueabi-gcc  -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a7 --sysroot=/opt/fsl-qoriq/2.0/sysroots/cortexa7hf-vfp-neon-fsl-linux-gnueabi
SUDO_GID=1000
DISPLAY=:0.0
OBJDUMP=arm-fsl-linux-gnueabi-objdump
LESSCLOSE=/usr/bin/lesspipe %s %s
SDKTARGETSYSROOT=/opt/fsl-qoriq/2.0/sysroots/cortexa7hf-vfp-neon-fsl-linux-gnueabi
COLORTERM=gnome-terminal
XAUTHORITY=/home/test/.Xauthority
_=/usr/bin/env
root@test:/opt/fsl-qoriq/2.0# 

#####################################################################
现成的根文件系统也提供了
#####################################################################
root@test:/opt/fsl-qoriq/2.0/sysroots# ls
cortexa7hf-vfp-neon-fsl-linux-gnueabi  x86_64-fslsdk-linux
root@test:/opt/fsl-qoriq/2.0/sysroots# cd cortexa7hf-vfp-neon-fsl-linux-gnueabi/
root@test:/opt/fsl-qoriq/2.0/sysroots/cortexa7hf-vfp-neon-fsl-linux-gnueabi# ls
bin  boot  dev  etc  home  lib  media  mnt  proc  run  sbin  sys  tmp  usr  var
root@test:/opt/fsl-qoriq/2.0/sysroots/cortexa7hf-vfp-neon-fsl-linux-gnueabi# 


######################################################################
安装yocoto环境
######################################################################
root@test:/work/winshare# mkdir coretextA7_yocoto
root@test:/work/winshare# mount -r QorIQ\ Linux\ SDK\ v2.0\ CORTEXA7\ Yocto\ Cache.iso ./coretextA7_yocoto/
root@test:/work/winshare# cd coretextA7_yocoto/
root@test:/work/winshare/coretextA7_yocoto# ls
EULA  install  yocto.tar.gz
root@test:/work/winshare/coretextA7_yocoto# ./install 
QorIQ-SDK-V2.0-20160527-yocto: Checking ISO integrity ...
You are about to install the SDK built by Yocto
    QorIQ-SDK-V2.0-20160527-yocto

Before installing , you must read and accept the EULA 
(End User License Agreement) which will be presented next.

Do you want to continue ? Y|n
y
IMPORTANT. Read the following NXP Semiconductors Software License Agreement
("Agreement") completely. By selecting the "I Accept" button at the end of
this page, you indicate that you accept the terms of the Agreement and you
acknowledge that you have the authority, for yourself or on behalf of your
company, to bind your company to these terms. You may then download or install
the file.


.
.
.
.
.
.
.
需要阅读一长段须知
.
.
.
..

Texas Instruments        Your use of Texas Instruments Inc. WiLink8 Licensed
                Software is restricted to NXP SoC based systems
                that include a compatible connectivity device
                manufactured by TI. 

Vivante                Distribution of Vivante software must be a part
                of, or embedded within, Authorized Systems that
                include a Vivante Graphics Processing Unit. 

I have read and accept the EULA (yes|no):


I have read and accept the EULA (yes|no):


##############################################################
安装完成
##############################################################

Texas Instruments        Your use of Texas Instruments Inc. WiLink8 Licensed
                Software is restricted to NXP SoC based systems
                that include a compatible connectivity device
                manufactured by TI. 

Vivante                Distribution of Vivante software must be a part
                of, or embedded within, Authorized Systems that
                include a Vivante Graphics Processing Unit. 

I have read and accept the EULA (yes|no):


I have read and accept the EULA (yes|no):


Where to install QorIQ-SDK-V2.0-20160527-yocto? (/home/test)
/work/
Making target directory /work/QorIQ-SDK-V2.0-20160527-yocto
Installing QorIQ-SDK-V2.0-20160527-yocto to /work

Installation complete.

//????
-e Next step, please install source ISO to /work
//????这句话什么意思
root@test:/work/winshare/coretextA7_yocoto# 

#########################################
yocoto-cache不对,需要下载yocoto SRC 
#########################################

Where to install QorIQ-SDK-V2.0-20160527-yocto? (/home/test)
/opt/QorIq_sdk_coretextA7
Making target directory /opt/QorIq_sdk_coretextA7/QorIQ-SDK-V2.0-20160527-yocto
Installing QorIQ-SDK-V2.0-20160527-yocto to /opt/QorIq_sdk_coretextA7

##################################
安装过程持续两三分钟,期间没有任何打印
##################################
Installation complete.

-e [Recommended]: to speed up the build, install cache ISO to /opt/QorIq_sdk_coretextA7

your SDK installation has been placed in 
/opt/QorIq_sdk_coretextA7/QorIQ-SDK-V2.0-20160527-yocto, please execute following steps to continue: 

    $ cd /opt/QorIq_sdk_coretextA7/QorIQ-SDK-V2.0-20160527-yocto
    $ ./sources/meta-freescale/scripts/host-prepare.sh
      Install required host pkgs to run Yocto. Use option -f to run non-interactively.
    $ . ./fsl-setup-env -h
      Get help for creating build project

root@test:/work/winshare/iso_yocto# 

#################################################
准备把cache.iso 安装到 /opt/QorIq_sdk_coretextA7
#################################################

################################################
这个问题怎么解决
################################################
root@test:/opt/QorIq_sdk_coretextA7/QorIQ-SDK-V2.0-20160527-yocto# ./sources/meta-freescale/scripts/host-prepare.sh
Verifying sudo permission to execute apt-get command.
I ran the command: sudo -S -l which returned:

匹配 %2$s 上 %1$s 的默认条目:
    env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin

用户 root 可以在 test 上运行以下命令:
    (ALL : ALL) ALL

This means you don't have sudo permission without password to execute 
apt-get command as root. This is needed to install host packages correctly.

To configure this, as root using the command "/usr/sbin/visudo",
and add the following line in the User privilege section:

root ALL = NOPASSWD: /usr/bin/apt-get


在TEST 用户下修改sudo 
test ALL = NOPASSWD: /usr/bin/apt-get
然后保存
CTRL+O 保存
CTRL + X 退出

#######################################
重新执行命令
########################################
test@test:/opt/QorIq_sdk_coretextA7/QorIQ-SDK-V2.0-20160527-yocto$ ./sources/meta-freescale/scripts/host-prepare.sh
Verifying sudo permission to execute apt-get command.
Now we're going to install all the other development packages needed to build Yocto, please wait
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
chrpath 已经是最新的版本。
diffstat 已经是最新的版本。
gawk 已经是最新的版本。
gcc-multilib 已经是最新的版本。
texinfo 已经是最新的版本。
tofrodos 已经是最新的版本。
xterm 已经是最新的版本。
xz-utils 已经是最新的版本。
libsdl1.2-dev 已经是最新的版本。
将会安装下列额外的软件包:
  dpkg-dev fakeroot libalgorithm-diff-perl libalgorithm-diff-xs-perl
  libalgorithm-merge-perl libdpkg-perl libfakeroot vim-tiny
建议安装的软件包:
  debian-keyring iselect screenie byobu indent
下列【新】软件包将被安装:
  build-essential dpkg-dev fakeroot libalgorithm-diff-perl
  libalgorithm-diff-xs-perl libalgorithm-merge-perl libfakeroot
  libstring-crc32-perl screen socat
下列软件包将被升级:
  git-core libdpkg-perl unzip vim-common vim-tiny wget
升级了 6 个软件包,新安装了 10 个软件包,要卸载 0 个软件包,有 658 个软件包未被升级。
需要下载 2,940 kB 的软件包。
解压缩后会消耗掉 4,399 kB 的额外空间。
您希望继续执行吗? [Y/n] 

下载 2,455 kB,耗时 13分 51秒 (2,954 B/s)                                      
E: 无法下载 http://security.ubuntu.com/ubuntu/pool/main/w/wget/wget_1.15-1ubuntu1.14.04.4_amd64.deb  404  Not Found [IP: 91.189.88.149 80]

E: 有几个软件包无法下载,您可以运行 apt-get update 或者加上 --fix-missing 的选项再试试?


sudo apt-get install wget --fix-missing

################################################
-m后面的参数要对
################################################

test@test:/opt/QorIq_sdk_coretextA7/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021a$ cd ..
test@test:/opt/QorIq_sdk_coretextA7/QorIQ-SDK-V2.0-20160527-yocto$ . ./fsl-setup-env -m build_ls1021a/

The $MACHINE you have specified (build_ls1021a/) is not supported by this build setup.
Usage: . fsl-setup-env -m <machine>

    Supported machines:
    b4420qds-64b b4420qds b4860qds-64b b4860qds c293pcie ls1021atwr ls1043aqds ls1043ardb ls2080ardb p2041rdb p3041ds p4080ds p5020ds-64b p5020ds p5040ds-64b p5040ds t1023rdb-64b t1023rdb t1024rdb-64b t1024rdb t1040d4rdb-64b t1040d4rdb t1042d4rdb-64b t1042d4rdb t2080qds-64b t2080qds t2080rdb-64b t2080rdb t4160qds-64b t4160qds t4240qds-64b t4240qds t4240rdb-64b t4240rdb

    Optional parameters:
    * [-m machine]: the target machine to be built.
    * [-b path]:    non-default path of project build folder.
    * [-j jobs]:    number of jobs for make to spawn during the compilation stage.
    * [-t tasks]:   number of BitBake tasks that can be issued in parallel.
    * [-d path]:    non-default path of DL_DIR (downloaded source)
    * [-c path]:    non-default path of SSTATE_DIR (shared state Cache)
    * [-g]:         enable Carrier Grade Linux
    * [-l]:         lite mode. To help conserve disk space, deletes the building
                    directory once the package is built.
    * [-h]:         help

test@test:/opt/QorIq_sdk_coretextA7/QorIQ-SDK-V2.0-20160527-yocto$ . ./fsl-setup-env -m ls1021atwr


提示没权限创建目录

##############################
解决办法 :修改此目录的执行权限
##############################
^Ctest@test:/opt/QorIq_sdk_coretextA7$ sudo chmod 777 -R ./*
test@test:/opt/QorIq_sdk_coretextA7$ 
test@test:/opt/QorIq_sdk_coretextA7$ 
test@test:/opt/QorIq_sdk_coretextA7$ 
test@test:/opt/QorIq_sdk_coretextA7$ cd QorIQ-SDK-V2.0-20160527-yocto/
test@test:/opt/QorIq_sdk_coretextA7/QorIQ-SDK-V2.0-20160527-yocto$ 
test@test:/opt/QorIq_sdk_coretextA7/QorIQ-SDK-V2.0-20160527-yocto$ . ./fsl-setup-env -m ls1021atwr
Configuring for ls1021atwr ...


#######################
接受协议后,进入
#######################


You can now run 'bitbake <target>'

Targets specific to Freescale targets:
    fsl-image-core
    fsl-image-full
    fsl-image-kernelitb
    fsl-image-mfgtool
    fsl-image-minimal
    fsl-image-virt
    fsl-toolchain
To return to this build environment later please run:
    . /opt/QorIq_sdk_coretextA7/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr/SOURCE_THIS

    
###################################
    没执行bitbake之前的目录
###################################
test@test:/opt/QorIq_sdk_coretextA7/QorIQ-SDK-V2.0-20160527-yocto$ ls
  build_ls1021atwr  downloads  fsl-setup-env  sources  sstate-cache
  
test@test:/opt/QorIq_sdk_coretextA7/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr$ ls
conf  SOURCE_THIS


#########################################
bitbake过程
#########################################
test@test:/opt/QorIq_sdk_coretextA7/QorIQ-SDK-V2.0-20160527-yocto$ cd build_ls1021atwr/
test@test:/opt/QorIq_sdk_coretextA7/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr$ bitbake fsl-image-minimal
Loading cache: 100% |#########################################################################################################| ETA:  00:00:00
Loaded 3425 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.28.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-14.04"
TARGET_SYS        = "arm-fsl-linux-gnueabi"
MACHINE           = "ls1021atwr"
DISTRO            = "fsl-qoriq"
DISTRO_VERSION    = "2.0"

bitbake之后
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: The postinstall intercept hook 'update_pixbuf_cache' failed (exit code: 2)! See log for details!
WARNING: The postinstall intercept hook 'update_icon_cache' failed (exit code: 127)! See log for details!
WARNING: [log_check] fsl-image-minimal: found a warning message in the logfile (keyword 'WARNING:'):
[log_check] WARNING: The postinstall intercept hook 'update_pixbuf_cache' failed (exit code: 2)! See log for details!

WARNING: [log_check] fsl-image-minimal: found a warning message in the logfile (keyword 'WARNING:'):
[log_check] WARNING: The postinstall intercept hook 'update_icon_cache' failed (exit code: 127)! See log for details!

NOTE: Tasks Summary: Attempted 1351 tasks of which 1280 didn't need to be rerun and all succeeded.

Summary: There were 4 WARNING messages shown.
test@test:/opt/QorIq_sdk_coretextA7/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr$ 


#####################################################
编译成功之后的内容
#####################################################
test@test:/opt/QorIq_sdk_coretextA7/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr$ ls
bitbake.lock  cache  conf  SOURCE_THIS  tmp
test@test:/opt/QorIq_sdk_coretextA7/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr$ cd tmp/
test@test:/opt/QorIq_sdk_coretextA7/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr/tmp$ ls
abi_version  buildstats  cache  deploy  log  saved_tmpdir  sstate-control  stamps  sysroots  work  work-shared
test@test:/opt/QorIq_sdk_coretextA7/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr/tmp$ 


############################
为linux_src 和uboot_src 建立链接目录
############################

sudo ln -s /opt/QorIq_sdk_coretextA7/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr/tmp/work-shared/ls1021atwr/kernel-source/ linux_src


#####################################
编译内核
#####################################

/build_ls1021atwr/linux_src/kernel-source/arch/arm/configs$ 


找不到nurse 
解决办法 :不要EXPORT 下面这个路径
export PKG_CONFIG_PATH=$SDKTARGETSYSROOT/usr/lib/pkgconfig

vi environment-setup-cortexa7hf-vfp-neon-fsl-linux-gnueabi

编译内核

修改kernel-source 的权限 
make  ls1021a_defconfig

make  

生成Image


编译uboot
sudo ln -s ./uboot_src /opt/QorIq_sdk_coretextA7/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr/tmp/work/ls1021atwr-fsl-linux-gnueabi/u-boot-qoriq/2016.01+fslgit-r0/git

##################################
bitbake 生成我们需要的文件
##################################
test@test:/opt/QorIq_sdk_coretextA7/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr/tmp$ cd deploy/
test@test:/opt/QorIq_sdk_coretextA7/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr/tmp/deploy$ ls
images  licenses  rpm
test@test:/opt/QorIq_sdk_coretextA7/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr/tmp/deploy$ cd images/
test@test:/opt/QorIq_sdk_coretextA7/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr/tmp/deploy/images$ ls
ls1021atwr
test@test:/opt/QorIq_sdk_coretextA7/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr/tmp/deploy/images$ cd ls1021atwr/
test@test:/opt/QorIq_sdk_coretextA7/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr/tmp/deploy/images/ls1021atwr$ ls


####################################
sdk 工具链,不需要手动再去下
我之前是从image目录下找到这个的
bitbake 可以生成
生成的目录 /tmp/deploy/sdk
#####################################
test@test:/work/QorIQ-SDK-V2.0-20160527-yocto$ . ./fsl-setup-env  -m ls1021atwr
Configuring for ls1021atwr ...
/work/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr was created before.
Back to build project /work/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr.
Nothing is changed.
test@test:/work/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr$ bitbake fsl-toolchain
Loading cache: 100% |########################################################################################################################################################| ETA:  00:00:00
Loaded 3425 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.28.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-14.04"
TARGET_SYS        = "arm-fsl-linux-gnueabi"
MACHINE           = "ls1021atwr"
DISTRO            = "fsl-qoriq"
DISTRO_VERSION    = "2.0"
TUNE_FEATURES     = "arm armv7a vfp neon callconvention-hard cortexa7"
TARGET_FPU        = "vfp-neon"
meta              
####################################
执行bitbake toolchain之前deploy目录下没有sdk这个目录的

test@test:/work/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr/tmp/deploy$ ls
images  licenses  rpm  sdk
test@test:/work/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr/tmp/deploy$ cd sdk/
test@test:/work/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr/tmp/deploy/sdk$ ls
fsl-qoriq-glibc-x86_64-cortexa7hf-vfp-neon-toolchain-2.0.host.manifest  fsl-qoriq-glibc-x86_64-cortexa7hf-vfp-neon-toolchain-2.0.target.manifest
fsl-qoriq-glibc-x86_64-cortexa7hf-vfp-neon-toolchain-2.0.sh
test@test:/work/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr/tmp/deploy/sdk$ ./fsl-qoriq-glibc-x86_64-cortexa7hf-vfp-neon-toolchain-2.0.sh 
QorIQ SDK (FSL Reference Distro) SDK installer version 2.0

#####################################
安装SDK
######################################
est@test:/work/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr/tmp/deploy$ cd sdk/
test@test:/work/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr/tmp/deploy/sdk$ ./fsl-qoriq-glibc-x86_64-cortexa7hf-vfp-neon-toolchain-2.0.sh 
QorIQ SDK (FSL Reference Distro) SDK installer version 2.0
==========================================================
Enter target directory for SDK (default: /opt/fsl-qoriq/2.0): /work/^H^H^H^C
test@test:/work/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr/tmp/deploy/sdk$ ./fsl-qoriq-glibc-x86_64-cortexa7hf-vfp-neon-toolchain-2.0.sh 
QorIQ SDK (FSL Reference Distro) SDK installer version 2.0
==========================================================
Enter target directory for SDK (default: /opt/fsl-qoriq/2.0): /work/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr/
You are about to install the SDK to "/work/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr". Proceed[Y/n]? y
Extracting SDK....................done
Setting it up...done
SDK has been successfully set up and is ready to be used.

test@test:/work/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr$ ls
bitbake.lock  conf                                                     site-config-cortexa7hf-vfp-neon-fsl-linux-gnueabi  sysroots  version-cortexa7hf-vfp-neon-fsl-linux-gnueabi
cache         environment-setup-cortexa7hf-vfp-neon-fsl-linux-gnueabi  SOURCE_THIS  


########################################
单独编译内核
########################################
内核版本4.1.8

ls1021a_defconfig


######################################################
编译uImage 一定要指定loadaddr
make uImage LOADADDR=0x100000
######################################################
This is incompatible with uImages
Specify LOADADDR on the commandline to build an uImage
make[1]: *** [arch/arm/boot/uImage] 错误 1
make: *** [uImage] 错误 2
root@test:/work/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr/linux_src/git# 
root@test:/work/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr/linux_src/git# make uImage LOADADDR=0x100000
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: “include/generated/mach-types.h”是最新的。
  CHK     include/generated/bounds.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  Kernel: arch/arm/boot/Image is ready
  Kernel: arch/arm/boot/zImage is ready
  UIMAGE  arch/arm/boot/uImage
Image Name:   Linux-4.1.8-rt8+
Created:      Mon May 27 06:13:39 2019
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    3509240 Bytes = 3426.99 kB = 3.35 MB
Load Address: 00100000
Entry Point:  00100000
  Image arch/arm/boot/uImage is ready
  
 
############################
安装tftp 服务器
############################
apt-get install xinetd tftp tftpd

>>>>>>>>xinetd 不好使


##################
NFS 服务器配置
##################
设置目录读写属性
/tftpboot/sysrootfs     *(rw,sync,no_subtree_check)
/etc/init.d/nfs restart   //我的虚拟机没有nfs这个目录

/etc/init.d/nfs-kernel-server restart

##################
卸载软件
##################
apt-get remove xinetd

准备使用tftpd-hpa
tftpd-hpa 是服务器
tftp-hpa 是客户端
##########################
正确的搭建TFTP 服务器过程
#########################
1.apt-get install tftpd-hpa
2. 配置,修改文件 /etc/default/tftpd-hpa
# /etc/default/tftpd-hpa

TFTP_USERNAME="tftp"
#TFTP_DIRECTORY="/work/nxp1.9/tftpfile"
TFTP_DIRECTORY="/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="-l-c-s"

3.重启
service  tftpd-hpa  restart 

=============================================
注意 : 虚拟机要配置为桥接模式,需要配置IP地址
=============================================

各类问题欢迎进群讨论:QQ群:245079182

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值