aspeed: Add AST2600 machine to CI
Subsystems (3)
Joel Stanley
maintainerv2 cover aspeed: Add AST2600 machine to CI
The Aspeed AST2600 is modelled in Qemu. This makes some configuration changes so it can be added to CI.
v2 changes:
The u-boot-test-hooks patches are now merged.
I reworked "ast2600: Configure u-boot-with-spl.bin target" to use the kconfig SPL_MAX_SIZE. The size is set in the previous patch as a Kconfig default.
Included in the series is also a fix to the linker script, that resolves an issue I introduced with the previous fix.
I've added the reviews from Cédric and Chia-Wei to the patches they approved in v1.
The tests have passed a CI run on Azure:
https://dev.azure.com/u-boot/u-boot/_build/results?buildId=4607
Joel Stanley (7):
config/ast2600: Enable CRC32
config/ast2600: Make position independent
config/ast2600: Disable hash hardware accel
spl: Set SPL_MAX_SIZE default for AST2600
ast2600: Configure u-boot-with-spl.bin target
aspeed/spl: Remove OVERLAY from linker script
CI: Add Aspeed AST2600
.azure-pipelines.yml | 3 +++ .gitlab-ci.yml | 6 ++++++ arch/arm/mach-aspeed/ast2600/u-boot-spl.lds | 2 +- common/spl/Kconfig | 1 + configs/evb-ast2600_defconfig | 7 ++++--- 5 files changed, 15 insertions(+), 4 deletions(-)
Signature · 1 line
2.35.1
Joel Stanley
maintainerPATCH v2 1/7 config/ast2600: Enable CRC32
Useful for testing images with the default hash type.
--- configs/evb-ast2600_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/evb-ast2600_defconfig +1 -0
@@ -40,6 +40,7 @@ CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_STACK_R=y CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x2000000 CONFIG_SPL_SEPARATE_BSS=y +CONFIG_SPL_CRC32=y CONFIG_SPL_FIT_IMAGE_TINY=y CONFIG_SPL_DM_RESET=y CONFIG_SPL_RAM_SUPPORT=y
Signature · 1 line
2.35.1
Re: [PATCH v2 1/7] config/ast2600: Enable CRC32
Quoted 5 lines · Joel Stanley
Useful for testing images with the default hash type.
Reviewed-by Chia-Wei Wang <[email protected]>Reviewed-by Cédric Le Goater <[email protected]>Signed-off-by Joel Stanley <[email protected]>
For the series, applied to u-boot/next, thanks!
Signature · 1 line
Tom
Joel Stanley
maintainerPATCH v2 2/7 config/ast2600: Make position independent
In reply to Joel StanleyAllows loading one u-boot from another. Useful for testing on hardware.
--- configs/evb-ast2600_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/evb-ast2600_defconfig +1 -0
@@ -1,5 +1,6 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y +CONFIG_POSITION_INDEPENDENT=y CONFIG_SPL_SYS_THUMB_BUILD=y CONFIG_SPL_LDSCRIPT="arch/arm/mach-aspeed/ast2600/u-boot-spl.lds" CONFIG_ARCH_ASPEED=y
Signature · 1 line
2.35.1
Joel Stanley
maintainerPATCH v2 3/7 config/ast2600: Disable hash hardware accel
In reply to Joel StanleyThe HACE driver lacks support for all the hash types, causing boot to fail with the default FIT configuration which uses CRC32.
Additionally the Qemu model or the u-boot driver is unable to correctly compute the SHA256 hash used in a FIT.
Disable HACE by default while the above issues are worked out to enable boot testing in Qemu.
--- configs/evb-ast2600_defconfig | 3 --- 1 file changed, 3 deletions(-)
configs/evb-ast2600_defconfig +0 -3
@@ -66,9 +66,6 @@ CONFIG_REGMAP=y CONFIG_SPL_OF_TRANSLATE=y CONFIG_CLK=y CONFIG_SPL_CLK=y -CONFIG_DM_HASH=y -CONFIG_HASH_ASPEED=y -CONFIG_ASPEED_ACRY=y CONFIG_ASPEED_GPIO=y CONFIG_DM_I2C=y CONFIG_MISC=y
Signature · 1 line
2.35.1
Joel Stanley
maintainerPATCH v2 4/7 spl: Set SPL_MAX_SIZE default for AST2600
In reply to Joel StanleyThe AST2600 bootrom has a max size of 64KB. This can be overridden if the system is running the SPL from SPI NOR and not using secure boot.
---
New in v2
common/spl/Kconfig | 1 + 1 file changed, 1 insertion(+)
common/spl/Kconfig +1 -0
@@ -82,6 +82,7 @@ config SPL_MAX_SIZE default 0x7fa0 if SUNXI_SRAM_ADDRESS = 0x20000 && !MACH_SUN50I_H616 default 0x7000 if RCAR_GEN3 default 0x5fa0 if SUNXI_SRAM_ADDRESS = 0x0 + default 0x10000 if ASPEED_AST2600 default 0x0 help Maximum size of the SPL image (text, data, rodata, and linker lists
Signature · 1 line
2.35.1
Joel Stanley
maintainerPATCH v2 5/7 ast2600: Configure u-boot-with-spl.bin target
In reply to Joel StanleyThe normal way of loading u-boot is as a FIT, so configure u-boot.img as the SPL playload.
The u-boot-with-spl.bin target will add padding according to CONFIG_SPL_MAX_SIZE which defaults to 64KB on the AST2600.
With this the following simple steps can be used to build and boot a system:
make u-boot-with-spl.bin
truncate -s 64M u-boot-with-spl.bin
qemu-system-arm -nographic -M ast2600-evb \
-drive file=u-boot-with-spl.bin,if=mtd,format=raw---
v2:
Removed the change to include/configs/evb_ast2600.h
configs/evb-ast2600_defconfig | 2 ++ 1 file changed, 2 insertions(+)
configs/evb-ast2600_defconfig +2 -0
@@ -21,6 +21,8 @@ CONFIG_SPL_SIZE_LIMIT=0x10000 CONFIG_SPL=y # CONFIG_ARMV7_NONSEC is not set CONFIG_SYS_LOAD_ADDR=0x83000000 +CONFIG_SPL_PAYLOAD="u-boot.img" +CONFIG_BUILD_TARGET="u-boot-with-spl.bin" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_FIT=y CONFIG_SPL_FIT_SIGNATURE=y
Signature · 1 line
2.35.1
Joel Stanley
maintainerPATCH v2 6/7 aspeed/spl: Remove OVERLAY from linker script
In reply to Joel StanleyThe generic arm linker script contains this section:
.bss __rel_dyn_start (OVERLAY) : {
...
}The (OVERLAY) syntax in the description causes the .bss section to be included in the NOR area of the image:
$ objdump -t -j .bss spl/u-boot-spl SYMBOL TABLE: 0000c61c l d .bss 00000000 .bss 0000c640 l O .bss 00000040 __value.0 0000c68c g O .bss 00000000 __bss_end 0000c61c g O .bss 00000000 __bss_start 0000c680 g O .bss 0000000c stdio_devices
This is what the custom linker script tries to avoid, as the NOR area is read-only.
Remove the OVERLAY syntax to fix the BSS location:
$ objdump -t -j .bss spl/u-boot-spl SYMBOL TABLE: 83000000 l d .bss 00000000 .bss 83000000 l O .bss 00000040 __value.0 0000c61c g O .bss 00000000 __image_copy_end 8300004c g O .bss 00000000 __bss_end 83000000 g O .bss 00000000 __bss_start 83000040 g O .bss 0000000c stdio_devices
This restores the state of the linker script before the patch that fixed the linker lists issue.
---
I missed this in testing as I also had "image: fit: Use stack allocation macro" in my tree. The image now boots without that fix (and with it).
I don't understand why __rel_dyn_start is included in the section name. I'm removing it to restore what was there before, however the image boots regardless of it's inclusion.
arch/arm/mach-aspeed/ast2600/u-boot-spl.lds | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-aspeed/ast2600/u-boot-spl.lds +1 -1
@@ -68,7 +68,7 @@ SECTIONS _image_binary_end = .; - .bss __rel_dyn_start (OVERLAY) : { + .bss : { __bss_start = .; *(.bss*) . = ALIGN(4);
Signature · 1 line
2.35.1
Joel Stanley
maintainerPATCH v2 7/7 CI: Add Aspeed AST2600
In reply to Joel StanleyThe AST2600 has a Qemu model that allows testing. Create a SPI NOR image containing the combined SPL and u-boot FIT image.
--- .azure-pipelines.yml | 3 +++ .gitlab-ci.yml | 6 ++++++ 2 files changed, 9 insertions(+)
.azure-pipelines.yml +3 -0
@@ -261,6 +261,9 @@ stages: evb_ast2500: TEST_PY_BD: "evb-ast2500" TEST_PY_ID: "--id qemu" + evb_ast2600: + TEST_PY_BD: "evb-ast2600" + TEST_PY_ID: "--id qemu" vexpress_ca9x4: TEST_PY_BD: "vexpress_ca9x4" TEST_PY_ID: "--id qemu"
.gitlab-ci.yml +6 -0
@@ -272,6 +272,12 @@ evb-ast2500 test.py: TEST_PY_ID: "--id qemu" <<: *buildman_and_testpy_dfn +evb-ast2600 test.py: + variables: + TEST_PY_BD: "evb-ast2600" + TEST_PY_ID: "--id qemu" + <<: *buildman_and_testpy_dfn + sandbox_flattree test.py: variables: TEST_PY_BD: "sandbox_flattree"
Signature · 1 line
2.35.1
Re: [PATCH v2 7/7] CI: Add Aspeed AST2600
Hi Joel,
Quoted 32 lines · Joel Stanley
The AST2600 has a Qemu model that allows testing. Create a SPI NOR image containing the combined SPL and u-boot FIT image.
Reviewed-by Chia-Wei Wang <[email protected]>Reviewed-by Cédric Le Goater <[email protected]>Signed-off-by Joel Stanley <[email protected]>--- .azure-pipelines.yml | 3 +++ .gitlab-ci.yml | 6 ++++++ 2 files changed, 9 insertions(+).azure-pipelines.yml +3
-0@@ -261,6 +261,9 @@ stages: evb_ast2500: TEST_PY_BD: "evb-ast2500" TEST_PY_ID: "--id qemu" + evb_ast2600: + TEST_PY_BD: "evb-ast2600" + TEST_PY_ID: "--id qemu" vexpress_ca9x4: TEST_PY_BD: "vexpress_ca9x4" TEST_PY_ID: "--id qemu".gitlab-ci.yml +0
-0@@ -272,6 +272,12 @@ evb-ast2500 test.py: TEST_PY_ID: "--id qemu" <<: *buildman_and_testpy_dfn
.gitlab-ci.yml evb-ast2500 test.py: · line 283
Quoted 10 lines
.gitlab-ci.yml +6
-0+evb-ast2600 test.py: + variables: + TEST_PY_BD: "evb-ast2600" + TEST_PY_ID: "--id qemu" + <<: *buildman_and_testpy_dfn + sandbox_flattree test.py: variables: TEST_PY_BD: "sandbox_flattree"
Lately I'm seeing often timeout errors while Azure CI runs this evb-ast2600 target "test.py evb_ast2600". Do you have any idea, why this might be the case? Or how to debug / test what might go wrong here?
Thanks,
Stefan