# HG changeset patch # User Rob Landley # Date 1322832384 21600 # Node ID 38e80b18fe8b11d56a3387a45e8297def6047a2f # Parent 1fbfabb09582a297df188097cd28be47d5f6d2f6 Expand more/test.sh documentation with "rebuilding uClibc but not binutils/gcc" example. diff -r 1fbfabb09582 -r 38e80b18fe8b www/FAQ.html --- a/www/FAQ.html Mon Nov 07 07:37:06 2011 -0600 +++ b/www/FAQ.html Fri Dec 02 07:26:24 2011 -0600 @@ -316,22 +316,33 @@

A: Use the more/test.sh script

-

The more/test.sh script's first argument is the target to build for, and -the rest of its arguments are a command line to run as if building for that -target. It sets up the same context for building for an $ARCH the scripts use -(adds the appropriate cross compiler to the $PATH if it's been build, sets -all the shell functions and environment variables, and so on), and then runs -the rest of the command line in that context.

+

This wrapper runs a command line in build context: the first argument +is the target to build for, and the rest of its arguments are a command line +to run as if building for that target.

Examples:

-  more/test.sh armv5l build_section busybox
-  more/test.sh mips getconfig linux
+more/test.sh armv5l build_section busybox
+more/test.sh mips getconfig linux
 
-

You can also write your own script and source sources/include.sh and -call read_arch_dir yourself at the top of it, but that's pretty much all -test.sh does.

+

The wrapper imports sources/include.sh and calls load_target (with +NO_CLEANUP so it doesn't blank an existing output directory). This sets up +the same context for building for a given $ARCH that the build scripts use: +it adds the appropriate cross compiler to the $PATH (if it's already been +built), sets all the shell functions and environment variables, +creates the temporary directory, and so on. The wrapper then runs the rest of +the command line in the resulting context.

+ +

By default, more/test.sh acts as its own build stage called "test" +(because include.sh uses the name of the script file you're running to set a +default STAGE_NAME), so output winds up in build/test-armv5l and such. You +can override this by setting STAGE_NAME yourself, for example:

+ +
+# rebuild uClibc without redoing binutils/gcc/kernel headers stages:
+STAGE_NAME=simple-cross-compiler more/test.sh sparc build_section uClibc
+

Q: How do I play around with package source code?