Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1584075 > unrolled thread

[PATCH] make.cross: Update openrisc toolchain to fix builds

Started byStafford Horne <shorne@gmail.com>
First post2017-02-19 09:20 +0100
Last post2017-02-19 10:00 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] make.cross: Update openrisc toolchain to fix builds Stafford Horne <shorne@gmail.com> - 2017-02-19 09:20 +0100
    Re: [PATCH] make.cross: Update openrisc toolchain to fix builds Fengguang Wu <fengguang.wu@intel.com> - 2017-02-19 10:00 +0100

#1584075 — [PATCH] make.cross: Update openrisc toolchain to fix builds

FromStafford Horne <shorne@gmail.com>
Date2017-02-19 09:20 +0100
Subject[PATCH] make.cross: Update openrisc toolchain to fix builds
Message-ID<tcuSR-50f-7@gated-at.bofh.it>
The latest openrisc kernel patchs in linux-next are failing to build due
to old toolchains at the crosstool website.

Update to point the the toolchain binaries released the OpenRISC team.

Signed-off-by: Stafford Horne <shorne@gmail.com>
---
 sbin/make.cross | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/sbin/make.cross b/sbin/make.cross
index c450b4a..7f802b1 100755
--- a/sbin/make.cross
+++ b/sbin/make.cross
@@ -104,12 +104,31 @@ install_linaro()
 	sudo mv $dir  $GCC_INSTALL_PATH/gcc-$cross_gcc_version/$gcc_arch
 }
 
+install_openrisc()
+{
+	local URL='https://github.com/openrisc/or1k-gcc/releases/download/or1k-5.4.0-20170218'
+	local file='or1k-linux-5.4.0-20170218.tar.xz'
+
+	download_extract "$URL/$file"
+
+	local dir="$GCC_INSTALL_PATH/${gcc_arch}"
+	local cross_gcc_version=(${dir}/bin/${gcc_arch}-gcc-*.*.*)
+	local cross_gcc_version=${cross_gcc_version##*-}
+
+	echo mkdir -p $GCC_INSTALL_PATH/gcc-$cross_gcc_version
+	sudo mkdir -p $GCC_INSTALL_PATH/gcc-$cross_gcc_version
+	echo mv $dir  $GCC_INSTALL_PATH/gcc-$cross_gcc_version/$gcc_arch
+	sudo mv $dir  $GCC_INSTALL_PATH/gcc-$cross_gcc_version/$gcc_arch
+}
+
 install_cross_compiler()
 {
 	install_packages
 
 	if [[ $gcc_arch =~ 'aarch64' ]]; then
 		install_linaro
+	elif [[ $gcc_arch =~ 'or1k' ]]; then
+		install_openrisc
 	else
 		install_crosstool
 	fi
@@ -150,7 +169,7 @@ setup_crosstool()
 			fi
 			;;
 		openrisc)
-			gcc_arch=or32-linux
+			gcc_arch=or1k-linux
 			;;
 		s390)
 			gcc_arch=s390x-linux
-- 
2.9.3

[toc] | [next] | [standalone]


#1584080

FromFengguang Wu <fengguang.wu@intel.com>
Date2017-02-19 10:00 +0100
Message-ID<tcvvA-5dB-11@gated-at.bofh.it>
In reply to#1584075
Applied, thank you!

On Sun, Feb 19, 2017 at 05:14:36PM +0900, Stafford Horne wrote:
>The latest openrisc kernel patchs in linux-next are failing to build due
>to old toolchains at the crosstool website.
>
>Update to point the the toolchain binaries released the OpenRISC team.
>
>Signed-off-by: Stafford Horne <shorne@gmail.com>
>---
> sbin/make.cross | 21 ++++++++++++++++++++-
> 1 file changed, 20 insertions(+), 1 deletion(-)
>
>diff --git a/sbin/make.cross b/sbin/make.cross
>index c450b4a..7f802b1 100755
>--- a/sbin/make.cross
>+++ b/sbin/make.cross
>@@ -104,12 +104,31 @@ install_linaro()
> 	sudo mv $dir  $GCC_INSTALL_PATH/gcc-$cross_gcc_version/$gcc_arch
> }
>
>+install_openrisc()
>+{
>+	local URL='https://github.com/openrisc/or1k-gcc/releases/download/or1k-5.4.0-20170218'
>+	local file='or1k-linux-5.4.0-20170218.tar.xz'
>+
>+	download_extract "$URL/$file"
>+
>+	local dir="$GCC_INSTALL_PATH/${gcc_arch}"
>+	local cross_gcc_version=(${dir}/bin/${gcc_arch}-gcc-*.*.*)
>+	local cross_gcc_version=${cross_gcc_version##*-}
>+
>+	echo mkdir -p $GCC_INSTALL_PATH/gcc-$cross_gcc_version
>+	sudo mkdir -p $GCC_INSTALL_PATH/gcc-$cross_gcc_version
>+	echo mv $dir  $GCC_INSTALL_PATH/gcc-$cross_gcc_version/$gcc_arch
>+	sudo mv $dir  $GCC_INSTALL_PATH/gcc-$cross_gcc_version/$gcc_arch
>+}
>+
> install_cross_compiler()
> {
> 	install_packages
>
> 	if [[ $gcc_arch =~ 'aarch64' ]]; then
> 		install_linaro
>+	elif [[ $gcc_arch =~ 'or1k' ]]; then
>+		install_openrisc
> 	else
> 		install_crosstool
> 	fi
>@@ -150,7 +169,7 @@ setup_crosstool()
> 			fi
> 			;;
> 		openrisc)
>-			gcc_arch=or32-linux
>+			gcc_arch=or1k-linux
> 			;;
> 		s390)
> 			gcc_arch=s390x-linux
>-- 
>2.9.3

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web