boot/opensbi: introduce BR2_TARGET_OPENSBI_CUSTOM_MAKEOPTS
PATCH 1/1 boot/opensbi: introduce BR2_TARGET_OPENSBI_CUSTOM_MAKEOPTS
--- boot/opensbi/Config.in | 6 ++++++ boot/opensbi/opensbi.mk | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-)
boot/opensbi/Config.in +6 -0
@@ -119,4 +119,10 @@ config BR2_TARGET_OPENSBI_FW_FDT_PATH must be set in the U-Boot configuration for this file to be produced. +config BR2_TARGET_OPENSBI_CUSTOM_MAKEOPTS + string "Custom make options" + help + List of custom make options passed at build time. Can be + used for example to pass a BUILD_INFO= value. + endif
boot/opensbi/opensbi.mk +2 -1
@@ -31,7 +31,8 @@ BR_NO_CHECK_HASH_FOR += $(OPENSBI_SOURCE) endif OPENSBI_MAKE_ENV = \ - CROSS_COMPILE=$(TARGET_CROSS) + CROSS_COMPILE=$(TARGET_CROSS) \ + $(call qstrip,$(BR2_TARGET_OPENSBI_CUSTOM_MAKEOPTS)) OPENSBI_PLAT = $(call qstrip,$(BR2_TARGET_OPENSBI_PLAT)) ifneq ($(OPENSBI_PLAT),)
Signature · 6 lines
2.35.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 2 lines · Noah Huetter
Signed-off-by Noah Huetter <[email protected]>
Alistair
Quoted 37 lines
--- boot/opensbi/Config.in | 6 ++++++ boot/opensbi/opensbi.mk | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-)boot/opensbi/Config.in +6
-0@@ -119,4 +119,10 @@ config BR2_TARGET_OPENSBI_FW_FDT_PATH must be set in the U-Boot configuration for this file to be produced. +config BR2_TARGET_OPENSBI_CUSTOM_MAKEOPTS + string "Custom make options" + help + List of custom make options passed at build time. Can be + used for example to pass a BUILD_INFO= value. + endifboot/opensbi/opensbi.mk +2
-2@@ -31,7 +31,8 @@ BR_NO_CHECK_HASH_FOR += $(OPENSBI_SOURCE) endif OPENSBI_MAKE_ENV = \ - CROSS_COMPILE=$(TARGET_CROSS) + CROSS_COMPILE=$(TARGET_CROSS) \ + $(call qstrip,$(BR2_TARGET_OPENSBI_CUSTOM_MAKEOPTS)) OPENSBI_PLAT = $(call qstrip,$(BR2_TARGET_OPENSBI_PLAT)) ifneq ($(OPENSBI_PLAT),) --2.35.1
Quoted 4 lines
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Alistair,
Is there any action needed from my side to get this committed?
Noah
Quoted 49 lines · Alistair Francis
Quoted 2 lines · Noah Huetter
Signed-off-by Noah Huetter <[email protected]>Reviewed-by Alistair Francis <[email protected]>Alistair
Quoted 41 lines
--- boot/opensbi/Config.in | 6 ++++++ boot/opensbi/opensbi.mk | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-)boot/opensbi/Config.in +6
-0@@ -119,4 +119,10 @@ config BR2_TARGET_OPENSBI_FW_FDT_PATH must be set in the U-Boot configuration for this file to be produced. +config BR2_TARGET_OPENSBI_CUSTOM_MAKEOPTS + string "Custom make options" + help + List of custom make options passed at build time. Can be + used for example to pass a BUILD_INFO= value. + endifboot/opensbi/opensbi.mk +2
-2@@ -31,7 +31,8 @@ BR_NO_CHECK_HASH_FOR += $(OPENSBI_SOURCE) endif OPENSBI_MAKE_ENV = \ - CROSS_COMPILE=$(TARGET_CROSS) + CROSS_COMPILE=$(TARGET_CROSS) \ + $(call qstrip,$(BR2_TARGET_OPENSBI_CUSTOM_MAKEOPTS)) OPENSBI_PLAT = $(call qstrip,$(BR2_TARGET_OPENSBI_PLAT)) ifneq ($(OPENSBI_PLAT),) --2.35.1
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 3 lines
Noah Huetter https://beeblebrox.ch/ Fingerprint: A251 8391 5989 094E 0747 6B68 362A 1C58 456D DA0F
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 3 lines · Noah Hütter
Hi Alistair,
Is there any action needed from my side to get this committed?
It's just one of the +-200 pending patches that are not trivial.
Quoted 25 lines
Noah
Quoted 21 lines · Alistair Francis
Quoted 2 lines · Noah Huetter
Signed-off-by Noah Huetter <[email protected]>Reviewed-by Alistair Francis <[email protected]>Alistair
Quoted 13 lines
---
boot/opensbi/Config.in | 6 ++++++
boot/opensbi/opensbi.mk| 3 ++-2 files changed, 8 insertions(+), 1 deletion(-)boot/opensbi/Config.in +0
-0@@ -119,4 +119,10 @@ config BR2_TARGET_OPENSBI_FW_FDT_PATHmust be set in the U-Boot configuration for this file to be produced.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
+config
BR2_TARGET_OPENSBI_CUSTOM_MAKEOPTS
+ string "Custom make options"
+ help
+ List of custom make options passed at build time. Can be + used for example to pass a BUILD_INFO= value.
In this case, it's not trivial because the use case is not clear. Almost every
package has some random make, cmake, meson or whatever options that you could pass to it. What makes OpenSBI so special that you need to pass a freeform list of additional options?
Regards,
Arnout
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
+
endifboot/opensbi/opensbi.mk +0
-0@@ -31,7 +31,8 @@ BR_NO_CHECK_HASH_FOR += $(OPENSBI_SOURCE)endif
OPENSBI_MAKE_ENV= \
- CROSS_COMPILE=$(TARGET_CROSS)
+ CROSS_COMPILE=$(TARGET_CROSS) \
+ $(call qstrip,$(BR2_TARGET_OPENSBI_CUSTOM_MAKEOPTS))
OPENSBI_PLAT= $(call qstrip,$(BR2_TARGET_OPENSBI_PLAT)) ifneq ($(OPENSBI_PLAT),)Signature · 1 line
2.35.1
Quoted 10 lines
Quoted 4 lines
Quoted 4 lines
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 8 lines · Arnout Vandecappelle
Quoted 3 lines · Noah Hütter
Hi Alistair,
Is there any action needed from my side to get this committed?
It's just one of the +-200 pending patches that are not trivial.
Thanks for the update, I didn't want to put pressure on anyone, I'm a first time contributor and want to make no mistakes :).
Quoted 25 lines
Quoted 25 lines
Noah
Quoted 21 lines · Alistair Francis
Quoted 2 lines · Noah Huetter
Signed-off-by Noah Huetter <[email protected]>Reviewed-by Alistair Francis <[email protected]>Alistair
Quoted 13 lines
---
boot/opensbi/Config.in | 6 ++++++
boot/opensbi/opensbi.mk| 3 ++-2 files changed, 8 insertions(+), 1 deletion(-)boot/opensbi/Config.in +0
-0@@ -119,4 +119,10 @@ config BR2_TARGET_OPENSBI_FW_FDT_PATHmust be set in the U-Boot configuration for this file to be produced.
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
+config
BR2_TARGET_OPENSBI_CUSTOM_MAKEOPTS
+ string "Custom make options"
+ help
+ List of custom make options passed at build time. Can be + used for example to pass a BUILD_INFO= value.In this case, it's not trivial because the use case is not clear.
Almost every package has some random make, cmake, meson or whatever options that you could pass to it. What makes OpenSBI so special that you need to pass a freeform list of additional options?
In my specific case as described in the help, the value to BUILD_INFO. From looking at other packages I deduced that the _CUSTOM_MAKEOPTS is a common config to packages and added it to OpenSBI. Did I overlook something?
Best,
Noah
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
+
endifboot/opensbi/opensbi.mk +0
-0@@ -31,7 +31,8 @@ BR_NO_CHECK_HASH_FOR += $(OPENSBI_SOURCE)endif
OPENSBI_MAKE_ENV= \
- CROSS_COMPILE=$(TARGET_CROSS)
+ CROSS_COMPILE=$(TARGET_CROSS) \
+ $(call qstrip,$(BR2_TARGET_OPENSBI_CUSTOM_MAKEOPTS))
OPENSBI_PLAT= $(call qstrip,$(BR2_TARGET_OPENSBI_PLAT)) ifneq ($(OPENSBI_PLAT),)Signature · 1 line
2.35.1
Quoted 10 lines
Quoted 10 lines
Quoted 4 lines
Quoted 4 lines
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 6 lines · Noah Hütter
Quoted 3 lines · Arnout Vandecappelle
On 12/05/2022 08:50, Noah Hütter wrote:
[snip]
Quoted 9 lines
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
+config
BR2_TARGET_OPENSBI_CUSTOM_MAKEOPTS
+ string "Custom make options"
+ help
+ List of custom make options passed at build time. Can be + used for example to pass a BUILD_INFO= value.In this case, it's not trivial because the use case is not clear. Almost every package has some random make, cmake, meson or whatever options that you could pass to it. What makes OpenSBI so special that you need to pass a freeform list of additional options?
In my specific case as described in the help, the value to
BUILD_INFO.
Yes, but why is it absolutely necessary to set BUILD_INFO? Are there other
variables that are going to be need to be set, or is it just the one? In the latter case, it would be better to have BR2_TARGET_OPENSBI_BUILD_INFO.
Quoted 1 line
From looking at other packages I deduced that the
_CUSTOM_MAKEOPTSis a common config to packages and added it to OpenSBI. Did I overlook something?
There's just one that has this, uboot. It was added by this commit:
commit cc151c3993090a52d1fef8532f52d74ee6d924c9
Author: Thomas Petazzoni <[email protected]> Date: Fri Apr 26 17:19:46 2019
boot/uboot: add option to pass custom variables to U-Boot build
U-Boot supports a number of environment variables to pass specific information. The following patches were submitted in the past to one some specific Config.in option to pass some of these variables:
- http://patchwork.ozlabs.org/patch/881197/ proposed an option to pass a custom EXT_DTB= variable
- http://patchwork.ozlabs.org/patch/1018245/ proposed an option to pass a custom DEVICE_TREE= variable
Instead of adding one Config.in option for each of those variables, let's provide a generic mechanism to pass arbitrary variables during U-Boot build step.
I have to say that that commit message isn't really good enough either, it
should really have copied the explanations in the two referred patches as to why those two variables would need to be used. What we're really looking for is:
- A "proof" that this is for a relevant use case and not just some corner case that nobody other than yourself is ever going to need.
- A "design document" that this is really the way to implement this feature, that other alternatives are less appropriate (cfr. the "Instead of ... let's ..." sentence above).
- And all this documented in the commit message, so a few years down the line if someone changes it, we remember the reasons why we made those choices.
Note that it doesn't have to be very wordy, it's possible to cover those bases
in just a few words. But the gist of it needs to be there.
Regards,
Arnout
Quoted 33 lines
Best,
NoahQuoted 29 lines
Quoted 29 lines
Quoted 19 lines
Quoted 19 lines
+
endifboot/opensbi/opensbi.mk +0
-0@@ -31,7 +31,8 @@ BR_NO_CHECK_HASH_FOR += $(OPENSBI_SOURCE)endif
OPENSBI_MAKE_ENV= \
- CROSS_COMPILE=$(TARGET_CROSS)
+ CROSS_COMPILE=$(TARGET_CROSS) \
+ $(call qstrip,$(BR2_TARGET_OPENSBI_CUSTOM_MAKEOPTS))
OPENSBI_PLAT= $(call qstrip,$(BR2_TARGET_OPENSBI_PLAT)) ifneq ($(OPENSBI_PLAT),)Signature · 1 line
2.35.1Quoted 4 lines
Quoted 4 lines
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni via buildroot
AppliedQuoted 5 lines · On Wed, 27 Apr 2022 15:14:00 +0200 Noah Huetter <[email protected]> wrote:
Signed-off-by Noah Huetter <[email protected]>--- boot/opensbi/Config.in | 6 ++++++ boot/opensbi/opensbi.mk | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-)
Applied to master after changing the name toBR2_TARGET_OPENSBI_ADDITIONAL_VARIABLES.
Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot