Skip to contentSkip to conversation

configs/qemu_aarch64_sbsa_defconfig: use ARM cortex a57

PATCH Applied Romain Naour 4 participants 10 messages Nov 7, 2021 – Nov 9, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 configs/qemu_aarch64_sbsa_defconfig: use ARM cortex a57

When booting with cortex-a53, qemu refuse to start with the following message [1]:

qemu-system-aarch64: sbsa-ref: CPU type other than the built-in cortex-a57 not supported

Use ARM cortex a57 as requested by Qemu.

[1] https://git.qemu.org/?p=qemu.git;a=commitdiff;h=64580903c2b3aee08d74d64e6248a313b246cb69

---
 board/qemu/aarch64-sbsa/readme.txt  | 2 +-
 configs/qemu_aarch64_sbsa_defconfig | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
board/qemu/aarch64-sbsa/readme.txt +1 -1
index 7935108ef1..b62947f55f 100644
@@ -17,7 +17,7 @@ Run the emulation with:
 
   qemu-system-aarch64 \
     -M sbsa-ref \
-    -cpu cortex-a53 \
+    -cpu cortex-a57 \
     -smp 4 \
     -m 1024 \
     -nographic \
configs/qemu_aarch64_sbsa_defconfig +1 -1
index 0e1c799b4d..d1e0adadd1 100644
@@ -1,6 +1,6 @@
 # Architecture
 BR2_aarch64=y
-BR2_cortex_a53=y
+BR2_cortex_a57=y
 
 # Toolchain
 BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
Signature · 6 lines
2.31.1

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

PATCH 2/2 configs/qemu_aarch64_sbsa_defconfig: add gitlab runtime testing tag

Enable the runtime testing by adding the tag in the readme.txt

---
The gitlab job needs more that 3h to build and execute the test:
https://gitlab.com/kubu93/buildroot/-/jobs/1755899154
Tested locally using the Buildroot docker image.

I'm not sure about the comment about SeaBIOS package, the test works fine with the current host-qemu (6.1.0).

---
 board/qemu/aarch64-sbsa/readme.txt  | 2 +-
 configs/qemu_aarch64_sbsa_defconfig | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
board/qemu/aarch64-sbsa/readme.txt +1 -1
index b62947f55f..cf5f66d4d6 100644
@@ -23,7 +23,7 @@ Run the emulation with:
     -nographic \
     -pflash output/images/SBSA_FLASH0.fd \
     -pflash output/images/SBSA_FLASH1.fd \
-    -hda output/images/disk.img
+    -hda output/images/disk.img # qemu_aarch64_sbsa_defconfig
 
 Note that if you want to run sbsa-ref emulation with QEMU provided by
 your distro (i.e., not host-qemu by Buildroot) then you may need to
configs/qemu_aarch64_sbsa_defconfig +2 -2
index d1e0adadd1..e7d3bd03ca 100644
@@ -16,8 +16,8 @@ BR2_TARGET_ROOTFS_EXT2_4=y
 BR2_TARGET_ROOTFS_EXT2_SIZE="128M"
 
 # Image
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/aarch64-sbsa/assemble-flash-images support/scripts/genimage.sh"
-BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/qemu/aarch64-sbsa/genimage.cfg"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh board/qemu/aarch64-sbsa/assemble-flash-images support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG) -c board/qemu/aarch64-sbsa/genimage.cfg"
 
 # Linux headers same as kernel
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y
Signature · 6 lines
2.31.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Reviewed-by Dick Olsson on v1 2/2
#2 lore raw

Re: [Buildroot] [PATCH 2/2] configs/qemu_aarch64_sbsa_defconfig: add gitlab runtime testing tag

Hi Romain,

Quoted 6 lines · Romain Naour

Enable the runtime testing by adding the tag in the readme.txt

Quoted 7 lines

---
The gitlab job needs more that 3h to build and execute the test:
https://gitlab.com/kubu93/buildroot/-/jobs/1755899154
Tested locally using the Buildroot docker image.

