Skip to contentSkip to conversation

boot/edk2: bump to version edk2-stable202305

PATCH In review Julien Olivain 5 participants 11 messages May 30, 2023 – Jul 21, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 boot/edk2: bump to version edk2-stable202305

For change log since version edk2-stable202208, see:
- https://github.com/tianocore/edk2/releases/tag/edk2-stable202211
- https://github.com/tianocore/edk2/releases/tag/edk2-stable202302
- https://github.com/tianocore/edk2/releases/tag/edk2-stable202305

The main motivation of this bump is the RISC-V QEMU Virt support introduced in edk2-stable202302 (not yet supported in Buildroot).

Cc Dick Olsson <[email protected]>
Cc Vincent Stehlé <[email protected]>

---
Patch series tested on branch master at commit c765ac9 with commands:

    utils/docker-run make check-package
    ...
    0 warnings generated

    support/testing/run-tests \
        -d dl -o output_folder \
        tests.boot.test_edk2
    ...
    OK

    make qemu_aarch64_sbsa_defconfig
    make
    ...
    output/images/start-qemu.sh
    ...
    buildroot login:
---
 boot/edk2/edk2.hash | 2 +-
 boot/edk2/edk2.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
boot/edk2/edk2.hash +1 -1
index 94ee22ddc4..34d4b10e29 100644
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  c10520f269557d566e35fe8104141aa2865f9085ad2b3a30aae8a7e78a3ca5aa  edk2-edk2-stable202208-br1.tar.gz
+sha256  ca55351913e6258ebd8c08106f369ac71073d9cfaa80427fc5f131b06d808940  edk2-edk2-stable202305-br1.tar.gz
 sha256  50ce20c9cfdb0e19ee34fe0a51fc0afe961f743697b068359ab2f862b494df80  License.txt
boot/edk2/edk2.mk +1 -1
index fb6b9a3280..399bd346ef 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-EDK2_VERSION = edk2-stable202208
+EDK2_VERSION = edk2-stable202305
 EDK2_SITE = https://github.com/tianocore/edk2
 EDK2_SITE_METHOD = git
 EDK2_LICENSE = BSD-2-Clause-Patent
Signature · 6 lines
2.40.1

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

PATCH 2/3 package/edk2-platforms: bump in sync with edk2-stable202305

Bump the edk2-platforms commit to the one corresponding to version edk2-stable202305 of edk2, based on the timestamps.

Cc Dick Olsson <[email protected]>
Cc Vincent Stehlé <[email protected]>
---
 package/edk2-platforms/edk2-platforms.hash | 2 +-
 package/edk2-platforms/edk2-platforms.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
package/edk2-platforms/edk2-platforms.hash +1 -1
index 405a09241c..ae88b672a6 100644
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  1ed3f369a2743cc5a5fa4804d0af154e37b578f4e68c2e7f69734701a9b874db  edk2-platforms-3c3b1168017073c2bb2d97336c5929ebae805be1.tar.gz
+sha256  31257160ac51a4a5f63db92d26482d6a005286ed040dafe89d01f0ee906b111e  edk2-platforms-b71f2bda9e4fc183068eef5d1d90a631181a2506.tar.gz
 sha256  50ce20c9cfdb0e19ee34fe0a51fc0afe961f743697b068359ab2f862b494df80  License.txt
package/edk2-platforms/edk2-platforms.mk +1 -1
index 20a058baff..9e8ff94156 100644
@@ -5,7 +5,7 @@
 ################################################################################
 
 # Keep in sync with latest commit as of the release date for boot/edk2
-EDK2_PLATFORMS_VERSION = 3c3b1168017073c2bb2d97336c5929ebae805be1
+EDK2_PLATFORMS_VERSION = b71f2bda9e4fc183068eef5d1d90a631181a2506
 EDK2_PLATFORMS_SITE = $(call github,tianocore,edk2-platforms,$(EDK2_PLATFORMS_VERSION))
 EDK2_PLATFORMS_LICENSE = BSD-2-Clause-Patent
 EDK2_PLATFORMS_LICENSE_FILES = License.txt
Signature · 6 lines
2.40.1

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

PATCH 3/3 package/edk2-non-osi: bump in sync with edk2-stable202305

In reply to Julien Olivain

Bump the edk2-non-osi commit to the one corresponding to version edk2-stable202305 of edk2, based on the timestamps.

Cc Dick Olsson <[email protected]>
Cc Vincent Stehlé <[email protected]>
---
 package/edk2-non-osi/edk2-non-osi.hash | 2 +-
 package/edk2-non-osi/edk2-non-osi.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
package/edk2-non-osi/edk2-non-osi.hash +1 -1
index 7941df1f2f..2593324bc1 100644
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  7d27b1e6d90a26f3585ab58a2e051da69eae1b97754d3e2d80a5372879ae2501  edk2-non-osi-61662e8596dd9a64e3372f9a3ba6622d2628607c.tar.gz
+sha256  c048101d6532d9bb4f6450095e0b50812d9a831f7e3c119db48e5caf2bf020a6  edk2-non-osi-41876073afb7c7309018223baa1a6f8108bf23f0.tar.gz
 sha256  38d73db2f9dfb32e1666d898cb9d7c1ccd78302dd9922d5fac4a9cf61fa872d9  Silicon/Marvell/Armada7k8k/DeviceTree/Armada80x0McBin.inf
