Changeset 259

Show
Ignore:
Timestamp:
06/26/08 09:01:31 (2 months ago)
Author:
conrad
Message:

kernel configs for sh cross compile, local MigoR stuff

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • home/bin/build

    r256 r259  
    77THIS="build" 
    88 
    9 MIGOR_ROOT=/export/MigoR-BSP-20080326/rootfs 
     9MIGOR_ROOT=/export/MigoR-BSP-current/rootfs 
    1010 
    1111# Default configure flags 
     
    112112 
    113113  case $arch in 
    114     sh3* | sh4*) 
    115       build_set_paths "$HOME/usr/share/gnush4-nofpu_linux_v0701-1" 
    116       BUILD_TARGET_ARCH="sh3-linux" 
    117       CONFIGURE_FLAGS="--host=sh3-linux --prefix=$MIGOR_ROOT" 
    118       PKG_CONFIG_PATH="$MIGOR_ROOT/usr/local/lib/pkgconfig:$MIGOR_ROOT/usr/lib/pkgconfig" 
     114    sh | sh3* | sh4*) 
     115      BUILD_KERNEL_ARCH=sh 
     116 
     117      # Build on gentoo crossdev 
     118      #build_set_paths "/usr/sh3-unknown-linux-gnu/usr" 
     119      #export LDFLAGS="-L/usr/sh3-unknown-linux-gnu/lib $LDFLAGS" 
     120      #BUILD_TARGET_ARCH="sh3-unknown-linux-gnu" 
     121      #CONFIGURE_FLAGS="--host=sh3-unknown-linux-gnu --prefix=$MIGOR_ROOT" 
     122      #CONFIGURE_FLAGS="--host=sh3-unknown-linux-gnu --prefix=$HOME/usr-sh3" 
     123 
     124      # Build on deka 
     125      CROSS_DIR="$HOME/cross/toolchain-sh3" 
     126      build_set_paths $CROSS_DIR 
     127 
     128      #BUILD_TARGET_ARCH="sh3-linux" 
     129      BUILD_TARGET_ARCH="sh3-unknown-linux" 
     130      #CONFIGURE_FLAGS="--host=sh3-linux --prefix=$MIGOR_ROOT/usr/local" 
     131      CONFIGURE_FLAGS="--host=sh3-linux --prefix=$HOME/usr-sh3/" 
     132 
     133      ## Kernel Kbuild 
     134      export CROSS_COMPILE="$CROSS_DIR/bin/sh3-linux-" 
     135 
     136      ## pkg-config 
     137      #export PKG_CONFIG_PATH="$MIGOR_ROOT/usr/local/lib/pkgconfig:$MIGOR_ROOT/usr/lib/pkgconfig" 
     138      #export PKG_CONFIG_PATH="$HOME/usr-MigoR-cross/lib/pkgconfig:$PKG_CONFIG_PATH" 
     139      export PKG_CONFIG_PATH="$HOME/usr-sh3/lib/pkgconfig:$PKG_CONFIG_PATH" 
    119140      ;; 
    120141    *86* | amd64* | *) 
     
    160181############################################################ 
    161182 
     183build_setup_intree () { 
     184  if [ -e mplayer.c -o -e ffmpeg.c ] ; then 
     185    BUILD_IN_TREE="y" 
     186  fi 
     187} 
     188 
    162189build_kernel () { 
    163   msg="$1 Linux for $BUILD_TARGET_ARCH" 
     190  msg="$1 Linux for $BUILD_KERNEL_ARCH" 
    164191  shift 
    165192  builddir=$(build_get_dir) 
     
    168195 
    169196  # $MAKE handles DRY_RUN via make -n 
    170   $MAKE ARCH=$BUILD_TARGET_ARCH O=$builddir $* 
     197  $MAKE ARCH=$BUILD_KERNEL_ARCH O=$builddir $* 
     198 
     199  case $1 in 
     200    *config) 
     201      build_try_run "Copying kernel configuration to build dir" \ 
     202        cp .config $builddir 
     203      ;; 
     204  esac 
    171205} 
    172206 
    173207build_configure_customize () { 
    174208  srcdir=$(pwd) 
    175   if [ ! -e mplayer.c ] ; then 
     209  if test "x$BUILD_IN_TREE" = "x" ; then 
    176210    CONFIGURE_FLAGS="--srcdir=$srcdir $CONFIGURE_FLAGS" 
    177211  fi 
     
    189223} 
    190224 
    191 build_intree_only () { 
    192   # MPlayer can't be built out-of-tree 
    193   [ "x$BUILD_IN_TREE" = "xy" -o -e mplayer.c ] 
    194 } 
    195  
    196225build_in_builddir () { 
    197226  echo "build: [$BUILD_TARGET_ARCH] \"$*\"" 
    198227 
    199   if build_intree_only ; then 
     228  if test "x$BUILD_IN_TREE" = "xy" ; then 
    200229    build_try_run "Running \"$*\" (in-tree)" \ 
    201230      "$*" 
     
    250279  builddir=$(build_get_dir) 
    251280  if [ -e Kbuild ] ; then 
    252     build_kernel "Building" 
     281    build_kernel "Building" $* 
    253282  elif [ -e Setup.lhs -o -e Setup.hs ] ; then 
    254283    build_cabal_customize 
     
    299328 
    300329build_clean () { 
    301   if [ -e Kbuild -o build_intree_only ] ; then 
     330  if [ -e Kbuild -o "x$BUILD_IN_TREE" = "xy" ] ; then 
    302331    build_make clean 
    303332  elif [ -e Setup.lhs -o -e Setup.hs ] ; then 
     
    338367BUILD_IN_TREE="" 
    339368BUILD_IN_TMPDIR="" 
     369 
     370build_setup_intree 
    340371 
    341372GETOPTEST=`getopt --version` 
     
    414445    build_prepare $* 
    415446    ;; 
    416   config*) 
     447  *config*) 
    417448    build_configure $* 
    418449    ;; 
     
    426457    build_uninstall $* 
    427458    ;; 
     459  distcheck) 
     460    build_make distcheck $* 
     461    ;; 
    428462  make*|*) 
    429463    build_make $*