Skip to contentSkip to conversation

package/arm-gnu-toolchain: Add $(HOSTARCH) so it can be built with aarch64

PATCH In review [email protected] 3 participants 5 messages Oct 22, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/arm-gnu-toolchain: Add $(HOSTARCH) so it can be built with aarch64

From: Bryce Johnson <[email protected]>

Was testing building with arm64 build server and failed because it was downloading the x86_64 version. Use $(HOSTARCH) instead so it can also downloaded

Tested with building configs/ti_am62x_sk_defconfig on arm64. That it uses to build the 32bit R5 MCU.

---
 package/arm-gnu-toolchain/arm-gnu-toolchain.hash | 2 ++
 package/arm-gnu-toolchain/arm-gnu-toolchain.mk   | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
package/arm-gnu-toolchain/arm-gnu-toolchain.hash +2 -0
index 0800fa2168..110ec40c09 100644
@@ -1,2 +1,4 @@
 # taken from https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz.sha256asc
 sha256  6cd1bbc1d9ae57312bcd169ae283153a9572bd6a8e4eeae2fedfbc33b115fdbb  arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz
+# taken from https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-aarch64-arm-none-eabi.tar.xz.sha256asc
+sha256  8fd8b4a0a8d44ab2e195ccfbeef42223dfb3ede29d80f14dcf2183c34b8d199a  arm-gnu-toolchain-13.2.rel1-aarch64-arm-none-eabi.tar.xz
package/arm-gnu-toolchain/arm-gnu-toolchain.mk +1 -1
index 03bb4dc5da..fce80f2f3a 100644
@@ -6,7 +6,7 @@
 
 ARM_GNU_TOOLCHAIN_VERSION = 13.2.rel1
 ARM_GNU_TOOLCHAIN_SITE = https://developer.arm.com/-/media/Files/downloads/gnu/$(ARM_GNU_TOOLCHAIN_VERSION)/binrel
-ARM_GNU_TOOLCHAIN_SOURCE = arm-gnu-toolchain-$(ARM_GNU_TOOLCHAIN_VERSION)-x86_64-arm-none-eabi.tar.xz
+ARM_GNU_TOOLCHAIN_SOURCE = arm-gnu-toolchain-$(ARM_GNU_TOOLCHAIN_VERSION)-$(HOSTARCH)-arm-none-eabi.tar.xz
 ARM_GNU_TOOLCHAIN_LICENSE = GPL-3.0+
 
 HOST_ARM_GNU_TOOLCHAIN_INSTALL_DIR = $(HOST_DIR)/opt/gcc-arm-none-eabi
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hello Bryce!

Thanks for your patch. Some comments/questions below.

Quoted 3 lines · On Tue, 22 Oct 2024 12:05:40 -0600 [email protected] wrote:

From: Bryce Johnson <[email protected]>

Was testing building with arm64 build server and failed because it was downloading the x86_64 version. Use $(HOSTARCH) instead so it can also downloaded

Minor nit: commit messages should have line wrapped at ~80 columns.

Quoted 2 lines

Tested with building configs/ti_am62x_sk_defconfig on arm64. That it uses to build the 32bit R5 MCU.

More important nit: we need you to add your Signed-off-by: line at the end of the commit log to allow us to apply your patch.

Quoted 14 lines
package/arm-gnu-toolchain/arm-gnu-toolchain.hash +2 -0
index 0800fa2168..110ec40c09 100644
@@ -1,2 +1,4 @@
 # taken from https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz.sha256asc
 sha256  6cd1bbc1d9ae57312bcd169ae283153a9572bd6a8e4eeae2fedfbc33b115fdbb  arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz
+# taken from https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-aarch64-arm-none-eabi.tar.xz.sha256asc
+sha256  8fd8b4a0a8d44ab2e195ccfbeef42223dfb3ede29d80f14dcf2183c34b8d199a  arm-gnu-toolchain-13.2.rel1-aarch64-arm-none-eabi.tar.xz
package/arm-gnu-toolchain/arm-gnu-toolchain.mk +0 -0
index 03bb4dc5da..fce80f2f3a 100644