package/edk2-non-osi/edk2-non-osi.mk +1 -1
index 0abb3770c7..1103772768 100644
@@ -5,7 +5,7 @@
 ################################################################################
 
 # Keep in sync with latest commit as of the release date for boot/edk2
-EDK2_NON_OSI_VERSION = 61662e8596dd9a64e3372f9a3ba6622d2628607c
+EDK2_NON_OSI_VERSION = 41876073afb7c7309018223baa1a6f8108bf23f0
 EDK2_NON_OSI_SITE = $(call github,tianocore,edk2-non-osi,$(EDK2_NON_OSI_VERSION))
 EDK2_NON_OSI_INSTALL_TARGET = NO
 EDK2_NON_OSI_INSTALL_STAGING = YES
Signature · 6 lines
2.40.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Tested-by on v1 1/3
#3 lore raw
In reply to Julien Olivain
Quoted 14 lines · Julien Olivain

For change log since version edk2-stable202208, see:
- https://github.com/tianocore/edk2/releases/tag/edk2-stable202211
- https://github.com/tianocore/edk2/releases/tag/edk2-stable202302
- https://github.com/tianocore/edk2/releases/tag/edk2-stable202305

The main motivation of this bump is the RISC-V QEMU Virt support introduced in edk2-stable202302 (not yet supported in Buildroot).

Cc Dick Olsson <[email protected]>
Cc Vincent Stehlé <[email protected]>

---
Patch series tested on branch master at commit c765ac9 with commands:

Quoted 16 lines
    utils/docker-run make check-package
    ...
    0 warnings generated

    support/testing/run-tests \
        -d dl -o output_folder \
        tests.boot.test_edk2
    ...
    OK

    make qemu_aarch64_sbsa_defconfig
    make
    ...
    output/images/start-qemu.sh
    ...
    buildroot login:

Hi Julien,

Thanks for those patches!

I did test the following on my side without issue:

qemu_aarch64_sbsa_defconfig
tests.boot.test_edk2.TestEdk2
tests.boot.test_grub.TestGrubAArch64EFI
tests.boot.test_grub.TestGrubX8664EFI
tests.boot.test_grub.TestGrubi386EFI
tests.fs.test_iso9660.TestIso9660Grub2EFI
tests.fs.test_iso9660.TestIso9660Grub2Hybrid

Feel free to add (or not):

Best regards,
Vincent.

Quoted 30 lines
---
 boot/edk2/edk2.hash | 2 +-
 boot/edk2/edk2.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
boot/edk2/edk2.hash +1 -1
index 94ee22ddc4..34d4b10e29 100644
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  c10520f269557d566e35fe8104141aa2865f9085ad2b3a30aae8a7e78a3ca5aa  edk2-edk2-stable202208-br1.tar.gz
+sha256  ca55351913e6258ebd8c08106f369ac71073d9cfaa80427fc5f131b06d808940  edk2-edk2-stable202305-br1.tar.gz
 sha256  50ce20c9cfdb0e19ee34fe0a51fc0afe961f743697b068359ab2f862b494df80  License.txt
boot/edk2/edk2.mk +1 -1
index fb6b9a3280..399bd346ef 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-EDK2_VERSION = edk2-stable202208
+EDK2_VERSION = edk2-stable202305
 EDK2_SITE = https://github.com/tianocore/edk2
 EDK2_SITE_METHOD = git
 EDK2_LICENSE = BSD-2-Clause-Patent
Signature · 1 line
2.40.1

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

#4 lore raw

Hello Julien, Vincent, All,

Le 01/06/2023 à 15:25, Vincent Stehlé a écrit :

Quoted 38 lines · Julien Olivain
Quoted 14 lines

For change log since version edk2-stable202208, see:
- https://github.com/tianocore/edk2/releases/tag/edk2-stable202211
- https://github.com/tianocore/edk2/releases/tag/edk2-stable202302
- https://github.com/tianocore/edk2/releases/tag/edk2-stable202305

The main motivation of this bump is the RISC-V QEMU Virt support introduced in edk2-stable202302 (not yet supported in Buildroot).

Cc Dick Olsson <[email protected]>
Cc Vincent Stehlé <[email protected]>

---
Patch series tested on branch master at commit c765ac9 with commands:

Quoted 16 lines
    utils/docker-run make check-package
    ...
    0 warnings generated

    support/testing/run-tests \
        -d dl -o output_folder \
        tests.boot.test_edk2
    ...
    OK

    make qemu_aarch64_sbsa_defconfig
    make
    ...
    output/images/start-qemu.sh
    ...
    buildroot login:

Hi Julien,

Thanks for those patches!

I did test the following on my side without issue:

Quoted 7 lines

qemu_aarch64_sbsa_defconfig
tests.boot.test_edk2.TestEdk2
tests.boot.test_grub.TestGrubAArch64EFI
tests.boot.test_grub.TestGrubX8664EFI
tests.boot.test_grub.TestGrubi386EFI
tests.fs.test_iso9660.TestIso9660Grub2EFI
tests.fs.test_iso9660.TestIso9660Grub2Hybrid

