打印
[工具和软件]

freescale LTIB BSP 使用总结

[复制链接]
1273|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
energy1|  楼主 | 2015-1-28 20:44 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

freescale LTIB BSP 使用总结:
  1.ltib  BSP的简介(readme.bsp)
   
   Freescale Linux(tm) Target Image Builder (ltib)
   Board Support Package (BSP)
   details
   support
   features(kernel,u-boot,Toolchain)         
   MPC8315E RDB Configuation File list
    File Name     Description
    defconfig     LTIB default Configuration
    linux-2.6.29.6-mpc8315erdb.config         Kernel default configuration   
   
   
  
  2.ltib安装(readme)
  
   (1).   As root, mount the ISO image of DVD #2 on your machine:
          mount -o loop MPC8315ERDB_20090930-ltib.iso /mnt/cdrom
   - or -
          mount -o loop MPC8315ERDB_20090930-ltib.iso /media/cdrom
   
   (2).   As a non-root user, install the LTIB:
          /mnt/cdrom/install
   
   (3).   Input the desired LTIB installation path when prompted.
   
   The script will install LTIB into two different directories on your machine.
   
     /opt/freescale/pkgs       contains all the packages including Linux kernel, U-Boot and
          application packages;
   
      <install_path>/ltib contains the main LTIB scripts and spec files for MPC8315EMDS BSP.
   
   There are no uninstall scripts. To uninstall LTIB, you need to run
   ltib -m distclean
   firstly to remove the /opt/freescale/pkgs, /opt/freescale/ltib
   and <install_path>/ltib directories manually.
   
   
   说明:安装的过程要装好多的库文件:
   
   sudo apt-get install  zlib1g-dev ncurses-dev rpm;
   
  
  3.ltib的使用
    (1) 修改内核或文件系统并编译时,一个比较简单的方法是利用自带的配置文件(defconfig)   
    $ ./ltib --preconfig config/platform/mpc8315erdb/defconfig
   
    (2)ltib配置:
    ## 此配置默认不编译bootloader: [ ] Build a boot loader
    ## 若想修改此配置:
         ## 若需要编译bootloader,请找到并选中

  • Build a boot loader
             
       ## 此配置文件默认编译时不能修改配置内核:(X) Dont build the Linux kernel
             ## 若要编译内核,请找到并选中 kernel (linux 2.6.13.4) ---> (X) linux 2.6.13.4 ;其内核的默认配置文件为nas_linux-2.6.13.4-mpc8349itx.config        
             ## 若要修改内核的默认文件为其他,请找到 kernel config file,回车输入相应的配置文件名,其默认目录为config/platform/mpc8349itx/
             ## 若想在编译时并修改内核,请找到并选中
  • Configure the kernel
            
             ## 若想修改文件系统,添加或删除程序包,请进入 Package list ---> 并选中相应的包
             ## 若想修改busybox选项配置,请进入并选中 Package list --->
  •    Configure busybox at build time
             
             
             ## 其他目标系统配置、目标镜像生成选项配置类似。
             ## (解释)Load an Alternate Configuration File选项是选则一个已有的配置文件来自动配置各个选项
             ## Save Configuration to an Alternate File选项是将当前的配置信息保存为一个命名的文件名(eg:defconfig.liuby.today804)
             ## 最后退出时会弹出对话框,选择Yes保存,默认保存到config/platform/mpc8349itx/,名字是上面的命名
             ## 附注:同时生成的配置文件也会另存为 defconfig.dev(在config/platform/mpc8349itx/下),
             
             (3)内核和busybox配置
             上面的操作做完后开始编译,
             假如选择了编译时配置内核,会弹出内核的配置对话框,可用用上面类似的方法修改配置
             生成的内核配置文件为 nas_linux-2.6.13.4-mpc8349itx.config.dev(在config/platform/mpc8349itx/下)
             
             
             内核编译完成后,开始选择程序包的编译,
             如果选择了编译时配置busybox,会弹出 BusyBox Configuration 配置对话框
             若不改文件名,生成的配置文件为busybox.config(在config/platform/mpc8349itx/下)
             
             (4) 想看一下某些程序包的源码
             busybox是linux常用命令工具集,可根据开发需要选择需要的命令工具     
       想看一下某些程序包的源码,比如kernel、uboot等这些看了有益于身心健康的程序源码,该怎么办呢? 还有一种情况就是这些源码中存放有板子的各种配置文件,比如内存映射分配,也需要看一下源码文件,其命令格式为 $ ./ltib -m prep -p <program_package_name>
       ## 下面这部分我是在large文件夹下操作,所写路径也是相对于/usr/local/mpc8349/large/来写的,而不是mytest文件夹下
       ## 例如我们要查看MPC8349ITX开发板上vsc7385的内存分配,或查找VSC7385的驱动模块部分,需要看uboot、内核源码,以下命令得到内核源码
       
       
       $ ./ltib -m prep -p kernel
       ## 解压后的内核源码位于rpm/BUILD/linux-2.6.13/
       
       $ ./ltib -m prep -p kernel
       $ ./ltib -m scbuild -p kernel        ## 编译的镜像为rpm/BUILD/linux/arch/ppc/boot/images/uImage


       
       以下命令可以得到uboot源码
       $ ./ltib -m prep -p u-boot
       ## 解压后得到的uboot源码位于rpm/BUILD/u-boot-1.1.3
          
       
      
      4.生成文件说明 :
          

        rootfs.ext2.gz.uboot--ramdisk image that can be load with u-boot
       rootfs.jffs2----jffs2 filesystem image
       rootfs   ---directory,the root file system that will be deployed on your Board
       rootfs/boot/uImage -- kernel image that can be load with u-boot
       rootfs/boot/u-boot.bin
          u-boot binary image that can be programmed into mpc8315erdb board nor flash
       rootfs/boot/u-boot-nand.binary--
          u-boot binary image that can be programmed into mpc8315erdb board nand flash
       rootfs/boot/mpc8315erdb.dtb
          device tree binary(dtb)files for kernal boot up(support usb internal phy)
       rootfs/boot/mpc8315erdb_uipi.dtb  
          device tree binary(dtb)files for kernal boot up (support usb external phy)      
       
       


       内核文件为   rootfs/boot/uImage,
       根文件系统文件为 rootfs.ext2.gz.uboot
       u-boot.bin   u-boot
       mpc8315erdb.dtb  s


  • 相关帖子

    沙发
    a217zxg| | 2015-12-2 11:28 | 只看该作者
    这个贴为何没人顶哟,

    使用特权

    评论回复
    发新帖 我要提问
    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    94

    主题

    422

    帖子

    10

    粉丝