diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-02-07 22:32:09 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-02-07 22:32:09 +0000 |
commit | cd5d685695e2dadc4a74b6b26aa743028e6bb318 (patch) | |
tree | c8b7fc571f3f858be9cbb92df27060a36fde62c2 /misc | |
parent | bc970d28194d7254347adab9ddf4f9e483cd7798 (diff) | |
download | px4-nuttx-cd5d685695e2dadc4a74b6b26aa743028e6bb318.tar.gz px4-nuttx-cd5d685695e2dadc4a74b6b26aa743028e6bb318.tar.bz2 px4-nuttx-cd5d685695e2dadc4a74b6b26aa743028e6bb318.zip |
Add build instructions
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1481 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'misc')
-rw-r--r-- | misc/buildroot/configs/README.txt | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/misc/buildroot/configs/README.txt b/misc/buildroot/configs/README.txt index c27affd7f..43ac6ce74 100644 --- a/misc/buildroot/configs/README.txt +++ b/misc/buildroot/configs/README.txt @@ -1,3 +1,6 @@ +AVAILABLE CONFIGURATIONS +^^^^^^^^^^^^^^^^^^^^^^^^ + arm-defconfig Builds an ARM toolchain using gcc 3.4.5 @@ -18,3 +21,87 @@ m68k-config sh-defconfig Builds an SH-1/2 toolchain using gcc 3.4.5 + +GENERAL BUILD STEPS +^^^^^^^^^^^^^^^^^^^ + +1. CD to the correct directory. + + Change to the directory just above the NuttX installation. If <nuttx-dir> is + where NuttX is installed, then cd to <nuttx-dir>/.. + +2. Get and Install the buildroot Module + + a. Using a release tarball: + + cd <nuttx-dir>/.. + Download the appropriate buildroot package. + unpack the buildroot package + rename the directory to buildroot + + b. Using CVS + + Check out the misc/buildroot module. CVS checkout instructions: + + cvs -d:pserver:anonymous@nuttx.cvs.sourceforge.net:/cvsroot/nuttx login + cvs -z3 -d:pserver:anonymous@nuttx.cvs.sourceforge.net:/cvsroot/nuttx co -P misc/buildroot + + Move the buildroot Source Tree and create the archive directory + + mv misc/buildroot . + + Make the archive directory: + + mkdir archive + + The <nuttx-dir>/../buildroot is where the toolchain is built; + The <nuttx-dir>/../archive directory is where toolchain sources will be downloaded. + +3. Make sure that NuttX is configured + + cd <nuttx-dir>/tools + ./configure.sh <nuttx-configuration> + +4. Configure and Make the buildroot + + cd buildroot + cp configs/<config-file> .config + make oldconfig + make + + This will download the large source packages for the toolchain and build the toolchain. + The resulting binaries will be under buildroot/build_<arch>. There will also be a + large build directory called something like toolchain_build_<arch>; this directory + can be removed once the build completes successfully. + + Where <config-file> is one of the configuration files listed above and <arch> is an + archtecture name. Examples: build_m32c, build_arm_nofpu, etc. + +Cygwin GCC BUILD NOTES +^^^^^^^^^^^^^^^^^^^^^^ + On Cygwin, the buildroot 'make' command will fail with an error like: + + "... + build/genchecksum cc1-dummy > cc1-checksum.c + opening cc1-dummy: No such file or directory + ..." + + This is caused because on Cygwin, host executables will be generated with the extension .exe + and, apparently, the make variable "exeext" is set incorrectly. A work around after the + above occurs is: + + cd toolchain_build_<arch>/gcc-4.2.4-initial/gcc # Go to the directory where error occurred + mv cc1-dummy.exe cc1-dummy # Rename the executable without .exe + rm cc1-checksum.c # Get rid of the bad generated file + + Then resume the buildroot make: + + cd - # Back to the buildroot make directory + make # Restart the build + + GCC is built twice. First a initial, "bootstap" GCC is produced in + toolchain_build_<arch>/gcc-4.2.4-initial, then the final GCC is produced in + toolchain_build_<arch>/gcc-4.2.4-final. The above error will occur twice: Once for + the intial GCC build (see above) and once for the final GCC build. For the final GCC + build, the workaround is the same except that the directory will be + toolchain_build_<arch>/gcc-4.2.4-final/gcc. |