I'm not sure about the comment about SeaBIOS package, the test works fine with the current host-qemu (6.1.0).

Right, host-qemu works great! My CI setup has to rely on qemu packed by Debian, however. And if I recall correctly I ran into some display or VGA related issues with qemu from Debian for the sbsa machine. It was resolved by installing seabios because it adds some drivers to qemu.

It's probably a good idea to leave the comment there for others who might run into the same issue.

Quoted 31 lines

---
board/qemu/aarch64-sbsa/readme.txt | 2 +-
configs/qemu_aarch64_sbsa_defconfig | 4 ++--

2 files changed, 3 insertions(+), 3 deletions(-)
board/qemu/aarch64-sbsa/readme.txt +1 -1
index b62947f55f..cf5f66d4d6 100644
@@ -23,7 +23,7 @@ Run the emulation with:
    -nographic \
    -pflash output/images/SBSA_FLASH0.fd \
    -pflash output/images/SBSA_FLASH1.fd \
-    -hda output/images/disk.img
+    -hda output/images/disk.img # qemu_aarch64_sbsa_defconfig
 

Note that if you want to run sbsa-ref emulation with QEMU provided by your distro (i.e., not host-qemu by Buildroot) then you may need to

configs/qemu_aarch64_sbsa_defconfig +0 -0
index d1e0adadd1..e7d3bd03ca 100644
@@ -16,8 +16,8 @@ BR2_TARGET_ROOTFS_EXT2_4=y

BR2_TARGET_ROOTFS_EXT2_SIZE="128M"

# Image

configs/qemu_aarch64_sbsa_defconfig +2 -2
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/aarch64-sbsa/assemble-flash-images support/scripts/genimage.sh"
-BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/qemu/aarch64-sbsa/genimage.cfg"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh board/qemu/aarch64-sbsa/assemble-flash-images support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG) -c board/qemu/aarch64-sbsa/genimage.cfg"
Quoted 4 lines

# Linux headers same as kernel
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y

Signature · 1 line
2.31.1

Looks good!

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

#3 lore raw

Re: [Buildroot] [PATCH 2/2] configs/qemu_aarch64_sbsa_defconfig: add gitlab runtime testing tag

Hi Dick,

Le 07/11/2021 à 22:31, D. Olsson a écrit :

Quoted 13 lines

Hi Romain,

Quoted 11 lines · Romain Naour

Enable the runtime testing by adding the tag in the readme.txt

---
The gitlab job needs more that 3h to build and execute the test:
https://gitlab.com/kubu93/buildroot/-/jobs/1755899154
Tested locally using the Buildroot docker image.

Quoted 4 lines
Quoted 2 lines

I'm not sure about the comment about SeaBIOS package, the test works fine with the current host-qemu (6.1.0).

Right, host-qemu works great! My CI setup has to rely on qemu packed by Debian, however. And if I recall correctly I ran into some display or VGA related issues with qemu from Debian for the sbsa machine. It was resolved by installing seabios because it adds some drivers to qemu.

Indeed, the host-qemu is missing some important features (like the graphic support) because it would require to enable host variant for some packages (like sdl2).

Quoted 2 lines

It's probably a good idea to leave the comment there for others who might run into the same issue.

Ok to leave the comment as is.

Thanks for the review!

Best regards,
Romain

Quoted 32 lines
Quoted 32 lines

---
board/qemu/aarch64-sbsa/readme.txt | 2 +-
configs/qemu_aarch64_sbsa_defconfig | 4 ++--

2 files changed, 3 insertions(+), 3 deletions(-)
board/qemu/aarch64-sbsa/readme.txt +1 -1
index b62947f55f..cf5f66d4d6 100644
@@ -23,7 +23,7 @@ Run the emulation with:
    -nographic \
    -pflash output/images/SBSA_FLASH0.fd \
    -pflash output/images/SBSA_FLASH1.fd \