Thanks for testing but some test in gitlab-ci doesn't boot since this patch has been applied:

https://gitlab.com/buildroot.org/buildroot/-/jobs/4664845865
https://gitlab.com/buildroot.org/buildroot/-/jobs/4664845861
https://gitlab.com/buildroot.org/buildroot/-/jobs/4664845777
https://gitlab.com/buildroot.org/buildroot/-/jobs/4664845773

"SystemError: System does not boot"

I reproduced locally with "tests.boot.test_grub.TestGrubX8664EFI" then I reverted this commit to boot correctly.

There is no useful log, the image just hang.

Can you have a look?

Best regards,
Romain

Quoted 33 lines

Feel free to add (or not):

Best regards,
Vincent.

Quoted 22 lines
---
 boot/edk2/edk2.hash | 2 +-
 boot/edk2/edk2.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
boot/edk2/edk2.hash +1 -1
index 94ee22ddc4..34d4b10e29 100644
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  c10520f269557d566e35fe8104141aa2865f9085ad2b3a30aae8a7e78a3ca5aa  edk2-edk2-stable202208-br1.tar.gz
+sha256  ca55351913e6258ebd8c08106f369ac71073d9cfaa80427fc5f131b06d808940  edk2-edk2-stable202305-br1.tar.gz
 sha256  50ce20c9cfdb0e19ee34fe0a51fc0afe961f743697b068359ab2f862b494df80  License.txt
boot/edk2/edk2.mk +0 -0
index fb6b9a3280..399bd346ef 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
Quoted 12 lines
Quoted 8 lines
boot/edk2/edk2.mk +1 -1
-EDK2_VERSION = edk2-stable202208
+EDK2_VERSION = edk2-stable202305
 EDK2_SITE = https://github.com/tianocore/edk2
 EDK2_SITE_METHOD = git
 EDK2_LICENSE = BSD-2-Clause-Patent
Signature · 1 line
2.40.1

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

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

#5 lore raw

Hello Julien, Vincent, All,

Le 18/07/2023 à 23:57, Romain Naour a écrit :

Quoted 57 lines

Hello Julien, Vincent, All,

Le 01/06/2023 à 15:25, Vincent Stehlé a écrit :

Quoted 38 lines · Julien Olivain
Quoted 14 lines

For change log since version edk2-stable202208, see:
- https://github.com/tianocore/edk2/releases/tag/edk2-stable202211
- https://github.com/tianocore/edk2/releases/tag/edk2-stable202302
- https://github.com/tianocore/edk2/releases/tag/edk2-stable202305

The main motivation of this bump is the RISC-V QEMU Virt support introduced in edk2-stable202302 (not yet supported in Buildroot).

Cc Dick Olsson <[email protected]>
Cc Vincent Stehlé <[email protected]>

---
Patch series tested on branch master at commit c765ac9 with commands:

Quoted 16 lines
    utils/docker-run make check-package
    ...
    0 warnings generated

    support/testing/run-tests \
        -d dl -o output_folder \
        tests.boot.test_edk2
    ...
    OK

    make qemu_aarch64_sbsa_defconfig
    make
    ...
    output/images/start-qemu.sh
    ...
    buildroot login:

Hi Julien,

Thanks for those patches!

I did test the following on my side without issue:

Quoted 7 lines

qemu_aarch64_sbsa_defconfig
tests.boot.test_edk2.TestEdk2
tests.boot.test_grub.TestGrubAArch64EFI
tests.boot.test_grub.TestGrubX8664EFI
tests.boot.test_grub.TestGrubi386EFI
tests.fs.test_iso9660.TestIso9660Grub2EFI
tests.fs.test_iso9660.TestIso9660Grub2Hybrid

Thanks for testing but some test in gitlab-ci doesn't boot since this patch has been applied:

https://gitlab.com/buildroot.org/buildroot/-/jobs/4664845865
https://gitlab.com/buildroot.org/buildroot/-/jobs/4664845861
https://gitlab.com/buildroot.org/buildroot/-/jobs/4664845777
https://gitlab.com/buildroot.org/buildroot/-/jobs/4664845773

Quoted 8 lines

"SystemError: System does not boot"

I reproduced locally with "tests.boot.test_grub.TestGrubX8664EFI" then I reverted this commit to boot correctly.

There is no useful log, the image just hang.

Can you have a look?

The issue come from the qemu version (5.2.x) used by our gitlab-ci docker image.

If we use the "experimental QEMU command line option" (See [1]), the system boot:

-fw_cfg name=opt/org.tianocore/X-Cpuhp-Bugcheck-Override,string=yes

