Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
system.sh.sample 1.73 KiB
Newer Older
#!/bin/bash
#copy as "system.sh" and tweak for your system

ARCH=$(uname -m)

if test "-$ARCH-" = "-armv7l-"
then
 echo "Using: Native armv7l Compiler"
 echo "Using: Cross Compiler"
 #CC=arm-linux-gnueabi-

 #Test that user actually modified the above CC line:
 if [ "-${CC}-" == "--" ] ; then
  echo ""
  echo "Error: You haven't setup the Cross Compiler (CC variable) in system.sh"
  echo ""
  echo "with a (sane editor) open system.sh and modify the commented Line 12: #CC=arm-linux-gnueabi-"
  echo ""
  echo "If you need hints on installing an ARM GCC Cross ToolChain, view README file"
  echo ""
  exit
 fi

 GCC_TEST=$(LC_ALL=C ${CC}gcc -v 2>&1 | grep "Target:" | grep arm || true)
 GCC_REPORT=$(LC_ALL=C ${CC}gcc -v 2>&1 || true)
 if [ "-${GCC_TEST}-" == "--" ] ; then
  echo ""
  echo "Error: The GCC ARM Cross Compiler you setup in system.sh (CC variable)."
  echo "Doesn't seem to be valid for ARM, double check it's location, or that"
  echo "you chose the correct GCC Cross Compiler."
  echo ""
  echo "Output of: ${CC}gcc -v"
  echo "${GCC_REPORT}"
  echo ""
fi

#USE git for downloading source
#To minimize bandwidth, clone this in a directory of your choice
#git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
#Force Script to use the latest git commit's..
#This should be enabled with care, as any upstream commit can break any local patch..
#So NO SUPPORT ;)
#LATEST_GIT=1

#Use with Caution, mount locations can change... This define's SD/MMC card mount location for load_uImage.sh script.
#MMC=/dev/sde

#local patches
#LOCAL_PATCH_DIR=/full/path/to/dir/

#zImage to uImage
#OMAP3-4
#ZRELADDR=0x80008000

#mx51
#ZRELADDR=0x90008000

#mx53
#ZRELADDR=0x70008000