-    -hda output/images/disk.img
+    -hda output/images/disk.img # qemu_aarch64_sbsa_defconfig
 

Note that if you want to run sbsa-ref emulation with QEMU provided by your distro (i.e., not host-qemu by Buildroot) then you may need to

configs/qemu_aarch64_sbsa_defconfig +0 -0
index d1e0adadd1..e7d3bd03ca 100644
@@ -16,8 +16,8 @@ BR2_TARGET_ROOTFS_EXT2_4=y

BR2_TARGET_ROOTFS_EXT2_SIZE="128M"

# Image

configs/qemu_aarch64_sbsa_defconfig +2 -2
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/aarch64-sbsa/assemble-flash-images support/scripts/genimage.sh"
-BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/qemu/aarch64-sbsa/genimage.cfg"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh board/qemu/aarch64-sbsa/assemble-flash-images support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG) -c board/qemu/aarch64-sbsa/genimage.cfg"
Quoted 9 lines
Quoted 4 lines

# Linux headers same as kernel
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y

Signature · 1 line
2.31.1

Looks good!

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

#4 lore raw

Re: [Buildroot] [PATCH 2/2] configs/qemu_aarch64_sbsa_defconfig: add gitlab runtime testing tag

In reply to Romain Naour

Romain, All,

On 2021-11-07 20:29 +0100, Romain Naour spake thusly:

Quoted 4 lines

Enable the runtime testing by adding the tag in the readme.txt

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 47 lines

---
The gitlab job needs more that 3h to build and execute the test:
https://gitlab.com/kubu93/buildroot/-/jobs/1755899154
Tested locally using the Buildroot docker image.

I'm not sure about the comment about SeaBIOS package, the test works fine with the current host-qemu (6.1.0).

---
 board/qemu/aarch64-sbsa/readme.txt  | 2 +-
 configs/qemu_aarch64_sbsa_defconfig | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
board/qemu/aarch64-sbsa/readme.txt +1 -1
index b62947f55f..cf5f66d4d6 100644
@@ -23,7 +23,7 @@ Run the emulation with:
     -nographic \
     -pflash output/images/SBSA_FLASH0.fd \
     -pflash output/images/SBSA_FLASH1.fd \
-    -hda output/images/disk.img
+    -hda output/images/disk.img # qemu_aarch64_sbsa_defconfig
 
 Note that if you want to run sbsa-ref emulation with QEMU provided by
 your distro (i.e., not host-qemu by Buildroot) then you may need to
configs/qemu_aarch64_sbsa_defconfig +2 -2
index d1e0adadd1..e7d3bd03ca 100644
@@ -16,8 +16,8 @@ BR2_TARGET_ROOTFS_EXT2_4=y
 BR2_TARGET_ROOTFS_EXT2_SIZE="128M"
 
 # Image
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/aarch64-sbsa/assemble-flash-images support/scripts/genimage.sh"
-BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/qemu/aarch64-sbsa/genimage.cfg"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh board/qemu/aarch64-sbsa/assemble-flash-images support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG) -c board/qemu/aarch64-sbsa/genimage.cfg"
 
 # Linux headers same as kernel
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y
Signature · 6 lines
2.31.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#5 lore raw

Re: [Buildroot] [PATCH 2/2] configs/qemu_aarch64_sbsa_defconfig: add gitlab runtime testing tag

In reply to Romain Naour
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Romain" == Romain Naour <[email protected]> writes:

Enable the runtime testing by adding the tag in the readme.txt

Quoted 7 lines

---
The gitlab job needs more that 3h to build and execute the test:
https://gitlab.com/kubu93/buildroot/-/jobs/1755899154
Tested locally using the Buildroot docker image.

I'm not sure about the comment about SeaBIOS package, the test works fine with the current host-qemu (6.1.0).

Committed to 2021.08.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Reviewed-by Dick Olsson on v1 1/2
#6 lore raw
In reply to Romain Naour