If edk2 detect the issue in PlatformCpuCountBugCheck(), it print an error message (we didn't see it in our log) and *hang* if the qemu issue is present.

We have to add this workaround to each runtime test using edk2 package.

Thoughts?

[1]
https://github.com/tianocore/edk2/commit/bf5678b5802685e07583e3c7ec56d883cbdd5da3

Best regards,
Romain

Quoted 51 lines

Best regards,
Romain

Quoted 45 lines

Feel free to add (or not):

Best regards,
Vincent.

Quoted 30 lines
---
 boot/edk2/edk2.hash | 2 +-
 boot/edk2/edk2.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
boot/edk2/edk2.hash +1 -1
index 94ee22ddc4..34d4b10e29 100644
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  c10520f269557d566e35fe8104141aa2865f9085ad2b3a30aae8a7e78a3ca5aa  edk2-edk2-stable202208-br1.tar.gz
+sha256  ca55351913e6258ebd8c08106f369ac71073d9cfaa80427fc5f131b06d808940  edk2-edk2-stable202305-br1.tar.gz
 sha256  50ce20c9cfdb0e19ee34fe0a51fc0afe961f743697b068359ab2f862b494df80  License.txt
boot/edk2/edk2.mk +1 -1
index fb6b9a3280..399bd346ef 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-EDK2_VERSION = edk2-stable202208
+EDK2_VERSION = edk2-stable202305
 EDK2_SITE = https://github.com/tianocore/edk2
 EDK2_SITE_METHOD = git
 EDK2_LICENSE = BSD-2-Clause-Patent
Signature · 1 line
2.40.1

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

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

#6 lore raw

Hi Romain,

Quoted 71 lines · Romain Naour

Hello Julien, Vincent, All,

Le 18/07/2023 à 23:57, Romain Naour a écrit :

Quoted 57 lines

Hello Julien, Vincent, All,

Le 01/06/2023 à 15:25, Vincent Stehlé a écrit :

Quoted 38 lines · Julien Olivain
Quoted 14 lines

For change log since version edk2-stable202208, see:
- https://github.com/tianocore/edk2/releases/tag/edk2-stable202211
- https://github.com/tianocore/edk2/releases/tag/edk2-stable202302
- https://github.com/tianocore/edk2/releases/tag/edk2-stable202305

The main motivation of this bump is the RISC-V QEMU Virt support introduced in edk2-stable202302 (not yet supported in Buildroot).

Cc Dick Olsson <[email protected]>
Cc Vincent Stehlé <[email protected]>

---
Patch series tested on branch master at commit c765ac9 with commands:

Quoted 16 lines
    utils/docker-run make check-package
    ...
    0 warnings generated

    support/testing/run-tests \
        -d dl -o output_folder \
        tests.boot.test_edk2
    ...
    OK

    make qemu_aarch64_sbsa_defconfig
    make
    ...
    output/images/start-qemu.sh
    ...
    buildroot login:

Hi Julien,

Thanks for those patches!

I did test the following on my side without issue:

Quoted 7 lines

qemu_aarch64_sbsa_defconfig
tests.boot.test_edk2.TestEdk2
tests.boot.test_grub.TestGrubAArch64EFI
tests.boot.test_grub.TestGrubX8664EFI
tests.boot.test_grub.TestGrubi386EFI
tests.fs.test_iso9660.TestIso9660Grub2EFI
tests.fs.test_iso9660.TestIso9660Grub2Hybrid

Thanks for testing but some test in gitlab-ci doesn't boot since this patch has been applied:

https://gitlab.com/buildroot.org/buildroot/-/jobs/4664845865
https://gitlab.com/buildroot.org/buildroot/-/jobs/4664845861
https://gitlab.com/buildroot.org/buildroot/-/jobs/4664845777
https://gitlab.com/buildroot.org/buildroot/-/jobs/4664845773

Quoted 8 lines

"SystemError: System does not boot"

I reproduced locally with "tests.boot.test_grub.TestGrubX8664EFI" then I reverted this commit to boot correctly.

There is no useful log, the image just hang.

Can you have a look?

The issue come from the qemu version (5.2.x) used by our gitlab-ci docker image.

Quoted 8 lines

If we use the "experimental QEMU command line option" (See [1]), the system boot:

-fw_cfg name=opt/org.tianocore/X-Cpuhp-Bugcheck-Override,string=yes

If edk2 detect the issue in PlatformCpuCountBugCheck(), it print an error message (we didn't see it in our log) and *hang* if the qemu issue is present.

We have to add this workaround to each runtime test using edk2 package.

I confirm the workaround works for me, when adding "-fw_cfg name=opt/org.tianocore/X-Cpuhp-Bugcheck-Override,string=yes" in qemu opts.

We could indeed use it as is for now.

Quoted 1 line

Thoughts?

Having those quirks here and there in tests will make future updates of the docker image even more difficult. Ideally, we need some way to track them for later cleanups. For smooth(er) updates, it would be also good to have the test not failing before and after the update. By "not failing", I also mean it could also be skipped.

This could be done by exposing the emulator version, and reporting some test message (for ex, in support/testing/infra/emulator.py).

We could have somewhere in the test in question, or in a base class:
(untested pseudo pythoncode)

def qemu_has_cpuhp_bug(self):
v = self.emulator.get_version()
return v[0] < 7 or (v[0] = 7 and v < (7, 2, 1))

if self.qemu_has_cpuhp_bug():
self.show_msg("Warning: applying QEmu CPUHP workaround") emulator_args += "-fw_cfg ..."
elif self.running_in_br_docker_image():
self.show_msg("Info: test workaround code no longer needed")

In some other corner cases, we could just skip the test:

if qemu_has_cpuhp_bug():
msg = "Unsupported emulator version"
self.show_msg("Skipping test: " + msg)
self.skipTest(msg)

I think it would be good to keep the test suite working with the qemu version in the docker image AND the host-qemu in Buildroot (which the one used in _defconfigs, and is supposed to be near the latest released version).

What do you think?

Quoted 63 lines

[1]
https://github.com/tianocore/edk2/commit/bf5678b5802685e07583e3c7ec56d883cbdd5da3

Best regards,
Romain

Quoted 55 lines

Best regards,
Romain

Quoted 49 lines

Feel free to add (or not):

Best regards,
Vincent.

Quoted 30 lines
---
 boot/edk2/edk2.hash | 2 +-
 boot/edk2/edk2.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
boot/edk2/edk2.hash +0 -1
index 94ee22ddc4..34d4b10e29 100644
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  

c10520f269557d566e35fe8104141aa2865f9085ad2b3a30aae8a7e78a3ca5aa edk2-edk2-stable202208-br1.tar.gz +sha256
ca55351913e6258ebd8c08106f369ac71073d9cfaa80427fc5f131b06d808940 edk2-edk2-stable202305-br1.tar.gz
sha256
50ce20c9cfdb0e19ee34fe0a51fc0afe961f743697b068359ab2f862b494df80 License.txt

boot/edk2/edk2.mk +1 -1
index fb6b9a3280..399bd346ef 100644
@@ -4,7 +4,7 @@
 #
 
 ################################################################################
 
-EDK2_VERSION = edk2-stable202208
+EDK2_VERSION = edk2-stable202305
 EDK2_SITE = https://github.com/tianocore/edk2
 EDK2_SITE_METHOD = git
Quoted 4 lines

EDK2_LICENSE = BSD-2-Clause-Patent
--
2.40.1

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

Best regards,

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

#7 lore raw

Hi Julien,

Le 21/07/2023 à 22:07, Julien Olivain a écrit :

Quoted 121 lines

Hi Romain,

Quoted 71 lines · Romain Naour

Hello Julien, Vincent, All,

Le 18/07/2023 à 23:57, Romain Naour a écrit :

Quoted 57 lines

Hello Julien, Vincent, All,

Le 01/06/2023 à 15:25, Vincent Stehlé a écrit :

Quoted 38 lines · Julien Olivain
Quoted 24 lines

For change log since version edk2-stable202208, see:
- https://github.com/tianocore/edk2/releases/tag/edk2-stable202211
- https://github.com/tianocore/edk2/releases/tag/edk2-stable202302
- https://github.com/tianocore/edk2/releases/tag/edk2-stable202305

The main motivation of this bump is the RISC-V QEMU Virt support introduced in edk2-stable202302 (not yet supported in Buildroot).

Cc Dick Olsson <[email protected]>
Cc Vincent Stehlé <[email protected]>

---
Patch series tested on branch master at commit c765ac9 with commands:

    utils/docker-run make check-package
    ...
    0 warnings generated

    support/testing/run-tests \
        -d dl -o output_folder \
        tests.boot.test_edk2
    ...
    OK

Quoted 6 lines

    make qemu_aarch64_sbsa_defconfig
    make
    ...
    output/images/start-qemu.sh
    ...
    buildroot login:

Hi Julien,

Thanks for those patches!

I did test the following on my side without issue:

Quoted 7 lines

  qemu_aarch64_sbsa_defconfig
  tests.boot.test_edk2.TestEdk2
  tests.boot.test_grub.TestGrubAArch64EFI
  tests.boot.test_grub.TestGrubX8664EFI
  tests.boot.test_grub.TestGrubi386EFI
  tests.fs.test_iso9660.TestIso9660Grub2EFI
  tests.fs.test_iso9660.TestIso9660Grub2Hybrid

Thanks for testing but some test in gitlab-ci doesn't boot since this patch has been applied:

https://gitlab.com/buildroot.org/buildroot/-/jobs/4664845865
https://gitlab.com/buildroot.org/buildroot/-/jobs/4664845861
https://gitlab.com/buildroot.org/buildroot/-/jobs/4664845777
https://gitlab.com/buildroot.org/buildroot/-/jobs/4664845773

Quoted 8 lines

"SystemError: System does not boot"

I reproduced locally with "tests.boot.test_grub.TestGrubX8664EFI" then I reverted this commit to boot correctly.

There is no useful log, the image just hang.

Can you have a look?

The issue come from the qemu version (5.2.x) used by our gitlab-ci docker image.

Quoted 8 lines

If we use the "experimental QEMU command line option" (See [1]), the system boot:

  -fw_cfg name=opt/org.tianocore/X-Cpuhp-Bugcheck-Override,string=yes

If edk2 detect the issue in PlatformCpuCountBugCheck(), it print an error message (we didn't see it in our log) and *hang* if the qemu issue is present.

We have to add this workaround to each runtime test using edk2 package.

I confirm the workaround works for me, when adding "-fw_cfg name=opt/org.tianocore/X-Cpuhp-Bugcheck-Override,string=yes" in qemu opts.

We could indeed use it as is for now.

Quoted 1 line

Thoughts?

Having those quirks here and there in tests will make future updates of the docker image even more difficult. Ideally, we need some way to track them for later cleanups. For smooth(er) updates, it would be also good to have the test not failing before and after the update. By "not failing", I also mean it could also be skipped.

This could be done by exposing the emulator version, and reporting some test message (for ex, in support/testing/infra/emulator.py).

We could have somewhere in the test in question, or in a base class:
(untested pseudo pythoncode)

    def qemu_has_cpuhp_bug(self):
        v = self.emulator.get_version()
        return v[0] < 7 or (v[0] = 7 and v < (7, 2, 1))

    if self.qemu_has_cpuhp_bug():
        self.show_msg("Warning: applying QEmu CPUHP workaround") emulator_args += "-fw_cfg ..."
    elif self.running_in_br_docker_image():
        self.show_msg("Info: test workaround code no longer needed")

In some other corner cases, we could just skip the test:

    if qemu_has_cpuhp_bug():
        msg = "Unsupported emulator version"
        self.show_msg("Skipping test: " + msg)
        self.skipTest(msg)

Quoted 6 lines

I think it would be good to keep the test suite working with the qemu version in the docker image AND the host-qemu in Buildroot (which the one used in _defconfigs, and is supposed to be near the latest released version).

What do you think?

We should also take care of running run-tests under gitlab-ci. A gitlab job is failed or passed. If a test must be skipped by run-tests due to the qemu version, then the test must not be listed by run-tests -l in order to not be part of the gitlab-ci pipeline. I'm not sure if we can do that with nose2.

run-tests could (at least) print a warning when the Qemu version doesn't match the one we currently use for the gitlab-ci testing.

run-tests is not tested with host-qemu provided by Buildroot, some tests may not work as expected. We can't really support all possible Qemu versions, it may be difficult to know when we have to skip a test or apply a workaround. It may be a maintenance burden.

Best regards,
Romain

Quoted 66 lines
Quoted 65 lines

[1]
https://github.com/tianocore/edk2/commit/bf5678b5802685e07583e3c7ec56d883cbdd5da3

Best regards,
Romain

Quoted 55 lines

Best regards,
Romain

Quoted 49 lines

Feel free to add (or not):

Best regards,
Vincent.

Quoted 28 lines

---
 boot/edk2/edk2.hash | 2 +-
 boot/edk2/edk2.mk   | 2 +-

 2 files changed, 2 insertions(+), 2 deletions(-)
boot/edk2/edk2.hash +0 -1
index 94ee22ddc4..34d4b10e29 100644
@@ -1,3 +1,3 @@
  # Locally calculated
-sha256  c10520f269557d566e35fe8104141aa2865f9085ad2b3a30aae8a7e78a3ca5aa 

edk2-edk2-stable202208-br1.tar.gz
+sha256  ca55351913e6258ebd8c08106f369ac71073d9cfaa80427fc5f131b06d808940 edk2-edk2-stable202305-br1.tar.gz
 sha256  50ce20c9cfdb0e19ee34fe0a51fc0afe961f743697b068359ab2f862b494df80 License.txt

boot/edk2/edk2.mk +0 -0
index fb6b9a3280..399bd346ef 100644
@@ -4,7 +4,7 @@
  #


################################################################################

boot/edk2/edk2.mk +1 -1
-EDK2_VERSION = edk2-stable202208
+EDK2_VERSION = edk2-stable202305
Quoted 6 lines

 EDK2_SITE = https://github.com/tianocore/edk2
 EDK2_SITE_METHOD = git
 EDK2_LICENSE = BSD-2-Clause-Patent

Signature · 1 line
2.40.1

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

Quoted 7 lines

Best regards,

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

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

#8 lore raw
In reply to Romain Naour

Hi Romain, All,

Quoted 57 lines · Romain Naour

Hello Julien, Vincent, All,

Le 01/06/2023 à 15:25, Vincent Stehlé a écrit :

Quoted 38 lines · Julien Olivain
Quoted 14 lines

For change log since version edk2-stable202208, see:
- https://github.com/tianocore/edk2/releases/tag/edk2-stable202211
- https://github.com/tianocore/edk2/releases/tag/edk2-stable202302
- https://github.com/tianocore/edk2/releases/tag/edk2-stable202305

The main motivation of this bump is the RISC-V QEMU Virt support introduced in edk2-stable202302 (not yet supported in Buildroot).

Cc Dick Olsson <[email protected]>
Cc Vincent Stehlé <[email protected]>

---
Patch series tested on branch master at commit c765ac9 with commands:

Quoted 16 lines
    utils/docker-run make check-package
    ...
    0 warnings generated

    support/testing/run-tests \
        -d dl -o output_folder \
        tests.boot.test_edk2
    ...
    OK

    make qemu_aarch64_sbsa_defconfig
    make
    ...
    output/images/start-qemu.sh
    ...
    buildroot login:

Hi Julien,

Thanks for those patches!

I did test the following on my side without issue:

Quoted 7 lines

qemu_aarch64_sbsa_defconfig
tests.boot.test_edk2.TestEdk2
tests.boot.test_grub.TestGrubAArch64EFI
tests.boot.test_grub.TestGrubX8664EFI
tests.boot.test_grub.TestGrubi386EFI
tests.fs.test_iso9660.TestIso9660Grub2EFI
tests.fs.test_iso9660.TestIso9660Grub2Hybrid

Thanks for testing but some test in gitlab-ci doesn't boot since this patch has been applied:

https://gitlab.com/buildroot.org/buildroot/-/jobs/4664845865
https://gitlab.com/buildroot.org/buildroot/-/jobs/4664845861
https://gitlab.com/buildroot.org/buildroot/-/jobs/4664845777
https://gitlab.com/buildroot.org/buildroot/-/jobs/4664845773

Quoted 8 lines

"SystemError: System does not boot"

I reproduced locally with "tests.boot.test_grub.TestGrubX8664EFI" then I reverted this commit to boot correctly.

There is no useful log, the image just hang.

Can you have a look?

Before sending this patch, I initially successfully ran those tests using a qemu at v8.0.0 (2023-04-19), same as Buildroot host-qemu at that time.

I now reproduce those issues with the Buildroot docker image using utils/docker-run, which includes qemu v5.2.0 (2020-12-08).

After bisecting, I found that qemu commit:
https://gitlab.com/qemu-project/qemu/-/commit/6a3aa014c54535d0ac67516b10ea17778bbafffd
fixes those issues. It's included in QEmu v7.2.1 (2023-04-05). When using a QEmu version including this commit, the test works.

Updating support/docker/Dockerfile to use
"FROM debian:bookworm-20230703" also fixes those tests, as it includes qemu-system-x86_64 v7.2.2 (2023-04-23).

I believe edk2-stable202305 is correct and the issue is more on the qemu 5.2.0 side, included in the Buildroot Docker image.

I'm not sure if it's the right time to update the Buildroot Docker image from Debian 11 to 12. I also did not tested what other issues such an update would introduce.

So the options I see right now are:

1. disable the test until the Buildroot Docker image is updated,

2. or directly update the Docker image soon,

3. or we could eventually investigate to patch edk2 to avoid triggering this issue.

Any comments or suggestions?

Best regards,

Julien.

Quoted 54 lines

Best regards,
Romain

Quoted 49 lines

Feel free to add (or not):

Best regards,
Vincent.

Quoted 30 lines
---
 boot/edk2/edk2.hash | 2 +-
 boot/edk2/edk2.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
boot/edk2/edk2.hash +0 -1
index 94ee22ddc4..34d4b10e29 100644
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  

c10520f269557d566e35fe8104141aa2865f9085ad2b3a30aae8a7e78a3ca5aa edk2-edk2-stable202208-br1.tar.gz +sha256
ca55351913e6258ebd8c08106f369ac71073d9cfaa80427fc5f131b06d808940 edk2-edk2-stable202305-br1.tar.gz
sha256
50ce20c9cfdb0e19ee34fe0a51fc0afe961f743697b068359ab2f862b494df80 License.txt

boot/edk2/edk2.mk +1 -1
index fb6b9a3280..399bd346ef 100644
@@ -4,7 +4,7 @@
 #
 
 ################################################################################
 
-EDK2_VERSION = edk2-stable202208
+EDK2_VERSION = edk2-stable202305
 EDK2_SITE = https://github.com/tianocore/edk2
 EDK2_SITE_METHOD = git
Quoted 4 lines

EDK2_LICENSE = BSD-2-Clause-Patent
--
2.40.1

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

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

#9 lore raw

Hi Julien,

Le 20/07/2023 à 00:01, Julien Olivain a écrit :

Quoted 81 lines

Hi Romain, All,

Quoted 57 lines · Romain Naour

Hello Julien, Vincent, All,

Le 01/06/2023 à 15:25, Vincent Stehlé a écrit :

Quoted 38 lines · Julien Olivain
Quoted 24 lines

For change log since version edk2-stable202208, see:
- https://github.com/tianocore/edk2/releases/tag/edk2-stable202211
- https://github.com/tianocore/edk2/releases/tag/edk2-stable202302
- https://github.com/tianocore/edk2/releases/tag/edk2-stable202305

The main motivation of this bump is the RISC-V QEMU Virt support introduced in edk2-stable202302 (not yet supported in Buildroot).

Cc Dick Olsson <[email protected]>
Cc Vincent Stehlé <[email protected]>

---
Patch series tested on branch master at commit c765ac9 with commands:

    utils/docker-run make check-package
    ...
    0 warnings generated

    support/testing/run-tests \
        -d dl -o output_folder \
        tests.boot.test_edk2
    ...
    OK

Quoted 6 lines

    make qemu_aarch64_sbsa_defconfig
    make
    ...
    output/images/start-qemu.sh
    ...
    buildroot login:

Hi Julien,

Thanks for those patches!

I did test the following on my side without issue:

Quoted 7 lines

  qemu_aarch64_sbsa_defconfig
  tests.boot.test_edk2.TestEdk2
  tests.boot.test_grub.TestGrubAArch64EFI
  tests.boot.test_grub.TestGrubX8664EFI
  tests.boot.test_grub.TestGrubi386EFI
  tests.fs.test_iso9660.TestIso9660Grub2EFI
  tests.fs.test_iso9660.TestIso9660Grub2Hybrid

Thanks for testing but some test in gitlab-ci doesn't boot since this patch has been applied:

https://gitlab.com/buildroot.org/buildroot/-/jobs/4664845865
https://gitlab.com/buildroot.org/buildroot/-/jobs/4664845861
https://gitlab.com/buildroot.org/buildroot/-/jobs/4664845777
https://gitlab.com/buildroot.org/buildroot/-/jobs/4664845773

Quoted 8 lines

"SystemError: System does not boot"

I reproduced locally with "tests.boot.test_grub.TestGrubX8664EFI" then I reverted this commit to boot correctly.

There is no useful log, the image just hang.

Can you have a look?

Before sending this patch, I initially successfully ran those tests using a qemu at v8.0.0 (2023-04-19), same as Buildroot host-qemu at that time.

I now reproduce those issues with the Buildroot docker image using utils/docker-run, which includes qemu v5.2.0 (2020-12-08).

After bisecting, I found that qemu commit:
https://gitlab.com/qemu-project/qemu/-/commit/6a3aa014c54535d0ac67516b10ea17778bbafffd
fixes those issues. It's included in QEmu v7.2.1 (2023-04-05). When using a QEmu version including this commit, the test works.

Quoted 6 lines

Updating support/docker/Dockerfile to use
"FROM debian:bookworm-20230703" also fixes those tests, as it includes qemu-system-x86_64 v7.2.2 (2023-04-23).

I believe edk2-stable202305 is correct and the issue is more on the qemu 5.2.0 side, included in the Buildroot Docker image.

I'm agree with you, it's a qemu issue.

It reminds me a previous issue between qemu 2.8 and the Buildroot's testsuite TestUbi [1].

Quoted 4 lines

I'm not sure if it's the right time to update the Buildroot Docker image from Debian 11 to 12. I also did not tested what other issues such an update would introduce.

Updating the Buildroot Docker image and Qemu may requires some careful testing, see again [1] :)

[1]
https://git.buildroot.net/buildroot/commit/?id=d8447c38f53f98e1df4a209e9f70e54f8b60f36e

Quoted 5 lines

So the options I see right now are:

1. disable the test until the Buildroot Docker image is updated,

The problem is that the testsuite doesn't check which Qemu version is used for testing. Building host-qemu before each tests will increase the build time...

We may add a new job in the gitlab-ci to build host-qemu in a job and use it as build artefacts for each test jobs. But we will not use the same Qemu version than the one provided by our docker image (used by utils/docker-run script).

Quoted 2 lines

2. or directly update the Docker image soon,

This is the 2nd Qemu 5.2.x issue... So it may be a good motivation to update.

https://git.buildroot.net/buildroot/commit/?id=37e23e0dd7187bb27abb329f4fbb29c59c31c672

Quoted 3 lines

3. or we could eventually investigate to patch edk2 to avoid triggering this issue.

We have a workaround using "-fw_cfg name=opt/org.tianocore/X-Cpuhp-Bugcheck-Override,string=yes"

See:
http://lists.busybox.net/pipermail/buildroot/2023-July/670819.html

Quoted 2 lines

Any comments or suggestions?

Thanks for your help!

Best regards,
Romain

Quoted 60 lines

Best regards,

Julien.

Quoted 54 lines

Best regards,
Romain

Quoted 49 lines

Feel free to add (or not):

Best regards,
Vincent.

Quoted 28 lines

---
 boot/edk2/edk2.hash | 2 +-
 boot/edk2/edk2.mk   | 2 +-

 2 files changed, 2 insertions(+), 2 deletions(-)
boot/edk2/edk2.hash +0 -1
index 94ee22ddc4..34d4b10e29 100644
@@ -1,3 +1,3 @@
  # Locally calculated
-sha256  c10520f269557d566e35fe8104141aa2865f9085ad2b3a30aae8a7e78a3ca5aa 

edk2-edk2-stable202208-br1.tar.gz
+sha256  ca55351913e6258ebd8c08106f369ac71073d9cfaa80427fc5f131b06d808940 edk2-edk2-stable202305-br1.tar.gz
 sha256  50ce20c9cfdb0e19ee34fe0a51fc0afe961f743697b068359ab2f862b494df80 License.txt

boot/edk2/edk2.mk +0 -0
index fb6b9a3280..399bd346ef 100644
@@ -4,7 +4,7 @@
  #


################################################################################

boot/edk2/edk2.mk +1 -1
-EDK2_VERSION = edk2-stable202208
+EDK2_VERSION = edk2-stable202305
Quoted 6 lines

 EDK2_SITE = https://github.com/tianocore/edk2
 EDK2_SITE_METHOD = git
 EDK2_LICENSE = BSD-2-Clause-Patent

Signature · 1 line
2.40.1

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

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

#10 lore raw
In reply to Julien Olivain
Quoted 5 lines · On Tue, 30 May 2023 22:07:26 +0200 Julien Olivain <[email protected]> wrote:

For change log since version edk2-stable202208, see:
- https://github.com/tianocore/edk2/releases/tag/edk2-stable202211
- https://github.com/tianocore/edk2/releases/tag/edk2-stable202302
- https://github.com/tianocore/edk2/releases/tag/edk2-stable202305

Quoted 8 lines

The main motivation of this bump is the RISC-V QEMU Virt support introduced in edk2-stable202302 (not yet supported in Buildroot).

Cc Dick Olsson <[email protected]>
Cc Vincent Stehlé <[email protected]>

---
Patch series tested on branch master at commit c765ac9 with commands:

Series applied, 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