On 4 August 2015 at 10:54, Laszlo Ersek <ler...@redhat.com> wrote:
> On 08/04/15 09:57, Ard Biesheuvel wrote:
>> LinuxLoader has been split off from the ARM BDS into a separate
>> EFI application. Because we never included this application into
>> the ArmVirtPkg platforms, its ARM BDS builds have effectively been
>> broken ever since that change was merged.
>>
>> Let's fix the situation by:
>> - Disabling LinuxLoader support for AARCH64 builds: arm64 Linux kernels
>>   have UEFI stub support enabled by default, and the LinuxLoader code for
>>   booting arm64 Linux kernels is buggy. Note that this does not disable
>>   the ARM BDS text menu, it just removes the ability to boot bare Linux
>>   kernels.
>> - Adding the LinuxLoader EFI application to the ARM builds.
>>
>> Contributed-under: TianoCore Contribution Agreement 1.0
>> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org>
>> ---
>>  ArmVirtPkg/ArmVirt.dsc.inc | 9 ++++++---
>>  ArmVirtPkg/ArmVirtQemu.dsc | 5 +++++
>>  ArmVirtPkg/ArmVirtQemu.fdf | 3 +++
>>  3 files changed, 14 insertions(+), 3 deletions(-)
>>
>> diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc
>> index 2e2708d1c281..735f9edc58d6 100644
>> --- a/ArmVirtPkg/ArmVirt.dsc.inc
>> +++ b/ArmVirtPkg/ArmVirt.dsc.inc
>> @@ -206,6 +206,9 @@ [LibraryClasses.common.UEFI_APPLICATION]
>>    
>> PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
>>    
>> MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
>>    HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
>> +  ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
>> +  FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
>> +  SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
>>
>>  [LibraryClasses.common.UEFI_DRIVER]
>>    
>> ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
>> @@ -277,6 +280,9 @@ [PcdsFeatureFlag.common]
>>
>>    gEfiMdeModulePkgTokenSpaceGuid.PcdTurnOffUsbLegacySupport|TRUE
>>
>> +[PcdsFeatureFlag.AARCH64]
>> +  gArmPlatformTokenSpaceGuid.PcdBdsLinuxSupport|FALSE
>> +
>>  [PcdsFixedAtBuild.common]
>>    gArmPlatformTokenSpaceGuid.PcdFirmwareVendor|"ARM Virtualization Platform"
>>
>> @@ -398,9 +404,6 @@ [Components.common]
>>        
>> NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
>>        
>> NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
>>        
>> HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
>> -      ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
>> -      FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
>> -      SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
>>        PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
>>        
>> BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
>>
>> diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
>> index a2a82a4dba8c..92d55c770f55 100644
>> --- a/ArmVirtPkg/ArmVirtQemu.dsc
>> +++ b/ArmVirtPkg/ArmVirtQemu.dsc
>> @@ -381,3 +381,8 @@ [Components.common]
>>    MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
>>    MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
>>    MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
>> +
>> +[Components.ARM]
>> +!if $(INTEL_BDS) == FALSE
>> +  ArmPkg/Application/LinuxLoader/LinuxLoader.inf
>> +!endif
>> diff --git a/ArmVirtPkg/ArmVirtQemu.fdf b/ArmVirtPkg/ArmVirtQemu.fdf
>> index 3c0487cd95b6..47f9b095b3af 100644
>> --- a/ArmVirtPkg/ArmVirtQemu.fdf
>> +++ b/ArmVirtPkg/ArmVirtQemu.fdf
>> @@ -177,6 +177,9 @@ [FV.FvMain]
>>    INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
>>  !else
>>    INF ArmPlatformPkg/Bds/Bds.inf
>> +!if $(ARCH) == ARM
>> +  INF ArmPkg/Application/LinuxLoader/LinuxLoader.inf
>> +!endif
>>  !endif
>
> One question -- do we have any trick in place in ArmVirtPkg that allows
> us to find UEFI_APPLICATION modules in firmware volumes? I vaguely
> recall patches from the list that expose FVs as filesystems, or some such.
>
> If we use that in ArmVirtPkg, then it makes sense to build a
> UEFI_APPLICATION into the firmware binary; otherwise it doesn't. (The
> UEFI shell is located differently by the Intel BDS; the FILE_GUID of the
> shell binary is specified in PcdShellFile, and GenericBdsLib looks for
> it specifically.)
>
> Hm... yes, I think I have "MdeModulePkg/Universal/FvSimpleFileSystemDxe"
> in mind. We don't use it in ArmVirtPkg (nor OvmfPkg, FWIW). So, please
> either drop the FDF hunk, or include FvSimpleFileSystemDxe too in the
> build. (Or explain why I'm wrong :))
>

I think you're right. I fixed the ARM BDS menu, but booting an image
using the LinuxLoader does not actually work after applying the patch.
(Should have tested this more thoroughly, obviously). I will respin
and add the FvSimpleFileSystemDxe to the ARM+ARM_BDS build
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to