Hi Romain,

Resending my review because I didn't reply to all :)

Quoted 5 lines · Romain Naour

When booting with cortex-a53, qemu refuse to start with the following message [1]:

qemu-system-aarch64: sbsa-ref: CPU type other than the built-in cortex-a57 not supported

Thanks for catching this! Looks like removal of a53 support is a fairly recent change in QEMU: https://github.com/qemu/qemu/commit/4f335a6381f83beb5d6ac0d3993514379454a99d#diff-8efb73c3e0dd9d7a13b0597a056b4cd8fa9d9250c7de8b1d3b538d07d98a8c50

Quoted 34 lines

Use ARM cortex a57 as requested by Qemu.

[1] https://git.qemu.org/?p=qemu.git;a=commitdiff;h=64580903c2b3aee08d74d64e6248a313b246cb69

---
board/qemu/aarch64-sbsa/readme.txt | 2 +- configs/qemu_aarch64_sbsa_defconfig | 2 +-

2 files changed, 2 insertions(+), 2 deletions(-)
board/qemu/aarch64-sbsa/readme.txt +1 -1
index 7935108ef1..b62947f55f 100644
@@ -17,7 +17,7 @@ Run the emulation with:
 
  qemu-system-aarch64 \
    -M sbsa-ref \
-    -cpu cortex-a53 \
+    -cpu cortex-a57 \
    -smp 4 \
    -m 1024 \
    -nographic \
configs/qemu_aarch64_sbsa_defconfig +0 -0
index 0e1c799b4d..d1e0adadd1 100644
@@ -1,6 +1,6 @@
 # Architecture

BR2_aarch64=y

configs/qemu_aarch64_sbsa_defconfig +1 -1
-BR2_cortex_a53=y
+BR2_cortex_a57=y
Quoted 4 lines

# Toolchain
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y

Signature · 1 line
2.31.1

Looks good!

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

#7 lore raw

Hi Dick,

Le 07/11/2021 à 22:25, D. Olsson a écrit :

Quoted 9 lines

Hi Romain,

Resending my review because I didn't reply to all :)

Quoted 5 lines · Romain Naour

When booting with cortex-a53, qemu refuse to start with the following message [1]:

Quoted 7 lines
Quoted 2 lines

 qemu-system-aarch64: sbsa-ref: CPU type other than the built-in cortex-a57 not supported

Thanks for catching this! Looks like removal of a53 support is a fairly recent
change in
QEMU: https://github.com/qemu/qemu/commit/4f335a6381f83beb5d6ac0d3993514379454a99d#diff-8efb73c3e0dd9d7a13b0597a056b4cd8fa9d9250c7de8b1d3b538d07d98a8c50
<https://github.com/qemu/qemu/commit/4f335a6381f83beb5d6ac0d3993514379454a99d#diff-8efb73c3e0dd9d7a13b0597a056b4cd8fa9d9250c7de8b1d3b538d07d98a8c50>

Thanks for the link! Indeed the a53 support has been removed since qemu 6.0.

I was surprised by having this issue, It's a good reason to enable the gitlab runtime testing in the following patch.

Best regards,
Romain

Quoted 38 lines
Quoted 38 lines

Use ARM cortex a57 as requested by Qemu.

[1]
https://git.qemu.org/?p=qemu.git;a=commitdiff;h=64580903c2b3aee08d74d64e6248a313b246cb69

---
board/qemu/aarch64-sbsa/readme.txt  | 2 +- configs/qemu_aarch64_sbsa_defconfig | 2 +-

2 files changed, 2 insertions(+), 2 deletions(-)
board/qemu/aarch64-sbsa/readme.txt +1 -1
index 7935108ef1..b62947f55f 100644
@@ -17,7 +17,7 @@ Run the emulation with:
 
   qemu-system-aarch64 \
     -M sbsa-ref \
-    -cpu cortex-a53 \
+    -cpu cortex-a57 \
     -smp 4 \
     -m 1024 \
     -nographic \
configs/qemu_aarch64_sbsa_defconfig +0 -0
index 0e1c799b4d..d1e0adadd1 100644
@@ -1,6 +1,6 @@
 # Architecture

BR2_aarch64=y

configs/qemu_aarch64_sbsa_defconfig +1 -1
-BR2_cortex_a53=y
+BR2_cortex_a57=y
Quoted 9 lines
Quoted 4 lines

# Toolchain
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y

Signature · 1 line
2.31.1

Looks good!

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

#8 lore raw

Romain, Dick, All,

On 2021-11-07 23:12 +0100, Romain Naour spake thusly:

Quoted 13 lines

Le 07/11/2021 à 22:25, D. Olsson a écrit :

Quoted 12 lines

Hi Romain,

Resending my review because I didn't reply to all :)

Quoted 7 lines · Romain Naour

When booting with cortex-a53, qemu refuse to start with the following message [1]:

 qemu-system-aarch64: sbsa-ref: CPU type other than the built-in cortex-a57 not supported

Quoted 6 lines
Quoted 4 lines

Thanks for catching this! Looks like removal of a53 support is a fairly recent
change in
QEMU: https://github.com/qemu/qemu/commit/4f335a6381f83beb5d6ac0d3993514379454a99d#diff-8efb73c3e0dd9d7a13b0597a056b4cd8fa9d9250c7de8b1d3b538d07d98a8c50
<https://github.com/qemu/qemu/commit/4f335a6381f83beb5d6ac0d3993514379454a99d#diff-8efb73c3e0dd9d7a13b0597a056b4cd8fa9d9250c7de8b1d3b538d07d98a8c50>

Thanks for the link! Indeed the a53 support has been removed since qemu 6.0.

Cortex-a53 has not been removed from qemu. It's just that it no longer is a valid CPU for the sbsa-ref machine.

I've ammended the commit log with the info provided by Dick, and applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 59 lines

I was surprised by having this issue, It's a good reason to enable the gitlab runtime testing in the following patch.

Best regards,
Romain

Quoted 38 lines
Quoted 38 lines

Use ARM cortex a57 as requested by Qemu.

[1]
https://git.qemu.org/?p=qemu.git;a=commitdiff;h=64580903c2b3aee08d74d64e6248a313b246cb69

---
board/qemu/aarch64-sbsa/readme.txt  | 2 +- configs/qemu_aarch64_sbsa_defconfig | 2 +-

2 files changed, 2 insertions(+), 2 deletions(-)
board/qemu/aarch64-sbsa/readme.txt +1 -1
index 7935108ef1..b62947f55f 100644
@@ -17,7 +17,7 @@ Run the emulation with:
 
   qemu-system-aarch64 \
     -M sbsa-ref \
-    -cpu cortex-a53 \
+    -cpu cortex-a57 \
     -smp 4 \
     -m 1024 \
     -nographic \
configs/qemu_aarch64_sbsa_defconfig +0 -0
index 0e1c799b4d..d1e0adadd1 100644
@@ -1,6 +1,6 @@
 # Architecture

BR2_aarch64=y

configs/qemu_aarch64_sbsa_defconfig +1 -1
-BR2_cortex_a53=y
+BR2_cortex_a57=y
Quoted 9 lines
Quoted 4 lines

# Toolchain
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y

Signature · 1 line
2.31.1

Looks good!

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

Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#9 lore raw
In reply to Romain Naour
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Romain" == Romain Naour <[email protected]> writes:

When booting with cortex-a53, qemu refuse to start with the following message [1]:
qemu-system-aarch64: sbsa-ref: CPU type other than the built-in cortex-a57 not supported

Use ARM cortex a57 as requested by Qemu.

[1] https://git.qemu.org/?p=qemu.git;a=commitdiff;h=64580903c2b3aee08d74d64e6248a313b246cb69

Committed to 2021.08.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot