Chinaunix首页 | 论坛 | 博客
  • 博客访问: 816563
  • 博文数量: 124
  • 博客积分: 1927
  • 博客等级: 上尉
  • 技术积分: 932
  • 用 户 组: 普通用户
  • 注册时间: 2010-08-31 14:06
文章分类

全部博文(124)

文章存档

2018年(5)

2017年(2)

2016年(6)

2015年(4)

2014年(24)

2013年(7)

2012年(11)

2011年(13)

2010年(52)

我的朋友

分类: LINUX

2012-04-19 10:11:05

Q1: How do I know which packages are available/will be installed?

Before configuring ltib, you can run bin/listpkgs on an ltib config file, for instance, for the mpc8548cds, you could run:
bin/listpkgs config/platform/mpc8548cds/defconfig
This will list all the packages that can be selected. The ones with a 'y' in the 'Enabled' column will be built/installed by default.
If you have configured ltib already, you can get a more accurate (exact) listing by running:
./ltib -m listpkgs
To select only those packages that are enabled, pipe either of the previous commands to grep as follows:
./ltib -m listpkgs | grep ' y '

Q2:
How do I know what license a package uses
Use the -m listpkgs option

Q3: How do I change package selection/configuration and immediately build
Use the --configure option

Q4: How do I change package select/configuration without building
Use the -m config option

Q5: How do I build/install just a single package?
./ltib -p
Note: When specifying a package -p, the package will be force re-built, even if it is up-to-date.
Note: The build/install will fail if dependent packages are not already installed.

Q6:
How can I add a completely new package to the root filesystem
The following work-flow examples show the process of importing new packages to the root filesystem.
I have a directory with some sources unpacked
1. First clean your sources (remove any .o, .a, .so generated files) and then make a 'tarball', for instance:
cd -x.y
make clean
cd ..
tar zcvf -x.y.tar.gz -x.y
2. Move this tarball to the LPP so ltib can find it.
mv -x.y.tar.gz /opt/freescale/pkgs/
3. Create a specfile using the existing template.
mkdir dist/lfs-5.1/
cp dist/lfs-5.1/template/template.spec dist/lfs-5.1//.spec
4. Edit and fixup the template to reflect your package. The fields that need changing are:
Field Description
Summary put in a summary of what the package is/does
Name put in the name of the packge (usually from the tarball name)
Version put in the version (usually from the tarball/directory
Release start at 1 and rev each time you change the spec file
License e.g GPL/LGPL/BSD, look this up in the package's files
Group If this exists on an rpm based machine, copy from rpm -qi
If not, choose something from /usr/share/doc/rpm-/GROUPS
%Build often you'll need to add --host=$CFGHOST --build=%{_build} to the configure clause
5. Unpack the new package sources:
./ltib -m prep -p
6. Make any changes you need to the sources to get them to cross compile
7. Build the new package with your changes:
./ltib -m scbuild -p
8. Once the new package builds okay, check the install phase:
./ltib -m scinstall -p
9. Install the test package in the NFS root filesystem area (rootfs) and test
./ltib -m scdeploy -p
10. Once you're happy the package is running correctly, capture your changes.
./ltib -m patchmerge
Any changes you've made will be put into a patch file and copied to /opt/freescale/pkgs. In addition, the spec file will be updated to reference the new patch. You should check the patch and eliminate any bogus diffs.
11. Upload the sources to the GPP
For external public files, use this link:
You must have previously been blessed as a developer to do this. For more information, contact the mailing list:
The files to be uploaded are your original tarball plus the patch generated by ltib. You should take care to fill in the license/distributable/description fields accurately.
If you do not have project membership and upload permissions, please send and email to the mailing list explaining what you want to do.
12. Add your spec file to cvs
cvs add dist/lfs-5.1/
cvs add dist/lfs-5.1//.spec
cvs commit -m "added new_package" dist/lfs-5.1//.spec
If you do not have CVS write access, please send a patch to the LTIB mailing list.
13. Follow the steps in the next section on "adding to the config system"


Q7:
How do I introduce my new package to the config system
Here is an example for package 'strace'
1. . Edit config/userspace/packages.lkc, this is in alphabetic order. Just after the 'PKG_SKELL' entry add:
config PKG_STRACE
bool "strace"
2. . Edit dist/lfs/common/pkg_map. This is in build order. Put your package where it should go in the build order, and add an entry that ties the config key, to the directory containing the spec file for the package. For strace, I put this after gdb as shown:
PKG_GDB = gdb
PKG_STRACE = strace
3. . Commit your changes
cvs commit -m "added new_package"

Q8:
如何通过LTIB生成源代码,如U-BOOT?
例子:./ltib -m prep -p u-boot
生成的U-BOOT源码在rpm/BUILD/目录下面。
linux源代码在编译LTIB包时候有选项可以选择保留Linux source code,生成的代码也在rpm/BUILD/目录下面。
阅读(3432) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~