diff --git a/.azurepipelines/Platform-Build-GCC5.yml b/.azurepipelines/Platform-Build-GCC5.yml index 7c9af178dc..33c1d16c11 100644 --- a/.azurepipelines/Platform-Build-GCC5.yml +++ b/.azurepipelines/Platform-Build-GCC5.yml @@ -36,10 +36,12 @@ jobs: BuildTarget: "DEBUG" BuildExtraTag: "" BuildExtraStep: - - script: sudo apt-get install -y libssl-dev clang llvm lld device-tree-compiler + - script: | + sudo apt-get update -qq + sudo apt-get install -y libssl-dev clang llvm lld device-tree-compiler displayName: Install openssl - template: Steps/RustSetupSteps.yml@mu_devops - Run: false + Run: true RunFlags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE EMPTY_DRIVE=TRUE TEST_REGEX=*TestApp*.efi RUN_TESTS=TRUE" BuildArtifactsBinary: | **/QEMU_EFI.fd @@ -53,10 +55,12 @@ jobs: BuildTarget: "RELEASE" BuildExtraTag: "" BuildExtraStep: - - script: sudo apt-get install -y libssl-dev clang llvm lld device-tree-compiler + - script: | + sudo apt-get update -qq + sudo apt-get install -y libssl-dev clang llvm lld device-tree-compiler displayName: Install openssl - template: Steps/RustSetupSteps.yml@mu_devops - Run: false + Run: true RunFlags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE EMPTY_DRIVE=TRUE TEST_REGEX=*TestApp*.efi RUN_TESTS=TRUE" BuildArtifactsBinary: | **/QEMU_EFI.fd diff --git a/.azurepipelines/Platform-Build-Job.yml b/.azurepipelines/Platform-Build-Job.yml index 6d8ea5126e..8fcccf1cae 100644 --- a/.azurepipelines/Platform-Build-Job.yml +++ b/.azurepipelines/Platform-Build-Job.yml @@ -66,6 +66,11 @@ jobs: variables: - name: Run + ${{ if EndsWith(item.Key, 'CODE_COVERAGE') }}: + value: false + ${{ elseif or(eq(item.Value.Run, true), eq(parameters.os_type, 'Linux')) }}: + value: true + ${{ else }}: value: false ${{ if and(ne(parameters.container_image, ''), ne(item.Value.SelfHostAgent, true)) }}: @@ -168,6 +173,14 @@ jobs: itemPattern: '**/*.efi' targetPath: 'Build/${{ item.Value.BuildPackage }}/${{ item.Value.BuildTarget }}_$(tool_chain_tag)/X64/' + # Run + - task: CmdLine@2 + displayName: Run to Shell + inputs: + script: stuart_build -c ${{ item.Value.BuildFile }} TOOL_CHAIN_TAG=$(tool_chain_tag) TARGET=${{ item.Value.BuildTarget }} ${{ item.Value.BuildFlags }} ${{ item.Value.RunFlags }} --FlashOnly + condition: and(gt(variables.pkg_count, 0), succeeded()) + timeoutInMinutes: ${{ parameters.run_timeout }} + # Copy build logs to the artifact staging directory - template: Steps/CommonLogCopyAndPublish.yml@mu_devops parameters: diff --git a/.azurepipelines/Ubuntu-GCC5.yml b/.azurepipelines/Ubuntu-GCC5.yml index b278fb6fda..6dd445b8d4 100644 --- a/.azurepipelines/Ubuntu-GCC5.yml +++ b/.azurepipelines/Ubuntu-GCC5.yml @@ -28,7 +28,6 @@ extends: do_pr_eval: true container_build: true os_type: Linux - rust_build: true extra_cargo_steps: - script: pip install -r pip-requirements.txt --upgrade displayName: Install and Upgrade pip Modules diff --git a/.azurepipelines/Windows-VS.yml b/.azurepipelines/Windows-VS.yml index 8e279e1081..773c63bf1b 100644 --- a/.azurepipelines/Windows-VS.yml +++ b/.azurepipelines/Windows-VS.yml @@ -27,7 +27,6 @@ extends: do_non_ci_setup: true do_pr_eval: true os_type: Windows_NT - rust_build: true extra_cargo_steps: - script: pip install -r pip-requirements.txt --upgrade displayName: Install and Upgrade pip Modules diff --git a/.pytool/CISettings.py b/.pytool/CISettings.py index 67dc983ead..715eca1ac8 100644 --- a/.pytool/CISettings.py +++ b/.pytool/CISettings.py @@ -108,7 +108,7 @@ def SetTargets(self, list_of_requested_target): def GetActiveScopes(self): ''' return tuple containing scopes that should be active for this process ''' - scopes = ("cibuild", "edk2-build", "host-based-test", "rust-ci") + scopes = ("cibuild", "edk2-build", "host-based-test") self.ActualToolChainTag = shell_environment.GetBuildVars().GetValue("TOOL_CHAIN_TAG", "") diff --git a/Platforms/QemuSbsaPkg/PlatformBuild.py b/Platforms/QemuSbsaPkg/PlatformBuild.py index ef3db61031..627861d744 100644 --- a/Platforms/QemuSbsaPkg/PlatformBuild.py +++ b/Platforms/QemuSbsaPkg/PlatformBuild.py @@ -46,7 +46,7 @@ class CommonPlatform(): PackagesSupported = ("QemuSbsaPkg",) ArchSupported = ("AARCH64",) TargetsSupported = ("DEBUG", "RELEASE", "NOOPT") - Scopes = ('qemu', 'qemusbsa', 'edk2-build', 'cibuild', 'configdata', 'rust-ci') + Scopes = ('qemu', 'qemusbsa', 'edk2-build', 'cibuild', 'configdata') WorkspaceRoot = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) PackagesPath = ( "Platforms", @@ -98,6 +98,7 @@ def GetRequiredSubmodules(self): RequiredSubmodule("Features/DEBUGGER", True), RequiredSubmodule("Features/DFCI", True), RequiredSubmodule("Features/CONFIG", True), + RequiredSubmodule("Features/FFA", True), ] def SetArchitectures(self, list_of_requested_architectures): @@ -321,9 +322,6 @@ def SetPlatformEnvAfterTarget(self): return 0 - def PlatformPreBuild(self): - return 0 - # # Copy a file into the designated region of target FD. # @@ -433,17 +431,6 @@ def PlatformPostBuild(self): logging.error("Virtual environment not found") return -1 - outstream = StringIO() - # If we are not in a virtual environment, we can build the firmware directly. - ret = RunCmd("poetry", "env list --full-path", workingdir=self.env.GetValue("ARM_TFA_PATH"), outstream=outstream, environ=cached_enivron) - if ret != 0: - return ret - - # Grab the last line, which is the virtual environment path. - logging.info(f"Virtual environment path: {outstream.getvalue().strip().split('\n')}") - virt_path = outstream.getvalue().strip().split('\n')[-1] - virt_cmd = "source " + virt_path + "/bin/activate" - # Second, put together the command to build the firmware. cmd = "make" if self.env.GetValue("TOOL_CHAIN_TAG") == "CLANGPDB": @@ -468,13 +455,11 @@ def PlatformPostBuild(self): temp_bash = os.path.join(self.env.GetValue("BUILD_OUTPUT_BASE"), "temp.sh") with open(temp_bash, "w") as f: f.write("#!/bin/bash\n") - f.write(f"{virt_cmd}\n") + f.write("poetry --verbose install\n") + f.write("poetry env activate\n") + f.write("poetry show\n") + f.write("pip3 install fdt\n") # why is this still needed? f.write(f"{cmd} {args}\n") - if virtual_env != "": - # If we were in a virtual environment, we need to reactivate it after the build. - f.write(f"source {virtual_env}\n") - else: - f.write("deactivate\n") # Fifth, run the temp bash file to build the firmware. ret = RunCmd("bash", temp_bash, workingdir=self.env.GetValue("ARM_TFA_PATH"), environ=cached_enivron) diff --git a/Platforms/QemuSbsaPkg/QemuSbsaPkg.dsc b/Platforms/QemuSbsaPkg/QemuSbsaPkg.dsc index b36beef61c..9493a323a5 100644 --- a/Platforms/QemuSbsaPkg/QemuSbsaPkg.dsc +++ b/Platforms/QemuSbsaPkg/QemuSbsaPkg.dsc @@ -497,6 +497,7 @@ PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf HobPrintLib|MdeModulePkg/Library/HobPrintLib/HobPrintLib.inf ArmGenericTimerCounterLib|ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.inf + TimerLib|FfaFeaturePkg/Library/ArmArchTimerLibEx/ArmArchTimerLibEx.inf ArmMmuLib|ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf StandaloneMmCoreEntryPoint|ArmPkg/Library/ArmStandaloneMmCoreEntryPoint/ArmStandaloneMmCoreEntryPoint.inf @@ -515,7 +516,7 @@ RngLib|MdeModulePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf - TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf + TimerLib|FfaFeaturePkg/Library/ArmArchTimerLibEx/ArmArchTimerLibEx.inf PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf ArmGenericTimerCounterLib|ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.inf @@ -1140,7 +1141,7 @@ MsWheaPkg/MsWheaReport/Dxe/MsWheaReportDxe.inf MsCorePkg/MuVarPolicyFoundationDxe/MuVarPolicyFoundationDxe.inf MsCorePkg/AcpiRGRT/AcpiRgrt.inf - MsCorePkg/HelloWorldRustDxe/HelloWorldRustDxe.inf + # MsCorePkg/HelloWorldRustDxe/HelloWorldRustDxe.inf MsGraphicsPkg/PrintScreenLogger/PrintScreenLogger.inf SecurityPkg/Hash2DxeCrypto/Hash2DxeCrypto.inf @@ -1241,7 +1242,7 @@ # # HID Support # - HidPkg/UefiHidDxe/UefiHidDxe.inf + # HidPkg/UefiHidDxe/UefiHidDxe.inf # # USB Support @@ -1252,10 +1253,10 @@ MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf - HidPkg/UsbHidDxe/UsbHidDxe.inf { - - UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf - } + # HidPkg/UsbHidDxe/UsbHidDxe.inf { + # + # UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf + # } # # TPM2 support diff --git a/Platforms/QemuSbsaPkg/QemuSbsaPkg.fdf b/Platforms/QemuSbsaPkg/QemuSbsaPkg.fdf index 78a81ab5e5..d98d25a004 100644 --- a/Platforms/QemuSbsaPkg/QemuSbsaPkg.fdf +++ b/Platforms/QemuSbsaPkg/QemuSbsaPkg.fdf @@ -411,12 +411,12 @@ READ_LOCK_STATUS = TRUE INF MsWheaPkg/MsWheaReport/Dxe/MsWheaReportDxe.inf INF MsCorePkg/MuVarPolicyFoundationDxe/MuVarPolicyFoundationDxe.inf INF MsCorePkg/LoadOptionVariablePolicyDxe/LoadOptionVariablePolicyDxe.inf - INF HidPkg/UsbHidDxe/UsbHidDxe.inf - INF HidPkg/UefiHidDxe/UefiHidDxe.inf + # INF HidPkg/UsbHidDxe/UsbHidDxe.inf + # INF HidPkg/UefiHidDxe/UefiHidDxe.inf INF MsGraphicsPkg/PrintScreenLogger/PrintScreenLogger.inf INF MsCorePkg/AcpiRGRT/AcpiRgrt.inf INF SecurityPkg/Hash2DxeCrypto/Hash2DxeCrypto.inf - INF MsCorePkg/HelloWorldRustDxe/HelloWorldRustDxe.inf + # INF MsCorePkg/HelloWorldRustDxe/HelloWorldRustDxe.inf INF AdvLoggerPkg/Application/AdvancedLogDumper/AdvancedLogDumper.inf # diff --git a/pip-requirements.txt b/pip-requirements.txt index 4993911418..72dc2b7368 100644 --- a/pip-requirements.txt +++ b/pip-requirements.txt @@ -18,3 +18,5 @@ xmlschema==3.4.2 regex==2024.9.11 pygount==1.8.0 pywin32==306; sys_platform == 'win32' +setuptools +poetry