原创 ltib介绍及安装方法

2010-7-17 00:14 12041 9 9 分类: MCU/ 嵌入式

 LTIB (Linux Target Image Builder)是飞思卡尔公司开发的一个工具,用于简化嵌入式bsp开发的工具,基本上就是一些脚本加上预先制作成功交叉工具连,由于linux开源世界太多软件版本不断升级,相互兼容极差,不同的软件由不同的志愿者维护,互相根本没有考虑到兼容性,这导致在嵌入式linux上开发的工程师的噩梦。在这种情况下,少数高人干起整合这些乱七八糟开源软件的事情,目标当然是尽量提供一个方便使用的软件包,避免那些琐碎繁杂的配置安装工作。


LTIB是其中之一,当然我觉得它还做的不够好,什么时候能做成如microsoft windows下的那种简单图形化傻瓜化的安装包就好了。


ltib网站:http://savannah.nongnu.org/projects/ltib/


http://www.bitshrine.org/ltib/


Main features 



  • Open source (GPL)
  • Runs on most popular Linux host distributions (x86 and some PPC)
  • Command line interface, with curses configuration screens (using LKC)
  • Support for multiple target architectures (PPC, ARM, Coldfire)
  • Target platforms selectable from a menu (CVS version)
  • More than 200 userspace packages selectable
  • Common root filesystem package set across architectures
  • Supports building of bootloaders and kernel images
  • All package building is done as non-root user
  • Configuration/selection of individual packages from a menu
  • Auto package dependency resolution
  • Auto file conflict resolution by package order build scaling
  • Auto re-install/de-install of packages by changes in dependency tree
  • Toolchain selectable at configuration time
  • Configuration of the Linux kernel using it's native config language
  • Kernel selection can easilty be changed from choicelist during configuration
  • Configuration of target system from host (IP address, services etc)
  • Supports preconfigs which allow developers to store different system configurations (e.g. toolchain selection, kernel selection, package selection etc).
  • Supports profiles this allows just the userspace package set to be re-configured. This is excellent for autobuilding or exchanging the non platform specific configuration between targets.
  • All packages are built as rpms and managed using rpm
  • Target image files managed using a private rpm database per LTIB instance on the host
  • Supports single package developer mode using prep/scbuild/scdeploy analogs
  • Provides a means of source capture (patches) and auto update of spec files
  • Shell mode available to run all commands in ltib's spec environment
  • Incremental deployment (over NFS) supported
  • RAMDISK and JFFS2 Flash image creation supported
  • Read-only root filesystem supported.
  • LTIB is meta-data only, all sources are pulled using http and locally cached in a common area per-host.
  • Remote source pulls support proxys
  • Support for glibc and uclibc
  • All meta-data formats are open source (rpm, Linux Kernel Config)
  • Modular BSP architecture (easy to add new BSPs)
  • Support batch mode and --continue for auto-builders
  • Support --dry to preview ltib's actions
  • Provides --dltest to check for availability of sources/patches
  • Provides listpkgs mode to show all available packages, whether selected and their individual licenses.
  • Provides a release mode, this encapsulates an LTIB project into an iso images that will not require network access.

-----------------------------------------------------------------------------------------


最近为了做mcf52277的板子,开始弄这个ltib,我觉得以后可以把所有的嵌入式linux开发都整合到ltib上来搞,以简化那些配置工作,应该能省很多精力。


我在fedora 7上安装m52277evb bsp,freescale的每个开发板都以ltib提供bsp包。下面记录下安装方法。


1. 把光盘或.iso文件(对于mcf52277evb来说就是M52277EVB_LTIB.ISO)mount到/mnt/cdrom:(注意用root身份)


mount /dev/cdrom /mnt/cdrom


2. 安装。先要切换到普通用户,因为ltib要求以普通用户安装,不要以root身份安装


su lzp


再安装:


cd /mnt/cdrom


./install


如果你顺利,这就完了,但我安装的时候出现了问题,报什么cp命令没有权限,但我检查了,确认所操作的目录我是有权限的rwx均有权限。实在奇怪,后来发现是fedora的那个selinux搞的鬼,在fedora的"系统”-》“管理”-》“SELinux Management”。把enforce mode从enforcing改成permissive。这样就ok了


3.运行ltib


cd到ltib安装到的目录,这个是在上面install过程中让你选择的。


然后:


./ltib


即可运行,第一次运行,实际上就是启动build image的工作,最后会调用编译器等工具连构建出最终内核image和文件系统image。


这个过程可能出现错误(但我没碰到),网上有文章说了出现的错误情况:


安装的时候 可能会出现如下提示:


I ran the command: sudo -S -l which returned:



We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:


    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.


Password:


This means you don't have sudo permission to execute rpm commands as root
without a password.  This is needed for this build script to operate correctly.


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


wzg ALL = NOPASSWD: /bin/rpm, /opt/freescale/ltib/usr/bin/rpm



Started: Mon May 24 16:32:21 2010
Ended:   Mon May 24 16:32:28 2010
Elapsed: 7 seconds


Build Failed


这是由于安装ltib需要是普通用户身份,但部分命令要超级用户权限才行,所以需要执行visudo增加用户lzp的权限,如下操作


# su
# /usr/sbin/visudo                // 此命令相对于vi打开了一个权限设置文件
                                // 按i进入输入模式,在最后一行添加如下一行内容
lzp   ALL = NOPASSWD: /bin/rpm, /opt/freescale/ltib/usr/bin/rpm
                               // 按ESC进入命令行模式,按:wq保存退出
# exit                         // 退出root,回到普通用户身份lzp

PARTNER CONTENT

文章评论0条评论)

登录后参与讨论
我要评论
0
9
关闭 站长推荐上一条 /3 下一条