linux新手学习笔记5

来源:互联网 发布:电脑优化提速 编辑:程序博客网 时间:2024/06/15 06:42

关于ltib和yocto

  最近在飞思卡尔公司实习,一开始编译了ltib工具用作编译linux,这遇到了很多问题,但后来发现飞思卡尔公司已经全面开始用yocto了,这又开始自己搞了搞yocto,同样是出了很多问题:版本的,参考资料不全的。现在把把我使用的资料整理出来,希望能帮助大家,要求ubuntu版本要是12.04。这个版本比较稳定,这个时候用的人也很多,出了问题也比较好解决。如果版本一样,按照这个步骤来,基本能一遍通过。 Good luck!

ltib:

Install patch-ltib-ubuntu12.04.sh

(https://community.freescale.com/docs/DOC-93455)
Create a soft link under /usr/include
sudo ln -s i386-linux-gnu/sys sys
Run ‘sudo visudo’ and add the following line to the end of sudoers file
%admin ALL = NOPASSWD: /usr/bin/rpm, /opt/freescale/ltib/usr/bin/rpm
•Install host packages needed by freescale LTIB
sudo aptitude -y install gettext libgtk2.0-dev rpm bison m4 libfreetype6-dev
sudo aptitude -y install libdbus-glib-1-dev liborbit2-dev intltool
sudo aptitude -y install ccache ncurses-dev zlib1g zlib1g-dev gcc g++ libtool
sudo aptitude -y install uuid-dev liblzo2-dev
sudo aptitude -y install tcl dpkg
if uname -a | grep -sq ‘x86_64’; then
  sudo aptitude -y install ia32-libs libc6-dev-i386 lib32z1
fi
sudo aptitude -y install gparted emacs22-nox openssh-server
sudo aptitude -y install nfs-common nfs-kernel-server lintian
sudo aptitude -y install git-core git-doc git-email git-gui gitk
sudo aptitude -y install diffstat indent tofrodos fakeroot doxygen uboot-mkimage
sudo aptitude -y install manpages-dev manpages-posix manpages-posix-dev linux-doc
sudo aptitude -y install vnc4server xvnc4viewer
sudo aptitude -y install asciidoc texlive-latex-base dblatex xutils-dev
sudo apt-get install texinfo

Modify ltib/dist/lfs-5.1/base_libs/base_libs.spec,
perl -w -e ‘
 #   @ARGV = grep { …
 #  exit (0) unless @ARGV;
Run menuconfig
./ltib -c

耐心等待编译完就ok了。

yocto:

如果是在飞思卡尔公司内部编译需要设置代理,这看公司的文档就可以解决,外网并不需要。
Essential Yocto Project host packages:
$ sudo apt-get install wget git-core unzip texinfo libsdl1.2-dev \
gawk diffstat build-essential chrpath
i.MX layers host packages for a Ubuntu 12.04 host setup:
$ sudo apt-get install sed cvs subversion coreutils 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 xterm


1. Create a bin folder in the home directory.
$ 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
2. Add the following line to the .bashrcfile to ensure that the ~/binfolder is in your PATH variable.
export PATH=~/bin:$PATH
$ mkdir fsl-release-bsp
$ cd fsl-release-bsp
$ git config --global user.name "yueuqiankun"
$ git config --global user.email "yueqiankun@163.com"
$ repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-3.10.17-1.0.0_ga
$ repo sync
$ MACHINE=imx6qsabresd source fsl-setup-release.sh –b build-x11 -e x11
$ bitbake fsl-image-x11

耐心等待编译吧,这样将近一天时间,编译出来会生成一个包括uboot、kernel、rootfs的整个.sdcard文件,大概有1.2G,可以从SD卡直接烧入,同时生成的还有uboot、kernel、rootfs单独的文件,可以分别使用。

0 0