* [PATCH v2 1/2] Kbuild: include arch/ Makefile before test/ directory
@ 2023-06-29 6:53 Ahmad Fatoum
2023-06-29 6:53 ` [PATCH v2 2/2] ci: pytest: have CI build and test ARCH=openrisc Ahmad Fatoum
2023-06-30 11:53 ` [PATCH v2 1/2] Kbuild: include arch/ Makefile before test/ directory Sascha Hauer
0 siblings, 2 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2023-06-29 6:53 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
Unless overridden by SORT*, LD will place sections matched by wildcards
in the order they were seen in the link. So far, this meant that
arch/ initcalls and device trees compiled into barebox proper, were
always last.
For platforms with PBL or with only one device tree in barebox proper,
this didn't matter much, but when enabling the of_manipulation selftest,
a second device tree would be built into barebox on kvx, openrisc and
some MIPS.
Because all directories appear before arch/, this had the effect that
on kvx, openrisc and some MIPS, __dtb_start would end up pointing at the
test's device tree instead of the board device tree breaking the build.
Switching the affected platforms to use PBL would be one fix for the
issue, but there's a simple one: let's just move test/ after arch/.
My preferred solution would've been to move arch/ at the first
beginning, but this may cause fallout for code that depended on specific
ordering of initcalls or other linker-defined lists.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
v1 -> v2:
- move only test/ after arch/ to reduce chance of breakage
---
Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 1d986ec9cb13..d6e65974458e 100644
--- a/Makefile
+++ b/Makefile
@@ -594,10 +594,12 @@ endif
include $(srctree)/scripts/Makefile.lib
# Objects we will link into barebox / subdirs we need to visit
-common-y := common/ drivers/ commands/ lib/ crypto/ net/ fs/ firmware/ test/
+common-y := common/ drivers/ commands/ lib/ crypto/ net/ fs/ firmware/
include $(srctree)/arch/$(SRCARCH)/Makefile
+common-y += test/
+
ifdef need-config
ifdef may-sync-config
# Read in dependencies to all Kconfig* files, make sure to run syncconfig if
--
2.39.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2 2/2] ci: pytest: have CI build and test ARCH=openrisc
2023-06-29 6:53 [PATCH v2 1/2] Kbuild: include arch/ Makefile before test/ directory Ahmad Fatoum
@ 2023-06-29 6:53 ` Ahmad Fatoum
2023-06-30 11:53 ` [PATCH v2 1/2] Kbuild: include arch/ Makefile before test/ directory Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2023-06-29 6:53 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
We already build test for OpenRISC and with latest fix, we can run
the testsuite against it in emulation, so add it to pytest CI as well.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
Tested working with QEMU 5.2.0 which we have in barebox-ci container.
QEMU 8.0.0 as shipped by NixOS doesn't work.
v1 -> v2:
- new patch
---
.github/workflows/test-labgrid-pytest.yml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/.github/workflows/test-labgrid-pytest.yml b/.github/workflows/test-labgrid-pytest.yml
index 0f34f43e8dff..514122ebf886 100644
--- a/.github/workflows/test-labgrid-pytest.yml
+++ b/.github/workflows/test-labgrid-pytest.yml
@@ -31,6 +31,10 @@ jobs:
lgenv: test/mips/qemu-malta64el_defconfig.yaml
defconfig: qemu-malta64el_defconfig
+ - ARCH: openrisc
+ lgenv: test/openrisc/generic_defconfig.yaml
+ defconfig: generic_defconfig
+
- ARCH: x86
lgenv: test/x86/efi_defconfig.yaml
defconfig: efi_defconfig
--
2.39.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 1/2] Kbuild: include arch/ Makefile before test/ directory
2023-06-29 6:53 [PATCH v2 1/2] Kbuild: include arch/ Makefile before test/ directory Ahmad Fatoum
2023-06-29 6:53 ` [PATCH v2 2/2] ci: pytest: have CI build and test ARCH=openrisc Ahmad Fatoum
@ 2023-06-30 11:53 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2023-06-30 11:53 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox
On Thu, Jun 29, 2023 at 08:53:55AM +0200, Ahmad Fatoum wrote:
> Unless overridden by SORT*, LD will place sections matched by wildcards
> in the order they were seen in the link. So far, this meant that
> arch/ initcalls and device trees compiled into barebox proper, were
> always last.
>
> For platforms with PBL or with only one device tree in barebox proper,
> this didn't matter much, but when enabling the of_manipulation selftest,
> a second device tree would be built into barebox on kvx, openrisc and
> some MIPS.
>
> Because all directories appear before arch/, this had the effect that
> on kvx, openrisc and some MIPS, __dtb_start would end up pointing at the
> test's device tree instead of the board device tree breaking the build.
>
> Switching the affected platforms to use PBL would be one fix for the
> issue, but there's a simple one: let's just move test/ after arch/.
>
> My preferred solution would've been to move arch/ at the first
> beginning, but this may cause fallout for code that depended on specific
> ordering of initcalls or other linker-defined lists.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> v1 -> v2:
> - move only test/ after arch/ to reduce chance of breakage
> ---
> Makefile | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
Applied, thanks
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-30 11:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-29 6:53 [PATCH v2 1/2] Kbuild: include arch/ Makefile before test/ directory Ahmad Fatoum
2023-06-29 6:53 ` [PATCH v2 2/2] ci: pytest: have CI build and test ARCH=openrisc Ahmad Fatoum
2023-06-30 11:53 ` [PATCH v2 1/2] Kbuild: include arch/ Makefile before test/ directory Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox