diff options
author | Maxim Grigoriev <maxim2405@gmail.com> | 2009-07-24 02:17:22 +0200 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2009-07-24 02:17:22 +0200 |
commit | 5ddb904a8620bceddd4df1c05c7342e10592c0c3 (patch) | |
tree | 0e01403aa2e63e0f36922cd10bda0cb31f4f6952 /target/xtensa/setup-config | |
parent | cd0b1ce3b7934c631477ad3262316199b73cce89 (diff) |
target/; xtensa support
Part of #163.
Signed-off-by: Maxim Grigoriev <maxim2405@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'target/xtensa/setup-config')
-rw-r--r-- | target/xtensa/setup-config | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/target/xtensa/setup-config b/target/xtensa/setup-config new file mode 100644 index 000000000..7ef8fe86e --- /dev/null +++ b/target/xtensa/setup-config @@ -0,0 +1,57 @@ +#!/bin/sh + +# Convenience script for setting up a default buildroot config +# for Xtensa processor targets.. + +usage() { + echo "Usage (invoke from top of buildroot tree):" + echo " ./target/xtensa/setup-config <corename>" + #echo " ./target/xtensa/setup-config <corename> [<overlaypath>]" + echo "where:" + echo " <corename> is the Xtensa core overlay name, as specified in the -c option" + echo " of the ./target/xtensa/xt-buildroot-overlay-install script." + echo "" + echo "For example:" + echo " ./target/xtensa/setup-config dc232b" + echo "" + echo "Currently installed (available) core overlay names are:" + echo " " `ls toolchain/binutils/binutils-xtensa_*.tgz | sed -e 's,toolchain\/binutils\/binutils-xtensa_\(.*\)\.tgz,\1,g'` + exit 1 +} + +if [ $# -ne 1 ]; then + usage +fi + +core=$1 ; shift + +if [ ! -f toolchain/binutils/binutils-xtensa_${core}.tgz \ + -o ! -f toolchain/gcc/gcc-xtensa_${core}.tgz \ + -o ! -f toolchain/gdb/gdb-xtensa_${core}.tgz ]; then + echo "ERROR: Did not find an installed Xtensa core overlay named '${core}'." + echo "ERROR: Please install it first with ./target/xtensa/xt-buildroot-overlay-install" + echo "" + usage +fi + +# Use preset buildroot config: +cp target/xtensa/defconfig .defconfig-xtensa +# Set core name: +sed -i -e 's,^BR2_xtensa_\(.*\)=y,BR2_xtensa_custom=y\nBR2_xtensa_custom_name="'${core}'",' .defconfig-xtensa +## sed -i -e 's,^.*BR2_xtensa_core_name.*,BR_xtensa_core_name="'${core}'",' .defconfig-xtensa +# Create full .config with defaults: +make clean defconfig CONFIG_DEFCONFIG=.defconfig-xtensa || exit 1 + +# Busybox adjustments: turn off 'ar' (can't create archives yet overrides real one) +# and turn on NFS mounting (Xtensa defconfig turns on RPC so this can work): +# +bborig=`grep '^BR2_PACKAGE_BUSYBOX_CONFIG=' .config | sed -e 's,.*"\(.*\)".*,\1,'` +bbconf=target/xtensa/busybox-config +cp $bborig $bbconf +sed -i -e 's,^CONFIG_AR=y,# CONFIG_AR is not set,' $bbconf +sed -i -e 's,^.*CONFIG_FEATURE_MOUNT_NFS.*,CONFIG_FEATURE_MOUNT_NFS=y,' $bbconf +# Make use of above busybox adjustments: +sed -i -e 's,.*\(BR2_PACKAGE_BUSYBOX_CONFIG\).*,\1="'$bbconf'",' .config + +echo "Done." + |