diff options
Diffstat (limited to 'docs/overview.txt')
-rw-r--r-- | docs/overview.txt | 53 |
1 files changed, 46 insertions, 7 deletions
diff --git a/docs/overview.txt b/docs/overview.txt index 3fd7b6f..740ac0a 100644 --- a/docs/overview.txt +++ b/docs/overview.txt @@ -412,6 +412,9 @@ eg. /your/root. This directory is the /image/ of what would be in the root file system of your target, and will contain all that your programs/packages have installed. +The 'populate' script | +----------------------+ + When your root directory is ready, it is still missing some important bits: the toolchain's libraries. To populate your root directory with those libs, just run: @@ -425,23 +428,59 @@ contains only those things you install in it. You can then use /your/root-populated to build up your file system image, a tarball, or to NFS-mount it from your target, or whatever you need. -populate accepts the following options: +The populate script accepts the following options: + + -s src_dir + Use 'src_dir' as the un-populated root directory. + + -d dst_dir + Put the populated root directory in 'dst_dir'. - -s [src_dir] - Use 'src_dir' as the 'source', un-populated root directory + -l lib1 [...] + Always add specified libraries. - -d [dst_dir] - Put the 'destination', populated root directory in 'dst_dir' + -L file + Always add libraries listed in 'file'. -f - Remove 'dst_dir' if it previously existed + Remove 'dst_dir' if it previously existed; continue even if any library + specified with -l or -L is missing. -v Be verbose, and tell what's going on (you can see exactly where libs are coming from). -h - Print the help + Print the help. + +See 'your-target-tuple-populate -h' for more information on the options. + +Here is how populate works: + + 1) performs some sanity checks: + - src_dir and dst_dir are specified + - src_dir exists + - unless forced, dst_dir does not exist + - src_dir != dst_dir + + 2) copy src_dir to dst_dir + + 3) add forced libraries to dst_dir + - build the list from -l and -L options + - get forced libraries from the sysroot (see below for heuristics) + - abort on the first missing library, unless -f is specified + + 4) add all missing libraries to dst_dir + - scan dst_dir for every ELF files that are 'executable' or + 'shared object' + - list the "NEEDED Shared library" fields + - check if the library is already in dst_dir/lib or dst_dir/usr/lib + - if not, get the library from the sysroot + - if it's in sysroot/lib, copy it to dst_dir/lib + - if it's in sysroot/usr/lib, copy it to dst_dir/usr/lib + - in both cases, use the SONAME of the library to create the file + in dst_dir + - if it was not found in the sysroot, this is an error. ___________________ / |