Line 72... |
Line 72... |
# - Hopefully now runs on Cygwin with new patch for uClibc
|
# - Hopefully now runs on Cygwin with new patch for uClibc
|
# 300409 - New Binutils patch - fixes objdump instruction decode issue
|
# 300409 - New Binutils patch - fixes objdump instruction decode issue
|
# 110509 - (v5c) Put in check for required build tools before building
|
# 110509 - (v5c) Put in check for required build tools before building
|
# 260509 - Changed gcc's package download to gcc-core as we only use the
|
# 260509 - Changed gcc's package download to gcc-core as we only use the
|
# c-language compiler and libraries right now.
|
# c-language compiler and libraries right now.
|
|
# 030609 - Fixed odd problem with uClibc build on latest Cygwin where it tried
|
|
# to run the INSTALL script file instead of the systems install binary
|
|
# by adding a suffix to the text file.
|
|
|
# TODO: OS X build things - need an "elf.h" from some Linux machine's
|
# TODO: OS X build things - need an "elf.h" from some Linux machine's
|
# /usr/local/include dir and put in Mac's /usr/local/include dir -
|
# /usr/local/include dir and put in Mac's /usr/local/include dir -
|
# this solves issue with Linux compilation
|
# this solves issue with Linux compilation
|
# TODO: OS X build things - add HOST_LOADLIBES="lintl" to make line of uClibc
|
# TODO: OS X build things - add HOST_LOADLIBES="lintl" to make line of uClibc
|
Line 397... |
Line 400... |
|
|
mkdir $INSTALL_DIR
|
mkdir $INSTALL_DIR
|
|
|
####################################################################################################
|
####################################################################################################
|
## Now check which sources have already been downloaded, if any ##
|
## Now check which sources have already been downloaded, if any ##
|
DO_DOWNLOADS="y" ## Default is to do downloads
|
DO_DOWNLOADS="y" ## Default is to NOT do downloads
|
|
|
if [ $DBG_BUILD -eq 1 ]
|
if [ $DBG_BUILD -eq 1 ]
|
then
|
then
|
## Ask if we should do downloads ##
|
## Ask if we should do downloads ##
|
echo "Do downloads?"
|
echo "Do downloads?"
|
Line 410... |
Line 413... |
## $YN will be zero length string if user just pressed enter ##
|
## $YN will be zero length string if user just pressed enter ##
|
if [ -z $DO_DOWNLOADS ]
|
if [ -z $DO_DOWNLOADS ]
|
then
|
then
|
DO_DOWNLOADS="n"
|
DO_DOWNLOADS="n"
|
else
|
else
|
DO_DOWNLOADS=$(echo $YN | tr [:upper:] [:lower:])
|
DO_DOWNLOADS=$(echo $DO_DOWNLOADS | tr [:upper:] [:lower:])
|
fi
|
fi
|
|
|
fi
|
fi
|
|
|
if [ $DO_DOWNLOADS = "y" ]
|
if [ $DO_DOWNLOADS = "y" ]
|
then
|
then
|
## Check if download directory exists, if not create it ##
|
## Check if download directory exists, if not create it ##
|
if [ -d $DOWNLOAD_DIR ]
|
if [ ! -d $DOWNLOAD_DIR ]; then
|
then
|
|
cd $DOWNLOAD_DIR
|
|
else
|
|
mkdir $DOWNLOAD_DIR
|
mkdir $DOWNLOAD_DIR
|
cd $DOWNLOAD_DIR
|
|
fi
|
fi
|
|
|
|
cd $DOWNLOAD_DIR
|
|
|
## We'll need the md5sum file ##
|
## We'll need the md5sum file ##
|
## This is a file stored on the ORSoC FTP server, containing checksums of all the files we need ##
|
## This is a file stored on the ORSoC FTP server, containing checksums of all the files we need ##
|
rm -f $MD5SUM_FILE
|
rm -f $MD5SUM_FILE
|
wget ftp://$ORSOC_FTP_USER:$ORSOC_FTP_PASSWD@$ORSOC_FTP_HOST/$ORSOC_FTP_DIR/$MD5SUM_FILE
|
wget ftp://$ORSOC_FTP_USER:$ORSOC_FTP_PASSWD@$ORSOC_FTP_HOST/$ORSOC_FTP_DIR/$MD5SUM_FILE
|
## Make sure we got that OK ##
|
## Make sure we got that OK ##
|
Line 547... |
Line 548... |
## Cygwin exports ##
|
## Cygwin exports ##
|
ON_CYGWIN=`set | grep -i mach|grep -i -c cygwin`
|
ON_CYGWIN=`set | grep -i mach|grep -i -c cygwin`
|
if [ $ON_CYGWIN -ge 1 ]
|
if [ $ON_CYGWIN -ge 1 ]
|
then
|
then
|
echo
|
echo
|
echo "Cygwin host exports:"
|
echo "Cygwin host detected"
|
|
echo "Platform specific exports:"
|
echo "export HOST_LOADLIBES=\"-lcurses -lintl\" "
|
echo "export HOST_LOADLIBES=\"-lcurses -lintl\" "
|
echo
|
echo
|
|
export ON_CYGWIN=1
|
export HOST_LOADLIBES="-lcurses -lintl"
|
export HOST_LOADLIBES="-lcurses -lintl"
|
fi
|
fi
|
|
|
####################################################################################################
|
####################################################################################################
|
|
|
Line 704... |
Line 707... |
## Apply patch to linux kernel sources ##
|
## Apply patch to linux kernel sources ##
|
bzip2 -dc $DOWNLOAD_DIR/$LINUX_PATCH | patch -p1 > $LINUX_VER-patch.log 2>&1
|
bzip2 -dc $DOWNLOAD_DIR/$LINUX_PATCH | patch -p1 > $LINUX_VER-patch.log 2>&1
|
|
|
## Make sure that patched ok ##
|
## Make sure that patched ok ##
|
check_exit_code
|
check_exit_code
|
|
## Copy our preconfigured configuration file into place ##
|
cp rgd_dot_config .config
|
cp rgd_dot_config .config
|
|
|
echo
|
echo
|
echo "Making Linux oldconfig"
|
echo "Making Linux oldconfig"
|
|
|
Line 842... |
Line 845... |
TARGET_SECOND_PART=`echo $TARGET | cut -f 2 -d "-"`
|
TARGET_SECOND_PART=`echo $TARGET | cut -f 2 -d "-"`
|
## Removes the uclinux line and changes to whatever our current target is ##
|
## Removes the uclinux line and changes to whatever our current target is ##
|
sed "s/or32\-uclinux/\or32\-$TARGET_SECOND_PART/" $BUILD_TOP/$UCLIB_VER/extra/Configs/Config.or32 > $BUILD_TOP/$UCLIB_VER/extra/Configs/Config.or32.newtarget
|
sed "s/or32\-uclinux/\or32\-$TARGET_SECOND_PART/" $BUILD_TOP/$UCLIB_VER/extra/Configs/Config.or32 > $BUILD_TOP/$UCLIB_VER/extra/Configs/Config.or32.newtarget
|
mv $BUILD_TOP/$UCLIB_VER/extra/Configs/Config.or32.newtarget $BUILD_TOP/$UCLIB_VER/extra/Configs/Config.or32
|
mv $BUILD_TOP/$UCLIB_VER/extra/Configs/Config.or32.newtarget $BUILD_TOP/$UCLIB_VER/extra/Configs/Config.or32
|
|
|
|
if [ $ON_CYGWIN -ge 1 ]
|
|
then
|
|
## If on Cygwin, fix strange error where 'install' command by the makefile ##
|
|
## results in it trying to execute the INSTALL text file in the root of the ##
|
|
## package ##
|
|
mv INSTALL INSTALL.txt
|
|
fi
|
|
|
echo
|
echo
|
echo "Making uClibc oldconfig"
|
echo "Making uClibc oldconfig"
|
|
|
HOST_LOADLIBES="-lcurses -lintl" HOSTCC=`which gcc` make oldconfig > $UCLIB_VER-make-oldconfig.log 2>&1
|
HOST_LOADLIBES="-lcurses -lintl" HOSTCC=`which gcc` make oldconfig > $UCLIB_VER-make-oldconfig.log 2>&1
|
|
|