Hi all,
I tried Quan's suggestion of reinstalling everything, but still got the message that "installing the Cygwin extensions" didn't work. The README doesn't say anything about how to install the extensions manually, so I poked around and ran install_cyg_ext.sh manually. It turns out that the installation script misbehaves if you're installing from a directory with a space in the path, as I was. I fixed the script:
#!/bin/sh
umount /usr/lib
# save our current working directory so we can go back later
CURDIR=`pwd`
set -e # exit on failure
# if no variables are specified, pull in info from the install_settings.cache file# that's created by the installer
if
then
# $1 = source bashrc file# $2 = target user.bashrc file# $3 = path to eclipse# $4 = path to altera/kits/nios2 or equivalent (KIT_HOME in registry)# $5 = application plugin directory name# $6 = uClibc plugin directory name# $7 = kernel plugin directory name
RC_FILE=$1
USER_RC_FILE=$2
ECLIPSE_BIN_HOME=$3
NIOS2_KIT_HOME=$4
APP_PLUGIN_NAME=$5
KERNEL_PLUGIN_NAME=$6
UCLIBC_PLUGIN_NAME=$7
else
. ./install_settings.cache
fi
SOURCE_RC=`echo $RC_FILE | sed 's/\\/\//g' | sed 's/ /\ /g'` # replaces \ with / and escapes spaces for use in shell statements
TARGET_RC=`echo $USER_RC_FILE | sed 's/\\/\//g' | sed 's/ /\ /g'` # replaces \ with / and escapes spaces for use in shell statements
ECLIPSE_PATH=`echo $ECLIPSE_BIN_HOME | sed 's/\\/\//g'`
KITS_PATH=`echo $NIOS2_KIT_HOME | sed 's/\\/\//g'`
NE_ROOT_PATH=`cygpath $KITS_PATH/examples/software/linux`
APP_PLUGIN_PATH=`cygpath $ECLIPSE_PATH/plugins/$APP_PLUGIN_NAME`
UCLIBC_PLUGIN_PATH=`cygpath $ECLIPSE_PATH/plugins/$UCLIBC_PLUGIN_NAME`
KERNEL_PLUGIN_PATH=`cygpath $ECLIPSE_PATH/plugins/$KERNEL_PLUGIN_NAME`
ECLIPSE_WORKSPACE_PATH=`cygpath $ECLIPSE_PATH/workspace`
if
then
# if we cannot find the string in the existing file, it has not
# been previously modified.
if
then
cp -f "$TARGET_RC" "$TARGET_RC.mtx_nios2linux.bak"
echo "" >> "$TARGET_RC"
cat "$SOURCE_RC" >> "$TARGET_RC"
# otherwise, the user.bashrc already contains the necessary
# modifications, so only update the version number/date.
else
cp -f "$TARGET_RC" "$TARGET_RC.mtx_nios2linux.bak"
sed -e 's/Version 1\., Built Fri May 7 11:44am/Version 1\.3, Built December 30th, 2004/g' "$TARGET_RC" > tmp.grep.file
rm -f "$TARGET_RC"
cp -f tmp.grep.file "$TARGET_RC"
rm -f tmp.grep.file
fi# no previous user.bashrc found
else
cp -f "$SOURCE_RC" "$TARGET_RC"
fi
# add the extra variables to the bashrc file
echo export LINUX_NE_ROOT=\"$NE_ROOT_PATH\" >> "$TARGET_RC"
echo export APP_PLUGIN=\"$APP_PLUGIN_PATH\" >> "$TARGET_RC"
echo export UCLIBC_PLUGIN=\"$UCLIBC_PLUGIN_PATH\" >> "$TARGET_RC"
echo export KERNEL_PLUGIN=\"$KERNEL_PLUGIN_PATH\" >> "$TARGET_RC"
echo export ECLIPSE_WORKSPACE=\"$ECLIPSE_WORKSPACE_PATH\" >> "$TARGET_RC"
cd /usr/include
rm curses.h form.h menu.h panel.h unctrl.h
ln -sf /usr/local/include/ncurses/curses.h
ln -sf /usr/local/include/ncurses/form.h
ln -sf /usr/local/include/ncurses/menu.h
ln -sf /usr/local/include/ncurses/panel.h
ln -sf /usr/local/include/ncurses/unctrl.h
# create a temporary file to indicate that we have# completed running this script.
cd "$CURDIR"
touch install_cyg_ext.done
I also changed run_sh.bat to
prepend the Quartus Cygwin path to the PATH, since I have multiple installations of Cygwin on my machine and wanted the installer to use the right one:
PATH=%QUARTUS_ROOTDIR%\bin\cygwin\bin;%PATH%
sh %1 %2 %3 %4 %5 %6 %7 %8 %9
I ran the installer manually with these new scripts and now I can configure my kernel!