Skip to content

OVMF_CODE.fd is not rerproducible after "BaseTools/Source/C/VfrCompile: Fix parallel make failures" patch #12360

@bbhtt

Description

@bbhtt

OVMF_CODE.fd is showing a large binary difference with the patch in #12199 applied.

See the diffoscope report: index.txt (change to .html). Rendered. https://freedesktop-sdk.gitlab.io/-/freedesktop-sdk/-/jobs/13686744023/artifacts/result_folder/components/_private/ovmf.bst/index.html

I was using a static copy of stackcookies JSON previously to fix the same binary difference. See #11433 but after the above build fix from #12199 it seems to have regressed.

This is the build script:

variables:
  arch-args: "none"
  arch-opts: "none"
  platform: "none"
  build-dir: "none"
  shell: "none"

  build-args: >-
    -n "${JOBS}"
    --buildtarget=RELEASE
    --tagname=GCC5
    --platform='%{platform}'
    %{arch-args}
    %{opts}

  opts: >-
    -D TPM1_ENABLE
    -D TPM2_ENABLE
    -D TPM2_CONFIG_ENABLE
    -D SECURE_BOOT_ENABLE
    %{arch-opts}

  code: '%{build-dir}/FV/OVMF_CODE.fd'
  vars: '%{build-dir}/FV/OVMF_VARS.fd'

  (?):
  - target_arch == "x86_64":
      arch-args: >-
        --arch=IA32
        --arch=X64
      arch-opts: >-
        -D SMM_REQUIRE
      platform: OvmfPkg/OvmfPkgIa32X64.dsc
      build-dir: Build/Ovmf3264/RELEASE_GCC5
      shell: '%{build-dir}/X64/Shell.efi'

  - target_arch == "aarch64":
      arch-args: >-
        --arch=AARCH64
      arch-opts: ''
      platform: ArmVirtPkg/ArmVirtQemu.dsc
      build-dir: Build/ArmVirtQemu-AArch64/RELEASE_GCC5
      code: '%{build-dir}/FV/QEMU_EFI.fd'
      vars: '%{build-dir}/FV/QEMU_VARS.fd'
      shell: '%{build-dir}/AARCH64/Shell.efi'

config:
  build-commands:
  - |
    sed -i 's/\r$//' BaseTools/Source/C/VfrCompile/GNUmakefile
    patch -p1 -i pr-12199.patch

  - |
    rm -rfv "%{build-root}/%{build-dir}"
    mkdir -p "%{build-root}/%{build-dir}"
    cp -vf StackCookieValues*.json "%{build-root}/%{build-dir}"

  - |
    . ./edksetup.sh
    make -C BaseTools/Source/C -j${JOBS}
    build %{build-args}

  install-commands:
  - |
    if [ "%{target_arch}" = "aarch64" ]; then
       truncate --size=64M '%{code}' '%{vars}'
    fi

  - |
    install -Dm644 -t "%{install-root}%{datadir}/ovmf" '%{code}' '%{vars}' '%{shell}'

sources:
- kind: git_repo
  url: github:tianocore/edk2.git
  track: edk2-stable*
  ref: edk2-stable202602-0-gb7a715f7c03c45c6b4575bf88596bfd79658b8ce
- kind: git_module
  path: CryptoPkg/Library/OpensslLib/openssl
  url: github:openssl/openssl.git
  ref: aea7aaf2abb04789f5868cbabec406ea43aa84bf
- kind: git_module
  path: CryptoPkg/Library/MbedTlsLib/mbedtls
  url: github:Mbed-TLS/mbedtls.git
  ref: e185d7fd85499c8ce5ca2a54f5cf8fe7dbe3f8df
- kind: git_module
  path: SecurityPkg/DeviceSecurity/SpdmLib/libspdm
  url: github:DMTF/libspdm.git
  ref: 1be116c7b7713fa9003e1bd53b53a34758549eb9
- kind: git_module
  path: UnitTestFrameworkPkg/Library/CmockaLib/cmocka
  url: github:tianocore/edk2-cmocka.git
  ref: 1cc9cde3448cdd2e000886a26acf1caac2db7cf1
- kind: git_module
  path: MdeModulePkg/Universal/RegularExpressionDxe/oniguruma
  url: github:kkos/oniguruma.git
  ref: 4ef89209a239c1aea328cf13c05a2807e5c146d1
- kind: git_module
  path: MdeModulePkg/Library/BrotliCustomDecompressLib/brotli
  url: github:google/brotli.git
  ref: e230f474b87134e8c6c85b630084c612057f253e
- kind: git_module
  path: BaseTools/Source/C/BrotliCompress/brotli
  url: github:google/brotli.git
  ref: e230f474b87134e8c6c85b630084c612057f253e
- kind: git_module
  path: RedfishPkg/Library/JsonLib/jansson
  url: github:akheron/jansson.git
  ref: e9ebfa7e77a6bee77df44e096b100e7131044059
- kind: git_module
  path: UnitTestFrameworkPkg/Library/GoogleTestLib/googletest
  url: github:google/googletest.git
  ref: 86add13493e5c881d7e4ba77fb91c1f57752b3a4
- kind: git_module
  path: UnitTestFrameworkPkg/Library/SubhookLib/subhook
  url: github:tianocore/edk2-subhook.git
  ref: 83d4e1ebef3588fae48b69a7352cc21801cb70bc
- kind: git_module
  path: MdePkg/Library/BaseFdtLib/libfdt
  url: github:devicetree-org/pylibfdt.git
  ref: cfff805481bdea27f900c32698171286542b8d3c
- kind: git_module
  path: MdePkg/Library/MipiSysTLib/mipisyst
  url: github:MIPI-Alliance/public-mipi-sys-t.git
  ref: 370b5944c046bab043dd8b133727b2135af7747a
- kind: local
  path: files/ovmf
- kind: local
  path: patches/ovmf/pr-12199.patch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions