http://blog.csdn.net/junht/article/details/7656540
Packages in the Ltib
4.3.1 to see which packages are enabled and can be installed
You can run bin/listpkgs on a ltib configuration file before you configure Ltib. For example, for Mpc8548cds, you can run:
# bin/listpkgs Config/platform/mpc8548cds/deconfig
This will list all the packages that can be selected. Those in the "Enable" column have a ' y ' that will be compiled/installed by default.
If you have already configured Ltib, you can get a more precise (specific) checklist by running:
#./ltib-m listpkgs
Select only those packages that are enabled, pipeline (there is a space between the Y and the single quotation marks):
#./ltib-m listpkgs | grep ' y '
4.3.2 View package usage licenses
use [[#OptionListpkgs][-m listpkgs]] option
4.3.3 Change the selection/configuration of packages and compile now
use [[#OptionConfigure][--configure]] option
4.3.4 Change the selection/configuration of a package without compiling
use [[#OptionConfig][-m config]] option
4.3.5 How to compile/ install not just a single package
#./ltib-p <package_name>
Note 1: When you specify a package with '-P ', it will be forced to compile, even if it is up-to-date.
NOTE 2: If the dependent package is not installed, then the compile/install will fail.
4.3.6 How to change the package and capture it
By default, RMP will decompress, configure, compile, install, and delete all sources in one step. This is a well-considered feature to ensure that a package is fully recompiled.
Obviously, if you are working on a package, this scenario is not helpful, in order to facilitate this development process, RPM provides the concept of short-circuited compilation/installation.
Examples of working processes
1. Unzip the source code and apply all current patches
#./ltib-m prep-p <package>
For example, decompression uboot source code, you can use #./ltib–m prep–p U-boot
2. Edit/Add files under "Rpm/build/package".
3. Compile the package you changed.
#./ltib-m scbuild-p <package>
4, once the package compiles successfully, check the installation status.
#./ltib-m scinstall-p <package>
5. Test your package before committing changes
#./ltib-m scdeploy-p <package>
6, repeat step 2--> 5 until you are satisfied with the results.
7. Generate a patch and update the spec file (dist/lsf/)
#./ltib-m patchmerge-p <package>
8. Manually clean up the patch files (as needed)
9. Build and install from scratch
#./ltib-p <package>
4.3.7 Add a new package to the root file system
How to add a new package to our root filesystem, as described below.
The first is: there is an existing srpm that you want to use.
1, import srpm. This will put the footage in the RPM subdirectory.
#./ltib–m Addsrpms <path_of_the_sprm_to_import>
2, as required to modify the spec file (see dist.lfs-5.1/template/template.spec example).
3. Determine package compilation:
#./ltib–m scbuild–p <new_package>
4. Modify the source files in the Rpm/build/new_package directory as needed.
5. Build and merge a patch to encapsulate your changes:
#./ltib–m patchmerge–p <new_package>
6. Manual removal of patch files (as required)
7. Build and install
#./ltib–p <new_package>-x.y
8. Save your changes:
a). Move the spec file from the staging area to a permanent zone and check the Git repository, for example:
#mkdir Dist/lfs-5.1/new_package
#mv Rpm/specs/new_package.spec dist/lfs-5.1/new_package/
#cd Dist/lfs-5.1/new_package
#git Add New_package.spec
#git commit-a-M "added New_package"
b). Copy the source file to your LPP (Local package Pool)
# Rsync-vptgo--ignore-existing rpm/sources/*/opt/freescale/pkgs/
c). Now you need to upload your source/patch to PPP.
The second: There is no ready-made package, and you want to create a brand new package. You can do this in the following ways:
1. First clean up your source files (delete all the. O,. A,. So suffixes of the makefile) and then make a "tarball", for example:
# CD <MY_NEW_PACKAGE>-X.Y
# Make Clean
# CD:
# tar ZCVF <my_new_package>-x.y.tar.gz <my_new_package>-x.y
2, move this tarball to LPP so that ' ltib ' can find it.
# MV <my_new_package>-x.y.tar.gz/opt/freescale/pkgs/
3. Create a specfile using an existing template
# mkdir Dist/lfs-5.1/<my_new_package>
# CP Dist/lfs-5.1/template/template.spec
Dist/lfs-5.1/<my_new_package>/<my_new_package>.spec
4, edit the fixed template to reflect your package, this file may make the following changes (this part of the example can be referred to the "compiling new U-boot" and "compiling the new Linux kernel" and other chapters):
| *field* | *description* |
| Summary | Put in a summary of the 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 to change the spec file |
| License | E.g Gpl/lgpl/bsd, look this and the package ' s files |
| Group | If this exists on a RPM based machine, copy from Rpm-qi <package> <br> If not, choose something from/usr/sh are/doc/rpm-<version>/groups |
| %Build | Often you ' ll need to add *--host= #CFGHOST--build=%{_build}* to the Configure clause |
5, unzip the new package source code
#./ltib-m prep-p <my_new_package>
6. Compile the new package you changed
#./ltib-m scbuild-p <my_new_package>
7. Once the new package has been compiled, check the installation status
#./ltib-m scinstall-p <my_new_package>
8. Before committing a change, if you want to test your package, you can do the following
#./ltib-m scdeploy-p <my_new_package>
9. Once you are satisfied with the new package, submit the updated spec file.
# git Add.
# git commit-a-M "added New_package"
10, through the http://auslxsc01.mtwk.freescale.net/ltib/index.html. Upload new packages containing the source code and patches to PPP.
Attention:
Only the approval file can release the BSP, so please follow the process
1. If you want to share with others, upload files to PPP
2, check the operation of the script, then you will get TWiki and other pages linked to your file
3. Send the requested email, including page links such as TWiki for review
4.3.8 how to introduce a new package to configure the system (slightly)
This section is omitted here, so you can refer to the 1439 lines of the Ltibfaq file (or search for the keyword how does I introduce my new package to the Config system)
4.4 Ltib in the source code
Where is the source of the software package?
If local public buffers are not available, they are downloaded and cached to a common area. If you are using an ISO image, they will be pre-installed into the local public cache.
Where can we get the source code? The main system is using GPP/LPP/PPP. First, let's look at what is LPP/GPP/PPP.
PPP (Private package Pool), which can have the option of using a storage area for private source code and patches to access the HTTP server privately.
The GPP (Global package Pool) is a publicly available HTTP server that is used to store the source code and patches for LTIB.
LPP (Local package Pool) is a native public cache that is used to store all source code and patches.
When Ltib need to compile RPMs, the package spec file is parsed, after parsing, the compiler has a list of source code and patches, this list is used when compiling the package. The compiler then completes the following tasks in order:
1) Check if the File/symlink (without any path/url prefix) exists rpm/spurces directory, if present, use. Otherwise, take the second step.
2) Check if the File/symlink (without any path/url prefix) exists in the LPP directory, and if the file exists, a symlink is created to the Rpm/source directory and the link is used. If not, proceed to step three.
3) The compiler attempts to download the file from PPP (if it is specified by the *%ppp_url* tag in *.ltibrc* to the LPP using *wget*). If the download succeeds, a symlink is created to Rpm/source and the link is used. If the download fails, proceed to step fourth.
4) The compiler attempts to download files from GPP (specified by *%gpp_url* tag in *.ltibrc* to the LPP using *wget*). If the download succeeds, a symlink is created to Rpm/source and the link is used. If the download fails, proceed to step fifth.
5) If all of the above steps fail, the compiler will give you a failure error message.
Note: You can enter your proxy server information into the ". Ltibrc" source file, if you are working in a corporate VPN environment and want to get the source code for external GPP on the Internet, you must do so.
Ltib Common Commands 3