* Re: [edk2-devel] Cannot build due to recent change
2020-10-01 10:43 ` [edk2-devel] " Leif Lindholm
@ 2020-10-01 11:06 ` Andrew Goodbody
2020-10-01 11:12 ` Leif Lindholm
2020-10-01 11:07 ` Sami Mujawar
2020-10-02 9:18 ` Laszlo Ersek
2 siblings, 1 reply; 6+ messages in thread
From: Andrew Goodbody @ 2020-10-01 11:06 UTC (permalink / raw)
To: Leif Lindholm, devel; +Cc: Ard Biesheuvel, Thomas Abraham, Liming Gao
On 01/10/2020 11:43, Leif Lindholm wrote:
> Hi Andrew,
>
> Welcome to the list.
Thank you. I did BIOS work and some UEFI in a previous role but have
been out of the loop for some years.
> First of all, it helps to cc maintainers of the bits you're having
> issues with.
>
> The GetMaintainer.py script can look these up for you automatically
> for a given path:
> python ../edk2/BaseTools/Scripts/GetMaintainer.py -l Platform/ARM/JunoPkg/ArmJuno.dsc
> Platform/ARM/JunoPkg/ArmJuno.dsc
> Leif Lindholm <leif@nuviainc.com>
> Ard Biesheuvel <ard.biesheuvel@arm.com>
> Thomas Abraham <thomas.abraham@arm.com>
Thanks for the pointer, will do in future.
> Anyway, yes - commit b5701a4c7a0f ("CryptoPkg: OpensslLib: Use RngLib
> to generate entropy in rand_pool"), merged through
> https://github.com/tianocore/edk2/pull/938 broke EmulatorPkg, and most
> platforms outside the main edk2 tree.
>
> This should have been handled better.
>
> But the fix is simple - if the platform port produces EFI_RNG_PROTOCOL
> from some onboard hw, you can use the approach from edk2-platforms
> commit 1e09147a01ae ("Platforms/RaspberryPi: Fix RPi4 RngLib build error").
> Otherwise, you can use the approach used in edk2 commit 416813753726
> ("ArmVirtPkg: Add RngLib based on TimerLib for CryptoPkg").
Just to be sure I understand this - most platforms outside of the main
edk2 tree are going to need updating to take account of this change.
> If you're just trying to build something, you can rewind your edk2
> HEAD to the edk2-stable202008 tag.
Thanks, good to know.
Andrew
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [edk2-devel] Cannot build due to recent change
2020-10-01 11:06 ` Andrew Goodbody
@ 2020-10-01 11:12 ` Leif Lindholm
0 siblings, 0 replies; 6+ messages in thread
From: Leif Lindholm @ 2020-10-01 11:12 UTC (permalink / raw)
To: Andrew Goodbody; +Cc: devel, Ard Biesheuvel, Thomas Abraham, Liming Gao
On Thu, Oct 01, 2020 at 12:06:07 +0100, Andrew Goodbody wrote:
> > Anyway, yes - commit b5701a4c7a0f ("CryptoPkg: OpensslLib: Use RngLib
> > to generate entropy in rand_pool"), merged through
> > https://github.com/tianocore/edk2/pull/938 broke EmulatorPkg, and most
> > platforms outside the main edk2 tree.
> >
> > This should have been handled better.
> >
> > But the fix is simple - if the platform port produces EFI_RNG_PROTOCOL
> > from some onboard hw, you can use the approach from edk2-platforms
> > commit 1e09147a01ae ("Platforms/RaspberryPi: Fix RPi4 RngLib build error").
> > Otherwise, you can use the approach used in edk2 commit 416813753726
> > ("ArmVirtPkg: Add RngLib based on TimerLib for CryptoPkg").
>
> Just to be sure I understand this - most platforms outside of the main edk2
> tree are going to need updating to take account of this change.
Well, most non-x86 platforms. There is an RdRand implementation in
tree, which I expect most platforms that could use already did.
/
Leif
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [edk2-devel] Cannot build due to recent change
2020-10-01 10:43 ` [edk2-devel] " Leif Lindholm
2020-10-01 11:06 ` Andrew Goodbody
@ 2020-10-01 11:07 ` Sami Mujawar
2020-10-02 9:18 ` Laszlo Ersek
2 siblings, 0 replies; 6+ messages in thread
From: Sami Mujawar @ 2020-10-01 11:07 UTC (permalink / raw)
To: devel@edk2.groups.io, leif@nuviainc.com,
andrew.goodbody@linaro.org
Cc: Ard Biesheuvel, Thomas Abraham, Liming Gao
Hi All,
I am looking into this and will provide a fix shortly.
Regards,
Sami Mujawar
-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Leif Lindholm via groups.io
Sent: 01 October 2020 11:44 AM
To: devel@edk2.groups.io; andrew.goodbody@linaro.org
Cc: Ard Biesheuvel <Ard.Biesheuvel@arm.com>; Thomas Abraham <thomas.abraham@arm.com>; Liming Gao <gaoliming@byosoft.com.cn>
Subject: Re: [edk2-devel] Cannot build due to recent change
Hi Andrew,
Welcome to the list.
First of all, it helps to cc maintainers of the bits you're having
issues with.
The GetMaintainer.py script can look these up for you automatically
for a given path:
python ../edk2/BaseTools/Scripts/GetMaintainer.py -l Platform/ARM/JunoPkg/ArmJuno.dsc
Platform/ARM/JunoPkg/ArmJuno.dsc
Leif Lindholm <leif@nuviainc.com>
Ard Biesheuvel <ard.biesheuvel@arm.com>
Thomas Abraham <thomas.abraham@arm.com>
Anyway, yes - commit b5701a4c7a0f ("CryptoPkg: OpensslLib: Use RngLib
to generate entropy in rand_pool"), merged through
https://github.com/tianocore/edk2/pull/938 broke EmulatorPkg, and most
platforms outside the main edk2 tree.
This should have been handled better.
But the fix is simple - if the platform port produces EFI_RNG_PROTOCOL
from some onboard hw, you can use the approach from edk2-platforms
commit 1e09147a01ae ("Platforms/RaspberryPi: Fix RPi4 RngLib build error").
Otherwise, you can use the approach used in edk2 commit 416813753726
("ArmVirtPkg: Add RngLib based on TimerLib for CryptoPkg").
If you're just trying to build something, you can rewind your edk2
HEAD to the edk2-stable202008 tag.
Best Regards,
Leif
On Wed, Sep 30, 2020 at 13:16:22 +0100, Andrew Goodbody wrote:
> Looks like a recent change is not working for AARCH64
>
> https://github.com/tianocore/edk2/commit/b5701a4c7a0fb185e0c5b9db9525939c78664bfd
>
> edk2-platforms/Platform/ARM/JunoPkg/ArmJuno.dsc(...): error 4000: Instance
> of library class [RngLib] is not found
> in [/home/andrew/src/edk2/CryptoPkg/Library/OpensslLib/OpensslLib.inf]
> [AARCH64]
> consumed by module [/home/andrew/src/edk2/NetworkPkg/IScsiDxe/IScsiDxe.inf]
>
>
> - Failed -
> Build end time: 12:56:54, Sep.30 2020
> Build total time: 00:00:01
>
> Sorry but I have not found my way around here yet. Is there anyone that can
> see what the best fix is for this please?
>
> Thanks,
> Andrew
>
>
>
>
>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [edk2-devel] Cannot build due to recent change
2020-10-01 10:43 ` [edk2-devel] " Leif Lindholm
2020-10-01 11:06 ` Andrew Goodbody
2020-10-01 11:07 ` Sami Mujawar
@ 2020-10-02 9:18 ` Laszlo Ersek
2 siblings, 0 replies; 6+ messages in thread
From: Laszlo Ersek @ 2020-10-02 9:18 UTC (permalink / raw)
To: devel, leif, andrew.goodbody; +Cc: Ard Biesheuvel, Thomas Abraham, Liming Gao
on a tangent:
On 10/01/20 12:43, Leif Lindholm wrote:
> if the platform port produces EFI_RNG_PROTOCOL
> from some onboard hw, you can use the approach from edk2-platforms
> commit 1e09147a01ae ("Platforms/RaspberryPi: Fix RPi4 RngLib build error").
Emphasis on "onboard hw".
I find it incredibly attractive and good system design that
Silicon/Broadcom/Bcm283x/Drivers/Bcm2838RngDxe
can *exist*, because the underlying *platform hardware* also exists. I
wish we had something similar for virt, i.e. randomness available from
just a handful of fixed location MMIO registers. Randomness is needed
way earlier than when various bus enumerations occur, such as PCI, or
even virtio-mmio.
See also: why virtio-serial is unusable as a real debug output device.
Yes, I know, on Intel there's RDRAND and friends; they didn't have good
press, and it's still unclear to me how much one can count on RDRAND's
presence on the various QEMU/KVM CPU models.
/end tangent
Laszlo
^ permalink raw reply [flat|nested] 6+ messages in thread