From 33bca149d48177147bf4e1feb84c0123695c8fa9 Mon Sep 17 00:00:00 2001 From: Abdoulaye Walsimou Gaye Date: Fri, 5 Apr 2013 22:25:42 +0200 Subject: Build system: CI: scripts rename Signed-off-by: Abdoulaye Walsimou Gaye --- defconfigs/arm/arm-ci-build.sh | 116 +++++++++++++++++++++++++++++++++++++++++ defconfigs/arm/arm-ic-build.sh | 116 ----------------------------------------- defconfigs/ci-build.sh | 83 +++++++++++++++++++++++++++++ defconfigs/ic-build.sh | 83 ----------------------------- 4 files changed, 199 insertions(+), 199 deletions(-) create mode 100755 defconfigs/arm/arm-ci-build.sh delete mode 100755 defconfigs/arm/arm-ic-build.sh create mode 100755 defconfigs/ci-build.sh delete mode 100755 defconfigs/ic-build.sh diff --git a/defconfigs/arm/arm-ci-build.sh b/defconfigs/arm/arm-ci-build.sh new file mode 100755 index 0000000..6c71fa3 --- /dev/null +++ b/defconfigs/arm/arm-ci-build.sh @@ -0,0 +1,116 @@ +#!/bin/sh + +arm_perror() { + echo "[IC-BUILD-ERROR] ARM: $1" +} + +cibuild_kconfig=$workspace/cibuild-arm.kconfig +rm -rf $cibuild_kconfig + +set_arch_family() { + case "$archvariant" in + arm9tdmi|arm920t|arm922t) + echo "CONFIG_EMBTK_ARCH_ARM_FAMILY_ARM9TDMI_"$(echo $archvariant | tr a-z A-Z)"=y" >> $cibuild_kconfig + ;; + arm968e-s) + echo "CONFIG_EMBTK_ARCH_ARM_FAMILY_ARM9E_"$(echo $archvariant | tr a-z A-Z)"=y" >> $cibuild_kconfig + ;; + arm1020e|arm1022e|arm1026ej-s) + echo "CONFIG_EMBTK_ARCH_ARM_FAMILY_ARM10E_"$(echo $archvariant | tr a-z A-Z)"=y" >> $cibuild_kconfig + ;; + xscale) + echo "CONFIG_EMBTK_ARCH_ARM_FAMILY_XSCALE_"$(echo $archvariant | tr a-z A-Z)"=y" >> $cibuild_kconfig + ;; + arm1136j-s|arm1136jf-s|arm1176jz-s|arm1176jzf-s|mpcore) + echo "CONFIG_EMBTK_ARCH_ARM_FAMILY_ARM11_"$(echo $archvariant | tr a-z A-Z)"=y" >> $cibuild_kconfig + ;; + cortex-a7|cortex-a8|cortex-a9|cortex-a15) + echo "CONFIG_EMBTK_ARCH_ARM_FAMILY_CORTEX_"$(echo $archvariant | tr a-z A-Z)"=y" >> $cibuild_kconfig + ;; + *) + arm_perror "Unknown ARM architecture family for $archvariant" + exit 1 + ;; + esac +} + +set_endian() { + case "$endian" in + LITTLE) + echo "CONFIG_EMBTK_ARCH_ARM_LITTLE_ENDIAN=y" >> $cibuild_kconfig + ;; + BIG) + echo "CONFIG_EMBTK_ARCH_ARM_LITTLE_ENDIAN=y" >> $cibuild_kconfig + ;; + *) + arm_perror "Unknown ARM endianness for $archvariant" + exit 1 + ;; + esac +} + +set_float() { + case "$float" in + softfloat) + echo "CONFIG_EMBTK_SOFTFLOAT=y" >> $cibuild_kconfig + ;; + hardfloat) + echo "CONFIG_EMBTK_HARDFLOAT=y" >> $cibuild_kconfig + ;; + *) + arm_perror "Unknown ARM floating point type $float for $archvariant" + exit 1 + ;; + esac +} + +set_os() { + case "$os" in + LINUX) + echo "CONFIG_EMBTK_OS_LINUX=y" >> $cibuild_kconfig + ;; + *) + arm_perror "Unsupported OS $os for ARM, please help to support it" + exit 1 + ;; + esac +} + +set_xcompiler() { + case "$toolchain" in + GCC) + echo "CONFIG_EMBTK_GCC_TOOLCHAIN=y" >> $cibuild_kconfig + ;; + Clang+llvm) + echo "CONFIG_EMBTK_LLVM_ONLY_TOOLCHAIN=y" >> $cibuild_kconfig + ;; + *) + arm_perror "Unsupported cross compiler $toolchain for ARM, please help to support it" + exit 1 + ;; + esac +} + +set_clibrary() { + case "$clibrary" in + eglibc) + echo "CONFIG_EMBTK_CLIB_EGLIBC=y" >> $cibuild_kconfig + ;; + uClibc) + echo "CONFIG_EMBTK_CLIB_UCLIBC=y" >> $cibuild_kconfig + ;; + *) + arm_perror "Unsupported c library $clibrary for ARM, please help to support it" + exit 1 + ;; + esac +} + +set_os +set_endian +set_arch_family +set_float +set_xcompiler +set_clibrary + +cat $cibuild_kconfig >> $workspace/.config && rm -rf $cibuild_kconfig diff --git a/defconfigs/arm/arm-ic-build.sh b/defconfigs/arm/arm-ic-build.sh deleted file mode 100755 index 6c71fa3..0000000 --- a/defconfigs/arm/arm-ic-build.sh +++ /dev/null @@ -1,116 +0,0 @@ -#!/bin/sh - -arm_perror() { - echo "[IC-BUILD-ERROR] ARM: $1" -} - -cibuild_kconfig=$workspace/cibuild-arm.kconfig -rm -rf $cibuild_kconfig - -set_arch_family() { - case "$archvariant" in - arm9tdmi|arm920t|arm922t) - echo "CONFIG_EMBTK_ARCH_ARM_FAMILY_ARM9TDMI_"$(echo $archvariant | tr a-z A-Z)"=y" >> $cibuild_kconfig - ;; - arm968e-s) - echo "CONFIG_EMBTK_ARCH_ARM_FAMILY_ARM9E_"$(echo $archvariant | tr a-z A-Z)"=y" >> $cibuild_kconfig - ;; - arm1020e|arm1022e|arm1026ej-s) - echo "CONFIG_EMBTK_ARCH_ARM_FAMILY_ARM10E_"$(echo $archvariant | tr a-z A-Z)"=y" >> $cibuild_kconfig - ;; - xscale) - echo "CONFIG_EMBTK_ARCH_ARM_FAMILY_XSCALE_"$(echo $archvariant | tr a-z A-Z)"=y" >> $cibuild_kconfig - ;; - arm1136j-s|arm1136jf-s|arm1176jz-s|arm1176jzf-s|mpcore) - echo "CONFIG_EMBTK_ARCH_ARM_FAMILY_ARM11_"$(echo $archvariant | tr a-z A-Z)"=y" >> $cibuild_kconfig - ;; - cortex-a7|cortex-a8|cortex-a9|cortex-a15) - echo "CONFIG_EMBTK_ARCH_ARM_FAMILY_CORTEX_"$(echo $archvariant | tr a-z A-Z)"=y" >> $cibuild_kconfig - ;; - *) - arm_perror "Unknown ARM architecture family for $archvariant" - exit 1 - ;; - esac -} - -set_endian() { - case "$endian" in - LITTLE) - echo "CONFIG_EMBTK_ARCH_ARM_LITTLE_ENDIAN=y" >> $cibuild_kconfig - ;; - BIG) - echo "CONFIG_EMBTK_ARCH_ARM_LITTLE_ENDIAN=y" >> $cibuild_kconfig - ;; - *) - arm_perror "Unknown ARM endianness for $archvariant" - exit 1 - ;; - esac -} - -set_float() { - case "$float" in - softfloat) - echo "CONFIG_EMBTK_SOFTFLOAT=y" >> $cibuild_kconfig - ;; - hardfloat) - echo "CONFIG_EMBTK_HARDFLOAT=y" >> $cibuild_kconfig - ;; - *) - arm_perror "Unknown ARM floating point type $float for $archvariant" - exit 1 - ;; - esac -} - -set_os() { - case "$os" in - LINUX) - echo "CONFIG_EMBTK_OS_LINUX=y" >> $cibuild_kconfig - ;; - *) - arm_perror "Unsupported OS $os for ARM, please help to support it" - exit 1 - ;; - esac -} - -set_xcompiler() { - case "$toolchain" in - GCC) - echo "CONFIG_EMBTK_GCC_TOOLCHAIN=y" >> $cibuild_kconfig - ;; - Clang+llvm) - echo "CONFIG_EMBTK_LLVM_ONLY_TOOLCHAIN=y" >> $cibuild_kconfig - ;; - *) - arm_perror "Unsupported cross compiler $toolchain for ARM, please help to support it" - exit 1 - ;; - esac -} - -set_clibrary() { - case "$clibrary" in - eglibc) - echo "CONFIG_EMBTK_CLIB_EGLIBC=y" >> $cibuild_kconfig - ;; - uClibc) - echo "CONFIG_EMBTK_CLIB_UCLIBC=y" >> $cibuild_kconfig - ;; - *) - arm_perror "Unsupported c library $clibrary for ARM, please help to support it" - exit 1 - ;; - esac -} - -set_os -set_endian -set_arch_family -set_float -set_xcompiler -set_clibrary - -cat $cibuild_kconfig >> $workspace/.config && rm -rf $cibuild_kconfig diff --git a/defconfigs/ci-build.sh b/defconfigs/ci-build.sh new file mode 100755 index 0000000..b2cfa7b --- /dev/null +++ b/defconfigs/ci-build.sh @@ -0,0 +1,83 @@ +#!/bin/sh + +# NOTE: this script only accepts long options + +perror() { + echo "[IC-BUILD-ERROR] : $1" +} + +pwarning() { + echo "[IC-BUILD-WARNING]: $1" +} + +pinfo() { + echo "[IC-BUILD-INFO] : $1" +} + +options=$(echo $* | sed 's/=/ /g') +set -- $options + +pinfo "Parsing parameters" + +while true; do + case "$1" in + --abi) + abi=$2; shift 2;; + --arch) + arch=$2; shift 2;; + --archvariant) + archvariant=$2; shift 2;; + --clibrary) + clibrary=$2; shift 2;; + --endian) + endian=$2; shift 2;; + --float) + float=$2; shift 2;; + --os) + os=$2; shift 2;; + --toolchain) + toolchain=$2; shift 2;; + --workspace) + workspace=$2; shift 2;; + --) + shift; break ;; + *) + break;; + esac +done + +# +# Basic checks +# +if [ "x$workspace" = "x" ]; then + perror "Workspace not specified" + exit 1 +fi + +if [ "x$arch" = "x" ]; then + perror "Architecture not specified" + exit 1 +fi + +if [ ! -d $workspace/defconfigs/$arch ]; then + perror "Architecture $arch seems not be supported" + exit 1 +fi + +if [ ! -e $workspace/defconfigs/$arch/$arch-ic-build.sh ]; then + perror "Architecture $arch does not provide specifics" + exit 1 +fi +cd $workspace && rm -rf .config .config.old && gmake clean + +# +# arch script +# +. $workspace/defconfigs/$arch/$arch-ic-build.sh + +# +# Now generating .config +# + +cat $workspace/defconfigs/common.kconfig >> $workspace/.config +cd $workspace && rm -rf $workspace/generated/* && gmake olddefconfig && gmake diff --git a/defconfigs/ic-build.sh b/defconfigs/ic-build.sh deleted file mode 100755 index b2cfa7b..0000000 --- a/defconfigs/ic-build.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/sh - -# NOTE: this script only accepts long options - -perror() { - echo "[IC-BUILD-ERROR] : $1" -} - -pwarning() { - echo "[IC-BUILD-WARNING]: $1" -} - -pinfo() { - echo "[IC-BUILD-INFO] : $1" -} - -options=$(echo $* | sed 's/=/ /g') -set -- $options - -pinfo "Parsing parameters" - -while true; do - case "$1" in - --abi) - abi=$2; shift 2;; - --arch) - arch=$2; shift 2;; - --archvariant) - archvariant=$2; shift 2;; - --clibrary) - clibrary=$2; shift 2;; - --endian) - endian=$2; shift 2;; - --float) - float=$2; shift 2;; - --os) - os=$2; shift 2;; - --toolchain) - toolchain=$2; shift 2;; - --workspace) - workspace=$2; shift 2;; - --) - shift; break ;; - *) - break;; - esac -done - -# -# Basic checks -# -if [ "x$workspace" = "x" ]; then - perror "Workspace not specified" - exit 1 -fi - -if [ "x$arch" = "x" ]; then - perror "Architecture not specified" - exit 1 -fi - -if [ ! -d $workspace/defconfigs/$arch ]; then - perror "Architecture $arch seems not be supported" - exit 1 -fi - -if [ ! -e $workspace/defconfigs/$arch/$arch-ic-build.sh ]; then - perror "Architecture $arch does not provide specifics" - exit 1 -fi -cd $workspace && rm -rf .config .config.old && gmake clean - -# -# arch script -# -. $workspace/defconfigs/$arch/$arch-ic-build.sh - -# -# Now generating .config -# - -cat $workspace/defconfigs/common.kconfig >> $workspace/.config -cd $workspace && rm -rf $workspace/generated/* && gmake olddefconfig && gmake -- cgit v1.2.3