Difference between revisions of "Developer Manual/Tools/Cygwin"

From coreboot
Jump to: navigation, search
(Created page with "The following Howto by an anonymous contributor details how to configure a Cygwin setup as a coreboot development environment. # <code>$ git clone http://review.coreboot.org/...")
 
(added attribution)
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
The following Howto by an anonymous contributor details how to configure a Cygwin setup as a coreboot development environment.
+
The following Howto by Jiming Sun from Intel details how to configure a Cygwin setup as a coreboot development environment.
  
 
# <code>$ git clone http://review.coreboot.org/coreboot.git</code> # Get the coreboot code
 
# <code>$ git clone http://review.coreboot.org/coreboot.git</code> # Get the coreboot code
 
# <code>$ cd /cygdrive/c</code> # this is your C drive
 
# <code>$ cd /cygdrive/c</code> # this is your C drive
# <code>$ cd source/coreboot/util</code> # assuming you have downloaded coreboot code under C:\source
+
# <code>$ cd source/coreboot</code> # assuming you have downloaded coreboot code under C:\source
# <code>$ cd crossgcc</code>
+
# <code>$ cd util/crossgcc</code>
 
# <code>$ ./buildgcc</code>
 
# <code>$ ./buildgcc</code>
 
# Wait for it finish in about 30 minutes, including download and build; if it fails, it might be your firewall preventing it from downloading.  Sometimes, if you download or use an older version of coreboot, the ./buildgcc may not finish due to either mismatched package names or mismatched versions.
 
# Wait for it finish in about 30 minutes, including download and build; if it fails, it might be your firewall preventing it from downloading.  Sometimes, if you download or use an older version of coreboot, the ./buildgcc may not finish due to either mismatched package names or mismatched versions.
 
# Once “./buildgcc” is done, you have all the GCC tools available to you.
 
# Once “./buildgcc” is done, you have all the GCC tools available to you.
# Open a DOS window and type “path” at the prompt. You should have something like C:\cygwin\usr\local\bin;C:\cygwin\usr\bin;C:\cygwin\bin in your PATH variable.
+
# At this point, you should have all the tools you need for building a coreboot project.
# Now, you need iasl in your path as well:
+
## Download ACPICA from https://acpica.org/downloads
+
## Change directory to where your APCICA is downloaded
+
## <code>$ tar xzf acpica-unix-VERSION.tar.gz</code>
+
## <code>$ cd acpica-unix-VERSION && make clean && make && make install</code>
+
## iasl will show up in /usr/bin
+
# At this point, you should all the tools you need for building a Coreboot project.
+
 
# Now, let’s try to build it:
 
# Now, let’s try to build it:
## <code>$ cd source/coreboot</code> # or wherever your Coreboot source code is
+
## <code>$ cd source/coreboot</code> # or wherever your coreboot source code is
 
## <code>$ make menuconfig</code> # to make sure you have the right platform, chipset, and other options you want to build, but you may skip this step if you just want to build an existing project
 
## <code>$ make menuconfig</code> # to make sure you have the right platform, chipset, and other options you want to build, but you may skip this step if you just want to build an existing project
## If your “make” shows error messages, like, “Permission Denied”, you need to go to the problematic directories, and does a “chmod 644 *.*” to make sure all files are readable and writable.
+
## If your "make" shows error messages like "Permission Denied", you need to fix up access permissions. In cygwin, run "chmod -R a+rwX ." from the coreboot directory (/cygdrive/c/source/coreboot in the example above). Note that the arguments are case sensitive.
## If you receive a message “.xcompile:1: no suitable gcc found”, You have a .xcompile file hanging around from a previous failed build. Delete the .xcompile file from the c:/cygwinc/source/coreboot directory and try again.
+
## If you receive a message “.xcompile:1: no suitable gcc found”, You have a .xcompile file hanging around from a previous failed build. Delete the .xcompile file from /cygdrive/c/source/coreboot directory and try again.
## Once you did all the “chmod” to resolve permission denied errors and deleted the .xcompile file, try “make clean” and “make” again.
+
## Once you used "chmod" to resolve permission denied errors and deleted the .xcompile file, try “make clean” and “make” again.
 
#You should see the build complete with a ROM image map showing at the end.
 
#You should see the build complete with a ROM image map showing at the end.

Latest revision as of 06:56, 11 June 2013

The following Howto by Jiming Sun from Intel details how to configure a Cygwin setup as a coreboot development environment.

  1. $ git clone http://review.coreboot.org/coreboot.git # Get the coreboot code
  2. $ cd /cygdrive/c # this is your C drive
  3. $ cd source/coreboot # assuming you have downloaded coreboot code under C:\source
  4. $ cd util/crossgcc
  5. $ ./buildgcc
  6. Wait for it finish in about 30 minutes, including download and build; if it fails, it might be your firewall preventing it from downloading. Sometimes, if you download or use an older version of coreboot, the ./buildgcc may not finish due to either mismatched package names or mismatched versions.
  7. Once “./buildgcc” is done, you have all the GCC tools available to you.
  8. At this point, you should have all the tools you need for building a coreboot project.
  9. Now, let’s try to build it:
    1. $ cd source/coreboot # or wherever your coreboot source code is
    2. $ make menuconfig # to make sure you have the right platform, chipset, and other options you want to build, but you may skip this step if you just want to build an existing project
    3. If your "make" shows error messages like "Permission Denied", you need to fix up access permissions. In cygwin, run "chmod -R a+rwX ." from the coreboot directory (/cygdrive/c/source/coreboot in the example above). Note that the arguments are case sensitive.
    4. If you receive a message “.xcompile:1: no suitable gcc found”, You have a .xcompile file hanging around from a previous failed build. Delete the .xcompile file from /cygdrive/c/source/coreboot directory and try again.
    5. Once you used "chmod" to resolve permission denied errors and deleted the .xcompile file, try “make clean” and “make” again.
  10. You should see the build complete with a ROM image map showing at the end.