Hacking EDK to work under CygwinWhen the project first started, before Linux toolchain binaries were available, the only way to proceed was under the Xygwin envoronment provided with the EDK. Xygwin is in turn based on the well-known Cygwin platform, a Linux-compatability layer that runs on Windows platforms. For various reasons, Xygwin was unable to support Linux kernel development, and so it was necessary to hack the EDK tools to work under Cygwin. Instructions for this are found below. NOTE: Xygwin and/or.Cygwin-based uClinux kernel development is no longer supported, and I strongly strongly recommend that you forget the whole idea. In principle it can be done, but it involves a lot of pain. So, if you go that route, I'm sympathetic, but am not really able to offer much help. You've been warned! Getting StartedMake sure Xilinx EDK is installed first, preferably in c:/EDK or somewhere similar. The following instructions assume C:/EDK. Don't forget to apply the most recent service packs etc. Install CygwinGo to www.cygwin.org and download and install a good, fresh copy of Cygwin. You don't need everything, just the basic shell, the development tools (gcc, binutils, cvs etc), vi, and any other stuff you like. Make sure you get the "patch" utility as well. Install this in C:/cygwin All hardware synthesis, kernel development and compilation will now happen under Cygwin. Forget about Xygwin, you'll never use it again. Toolchain HackingPerform the following steps (you may wish to save a copy of your c:/edk directory in case this goes wrong): $ cd c:/edk (or wherever you installed EDK) $ cat > xyg2cyg.sed :%s/xygwin1.dll/cygwin1.dll/g :w :q! ^D $ for f in $( find gnu/ bin/ -name '*.exe' -o '*.dll' ) do vim -b -s xyg2cyg.sed $f done (Note that spaces are important in the "for f in $( find ... )" command) Basically what's happening is a global search and replace through the toolchain pointing the executables to the Cygwin dlls, instead of Xygwin. When the dust settles, test out your hacked toolchain by starting a *Cygwin*
shell, $ mb-gcc If it says "no input files", then you're in business. If you get a dialog box popping up saying "Cannot find xygwin1.dll" then you've made an error somewhere in the previous step. Check you are in the correct directory, and repeat the steps carefully. A side effect of this process is that you can no longer run the libgen/platgen tools from within the XPS GUI. This is not really a hardship - you can still use XPS to generate the MHS and MSS files etc, then do a Sync Project and export Makefile, then do the actual platgen/libgen etc from the Cygwin command line. |
|
|
