From 565e523f9570f069fa7355fd37b3af1094e17fa5 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Tue, 2 Jan 2018 19:17:29 +0200 Subject: [PATCH 01/28] nanopineo2: boot*.cmd: forgot a setenv --- board/nanopineo2/boot-fwupdater.cmd | 2 +- board/nanopineo2/boot.cmd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/board/nanopineo2/boot-fwupdater.cmd b/board/nanopineo2/boot-fwupdater.cmd index e31c4405e9..1bb0d7388a 100644 --- a/board/nanopineo2/boot-fwupdater.cmd +++ b/board/nanopineo2/boot-fwupdater.cmd @@ -1,4 +1,4 @@ -bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait ro no_console_suspend panic=10 quiet loglevel=1 ipv6.disable=1 +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait ro no_console_suspend panic=10 quiet loglevel=1 ipv6.disable=1 fatload mmc 0 0x46000000 Image fatload mmc 0 0x47000000 rootfs.cpio.uboot diff --git a/board/nanopineo2/boot.cmd b/board/nanopineo2/boot.cmd index 462d0b93d7..c81f03256b 100644 --- a/board/nanopineo2/boot.cmd +++ b/board/nanopineo2/boot.cmd @@ -1,4 +1,4 @@ -bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait ro no_console_suspend panic=10 quiet loglevel=1 ipv6.disable=1 +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait ro no_console_suspend panic=10 quiet loglevel=1 ipv6.disable=1 fatload mmc 0 0x46000000 Image fatload mmc 0 0x48000000 sun50i-h5-nanopi-neo2.dtb From 7d3f0154a3f302f50681fd27d28e39cbe816ee37 Mon Sep 17 00:00:00 2001 From: Joo Aun Saw Date: Thu, 8 Feb 2018 01:04:53 +1100 Subject: [PATCH 02/28] xz compress images --- build.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build.sh b/build.sh index dac91efc6d..034c765ec7 100755 --- a/build.sh +++ b/build.sh @@ -46,6 +46,9 @@ elif [ "$target" == "mkrelease" ]; then $boarddir/mkimage.sh cp $outputdir/images/$osname-$board.img $basedir mv $basedir/$osname-$board.img $basedir/$osname-$board-$osversion.img + rm -f $basedir/$osname-$board-$osversion.img.xz + xz -6ek $basedir/$osname-$board-$osversion.img + echo "your image is ready at $basedir/$osname-$board-$osversion.img.xz" rm -f $basedir/$osname-$board-$osversion.img.gz $gzip $basedir/$osname-$board-$osversion.img echo "your image is ready at $basedir/$osname-$board-$osversion.img.gz" From 7e67e3391d17b424c5f3974802b9d30abc6fecf5 Mon Sep 17 00:00:00 2001 From: Joo Aun Saw Date: Fri, 9 Feb 2018 01:13:13 +1100 Subject: [PATCH 03/28] fwupdate: support xz compressed image --- board/common/overlay/sbin/fwupdate | 53 ++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 10 deletions(-) diff --git a/board/common/overlay/sbin/fwupdate b/board/common/overlay/sbin/fwupdate index 7cec9b4617..d496d105b7 100755 --- a/board/common/overlay/sbin/fwupdate +++ b/board/common/overlay/sbin/fwupdate @@ -44,7 +44,8 @@ ROOT_INFO_FILE=root_info BOOT_READY_FILE=boot_flash_ready FW_DIR=/data/.fwupdate -FW_FILE=firmware.img.gz +FW_FILE_GZ=firmware.img.gz +FW_FILE_XZ=firmware.img.xz FW_FILE_EXTR=firmware.img CURL_LOG_FILE=curl.log @@ -53,6 +54,9 @@ CURL_PID_FILE=curl.pid GUNZIP_LOG_FILE=gunzip.log GUNZIP_PID_FILE=gunzip.pid +XZCAT_LOG_FILE=xzcat.log +XZCAT_PID_FILE=xzcat.pid + DD_LOG_FILE=dd.log DD_PID_FILE=dd.pid @@ -101,7 +105,7 @@ function show_current() { function do_download() { echo "downloading..." - rm -f $FW_DIR/$FW_FILE + rm -f $FW_DIR/$FW_FILE_GZ $FW_DIR/$FW_FILE_XZ rm -f $FW_DIR/$FW_FILE_EXTR rm -f $FW_DIR/$BOOT_READY_FILE @@ -111,7 +115,7 @@ function do_download() { version=$1 if ! [[ "$url" == http* ]]; then # a version was given - url=$(show_versions true | grep "^$1" | cut -d ' ' -f 2) + url=$(show_versions true | sed -rn '/^'"$1"' http.*\.img\.[a-z]+$/ {;/.*\.xz/ !{;h}; /.*\.xz/ {;s/^'"$1"' (.*)/\1/p;q;};}; $ {;x;s/^'"$1"' (.*)/\1/p;}') else version="custom" fi @@ -127,6 +131,12 @@ function do_download() { exit 1 fi + outfile=$FW_DIR/$FW_FILE_GZ + format=$(echo $url | sed -rn 's/.*\.img\.([a-z]+)$/\1/ p') + if [ "$format" == "xz" ]; then + outfile=$FW_DIR/$FW_FILE_XZ + fi + rm -rf $FW_DIR/* mkdir -p $FW_DIR echo $version > $FW_DIR/$VER_FILE @@ -136,7 +146,7 @@ function do_download() { curl_opts+=" --user $os_firmware_username:$os_firmware_password" fi - curl $curl_opts -o $FW_DIR/$FW_FILE "$url" &> $FW_DIR/$CURL_LOG_FILE & + curl $curl_opts -o $outfile "$url" &> $FW_DIR/$CURL_LOG_FILE & pid=$! echo $pid > $FW_DIR/$CURL_PID_FILE wait $pid @@ -151,7 +161,7 @@ function download_status() { fi fi - if [ -f $FW_DIR/$FW_FILE ]; then + if [ -f $FW_DIR/$FW_FILE_GZ -o -f $FW_DIR/$FW_FILE_XZ ]; then echo "done" fi } @@ -165,23 +175,46 @@ function do_extract() { rm -f $FW_DIR/$FW_FILE_EXTR rm -f $FW_DIR/$BOOT_READY_FILE - if ! [ -f $FW_DIR/$FW_FILE ]; then + if ! [ -f $FW_DIR/$FW_FILE_GZ -o -f $FW_DIR/$FW_FILE_XZ ]; then echo "firmware file not downloaded" 1>&2 exit 1 fi - rm -f $FW_DIR/$FW_FILE_EXTR + format="gz" + if [ -f $FW_DIR/$FW_FILE_XZ ]; then + format="xz" + fi - gunzip -k -c $FW_DIR/$FW_FILE > $FW_DIR/$FW_FILE_EXTR 2>$FW_DIR/$GUNZIP_LOG_FILE & + rm -f $FW_DIR/$FW_FILE_EXTR + rm -f $FW_DIR/$GUNZIP_PID_FILE $FW_DIR/$XZCAT_PID_FILE + + if [ "$format" == "xz" ]; then + xzcat $FW_DIR/$FW_FILE_XZ > $FW_DIR/$FW_FILE_EXTR 2>$FW_DIR/$XZCAT_LOG_FILE & + elif [ "$format" == "gz" ]; then + gunzip -k -c $FW_DIR/$FW_FILE_GZ > $FW_DIR/$FW_FILE_EXTR 2>$FW_DIR/$GUNZIP_LOG_FILE & + else + echo "firmware compression format $format not supported" 1>&2 + exit 1 + fi pid=$! - echo $pid > $FW_DIR/$GUNZIP_PID_FILE + if [ "$format" == "xz" ]; then + echo $pid > $FW_DIR/$XZCAT_PID_FILE + elif [ "$format" == "gz" ]; then + echo $pid > $FW_DIR/$GUNZIP_PID_FILE + fi wait $pid # TODO verify hash } function extract_status() { - if [ -f $FW_DIR/$GUNZIP_PID_FILE ]; then + if [ -f $FW_DIR/$XZCAT_PID_FILE ]; then + pid=$(cat $FW_DIR/$XZCAT_PID_FILE) + if kill -0 $pid &>/dev/null; then + echo "running" + return + fi + elif [ -f $FW_DIR/$GUNZIP_PID_FILE ]; then pid=$(cat $FW_DIR/$GUNZIP_PID_FILE) if kill -0 $pid &>/dev/null; then echo "running" From 8b13b0a18fcbe714efde2351d83db762a5147665 Mon Sep 17 00:00:00 2001 From: Joo Aun Saw Date: Fri, 9 Feb 2018 09:53:39 +1100 Subject: [PATCH 04/28] build script: add xz and gz in image ready print message --- build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 034c765ec7..15e468a2dd 100755 --- a/build.sh +++ b/build.sh @@ -48,10 +48,10 @@ elif [ "$target" == "mkrelease" ]; then mv $basedir/$osname-$board.img $basedir/$osname-$board-$osversion.img rm -f $basedir/$osname-$board-$osversion.img.xz xz -6ek $basedir/$osname-$board-$osversion.img - echo "your image is ready at $basedir/$osname-$board-$osversion.img.xz" + echo "your xz image is ready at $basedir/$osname-$board-$osversion.img.xz" rm -f $basedir/$osname-$board-$osversion.img.gz $gzip $basedir/$osname-$board-$osversion.img - echo "your image is ready at $basedir/$osname-$board-$osversion.img.gz" + echo "your gz image is ready at $basedir/$osname-$board-$osversion.img.gz" elif [ -n "$target" ]; then make O=$outputdir $target else From 53d3428912cad3ced52ca83693110191718e8c83 Mon Sep 17 00:00:00 2001 From: Joo Aun Saw Date: Fri, 9 Feb 2018 11:50:32 +1100 Subject: [PATCH 05/28] fwupdate: simplify support for other compression formats --- board/common/overlay/sbin/fwupdate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/common/overlay/sbin/fwupdate b/board/common/overlay/sbin/fwupdate index d496d105b7..6b91b053c8 100755 --- a/board/common/overlay/sbin/fwupdate +++ b/board/common/overlay/sbin/fwupdate @@ -115,7 +115,7 @@ function do_download() { version=$1 if ! [[ "$url" == http* ]]; then # a version was given - url=$(show_versions true | sed -rn '/^'"$1"' http.*\.img\.[a-z]+$/ {;/.*\.xz/ !{;h}; /.*\.xz/ {;s/^'"$1"' (.*)/\1/p;q;};}; $ {;x;s/^'"$1"' (.*)/\1/p;}') + url=$(show_versions true | sed -rn '/^'"$version"' http.*\.img\.[a-z]+$/ {; /.*\.xz$/ {;s/^'"$version"' (.*)/\1/ p;q;}; /.*\.gz$/ {;h;b;};}; $ {;x;s/^'"$version"' (.*)/\1/ p;}') else version="custom" fi From c295a5fe0f49d23052210efc390ad14d36fb378d Mon Sep 17 00:00:00 2001 From: Joo Aun Saw Date: Fri, 9 Feb 2018 12:09:23 +1100 Subject: [PATCH 06/28] fwupdate: fix bug where url missing when gz img is last line --- board/common/overlay/sbin/fwupdate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/common/overlay/sbin/fwupdate b/board/common/overlay/sbin/fwupdate index 6b91b053c8..3b7c098bee 100755 --- a/board/common/overlay/sbin/fwupdate +++ b/board/common/overlay/sbin/fwupdate @@ -115,7 +115,7 @@ function do_download() { version=$1 if ! [[ "$url" == http* ]]; then # a version was given - url=$(show_versions true | sed -rn '/^'"$version"' http.*\.img\.[a-z]+$/ {; /.*\.xz$/ {;s/^'"$version"' (.*)/\1/ p;q;}; /.*\.gz$/ {;h;b;};}; $ {;x;s/^'"$version"' (.*)/\1/ p;}') + url=$(show_versions true | sed -rn '/^'"$version"' http.*\.img\.[a-z]+$/ {; /.*\.xz$/ {;s/^'"$version"' (.*)/\1/ p;q;}; /.*\.gz$/ {;h;b finish;};}; :finish; $ {;x;s/^'"$version"' (.*)/\1/ p;}') else version="custom" fi From be9ab1979b27c224492847e31bd6f3231d710107 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Thu, 22 Feb 2018 20:22:58 +0200 Subject: [PATCH 07/28] orangepione: use orange pi patched u-boot --- configs/orangepione_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/orangepione_defconfig b/configs/orangepione_defconfig index 3cadc77b0a..f80c0a6fb4 100644 --- a/configs/orangepione_defconfig +++ b/configs/orangepione_defconfig @@ -78,6 +78,8 @@ BR2_PACKAGE_UTIL_LINUX_PARTX=y BR2_PACKAGE_NANO=y BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="https://github.com/megous/u-boot/archive/8974e5998f60a6ba79d0ef9b9849602f804ee3d3.tar.gz" BR2_TARGET_UBOOT_BOARD_DEFCONFIG="orangepi_one" BR2_TARGET_UBOOT_NEEDS_DTC=y BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y From 6911636e0e47b87ccf9bce1c3df5508e884df475 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Thu, 22 Feb 2018 20:46:41 +0200 Subject: [PATCH 08/28] writeimage.sh: add support for decompressing xz images --- writeimage.sh | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/writeimage.sh b/writeimage.sh index 12364dda7b..36946f8370 100755 --- a/writeimage.sh +++ b/writeimage.sh @@ -20,7 +20,7 @@ fi if [[ $(id -u) -ne 0 ]]; then echo "please run as root"; exit 1; fi function msg() { - echo ":: $1" + echo " * $1" } while getopts "a:d:f:h:i:lm:n:o:p:s:w" o; do @@ -76,12 +76,25 @@ if ! [ -f $DISK_IMG ]; then exit 1 fi -gunzip=$(which unpigz 2> /dev/null || which gunzip 2> /dev/null) +gunzip=$(which unpigz 2> /dev/null || which gunzip 2> /dev/null || true) +unxz=$(which unxz 2> /dev/null || true) if [[ $DISK_IMG == *.gz ]]; then - msg "decompressing the gzipped image" + if [ -z "$gunzip" ]; then + msg "make sure you have the gzip package installed" + exit 1 + fi + msg "decompressing the .gz compressed image" $gunzip -c $DISK_IMG > ${DISK_IMG%???} DISK_IMG=${DISK_IMG%???} +elif [[ $DISK_IMG == *.xz ]]; then + if [ -z "$unxz" ]; then + msg "make sure you have the xz package installed" + exit 1 + fi + msg "decompressing the .xz compressed image" + $unxz -T 0 -c $DISK_IMG > ${DISK_IMG%???} + DISK_IMG=${DISK_IMG%???} fi umount ${SDCARD_DEV}* 2>/dev/null || true From a4d9ed4cf31efb49d4618ecb918565ebdb744ffc Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Thu, 22 Feb 2018 22:51:07 +0200 Subject: [PATCH 09/28] build.sh: xz: enable multithreaded compression --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 15e468a2dd..856754f5d7 100755 --- a/build.sh +++ b/build.sh @@ -47,7 +47,7 @@ elif [ "$target" == "mkrelease" ]; then cp $outputdir/images/$osname-$board.img $basedir mv $basedir/$osname-$board.img $basedir/$osname-$board-$osversion.img rm -f $basedir/$osname-$board-$osversion.img.xz - xz -6ek $basedir/$osname-$board-$osversion.img + xz -6ek -T 0 $basedir/$osname-$board-$osversion.img echo "your xz image is ready at $basedir/$osname-$board-$osversion.img.xz" rm -f $basedir/$osname-$board-$osversion.img.gz $gzip $basedir/$osname-$board-$osversion.img From f50bd21aff3a87f3f85862bff338e5d9b16ff5d0 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Thu, 22 Feb 2018 23:11:46 +0200 Subject: [PATCH 10/28] bitbucket versions listing helper: add xz file support --- board/common/overlay/usr/libexec/list-versions-bitbucket | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/board/common/overlay/usr/libexec/list-versions-bitbucket b/board/common/overlay/usr/libexec/list-versions-bitbucket index e54c188a84..044ea42791 100755 --- a/board/common/overlay/usr/libexec/list-versions-bitbucket +++ b/board/common/overlay/usr/libexec/list-versions-bitbucket @@ -5,10 +5,13 @@ if [ -z "$1" ]; then exit -1 fi +extensions=".img.gz .img.xz .img" opts="-s -S -f" test -n "$FW_USERNAME" && opts+=" --user $FW_USERNAME:$FW_PASSWORD" url="https://api.bitbucket.org/2.0/repositories/$1/downloads?pagelen=100&_=$(date +%s)" -jq_expr='.values[] | [{a: .name | split("-"), url: .links.self.href}] | map((.a[2] | rtrimstr(".img.gz") | rtrimstr(".img")), "false", .a[1], .url) | join("|")' + +rtrimstr=$(for e in $extensions; do echo -n " | rtrimstr(\"$e\")"; done) +jq_expr=".values[] | [{a: .name | split(\"-\"), url: .links.self.href}] | map((.a[2] $rtrimstr), \"false\", .a[1], .url) | join(\"|\")" curl $opts $url | jq --raw-output "$jq_expr" exit ${PIPESTATUS[0]} From abd8f38478325e382698c045dc7a5defdb4fa4b9 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Thu, 22 Feb 2018 23:37:00 +0200 Subject: [PATCH 11/28] fwupdate: show command logs if downloading or decompressing fails --- board/common/overlay/sbin/fwupdate | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/board/common/overlay/sbin/fwupdate b/board/common/overlay/sbin/fwupdate index 3b7c098bee..9514b9a93e 100755 --- a/board/common/overlay/sbin/fwupdate +++ b/board/common/overlay/sbin/fwupdate @@ -150,6 +150,11 @@ function do_download() { pid=$! echo $pid > $FW_DIR/$CURL_PID_FILE wait $pid + + if [ "$?" != 0 ]; then + cat $FW_DIR/$CURL_LOG_FILE + exit 1 + fi } function download_status() { @@ -189,21 +194,27 @@ function do_extract() { rm -f $FW_DIR/$GUNZIP_PID_FILE $FW_DIR/$XZCAT_PID_FILE if [ "$format" == "xz" ]; then + DECOMPRESS_LOG_FILE=$FW_DIR/$XZCAT_LOG_FILE + DECOMPRESS_PID_FILE=$FW_DIR/$XZCAT_PID_FILE xzcat $FW_DIR/$FW_FILE_XZ > $FW_DIR/$FW_FILE_EXTR 2>$FW_DIR/$XZCAT_LOG_FILE & elif [ "$format" == "gz" ]; then + DECOMPRESS_LOG_FILE=$FW_DIR/$GUNZIP_LOG_FILE + DECOMPRESS_PID_FILE=$FW_DIR/$GUNZIP_PID_FILE gunzip -k -c $FW_DIR/$FW_FILE_GZ > $FW_DIR/$FW_FILE_EXTR 2>$FW_DIR/$GUNZIP_LOG_FILE & else echo "firmware compression format $format not supported" 1>&2 exit 1 fi + pid=$! - if [ "$format" == "xz" ]; then - echo $pid > $FW_DIR/$XZCAT_PID_FILE - elif [ "$format" == "gz" ]; then - echo $pid > $FW_DIR/$GUNZIP_PID_FILE - fi + echo $pid > $DECOMPRESS_PID_FILE wait $pid + if [ "$?" != 0 ]; then + cat $DECOMPRESS_LOG_FILE + exit 1 + fi + # TODO verify hash } From 216bb4601aab40564bfd04659322b73b4012d52b Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Thu, 22 Feb 2018 23:38:59 +0200 Subject: [PATCH 12/28] mkimage.sh: use "*" for console messages --- board/common/mkimage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/common/mkimage.sh b/board/common/mkimage.sh index 2b8a9def24..cf82723b49 100755 --- a/board/common/mkimage.sh +++ b/board/common/mkimage.sh @@ -8,7 +8,7 @@ fi test "root" != "$USER" && exec sudo -E $0 "$@" function msg() { - echo ":: $1" + echo " * $1" } function cleanup { From 0db67043cb6cd730663f0430f65ff73d34ff19b6 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Fri, 23 Feb 2018 22:45:23 +0200 Subject: [PATCH 13/28] build.sh: add support for sourcing .build-env --- build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.sh b/build.sh index 856754f5d7..1861110162 100755 --- a/build.sh +++ b/build.sh @@ -15,6 +15,8 @@ osname=$(source $basedir/board/common/overlay/etc/version && echo $os_short_name osversion=$(source $basedir/board/common/overlay/etc/version && echo $os_version) gzip=$(which pigz || which gzip) +test -f $basedir/.build-env && source $basedir/.build-env + if [ "$board" == "all" ]; then boards=$(ls $basedir/configs/*_defconfig | grep -v initramfs | grep -oE '\w+_defconfig$' | cut -d '_' -f 1) for b in $boards; do From c61e8487881e52f309f9fde9fefbe1d60483eac7 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sat, 3 Mar 2018 21:09:51 +0200 Subject: [PATCH 14/28] add python-redis package --- package/Config.in | 1 + package/python-redis/Config.in | 6 ++++++ package/python-redis/python-redis.mk | 13 +++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 package/python-redis/Config.in create mode 100644 package/python-redis/python-redis.mk diff --git a/package/Config.in b/package/Config.in index 10048ce892..e3106412cd 100644 --- a/package/Config.in +++ b/package/Config.in @@ -881,6 +881,7 @@ menu "External python modules" source "package/python-pyxb/Config.in" source "package/python-pyyaml/Config.in" source "package/python-pyzmq/Config.in" + source "package/python-redis/Config.in" source "package/python-requests/Config.in" source "package/python-requests-toolbelt/Config.in" source "package/python-rpi-gpio/Config.in" diff --git a/package/python-redis/Config.in b/package/python-redis/Config.in new file mode 100644 index 0000000000..e396ba0d9c --- /dev/null +++ b/package/python-redis/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PYTHON_REDIS + bool "python-redis" + depends on BR2_PACKAGE_PYTHON + help + Python driver for Redis + diff --git a/package/python-redis/python-redis.mk b/package/python-redis/python-redis.mk new file mode 100644 index 0000000000..31475ca463 --- /dev/null +++ b/package/python-redis/python-redis.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# python-redis +# +################################################################################ + +PYTHON_REDIS_VERSION = 2.10.6 +PYTHON_REDIS_SOURCE = redis-$(PYTHON_REDIS_VERSION).tar.gz +PYTHON_REDIS_SITE = https://pypi.python.org/packages/09/8d/6d34b75326bf96d4139a2ddd8e74b80840f800a0a79f9294399e212cb9a7 +PYTHON_REDIS_SETUP_TYPE = setuptools + +$(eval $(python-package)) + From cb80216f96a7e712dd8b5d4fef78b1eac8db37c2 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sat, 3 Mar 2018 23:23:48 +0200 Subject: [PATCH 15/28] cleanups: do not remove python distutils --- board/common/cleanups.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/board/common/cleanups.sh b/board/common/cleanups.sh index 3cf2a9a261..90286a07b5 100755 --- a/board/common/cleanups.sh +++ b/board/common/cleanups.sh @@ -191,7 +191,6 @@ rm -f $TARGET/usr/bin/v4l2-compliance rm -rf $TARGET/usr/lib/python2.7/site-packages/samba/ rm -rf $TARGET/usr/lib/python2.7/ensurepip/ rm -rf $TARGET/usr/lib/python2.7/config/ -rm -rf $TARGET/usr/lib/python2.7/distutils/ rm -rf $TARGET/usr/lib/python2.7/unittest/ # buildroot default startup scripts From b4617b284038555d910d01c5ca1e3fc1dfa86504 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sun, 4 Mar 2018 16:16:59 +0200 Subject: [PATCH 16/28] libwebcam: remove useless rm command --- package/libwebcam/libwebcam.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/package/libwebcam/libwebcam.mk b/package/libwebcam/libwebcam.mk index defdc8638c..090ef6883b 100644 --- a/package/libwebcam/libwebcam.mk +++ b/package/libwebcam/libwebcam.mk @@ -10,7 +10,6 @@ LIBWEBCAM_SITE = http://freefr.dl.sourceforge.net/project/libwebcam/source LIBWEBCAM_DEPENDENCIES = libxml2 define LIBWEBCAM_INSTALL_TARGET_CMDS - rm $(@D)/uvcdynctrl/uvcdynctrl-*.gz cp $(@D)/uvcdynctrl/uvcdynctrl $(TARGET_DIR)/usr/bin/uvcdynctrl cp -d $(@D)/libwebcam/libwebcam.so* $(TARGET_DIR)/usr/lib endef From f13f4219028a1f4ef417dd7315e488bdf5e55bd1 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sun, 4 Mar 2018 17:20:28 +0200 Subject: [PATCH 17/28] build.sh: add clean-target command --- build.sh | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 1861110162..931588d9ed 100755 --- a/build.sh +++ b/build.sh @@ -1,7 +1,12 @@ #!/bin/bash if [ -z "$1" ]; then - echo "Usage: $0 [mkimage|mkrelease|make_targets...]" + echo "Usage: $0 [mkimage|mkrelease|clean-target|make-targets...]" + echo " mkimage - creates the OS image (.img)" + echo " mkrelease - creates the compressed OS image (.img.gz, .img.xz)" + echo " clean-target - removes the target dir, preserving the package build dirs" + echo "" + echo " for other make targets, see the BuildRoot manual" exit 1 fi @@ -44,6 +49,7 @@ fi if [ "$target" == "mkimage" ]; then $boarddir/mkimage.sh + elif [ "$target" == "mkrelease" ]; then $boarddir/mkimage.sh cp $outputdir/images/$osname-$board.img $basedir @@ -54,8 +60,23 @@ elif [ "$target" == "mkrelease" ]; then rm -f $basedir/$osname-$board-$osversion.img.gz $gzip $basedir/$osname-$board-$osversion.img echo "your gz image is ready at $basedir/$osname-$board-$osversion.img.gz" + +elif [ "$target" == "clean-target" ]; then + if [ -d $outputdir/build ]; then + echo "removing .stamp_target_installed files" + find $outputdir/build -name .stamp_target_installed | xargs -r rm + fi + + if [ -d $outputdir/target ]; then + echo "removing target directory" + rm -rf $outputdir/target + fi + + echo "target is clean" + elif [ -n "$target" ]; then make O=$outputdir $target + else make O=$outputdir all echo "build successful" From 9d871ba6dc70d493f528890648f671b872bbd88e Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sun, 4 Mar 2018 18:59:14 +0200 Subject: [PATCH 18/28] build.sh: clean-target: also clean host and staging --- build.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/build.sh b/build.sh index 931588d9ed..c5a0190b0a 100755 --- a/build.sh +++ b/build.sh @@ -62,14 +62,23 @@ elif [ "$target" == "mkrelease" ]; then echo "your gz image is ready at $basedir/$osname-$board-$osversion.img.gz" elif [ "$target" == "clean-target" ]; then + if [ -d $outputdir/target ]; then + echo "removing target directory" + rm -rf $outputdir/target/* + + echo "removing staging directory" + rm -rf $outputdir/staging/* + fi + if [ -d $outputdir/build ]; then echo "removing .stamp_target_installed files" find $outputdir/build -name .stamp_target_installed | xargs -r rm - fi - if [ -d $outputdir/target ]; then - echo "removing target directory" - rm -rf $outputdir/target + echo "removing .stamp_staging_installed files" + find $outputdir/build -name .stamp_staging_installed | xargs -r rm + + echo "removing .stamp_host_installed files" + find $outputdir/build -name .stamp_host_installed | xargs -r rm fi echo "target is clean" From 95b057a2594002664bfc402b023d728d2dd4ed45 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sun, 11 Mar 2018 22:58:44 +0200 Subject: [PATCH 19/28] build.sh: allow overriding image name and version with env vars --- board/common/mkimage.sh | 4 +++- build.sh | 20 ++++++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/board/common/mkimage.sh b/board/common/mkimage.sh index cf82723b49..0deebb0442 100755 --- a/board/common/mkimage.sh +++ b/board/common/mkimage.sh @@ -36,7 +36,9 @@ ROOT_IMG=$IMG_DIR/root.img ROOT_SIZE="180" # MB DISK_SIZE="220" # MB -OS_NAME=$(source $IMG_DIR/../../../board/common/overlay/etc/version && echo $os_short_name) + +COMMON_DIR=$(cd $IMG_DIR/../../../board/common; pwd) +OS_NAME=$(source $COMMON_DIR/overlay/etc/version && echo $os_short_name) # boot filesystem msg "creating boot loop device" diff --git a/build.sh b/build.sh index c5a0190b0a..52db829859 100755 --- a/build.sh +++ b/build.sh @@ -16,12 +16,28 @@ board=$1 target=${*:2} cd $(dirname $0) basedir=$(pwd) -osname=$(source $basedir/board/common/overlay/etc/version && echo $os_short_name) -osversion=$(source $basedir/board/common/overlay/etc/version && echo $os_version) gzip=$(which pigz || which gzip) +# extra environment from local file test -f $basedir/.build-env && source $basedir/.build-env +# OS name + +if [ -n "$THINGOS_NAME" ]; then + osname=$THINGOS_NAME +else + osname=$(source $basedir/board/common/overlay/etc/version && echo $os_short_name) +fi + +# OS version +if [ -n "$THINGOS_VERSION" ]; then + osversion=$THINGOS_VERSION +else + osversion=$(source $basedir/board/common/overlay/etc/version && echo $os_version) +fi + +# when the special "all" keyword is used for board, +# all boards are processed, in turn if [ "$board" == "all" ]; then boards=$(ls $basedir/configs/*_defconfig | grep -v initramfs | grep -oE '\w+_defconfig$' | cut -d '_' -f 1) for b in $boards; do From 50688d8b93c06ab19110a1e0220ece1ed9492be1 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sun, 11 Mar 2018 23:27:04 +0200 Subject: [PATCH 20/28] build.sh: releases are created in output/${board}/images now --- build.sh | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/build.sh b/build.sh index 52db829859..72afd2972f 100755 --- a/build.sh +++ b/build.sh @@ -67,15 +67,20 @@ if [ "$target" == "mkimage" ]; then $boarddir/mkimage.sh elif [ "$target" == "mkrelease" ]; then - $boarddir/mkimage.sh - cp $outputdir/images/$osname-$board.img $basedir - mv $basedir/$osname-$board.img $basedir/$osname-$board-$osversion.img - rm -f $basedir/$osname-$board-$osversion.img.xz - xz -6ek -T 0 $basedir/$osname-$board-$osversion.img - echo "your xz image is ready at $basedir/$osname-$board-$osversion.img.xz" - rm -f $basedir/$osname-$board-$osversion.img.gz - $gzip $basedir/$osname-$board-$osversion.img - echo "your gz image is ready at $basedir/$osname-$board-$osversion.img.gz" + test -f $outputdir/images/$osname-$board.img || $boarddir/mkimage.sh + cp $outputdir/images/$osname-$board.img $outputdir/images/$osname-$board-$osversion.img + + echo "preparing compressed xz image" + rm -f $outputdir/images/$osname-$board-$osversion.img.xz + xz -6ek -T 0 $outputdir/images/$osname-$board-$osversion.img + echo "your xz image is ready at $outputdir/images/$osname-$board-$osversion.img.xz" + + echo "preparing compressed gz image" + rm -f $outputdir/images/$osname-$board-$osversion.img.gz + $gzip $outputdir/images/$osname-$board-$osversion.img + echo "your gz image is ready at $outputdir/images/$osname-$board-$osversion.img.gz" + + rm -f $outputdir/images/$osname-$board-$osversion.img elif [ "$target" == "clean-target" ]; then if [ -d $outputdir/target ]; then From 39e565c228d09b645d8752d9a6fef3c150828732 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sat, 17 Mar 2018 17:18:47 +0200 Subject: [PATCH 21/28] build.sh: clean-target now also removes .config --- build.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build.sh b/build.sh index 72afd2972f..6bb1ce9961 100755 --- a/build.sh +++ b/build.sh @@ -102,6 +102,11 @@ elif [ "$target" == "clean-target" ]; then find $outputdir/build -name .stamp_host_installed | xargs -r rm fi + if [ -f $outputdir/.config ]; then + echo "removing .config file" + rm -f $outputdir/.config + fi + echo "target is clean" elif [ -n "$target" ]; then From 7e6dee582a158e3837890254b16ff4bfe5c8d491 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Fri, 23 Mar 2018 23:03:52 +0200 Subject: [PATCH 22/28] toolchain-external: allow specifying binaries relative path --- toolchain/toolchain-external/pkg-toolchain-external.mk | 2 +- .../toolchain-external-custom/Config.in.options | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/toolchain/toolchain-external/pkg-toolchain-external.mk b/toolchain/toolchain-external/pkg-toolchain-external.mk index dc0588c536..9be046eb8f 100644 --- a/toolchain/toolchain-external/pkg-toolchain-external.mk +++ b/toolchain/toolchain-external/pkg-toolchain-external.mk @@ -77,7 +77,7 @@ ifneq ($(TOOLCHAIN_EXTERNAL_PREFIX),) TOOLCHAIN_EXTERNAL_BIN := $(dir $(shell which $(TOOLCHAIN_EXTERNAL_PREFIX)-gcc)) endif else -TOOLCHAIN_EXTERNAL_BIN := $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/bin +TOOLCHAIN_EXTERNAL_BIN := $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_BIN_PATH)) endif # If this is a buildroot toolchain, it already has a wrapper which we want to diff --git a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options index a28534080d..040191cb4d 100644 --- a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options +++ b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options @@ -12,6 +12,14 @@ config BR2_TOOLCHAIN_EXTERNAL_URL help URL of the custom toolchain tarball to download and install. +config BR2_TOOLCHAIN_EXTERNAL_BIN_PATH + string "Toolchain bin path" + default "/bin" + depends on BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD + help + Path to where the binaries (e.g. the compiler) can be found, + relative to the downloaded toolchain root directory. + config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX string "Toolchain prefix" default "$(ARCH)-linux" From f95cc3c86f4fa4caff166bef4977f6709de7bd6e Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Fri, 23 Mar 2018 23:04:18 +0200 Subject: [PATCH 23/28] raspberrypi: use official RPi toolchain --- configs/raspberrypi_defconfig | 13 +++++++++---- .../toolchain-external-custom/Config.in.options | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/configs/raspberrypi_defconfig b/configs/raspberrypi_defconfig index 30fab31734..f8c342f287 100644 --- a/configs/raspberrypi_defconfig +++ b/configs/raspberrypi_defconfig @@ -3,10 +3,15 @@ BR2_arm1176jzf_s=y BR2_CCACHE=y BR2_CCACHE_DIR="$(TOPDIR)/.buildroot-ccache-raspberrypi" BR2_OPTIMIZE_2=y -BR2_TOOLCHAIN_BUILDROOT_GLIBC=y -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y -BR2_GCC_VERSION_4_9_X=y -BR2_TOOLCHAIN_BUILDROOT_CXX=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y +BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/raspberrypi/tools/archive/5caa7046982f0539cf5380f94da04b31129ed521.tar.gz" +BR2_TOOLCHAIN_EXTERNAL_BIN_PATH="/arm-bcm2708/arm-linux-gnueabihf/bin" +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="arm-linux-gnueabihf" +BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y +BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_1=y +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y +BR2_TOOLCHAIN_EXTERNAL_CXX=y BR2_TARGET_OPTIMIZATION="-pipe" BR2_ROOTFS_SKELETON_CUSTOM=y BR2_ROOTFS_SKELETON_CUSTOM_PATH="board/common/skeleton" diff --git a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options index 040191cb4d..9a4987662d 100644 --- a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options +++ b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options @@ -14,7 +14,7 @@ config BR2_TOOLCHAIN_EXTERNAL_URL config BR2_TOOLCHAIN_EXTERNAL_BIN_PATH string "Toolchain bin path" - default "/bin" + default "bin" depends on BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD help Path to where the binaries (e.g. the compiler) can be found, From 4af1c690d3f58dba121b1fceb9739fd06fd1821f Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sat, 24 Mar 2018 16:02:43 +0200 Subject: [PATCH 24/28] toolchain-external: fix bin path for known toolchains --- toolchain/toolchain-external/pkg-toolchain-external.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/toolchain/toolchain-external/pkg-toolchain-external.mk b/toolchain/toolchain-external/pkg-toolchain-external.mk index 9be046eb8f..07d3e689cb 100644 --- a/toolchain/toolchain-external/pkg-toolchain-external.mk +++ b/toolchain/toolchain-external/pkg-toolchain-external.mk @@ -71,6 +71,11 @@ else TOOLCHAIN_EXTERNAL_INSTALL_DIR = $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PATH)) endif +# if binary path unset (non-custom external toolchains), use "bin" +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BIN_PATH),) +BR2_TOOLCHAIN_EXTERNAL_BIN_PATH = bin +endif + ifeq ($(TOOLCHAIN_EXTERNAL_INSTALL_DIR),) ifneq ($(TOOLCHAIN_EXTERNAL_PREFIX),) # if no path set, figure it out from path From 4a38dd2fffae035f3f89952274b65321f8cdc9c2 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sat, 24 Mar 2018 21:25:51 +0200 Subject: [PATCH 25/28] build.sh: replace internal version string from THINGOS_VERSION --- build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.sh b/build.sh index 6bb1ce9961..d303bbdb2d 100755 --- a/build.sh +++ b/build.sh @@ -31,6 +31,10 @@ fi # OS version if [ -n "$THINGOS_VERSION" ]; then + # set internal OS version from env variable + if [ -f $outputdir/target/etc/version ]; then + sed -r -i "s/os_version=\".*\"/os_version=\"$THINGOS_VERSION\"/" $outputdir/target/etc/version + fi osversion=$THINGOS_VERSION else osversion=$(source $basedir/board/common/overlay/etc/version && echo $os_version) From 7bf81fe2916e233b94f46ac1214ca12fbe0a3dd1 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sun, 25 Mar 2018 14:05:45 +0300 Subject: [PATCH 26/28] set some internal OS variables from environment --- board/common/mkimage.sh | 20 ++++++++++++++++++++ build.sh | 14 ++++++-------- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/board/common/mkimage.sh b/board/common/mkimage.sh index 0deebb0442..2b5e8e8600 100755 --- a/board/common/mkimage.sh +++ b/board/common/mkimage.sh @@ -81,6 +81,26 @@ mount -o loop $loop_dev $ROOT msg "copying root filesystem contents" tar -xpsf $ROOT_SRC -C $ROOT +# set internal OS name, prefix and version according to env variables +if [ -f $ROOT/etc/version ]; then + if [ -n "$THINGOS_NAME" ]; then + msg "setting OS name to $THINGOS_NAME" + sed -ri "s/os_name=\".*\"/os_name=\"$THINGOS_NAME\"/" $ROOT/etc/version + fi + if [ -n "$THINGOS_SHORT_NAME" ]; then + msg "setting OS short name to $THINGOS_SHORT_NAME" + sed -ri "s/os_short_name=\".*\"/os_short_name=\"$THINGOS_SHORT_NAME\"/" $ROOT/etc/version + fi + if [ -n "$THINGOS_PREFIX" ]; then + msg "setting OS prefix to $THINGOS_PREFIX" + sed -ri "s/os_prefix=\".*\"/os_prefix=\"$THINGOS_PREFIX\"/" $ROOT/etc/version + fi + if [ -n "$THINGOS_VERSION" ]; then + msg "setting OS version to $THINGOS_VERSION" + sed -ri "s/os_version=\".*\"/os_version=\"$THINGOS_VERSION\"/" $ROOT/etc/version + fi +fi + msg "unmounting root filesystem" umount $ROOT diff --git a/build.sh b/build.sh index d303bbdb2d..b68f4c3e0f 100755 --- a/build.sh +++ b/build.sh @@ -22,19 +22,14 @@ gzip=$(which pigz || which gzip) test -f $basedir/.build-env && source $basedir/.build-env # OS name - -if [ -n "$THINGOS_NAME" ]; then - osname=$THINGOS_NAME +if [ -n "$THINGOS_SHORT_NAME" ]; then + osname=$THINGOS_SHORT_NAME else osname=$(source $basedir/board/common/overlay/etc/version && echo $os_short_name) fi # OS version if [ -n "$THINGOS_VERSION" ]; then - # set internal OS version from env variable - if [ -f $outputdir/target/etc/version ]; then - sed -r -i "s/os_version=\".*\"/os_version=\"$THINGOS_VERSION\"/" $outputdir/target/etc/version - fi osversion=$THINGOS_VERSION else osversion=$(source $basedir/board/common/overlay/etc/version && echo $os_version) @@ -113,8 +108,11 @@ elif [ "$target" == "clean-target" ]; then echo "target is clean" +elif [ "$target" == "all" ]; then + make O=$outputdir all + elif [ -n "$target" ]; then - make O=$outputdir $target + $0 $b all else make O=$outputdir all From dfb309eb5edf8c9b4750d1e6b3ad278128f9dd8a Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sun, 25 Mar 2018 14:30:34 +0300 Subject: [PATCH 27/28] BR2_TOOLCHAIN_EXTERNAL_BIN_PATH -> BR2_TOOLCHAIN_EXTERNAL_REL_BIN_PATH --- configs/raspberrypi_defconfig | 2 +- toolchain/toolchain-external/pkg-toolchain-external.mk | 10 +++++----- .../toolchain-external-custom/Config.in.options | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/configs/raspberrypi_defconfig b/configs/raspberrypi_defconfig index f8c342f287..491b11a717 100644 --- a/configs/raspberrypi_defconfig +++ b/configs/raspberrypi_defconfig @@ -6,7 +6,7 @@ BR2_OPTIMIZE_2=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/raspberrypi/tools/archive/5caa7046982f0539cf5380f94da04b31129ed521.tar.gz" -BR2_TOOLCHAIN_EXTERNAL_BIN_PATH="/arm-bcm2708/arm-linux-gnueabihf/bin" +BR2_TOOLCHAIN_EXTERNAL_REL_BIN_PATH="arm-bcm2708/arm-linux-gnueabihf/bin" BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="arm-linux-gnueabihf" BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_1=y diff --git a/toolchain/toolchain-external/pkg-toolchain-external.mk b/toolchain/toolchain-external/pkg-toolchain-external.mk index 07d3e689cb..393ff85c63 100644 --- a/toolchain/toolchain-external/pkg-toolchain-external.mk +++ b/toolchain/toolchain-external/pkg-toolchain-external.mk @@ -71,10 +71,10 @@ else TOOLCHAIN_EXTERNAL_INSTALL_DIR = $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PATH)) endif -# if binary path unset (non-custom external toolchains), use "bin" -ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BIN_PATH),) -BR2_TOOLCHAIN_EXTERNAL_BIN_PATH = bin -endif +# If binary path unset (known, supported external toolchains), use "bin". +TOOLCHAIN_EXTERNAL_REL_BIN_PATH = $(or \ + $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_REL_BIN_PATH)), \ + bin) ifeq ($(TOOLCHAIN_EXTERNAL_INSTALL_DIR),) ifneq ($(TOOLCHAIN_EXTERNAL_PREFIX),) @@ -82,7 +82,7 @@ ifneq ($(TOOLCHAIN_EXTERNAL_PREFIX),) TOOLCHAIN_EXTERNAL_BIN := $(dir $(shell which $(TOOLCHAIN_EXTERNAL_PREFIX)-gcc)) endif else -TOOLCHAIN_EXTERNAL_BIN := $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_BIN_PATH)) +TOOLCHAIN_EXTERNAL_BIN := $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/$(TOOLCHAIN_EXTERNAL_REL_BIN_PATH) endif # If this is a buildroot toolchain, it already has a wrapper which we want to diff --git a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options index 9a4987662d..e10cc857d8 100644 --- a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options +++ b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options @@ -12,8 +12,8 @@ config BR2_TOOLCHAIN_EXTERNAL_URL help URL of the custom toolchain tarball to download and install. -config BR2_TOOLCHAIN_EXTERNAL_BIN_PATH - string "Toolchain bin path" +config BR2_TOOLCHAIN_EXTERNAL_REL_BIN_PATH + string "Toolchain relative bin path" default "bin" depends on BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD help From ad5f3cb65587b27ff7e41aa4df904231a457c16a Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sun, 25 Mar 2018 14:39:50 +0300 Subject: [PATCH 28/28] build.sh: clean-target: remove images folder as well --- build.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build.sh b/build.sh index b68f4c3e0f..3f928daac8 100755 --- a/build.sh +++ b/build.sh @@ -88,6 +88,9 @@ elif [ "$target" == "clean-target" ]; then echo "removing staging directory" rm -rf $outputdir/staging/* + + echo "removing images directory" + rm -rf $outputdir/images/* fi if [ -d $outputdir/build ]; then