1You may run these scripts to build a UEFI/PI gcc cross compiler. 2 3Cross compilers built with these scripts are tested on 4Linux, OS X and Cygwin. 5 6Please note that you may need to modify your edk2 tree's Conf/tools_def.txt 7file to point to the location where you installed the cross compiler. 8 9=== tianoCross-gcc-4.1 === 10 11This script will build an x86 (ia32) cross compiler. 12 13The results of this script are very similar to the 'mingw' cross compiler 14which is commonly available on linux and OS X. But, since the cross 15compiler produced by this script is tested, it is the only 'supported' way 16to build UEFI/PI images. 17 18To use this script, you will need: 19 20 * A recent version (3.0 or later should be fine) of gcc that is able to produce 21 executables for the machine that you want to run this compiler on (the host 22 machine). 23 * wget or curl 24 * tar 25 * bzip 26 * gzip 27 * bash 28 * As well as (possibly) others tools and development packages 29 30=== x86_64-mingw-gcc-build.py == 31 32This script will build an x86_64 (x64/Intel 64/amd64) cross compiler. 33 34To use this script, you will need: 35 36 * A recent version (3.0 or later should be fine) of gcc that is able to 37 produce executables for the machine that you want to run this compiler 38 on (the host machine). 39 * Python 2.5 40 * texinfo 41 * bison 42 * flex 43 * libmpfr 44 * libgmp 45 * As well as (possibly) others tools and development packages 46 47=== Ubuntu Notes === 48 49On Ubuntu, the following command should install all the necessary build 50packages to utilize the x86_64-mingw-gcc-build.py script: 51 52 sudo apt-get install build-essential texinfo bison flex libgmp3-dev libmpfr-dev 53 54=== CYGWIN Notes === 55 56You should setup cygwin to use binmode on all mounts. When you initially 57install cygwin it gives you the choice of Unix file mode (recommended) or DOS 58file mode. Unix mode will cause all the cygwin directories to be mounted in 59binmode, while DOS will mount the dirs in textmode. Here is an example of a 60cygwin install where the dirs are (properly) mounted in binmode. 61 62C:\cygwin\bin on /usr/bin type user (binmode) 63C:\cygwin\lib on /usr/lib type user (binmode) 64c:\workspace on /workspace type system (binmode) 65C:\cygwin on / type user (binmode) 66 67If you use textmode, it is likely that the build will fail in a way that is 68hard to debug. 69 70Cygwin is pretty slow, so it is not recommended for large builds. 71 72