From 04a7b1091ff6f6cb9572ff75db7d4bed29afc2c7 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Boric Date: Sat, 28 May 2016 17:54:31 +0200 Subject: [PATCH] Introduce BSP_NAME The current build system can't handle properly having more than one board family and more than one BSP, so we make up a way to select what to build and what to do based on the BSP_NAME variable which will become useful later on. This commit purposely breaks the Jenkins infrastructure as it exists now, so that the pain is felt only once. Co-Authored-By: Benjamin Dauphin Co-Authored-By: Gilles Henaux --- releasetools/{arm_sdimage.sh => arm_sdimage_omap.sh} | 4 ++-- releasetools/image.defaults | 5 ++++- releasetools/x86_cdimage.sh | 2 +- releasetools/x86_hdimage.sh | 2 +- releasetools/x86_ramimage.sh | 2 +- releasetools/x86_usbimage.sh | 2 +- 6 files changed, 10 insertions(+), 7 deletions(-) rename releasetools/{arm_sdimage.sh => arm_sdimage_omap.sh} (99%) diff --git a/releasetools/arm_sdimage.sh b/releasetools/arm_sdimage_omap.sh similarity index 99% rename from releasetools/arm_sdimage.sh rename to releasetools/arm_sdimage_omap.sh index e9a941edd..a95054255 100755 --- a/releasetools/arm_sdimage.sh +++ b/releasetools/arm_sdimage_omap.sh @@ -19,13 +19,13 @@ then . ${SETTINGS_MINIX} fi +BSP_NAME=omap : ${ARCH=evbearm-el} -: ${OBJ=../obj.${ARCH}} : ${TOOLCHAIN_TRIPLET=arm-elf32-minix-} : ${BUILDSH=build.sh} : ${SETS="minix-base minix-comp minix-games minix-man minix-tests tests"} -: ${IMG=minix_arm_sd.img} +: ${IMG=minix_arm_sd_omap.img} # ARM definitions: : ${BUILDVARS=-V MKGCCCMDS=yes -V MKLLVM=no} diff --git a/releasetools/image.defaults b/releasetools/image.defaults index a37e023b7..5872b5855 100644 --- a/releasetools/image.defaults +++ b/releasetools/image.defaults @@ -1,4 +1,4 @@ -: ${OBJ=../obj.${ARCH}} +: ${OBJ=../obj.${ARCH}-${BSP_NAME}} : ${CROSS_TOOLS=${OBJ}/"tooldir.`uname -s`-`uname -r`-`uname -m`"/bin} : ${CROSS_PREFIX=${CROSS_TOOLS}/${TOOLCHAIN_TRIPLET}} : ${JOBS=1} @@ -21,6 +21,9 @@ : ${RC=../local/rc.${ARCH}} : ${ASR_HACK=0} +# add BSP to buildvars +BUILDVARS="-V BSP_NAME=${BSP_NAME} ${BUILDVARS}" + # where the kernel & boot modules will be MODDIR=${DESTDIR}/boot/minix/.temp diff --git a/releasetools/x86_cdimage.sh b/releasetools/x86_cdimage.sh index c51ec202c..337056fb1 100755 --- a/releasetools/x86_cdimage.sh +++ b/releasetools/x86_cdimage.sh @@ -6,8 +6,8 @@ set -e # be replaced by the proper NetBSD infrastructure. # +BSP_NAME=generic-pc : ${ARCH=i386} -: ${OBJ=../obj.${ARCH}} : ${TOOLCHAIN_TRIPLET=i586-elf32-minix-} : ${BUILDSH=build.sh} diff --git a/releasetools/x86_hdimage.sh b/releasetools/x86_hdimage.sh index 58c758886..eff4a0736 100755 --- a/releasetools/x86_hdimage.sh +++ b/releasetools/x86_hdimage.sh @@ -6,8 +6,8 @@ set -e # be replaced by the proper NetBSD infrastructure. # +BSP_NAME=generic-pc : ${ARCH=i386} -: ${OBJ=../obj.${ARCH}} : ${TOOLCHAIN_TRIPLET=i586-elf32-minix-} : ${BUILDSH=build.sh} diff --git a/releasetools/x86_ramimage.sh b/releasetools/x86_ramimage.sh index 6e691900d..7cc0f284f 100755 --- a/releasetools/x86_ramimage.sh +++ b/releasetools/x86_ramimage.sh @@ -6,8 +6,8 @@ set -e # be replaced by the proper NetBSD infrastructure. # +BSP_NAME=generic-pc : ${ARCH=i386} -: ${OBJ=../obj.${ARCH}} : ${TOOLCHAIN_TRIPLET=i586-elf32-minix-} : ${BUILDSH=build.sh} diff --git a/releasetools/x86_usbimage.sh b/releasetools/x86_usbimage.sh index 63b07a32f..20ce76fea 100755 --- a/releasetools/x86_usbimage.sh +++ b/releasetools/x86_usbimage.sh @@ -6,8 +6,8 @@ set -e # be replaced by the proper NetBSD infrastructure. # +BSP_NAME=generic-pc : ${ARCH=i386} -: ${OBJ=../obj.${ARCH}} : ${TOOLCHAIN_TRIPLET=i586-elf32-minix-} : ${BUILDSH=build.sh}