From d90b0d1bfbe526cc8a19ea4bf8a839a0e58dfd70 Mon Sep 17 00:00:00 2001 From: zador-blood-stained Date: Tue, 1 Aug 2017 16:30:56 +0300 Subject: [PATCH] Add Stretch building constraints --- config/sources/odroidc1.conf | 1 + config/sources/odroidxu4.conf | 1 + config/sources/rda8810.conf | 2 ++ config/sources/s500.conf | 2 ++ config/sources/sunxi64_common.inc | 4 ++++ config/sources/sunxi_common.inc | 1 + lib/configuration.sh | 2 ++ lib/main.sh | 3 ++- 8 files changed, 15 insertions(+), 1 deletion(-) diff --git a/config/sources/odroidc1.conf b/config/sources/odroidc1.conf index cae3afcd85..a8f398e525 100644 --- a/config/sources/odroidc1.conf +++ b/config/sources/odroidc1.conf @@ -16,6 +16,7 @@ case $BRANCH in KERNELBRANCH='branch:odroidc-3.10.y' KERNELDIR='linux-odroidc1' KERNEL_USE_GCC='< 4.9' + CAN_BUILD_STRETCH=no ;; next) diff --git a/config/sources/odroidxu4.conf b/config/sources/odroidxu4.conf index f0a8121ebd..96ba3e0136 100644 --- a/config/sources/odroidxu4.conf +++ b/config/sources/odroidxu4.conf @@ -13,6 +13,7 @@ case $BRANCH in KERNELBRANCH='branch:odroidxu3-3.10.y' KERNELDIR='linux-odroidxu4' UBOOT_USE_GCC='< 4.9' + CAN_BUILD_STRETCH=no ;; next) diff --git a/config/sources/rda8810.conf b/config/sources/rda8810.conf index 8598d1e25c..6f102f3be8 100644 --- a/config/sources/rda8810.conf +++ b/config/sources/rda8810.conf @@ -18,6 +18,8 @@ KERNELDIR='linux-rda8810' KERNEL_USE_GCC='< 5.0' +CAN_BUILD_STRETCH=no + HAS_UUID_SUPPORT=yes CPUMIN=329333 diff --git a/config/sources/s500.conf b/config/sources/s500.conf index 5e3647151e..f2edcc906a 100644 --- a/config/sources/s500.conf +++ b/config/sources/s500.conf @@ -5,6 +5,8 @@ KERNELSOURCE='https://github.com/LeMaker/linux-actions' KERNELBRANCH='branch:linux-3.10.y' KERNELDIR='linux-s500' +CAN_BUILD_STRETCH=no + CPUMIN=408000 CPUMAX=1104000 GOVERNOR=interactive diff --git a/config/sources/sunxi64_common.inc b/config/sources/sunxi64_common.inc index 63b6edd30d..2540518802 100644 --- a/config/sources/sunxi64_common.inc +++ b/config/sources/sunxi64_common.inc @@ -4,6 +4,10 @@ HAS_UUID_SUPPORT=yes OFFSET=2 case $BRANCH in + default) + CAN_BUILD_STRETCH=no + ;; + dev) BOOTSOURCE='https://github.com/zador-blood-stained/u-boot-sun50i.git' BOOTDIR='u-boot-sun50i' diff --git a/config/sources/sunxi_common.inc b/config/sources/sunxi_common.inc index 0e1dba2a25..84ba6daf0f 100644 --- a/config/sources/sunxi_common.inc +++ b/config/sources/sunxi_common.inc @@ -20,6 +20,7 @@ BOOTDELAY=0 case $BRANCH in default) GOVERNOR=interactive + CAN_BUILD_STRETCH=no ;; next) diff --git a/lib/configuration.sh b/lib/configuration.sh index 19b6019e66..f155e28281 100644 --- a/lib/configuration.sh +++ b/lib/configuration.sh @@ -28,6 +28,8 @@ ROOTFSCACHE_VERSION=3 # echo $(( $(blockdev --getsize64 /dev/sdX) / 1024 / 1024 )) [[ "btrfs f2fs" == *$ROOTFS_TYPE* && -z $FIXED_IMAGE_SIZE ]] && exit_with_error "Please define FIXED_IMAGE_SIZE" +[[ $RELEASE == stretch && CAN_BUILD_STRETCH != yes ]] && exit_with_error "Building Debian Stretch images with selected kernel is not supported" + # small SD card with kernel, boot script and .dtb/.bin files [[ $ROOTFS_TYPE == nfs ]] && FIXED_IMAGE_SIZE=64 diff --git a/lib/main.sh b/lib/main.sh index 8a89f927d4..4a89ee0527 100644 --- a/lib/main.sh +++ b/lib/main.sh @@ -79,6 +79,7 @@ fi if [[ $PROGRESS_LOG_TO_FILE != yes ]]; then unset PROGRESS_LOG_TO_FILE; fi SHOW_WARNING=yes +CAN_BUILD_STRETCH=yes if [[ $USE_CCACHE != no ]]; then CCACHE=ccache @@ -219,7 +220,7 @@ fi if [[ $KERNEL_ONLY != yes && -z $RELEASE ]]; then options=() options+=("jessie" "Debian 8 Jessie") - [[ $EXPERT == yes ]] && options+=("stretch" "Debian 9 Stretch") + [[ $EXPERT == yes && $CAN_BUILD_STRETCH == yes ]] && options+=("stretch" "Debian 9 Stretch") options+=("xenial" "Ubuntu Xenial 16.04 LTS") RELEASE=$(dialog --stdout --title "Choose a release" --backtitle "$backtitle" --menu "Select the target OS release" \ $TTY_Y $TTY_X $(($TTY_Y - 8)) "${options[@]}")