diff --git a/build-all.sh b/build-all.sh index 9eb2cbadf..03fac995d 100644 --- a/build-all.sh +++ b/build-all.sh @@ -195,11 +195,11 @@ echo -e "\n${#buildlist[@]} total\n" buildall_start=`date +%s` n=0 for line in "${buildlist[@]}"; do - unset LINUXFAMILY LINUXCONFIG KERNELDIR KERNELSOURCE KERNELBRANCH BOOTDIR BOOTSOURCE BOOTBRANCH ARCH UBOOT_NEEDS_GCC KERNEL_NEEDS_GCC \ + unset LINUXFAMILY LINUXCONFIG KERNELDIR KERNELSOURCE KERNELBRANCH BOOTDIR BOOTSOURCE BOOTBRANCH ARCH UBOOT_USE_GCC KERNEL_USE_GCC \ CPUMIN CPUMAX UBOOT_VER KERNEL_VER GOVERNOR BOOTSIZE BOOTFS_TYPE UBOOT_TOOLCHAIN KERNEL_TOOLCHAIN PACKAGE_LIST_EXCLUDE KERNEL_IMAGE_TYPE \ write_uboot_platform family_tweaks setup_write_uboot_platform BOOTSCRIPT UBOOT_TARGET_MAP LOCALVERSION UBOOT_COMPILER KERNEL_COMPILER \ MODULES MODULES_NEXT MODULES_DEV INITRD_ARCH HAS_UUID_SUPPORT BOOTENV_FILE BOOTDELAY MODULES_BLACKLIST MODULES_BLACKLIST_NEXT \ - MODULES_BLACKLIST_DEV MOUNT SDCARD BOOTPATCHDIR buildtext RELEASE UBOOT_ALT_GCC KERNEL_ALT_GCC IMAGE_TYPE OVERLAY_PREFIX + MODULES_BLACKLIST_DEV MOUNT SDCARD BOOTPATCHDIR buildtext RELEASE IMAGE_TYPE OVERLAY_PREFIX read BOARD BRANCH RELEASE BUILD_DESKTOP <<< $line n=$[$n+1] diff --git a/common.sh b/common.sh index 3ac0b9d9e..fee375669 100644 --- a/common.sh +++ b/common.sh @@ -13,7 +13,6 @@ # compile_uboot # compile_kernel # compile_sunxi_tools -# check_toolchain # find_toolchain # advanced_patch # process_patch_file @@ -44,14 +43,9 @@ compile_uboot() display_alert "Compiling u-boot" "$version" "info" local toolchain="" - if [[ -n $UBOOT_ALT_GCC ]] && ! check_toolchain "$UBOOT_COMPILER" "$UBOOT_ALT_GCC"; then - # try to find alternative toolchain - toolchain=$(find_toolchain "$UBOOT_COMPILER" "$UBOOT_ALT_GCC") - fi - if [[ -z $toolchain && -n $UBOOT_NEEDS_GCC ]] && ! check_toolchain "$UBOOT_COMPILER" "$UBOOT_NEEDS_GCC"; then - # try to find required toolchain if alt was not found - toolchain=$(find_toolchain "$UBOOT_COMPILER" "$UBOOT_NEEDS_GCC") - [[ -z $toolchain ]] && exit_with_error "Could not find required toolchain" "${UBOOT_COMPILER}gcc $UBOOT_NEEDS_GCC" + if [[ -n $UBOOT_USE_GCC ]]; then + toolchain=$(find_toolchain "$UBOOT_COMPILER" "$UBOOT_USE_GCC") + [[ -z $toolchain ]] && exit_with_error "Could not find required toolchain" "${UBOOT_COMPILER}gcc $UBOOT_USE_GCC" fi display_alert "Compiler version" "${UBOOT_COMPILER}gcc $(eval ${toolchain:+env PATH=$toolchain:$PATH} ${UBOOT_COMPILER}gcc -dumpversion)" "info" @@ -196,14 +190,9 @@ compile_kernel() display_alert "Compiling $BRANCH kernel" "$version" "info" local toolchain="" - if [[ -n $KERNEL_ALT_GCC ]] && ! check_toolchain "$KERNEL_COMPILER" "$KERNEL_ALT_GCC"; then - # try to find alternative toolchain - toolchain=$(find_toolchain "$KERNEL_COMPILER" "$KERNEL_ALT_GCC") - fi - if [[ -z $toolchain && -n $KERNEL_NEEDS_GCC ]] && ! check_toolchain "$KERNEL_COMPILER" "$KERNEL_NEEDS_GCC"; then - # try to find required toolchain if alt was not found - toolchain=$(find_toolchain "$KERNEL_COMPILER" "$KERNEL_NEEDS_GCC") - [[ -z $toolchain ]] && exit_with_error "Could not find required toolchain" "${KERNEL_COMPILER}gcc $KERNEL_NEEDS_GCC" + if [[ -n $KERNEL_USE_GCC ]]; then + toolchain=$(find_toolchain "$KERNEL_COMPILER" "$KERNEL_USE_GCC") + [[ -z $toolchain ]] && exit_with_error "Could not find required toolchain" "${KERNEL_COMPILER}gcc $KERNEL_USE_GCC" fi display_alert "Compiler version" "${KERNEL_COMPILER}gcc $(eval ${toolchain:+env PATH=$toolchain:$PATH} ${KERNEL_COMPILER}gcc -dumpversion)" "info" @@ -283,20 +272,6 @@ compile_sunxi_tools() fi } -# check_toolchain -# -# checks if system default toolchain version satisfies -# : "< x.y"; "> x.y"; "== x.y" -check_toolchain() -{ - local compiler=$1 - local expression=$2 - # get major.minor gcc version - local gcc_ver=$(${compiler}gcc -dumpversion | grep -oE "^[[:digit:]].[[:digit:]]") - awk "BEGIN{exit ! ($gcc_ver $expression)}" && return 0 - return 1 -} - # find_toolchain # # returns path to toolchain that satisfies diff --git a/config/sources/cubox.conf b/config/sources/cubox.conf index 05559dcbb..27557c2bc 100644 --- a/config/sources/cubox.conf +++ b/config/sources/cubox.conf @@ -7,14 +7,14 @@ BOOTENV_FILE='cubox-default.txt' UBOOT_TARGET_MAP=';;SPL u-boot.img' -UBOOT_NEEDS_GCC='< 5.0' -KERNEL_NEEDS_GCC='< 5.0' +UBOOT_USE_GCC='< 5.0' case $BRANCH in default) KERNELSOURCE='https://github.com/linux4kix/linux-linaro-stable-mx6' KERNELBRANCH='branch:linux-linaro-lsk-v3.14-mx6' KERNELDIR='linux-cubox' + KERNEL_USE_GCC='< 5.0' ;; next) @@ -43,9 +43,9 @@ write_uboot_platform() dd if=$1/u-boot.img of=$2 bs=1K seek=42 status=noxfer > /dev/null 2>&1 } -if [[ $BOARD == "wandboard-quad" ]]; then - unset UBOOT_NEEDS_GCC && UBOOT_ALT_GCC='> 6.1' - unset KERNEL_NEEDS_GCC && KERNEL_ALT_GCC='> 6.1' +if [[ $BOARD == wandboard-quad ]]; then + UBOOT_USE_GCC='> 6.0' + KERNEL_USE_GCC='> 6.0' CPUMAX=1008000 GOVERNOR=ondemand HAS_UUID_SUPPORT=yes diff --git a/config/sources/meson.conf b/config/sources/meson.conf index 6fb71d6dc..c03fe516c 100644 --- a/config/sources/meson.conf +++ b/config/sources/meson.conf @@ -2,14 +2,13 @@ BOOTSOURCE='https://github.com/hardkernel/u-boot.git' BOOTBRANCH='branch:odroidc-v2011.03' BOOTDIR='u-boot-odroidc1' BOOTPATCHDIR='u-boot-odroidc1' -UBOOT_NEEDS_GCC='< 4.9' -BOOTSCRIPT="boot-odroid-c1.ini:boot.ini" +UBOOT_USE_GCC='< 4.9' +BOOTSCRIPT='boot-odroid-c1.ini:boot.ini' UBOOT_TARGET_MAP=';;sd_fuse/bl1.bin.hardkernel sd_fuse/u-boot.bin' HAS_UUID_SUPPORT=yes -KERNEL_NEEDS_GCC='< 4.9' KERNEL_IMAGE_TYPE=uImage case $BRANCH in @@ -17,6 +16,7 @@ case $BRANCH in KERNELSOURCE='https://github.com/hardkernel/linux' KERNELBRANCH='branch:odroidc-3.10.y' KERNELDIR='linux-odroidc1' + KERNEL_USE_GCC='< 4.9' ;; next) diff --git a/config/sources/meson64.conf b/config/sources/meson64.conf index cfe56b50e..e274feb7c 100644 --- a/config/sources/meson64.conf +++ b/config/sources/meson64.conf @@ -2,8 +2,8 @@ BOOTSOURCE='https://github.com/hardkernel/u-boot.git' BOOTBRANCH='branch:odroidc2-v2015.01' BOOTDIR='u-boot-odroidc2' BOOTPATCHDIR='u-boot-odroidc2' -UBOOT_NEEDS_GCC='< 5.0' -BOOTSCRIPT="boot-odroid-c2.ini:boot.ini" +UBOOT_USE_GCC='< 5.0' +BOOTSCRIPT='boot-odroid-c2.ini:boot.ini' UBOOT_TARGET_MAP='ARCH=arm;;sd_fuse/bl1.bin.hardkernel sd_fuse/u-boot.bin' diff --git a/config/sources/mvebu.conf b/config/sources/mvebu.conf index bfcf2ceae..1ac1c1920 100644 --- a/config/sources/mvebu.conf +++ b/config/sources/mvebu.conf @@ -2,14 +2,14 @@ BOOTSOURCE='https://github.com/SolidRun/u-boot-armada38x' BOOTBRANCH='branch:u-boot-2013.01-15t1-clearfog' BOOTDIR='u-boot-armada' BOOTPATCHDIR='u-boot-armada' -BOOTSCRIPT="boot-marvell.cmd:boot.cmd" +BOOTSCRIPT='boot-marvell.cmd:boot.cmd' UBOOT_TARGET_MAP="u-boot.mmc;;u-boot.mmc u-boot-uart.mmc u-boot.sata;sata;u-boot.sata u-boot-uart.sata u-boot.flash;spi;u-boot.flash u-boot-uart.flash" -UBOOT_NEEDS_GCC='< 5.0' -UBOOT_COMPILER="arm-linux-gnueabi-" +UBOOT_USE_GCC='< 5.0' +UBOOT_COMPILER='arm-linux-gnueabi-' BOOTENV_FILE='clearfog-default.txt' HAS_UUID_SUPPORT=yes @@ -26,7 +26,7 @@ case $BRANCH in KERNELBRANCH=$MAINLINE_KERNEL_BRANCH KERNELDIR=$MAINLINE_KERNEL_DIR - KERNEL_ALT_GCC='> 6.1' + KERNEL_USE_GCC='> 6.0' ;; esac diff --git a/config/sources/mvebu64.conf b/config/sources/mvebu64.conf index d3bdac943..1872a0962 100644 --- a/config/sources/mvebu64.conf +++ b/config/sources/mvebu64.conf @@ -27,7 +27,7 @@ case $BRANCH in KERNELBRANCH=$MAINLINE_KERNEL_BRANCH KERNELDIR=$MAINLINE_KERNEL_DIR - KERNEL_ALT_GCC='> 6.1' + KERNEL_USE_GCC='> 6.1' ;; esac diff --git a/config/sources/odroidc1.conf b/config/sources/odroidc1.conf index f7a6ff090..3fe0cb2a9 100644 --- a/config/sources/odroidc1.conf +++ b/config/sources/odroidc1.conf @@ -2,14 +2,13 @@ BOOTSOURCE='https://github.com/hardkernel/u-boot.git' BOOTBRANCH='branch:odroidc-v2011.03' BOOTDIR='u-boot-odroidc1' BOOTPATCHDIR='u-boot-odroidc1' -UBOOT_NEEDS_GCC='< 4.9' +UBOOT_USE_GCC='< 4.9' BOOTSCRIPT="boot-odroid-c1.ini:boot.ini" UBOOT_TARGET_MAP=';;sd_fuse/bl1.bin.hardkernel sd_fuse/u-boot.bin' HAS_UUID_SUPPORT=yes -KERNEL_NEEDS_GCC='< 4.9' KERNEL_IMAGE_TYPE=uImage case $BRANCH in @@ -17,6 +16,7 @@ case $BRANCH in KERNELSOURCE='https://github.com/hardkernel/linux' KERNELBRANCH='branch:odroidc-3.10.y' KERNELDIR='linux-odroidc1' + KERNEL_USE_GCC='< 4.9' ;; next) diff --git a/config/sources/odroidc2.conf b/config/sources/odroidc2.conf index 0f43a1f91..bc6c2307d 100644 --- a/config/sources/odroidc2.conf +++ b/config/sources/odroidc2.conf @@ -2,7 +2,7 @@ BOOTSOURCE='https://github.com/hardkernel/u-boot.git' BOOTBRANCH='branch:odroidc2-v2015.01' BOOTDIR='u-boot-odroidc2' BOOTPATCHDIR='u-boot-odroidc2' -UBOOT_NEEDS_GCC='< 5.0' +UBOOT_USE_GCC='< 5.0' BOOTSCRIPT="boot-odroid-c2.ini:boot.ini" UBOOT_TARGET_MAP='ARCH=arm;;sd_fuse/bl1.bin.hardkernel sd_fuse/u-boot.bin' diff --git a/config/sources/odroidxu4.conf b/config/sources/odroidxu4.conf index 8701a827f..1418e7ec7 100644 --- a/config/sources/odroidxu4.conf +++ b/config/sources/odroidxu4.conf @@ -12,7 +12,7 @@ case $BRANCH in KERNELSOURCE='https://github.com/hardkernel/linux' KERNELBRANCH='branch:odroidxu3-3.10.y' KERNELDIR='linux-odroidxu4' - UBOOT_NEEDS_GCC='< 4.9' + UBOOT_USE_GCC='< 4.9' ;; next) @@ -25,8 +25,8 @@ case $BRANCH in BOOTPATCHDIR='u-boot-odroidxu4-next' BOOTENV_FILE='odroidxu4-next.txt' - UBOOT_ALT_GCC='> 6.1' - KERNEL_ALT_GCC='> 6.1' + UBOOT_USE_GCC='> 6.0' + KERNEL_USE_GCC='> 6.0' HAS_UUID_SUPPORT=yes diff --git a/config/sources/rda8810.conf b/config/sources/rda8810.conf index 86453002e..0cfa05bbc 100644 --- a/config/sources/rda8810.conf +++ b/config/sources/rda8810.conf @@ -10,14 +10,14 @@ OFFSET=2 UBOOT_TARGET_MAP=';;u-boot.rda' -UBOOT_NEEDS_GCC='< 5.0' +UBOOT_USE_GCC='< 5.0' UBOOT_COMPILER='arm-linux-gnueabi-' KERNELSOURCE='https://github.com/RDA8810/linux-RDA8810' KERNELBRANCH='branch:rdadroid-3.10.62-rel5.0.2' KERNELDIR='linux-rda8810' -KERNEL_NEEDS_GCC='< 5.0' +KERNEL_USE_GCC='< 5.0' HAS_UUID_SUPPORT=yes diff --git a/config/sources/rockchip.conf b/config/sources/rockchip.conf index 24de0765d..8e2405569 100644 --- a/config/sources/rockchip.conf +++ b/config/sources/rockchip.conf @@ -2,7 +2,7 @@ BOOTSCRIPT="boot-rockchip.cmd:boot.cmd" BOOTENV_FILE='rockchip-default.txt' UBOOT_TARGET_MAP=";;$SRC/lib/bin/rk3288_boot.bin u-boot-dtb.bin spl/u-boot-spl-dtb.bin" -UBOOT_ALT_GCC='> 6.1' +UBOOT_USE_GCC='> 6.0' HAS_UUID_SUPPORT=yes BOOTDELAY=0 diff --git a/config/sources/sun5i.conf b/config/sources/sun5i.conf index 91e2d8860..0e655eabe 100644 --- a/config/sources/sun5i.conf +++ b/config/sources/sun5i.conf @@ -6,7 +6,7 @@ case $BRANCH in KERNELSOURCE='https://github.com/linux-sunxi/linux-sunxi' KERNELBRANCH='branch:sunxi-3.4' KERNELDIR='linux-sunxi' - KERNEL_NEEDS_GCC='< 5.0' + KERNEL_USE_GCC='< 5.0' ;; dev) diff --git a/config/sources/sunxi64_common.inc b/config/sources/sunxi64_common.inc index 66acab6e4..66a8bef97 100644 --- a/config/sources/sunxi64_common.inc +++ b/config/sources/sunxi64_common.inc @@ -15,7 +15,7 @@ case $BRANCH in KERNELSOURCE='https://github.com/Icenowy/linux/' KERNELBRANCH='branch:sunxi64-next-20170216' KERNELDIR='linux-sun50i-dev' - KERNEL_ALT_GCC='> 6.1' + KERNEL_USE_GCC='> 6.1' LINUXCONFIG='linux-sun50i-dev' ;; esac diff --git a/config/sources/sunxi_common.inc b/config/sources/sunxi_common.inc index 16a578db5..7991bed9d 100644 --- a/config/sources/sunxi_common.inc +++ b/config/sources/sunxi_common.inc @@ -7,7 +7,7 @@ BOOTPATCHDIR="u-boot-sunxi" UBOOT_TARGET_MAP=';;u-boot-sunxi-with-spl.bin' -UBOOT_ALT_GCC='> 6.1' +UBOOT_USE_GCC='> 6.0' UBOOT_FW_ENV='0x88000,0x20000' # /etc/fw_env.config offset and env size HAS_UUID_SUPPORT=yes @@ -25,13 +25,13 @@ case $BRANCH in GOVERNOR=ondemand - KERNEL_ALT_GCC='> 6.1' + KERNEL_USE_GCC='> 6.0' ;; dev) GOVERNOR=ondemand - KERNEL_ALT_GCC='> 6.1' + KERNEL_USE_GCC='> 6.0' ;; esac diff --git a/configuration.sh b/configuration.sh index 0f9f44c4d..6b316fd24 100644 --- a/configuration.sh +++ b/configuration.sh @@ -102,20 +102,6 @@ esac if [[ $RELEASE == xenial ]]; then DISTRIBUTION="Ubuntu"; else DISTRIBUTION="Debian"; fi -# temporary hacks/overrides -case $LINUXFAMILY in - sun*i) - # 2016.07+ compilation fails due to GCC bug - # works on Linaro 5.3.1, fails on Ubuntu 5.3.1 - UBOOT_NEEDS_GCC='< 5.3' - ;; - - # also affects XU4 next branch - odroidxu4) - [[ $BRANCH == next ]] && UBOOT_NEEDS_GCC='< 5.3' - ;; -esac - # Essential packages PACKAGE_LIST="bc bridge-utils build-essential cpufrequtils device-tree-compiler figlet fbset fping \ iw fake-hwclock wpasupplicant psmisc ntp parted rsync sudo curl linux-base dialog crda \