aboriginal

changeset 155:ce1ca3d0f95b 0.2.1

Put zImage-$ARCH in build directory, not mini-native-$ARCH, and eliminate run-mini-native.sh in favor of generating a run script per target.
author Rob Landley <rob@landley.net>
date Mon, 09 Apr 2007 12:09:40 -0400
parents 47b14e5d6117
children ad6b2ba3ea2d
files build.sh include.sh mini-native.sh run-mini-native.sh sources/configs/armv4l sources/configs/armv5l sources/configs/i586 sources/configs/i686 sources/configs/mipsel sources/configs/powerpc sources/configs/sparc sources/configs/x86_64
diffstat 12 files changed, 31 insertions(+), 28 deletions(-) [+]
line diff
     1.1 --- a/build.sh	Mon Apr 09 12:06:12 2007 -0400
     1.2 +++ b/build.sh	Mon Apr 09 12:09:40 2007 -0400
     1.3 @@ -19,6 +19,7 @@
     1.4  do
     1.5    echo "=== Building ARCH $i"
     1.6    ./cross-compiler.sh $i || exit 1
     1.7 +  echo "=== native ($i)"
     1.8    ./mini-native.sh $i || exit 1
     1.9    ./package-mini-native.sh $i || exit 1
    1.10  done
     2.1 --- a/include.sh	Mon Apr 09 12:06:12 2007 -0400
     2.2 +++ b/include.sh	Mon Apr 09 12:09:40 2007 -0400
     2.3 @@ -217,6 +217,11 @@
     2.4    export NATIVE="${BUILD}/mini-native-$ARCH"
     2.5    export PATH="${CROSS}/bin:$PATH"
     2.6    export IMAGE="${BUILD}/image-${ARCH}.ext2"
     2.7 +
     2.8 +
     2.9 +  emulator_command image-$ARCH.ext2 zImage-$ARCH \
    2.10 +    "rw init=/tools/bin/sh panic=1 PATH=/tools/bin" > "$BUILD/run-$ARCH.sh" &&
    2.11 +  chmod +x "$BUILD/run-$ARCH.sh"
    2.12  fi
    2.13  mkdir -p "${WORK}"
    2.14  
     3.1 --- a/mini-native.sh	Mon Apr 09 12:06:12 2007 -0400
     3.2 +++ b/mini-native.sh	Mon Apr 09 12:09:40 2007 -0400
     3.3 @@ -24,7 +24,7 @@
     3.4  # build bootable kernel for target
     3.5  make ARCH="${KARCH}" allnoconfig KCONFIG_ALLCONFIG="${WORK}/miniconfig-linux" &&
     3.6  make ARCH="${KARCH}" CROSS_COMPILE="${ARCH}-" &&
     3.7 -cp "${KERNEL_PATH}" "${NATIVE}/zImage-${ARCH}" &&
     3.8 +cp "${KERNEL_PATH}" "${BUILD}/zImage-${ARCH}" &&
     3.9  cd .. &&
    3.10  $CLEANUP linux-*
    3.11  
     4.1 --- a/run-mini-native.sh	Mon Apr 09 12:06:12 2007 -0400
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,8 +0,0 @@
     4.4 -#!/bin/sh
     4.5 -
     4.6 -source include.sh
     4.7 -
     4.8 -INIT="$2"
     4.9 -[ -z "$INIT" ] && INIT=/tools/bin/sh
    4.10 -run_emulator build/image-"$1".ext2 build/mini-native-"$1"/zImage-"$1" \
    4.11 -	"rw init=$INIT panic=1 PATH=/tools/bin"
     5.1 --- a/sources/configs/armv4l	Mon Apr 09 12:06:12 2007 -0400
     5.2 +++ b/sources/configs/armv4l	Mon Apr 09 12:09:40 2007 -0400
     5.3 @@ -3,10 +3,10 @@
     5.4  GCC_FLAGS="--with-float=soft"
     5.5  BINUTILS_FLAGS=
     5.6  QEMU_TEST=$KARCH
     5.7 -run_emulator()
     5.8 +emulator_command()
     5.9  {
    5.10 -  qemu-system-arm -M versatilepb -nographic -no-reboot -hda "$1" \
    5.11 -	-kernel "$2" -append "$3 root=/dev/sda console=ttyAMA0"
    5.12 +  echo qemu-system-arm -M versatilepb -nographic -no-reboot -hda "$1" \
    5.13 +	-kernel "$2" -append "'$3 root=/dev/sda console=ttyAMA0'"
    5.14  }
    5.15  
    5.16  # Write out uClibc .config file.
     6.1 --- a/sources/configs/armv5l	Mon Apr 09 12:06:12 2007 -0400
     6.2 +++ b/sources/configs/armv5l	Mon Apr 09 12:09:40 2007 -0400
     6.3 @@ -3,10 +3,10 @@
     6.4  GCC_FLAGS=
     6.5  BINUTILS_FLAGS=
     6.6  QEMU_TEST=$KARCH
     6.7 -run_emulator()
     6.8 +emulator_command()
     6.9  {
    6.10 -  qemu-system-arm -M versatilepb -nographic -no-reboot -hda "$1" \
    6.11 -	-kernel "$2" -append "$3 root=/dev/sda console=ttyAMA0"
    6.12 +  echo qemu-system-arm -M versatilepb -nographic -no-reboot -hda "$1" \
    6.13 +	-kernel "$2" -append "'$3 root=/dev/sda console=ttyAMA0'"
    6.14  }
    6.15  
    6.16  # Write out uClibc .config file.
     7.1 --- a/sources/configs/i586	Mon Apr 09 12:06:12 2007 -0400
     7.2 +++ b/sources/configs/i586	Mon Apr 09 12:09:40 2007 -0400
     7.3 @@ -4,6 +4,11 @@
     7.4  GCC_FLAGS=
     7.5  QEMU_TEST=$KARCH
     7.6  
     7.7 +emulator_command()
     7.8 +{
     7.9 +  echo qemu -nographic -hda "$1" -kernel "$2" -append "'$3 root=/dev/hda console=ttyS0'"
    7.10 +}
    7.11 +
    7.12  # Write out uClibc .config file.
    7.13  
    7.14  cat > "${WORK}"/miniconfig-uClibc << 'EOF'
     8.1 --- a/sources/configs/i686	Mon Apr 09 12:06:12 2007 -0400
     8.2 +++ b/sources/configs/i686	Mon Apr 09 12:09:40 2007 -0400
     8.3 @@ -4,9 +4,9 @@
     8.4  GCC_FLAGS=
     8.5  QEMU_TEST=$KARCH
     8.6  
     8.7 -run_emulator()
     8.8 +emulator_command()
     8.9  {
    8.10 -  qemu -nographic -hda "$1" -kernel "$2" -append "$3 root=/dev/hda console=ttyS0"
    8.11 +  echo qemu -nographic -hda "$1" -kernel "$2" -append "'$3 root=/dev/hda console=ttyS0'"
    8.12  }
    8.13  
    8.14  # Write out uClibc .config file.
     9.1 --- a/sources/configs/mipsel	Mon Apr 09 12:06:12 2007 -0400
     9.2 +++ b/sources/configs/mipsel	Mon Apr 09 12:09:40 2007 -0400
     9.3 @@ -4,10 +4,10 @@
     9.4  GCC_FLAGS=
     9.5  QEMU_TEST=mipsel
     9.6  
     9.7 -run_emulator()
     9.8 +emulator_command()
     9.9  {
    9.10 -  qemu-system-mipsel -M mips -no-reboot -nographic -hda "$1" -kernel "$2" \
    9.11 -	-append "$3 console=ttyS0 root=/dev/hda"
    9.12 +  echo qemu-system-mipsel -M mips -no-reboot -nographic -hda "$1" -kernel "$2" \
    9.13 +	-append "'$3 console=ttyS0 root=/dev/hda'"
    9.14  }
    9.15  
    9.16  # Write out uClibc .config file.
    10.1 --- a/sources/configs/powerpc	Mon Apr 09 12:06:12 2007 -0400
    10.2 +++ b/sources/configs/powerpc	Mon Apr 09 12:09:40 2007 -0400
    10.3 @@ -3,10 +3,10 @@
    10.4  GCC_FLAGS=
    10.5  BINUTILS_FLAGS=
    10.6  QEMU_TEST= #ppc
    10.7 -run_emulator()
    10.8 +emulator_command()
    10.9  {
   10.10 -  qemu-system-ppc -M prep -nographic -hda "$1" \
   10.11 -	-kernel "$2" -append "$3 root=/dev/hda console=/dev/ttyS0"
   10.12 +  echo qemu-system-ppc -M prep -nographic -hda "$1" \
   10.13 +	-kernel "$2" -append "'$3 root=/dev/hda console=/dev/ttyS0'"
   10.14  }
   10.15  
   10.16  # Write out Linux kernel .config file
    11.1 --- a/sources/configs/sparc	Mon Apr 09 12:06:12 2007 -0400
    11.2 +++ b/sources/configs/sparc	Mon Apr 09 12:09:40 2007 -0400
    11.3 @@ -5,10 +5,10 @@
    11.4  BINUTILS_FLAGS=
    11.5  GCC_FLAGS=
    11.6  QEMU_TEST=$KARCH
    11.7 -run_emulator()
    11.8 +emulator_command()
    11.9  {
   11.10 -  qemu-system-sparc -nographic -no-reboot -hda "$1" \
   11.11 -        -kernel "$2" -append "$3 root=/dev/sda console=ttyS0"
   11.12 +  echo qemu-system-sparc -nographic -no-reboot -hda "$1" \
   11.13 +        -kernel "$2" -append "'$3 root=/dev/sda console=ttyS0'"
   11.14  }
   11.15  
   11.16  
    12.1 --- a/sources/configs/x86_64	Mon Apr 09 12:06:12 2007 -0400
    12.2 +++ b/sources/configs/x86_64	Mon Apr 09 12:09:40 2007 -0400
    12.3 @@ -4,9 +4,9 @@
    12.4  BINUTILS_FLAGS="--enable-64-bit-bfd"
    12.5  QEMU_TEST=
    12.6  
    12.7 -run_emulator()
    12.8 +emulator_command()
    12.9  {
   12.10 -  qemu-system-x86_64 -nographic -hda "$1" -kernel "$2" -append "$3 root=/dev/hda console=ttyS0"
   12.11 +  echo qemu-system-x86_64 -nographic -hda "$1" -kernel "$2" -append "'$3 root=/dev/hda console=ttyS0'"
   12.12  }
   12.13  
   12.14  # Write out uClibc .config file.