package/arm-gnu-toolchain/arm-gnu-toolchain.mk line 9

Quoted 5 lines
package/arm-gnu-toolchain/arm-gnu-toolchain.mk +1 -1
@@ -6,7 +6,7 @@
 
 ARM_GNU_TOOLCHAIN_VERSION = 13.2.rel1
 ARM_GNU_TOOLCHAIN_SITE = https://developer.arm.com/-/media/Files/downloads/gnu/$(ARM_GNU_TOOLCHAIN_VERSION)/binrel
-ARM_GNU_TOOLCHAIN_SOURCE = arm-gnu-toolchain-$(ARM_GNU_TOOLCHAIN_VERSION)-x86_64-arm-none-eabi.tar.xz
+ARM_GNU_TOOLCHAIN_SOURCE = arm-gnu-toolchain-$(ARM_GNU_TOOLCHAIN_VERSION)-$(HOSTARCH)-arm-none-eabi.tar.xz

The change looks correct as-is of course, as it doesn't make anything worse. However, I believe to make things cleaner, we should perhaps introduce a package/arm-gnu-toolchain/Config.in.host file, with a blind option BR2_HOST_PACKAGE_ARM_GNU_TOOLCHAIN, that has a "depends on" the host architectures that are supported. And the packages that use host-arm-gnu-toolchain would have to be careful to propagate those depends on, so that we do not allow using host-arm-gnu-toolchain on configurations that do not allow using the host-arm-gnu-toolchain package. However this can be done as a separate patch, as again your change is not making things any worse than they already are :)

Could you send a v2 of your patch with the proposed changes?

Thanks again!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Hi Thomas,
Yes I'll do that. Finally got the git send email with my gmail account working and thought the Signed-off-by got added. I'll clean up that and the line length as well.

Bryce

Quoted 53 lines · Thomas Petazzoni

Hello Bryce!

Thanks for your patch. Some comments/questions below.

Quoted 3 lines · On Tue, 22 Oct 2024 12:05:40 -0600 [email protected] wrote:

From: Bryce Johnson <[email protected]>

Was testing building with arm64 build server and failed because it was downloading the x86_64 version. Use $(HOSTARCH) instead so it can also downloaded

Minor nit: commit messages should have line wrapped at ~80 columns.

Quoted 2 lines

Tested with building configs/ti_am62x_sk_defconfig on arm64. That it uses to build the 32bit R5 MCU.

More important nit: we need you to add your Signed-off-by: line at the end of the commit log to allow us to apply your patch.

Quoted 14 lines
package/arm-gnu-toolchain/arm-gnu-toolchain.hash +2 -0
index 0800fa2168..110ec40c09 100644
@@ -1,2 +1,4 @@
 # taken from https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz.sha256asc
 sha256  6cd1bbc1d9ae57312bcd169ae283153a9572bd6a8e4eeae2fedfbc33b115fdbb  arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz
+# taken from https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-aarch64-arm-none-eabi.tar.xz.sha256asc
+sha256  8fd8b4a0a8d44ab2e195ccfbeef42223dfb3ede29d80f14dcf2183c34b8d199a  arm-gnu-toolchain-13.2.rel1-aarch64-arm-none-eabi.tar.xz
package/arm-gnu-toolchain/arm-gnu-toolchain.mk +0 -0
index 03bb4dc5da..fce80f2f3a 100644

package/arm-gnu-toolchain/arm-gnu-toolchain.mk line 9

Quoted 5 lines
package/arm-gnu-toolchain/arm-gnu-toolchain.mk +1 -1
@@ -6,7 +6,7 @@
 
 ARM_GNU_TOOLCHAIN_VERSION = 13.2.rel1
 ARM_GNU_TOOLCHAIN_SITE = https://developer.arm.com/-/media/Files/downloads/gnu/$(ARM_GNU_TOOLCHAIN_VERSION)/binrel
