LFScript Switches

From LFScript
Revision as of 19:27, 30 January 2012 by Marcel (talk | contribs)

LFScript is a command line application. You must provide LFScript with one or more switches to control what LFScript will build. Some switches (also called 'options') require additional arguments.

If you want to give several options without arguments, you can collapse them. The following two commands produce identical results:

./lfscript -B -u -x nano -k myconfig.config
./lfscript -Bux nano -k myconfig.config

If you want to give a switch multiple arguments you must enclose them in quote marks.

./lfscript -Bx nano which      # WRONG!
./lfscript -Bx "nano which"    # Right

Every switch should be used only once per session, and not every switch will allow the use of others.

Selecting the base system

Every time you use LFScript, you must specify a base system at least. Even if you've already build it and only want to extend or install your system, you must always specify which base system to use.

-B

This will automatically select the base system for you, if only one is available.

Normally, LFScript is distributed with scripts for a single base system, making this option the easiest to use of the two 'b' options.

-b <basesystem>

With this option you can specify which base system to build.

-k <kernel_configuration>

Uses the specified Linux configuration file when building the kernel. If this option has not been set, LFScript will run make defconfig on the kernel, producing a default kernel configuration which probably lacks drivers and other support for your system. See Configuring a kernel for more information on how to create this configuration file.

Scripts named "kernel", or have the keyword "kernel" in their TAGS variable (see Script layout) will receive the configuration file.

LFScript has sample kernel configurations (used by the fsOS Live CD) in the "fsos" folder.

Examples

./lfscript -B                            # Builds an LFS system
./lfscript -b lfs-9193                   # Builds LFS SVN revision 9193 (if scripts for it exist)
./lfscript -Bk fsos/3.2.1-i486.config    # Builds an LFS system and uses an fsOS kernel configuration file