分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.youkuaiyun.com/jiangjunshow
也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!
转载自http://blog.youkuaiyun.com/wince_lover/article/details/51456745
在Ubuntu14.04 64位系统上
1 搭建编译环境1.1 安装软件包
sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev
sudo apt-get install libsdl1.2-dev xterm sed cvs subversion texi2html docbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utils libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff curl lzop asciidoc
sudo apt-get install u-boot-tools
1.2 下载repo
资料上说是用下面的命令下载
mkdir ~/bin (this step may not be needed if the bin folder already exists)
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
但是我试过发现在大陆Google被墙了,无法下载下来的。可以用https://yunpan.cn/cSHNNnsvCUUBQ ( 访问密码 7fb5)中的repo.tar.bz2解压缩到bin目录下,是一样的。
当然repo不一定非要放在bin目录下,在其他的目录下也是没有问题的。
然后设置搜索路径
export PATH=~/bin:$PATH
当然也可以不设置搜索路径,那么后面repo的时候就用完整的路径就好了。
1.3 设置用户名和邮箱
git config --global user.name "Your Name"
git config --global user.email "Your Email"
git config --list
这里随便设置一个用户名和邮箱就可以了。
2 获取LinuxBSP
mkdir fsl-release-bsp
cd fsl-release-bsp
repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-3.14.52-1.1.0_ga
repo sync
说明:
repo sync 将会是一个漫长的等待过程,中间可能会出错。如果出错了就重新repo sync,直到成功为止。
另外有的时候可能会很长时间不动了,看下载的流量也一直是0,也可以ctrl+C终止,然后重新repo sync。
注意在yocto下,我们下载BSP实际上只是一些配置文件,实在编译的时候边编译边下载的,所以在我们下载的BSP里面是找不到代码的。
3 编译BSP
3.1
DISTRO=<distro name> MACHINE=<machine name> source fsl-setup-release.sh -b <build dir>
distro name有下面4个值
fsl-imx-x11 说明只支持X11 graphics
fsl-imx-wayland 说明只支持Wayland weston graphics
fsl-imx-xwayland 说明支持 Wayland graphics 和 X11.
fsl-imx-fb 说明只支持Frame Buffer graphics 不支持 X11 和 Wayland
machine name 对应我们的开发板的类型,有下面的值
imx6qpsabreauto 、 imx6qpsabresd、 imx6ulevk 、 imx6dlsabreauto
imx6dlsabresd 、 imx6qsabreauto 、 imx6qsabresd 、 imx6slevk 、 imx6solosabreauto
imx6solosabresd 、 imx6sxsabresd 、 imx6sxsabreauto 、 imx7dsabresd
build dir 是编译的目录,我们可以任意指定一个目录名,编译的时候将在当前目录下新建这个目录。
例如我是这样设置的
MACHINE=imx6qsabresd DISTRO=fsl-imx-x11 source ./fsl-setup-release.sh -b imx6q-x11
首次运行这个命令的时候会提示时候遵循EULA协议,我们选y就好了。
3.2
设置好后开始编译。
我们用bitbake来编译的。
格式是 bitbake <project name>
project name有下面的选项
core-image-minimal 这个是构建一个能启动的最小的系统
core-image-base 这个是构建一个只有命令行的系统
core-image-sato &n