-ARM_GNU_TOOLCHAIN_SOURCE = arm-gnu-toolchain-$(ARM_GNU_TOOLCHAIN_VERSION)-x86_64-arm-none-eabi.tar.xz
+ARM_GNU_TOOLCHAIN_SOURCE = arm-gnu-toolchain-$(ARM_GNU_TOOLCHAIN_VERSION)-$(HOSTARCH)-arm-none-eabi.tar.xz

The change looks correct as-is of course, as it doesn't make anything worse. However, I believe to make things cleaner, we should perhaps introduce a package/arm-gnu-toolchain/Config.in.host file, with a blind option BR2_HOST_PACKAGE_ARM_GNU_TOOLCHAIN, that has a "depends on" the host architectures that are supported. And the packages that use host-arm-gnu-toolchain would have to be careful to propagate those depends on, so that we do not allow using host-arm-gnu-toolchain on configurations that do not allow using the host-arm-gnu-toolchain package. However this can be done as a separate patch, as again your change is not making things any worse than they already are :)

Could you send a v2 of your patch with the proposed changes?

Quoted 7 lines

Thanks again!

Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training
https://bootlin.com

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw

Hello Bryce,

Quoted 3 lines · On Tue, 22 Oct 2024 14:36:44 -0600 Bryce Johnson <[email protected]> wrote:

Yes I'll do that. Finally got the git send email with my gmail account working and thought the Signed-off-by got added. I'll clean up that and the line length as well.

Thanks, I have seen your v2, which I have applied. However, did you see the remainder of my review? See below.

Quoted 14 lines
Quoted 14 lines

package/arm-gnu-toolchain/arm-gnu-toolchain.mk line 9

Quoted 2 lines
package/arm-gnu-toolchain/arm-gnu-toolchain.mk +1 -1
-ARM_GNU_TOOLCHAIN_SOURCE = arm-gnu-toolchain-$(ARM_GNU_TOOLCHAIN_VERSION)-x86_64-arm-none-eabi.tar.xz
+ARM_GNU_TOOLCHAIN_SOURCE = arm-gnu-toolchain-$(ARM_GNU_TOOLCHAIN_VERSION)-$(HOSTARCH)-arm-none-eabi.tar.xz  

The change looks correct as-is of course, as it doesn't make anything worse. However, I believe to make things cleaner, we should perhaps introduce a package/arm-gnu-toolchain/Config.in.host file, with a blind option BR2_HOST_PACKAGE_ARM_GNU_TOOLCHAIN, that has a "depends on" the host architectures that are supported. And the packages that use host-arm-gnu-toolchain would have to be careful to propagate those depends on, so that we do not allow using host-arm-gnu-toolchain on configurations that do not allow using the host-arm-gnu-toolchain package. However this can be done as a separate patch, as again your change is not making things any worse than they already are :)

Quoted 1 line
Quoted 1 line

Could you send a v2 of your patch with the proposed changes?

Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw

Hi Thomas,

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

The change looks correct as-is of course, as it doesn't make anything worse. However, I believe to make things cleaner, we should perhaps introduce a package/arm-gnu-toolchain/Config.in.host file, with a blind option BR2_HOST_PACKAGE_ARM_GNU_TOOLCHAIN, that has a "depends on" the host architectures that are supported. And the packages that use host-arm-gnu-toolchain would have to be careful to propagate those depends on, so that we do not allow using host-arm-gnu-toolchain on configurations that do not allow using the host-arm-gnu-toolchain package. However this can be done as a separate patch, as again your change is not making things any worse than they already are :)

Quoted 1 line
Quoted 1 line
Quoted 1 line

Could you send a v2 of your patch with the proposed changes?

I followed up with a patchset with taking a crack at the changes. Let me know how they look or if there is a better way then what I did.

Bryce
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot