Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New packages: {edk2,ovmf-*}-202102 #29074

Closed
wants to merge 1 commit into from

Conversation

Logarithmus
Copy link
Contributor

@Logarithmus Logarithmus commented Feb 26, 2021

Continues #17225
Closes #11243, #27229

General

Have the results of the proposed changes been tested?

  • I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
  • I generally don't use the affected packages but briefly tested this PR

Does it build and run successfully?

  • I built this PR locally for my native architecture, (x86_64-musl)
  • I built this PR locally for these architectures (if supported. mark crossbuilds):
    • x86_64
    • x86_64-musl
    • i686

@ericonr
Copy link
Member

ericonr commented Feb 26, 2021

Please clean up your commit, you have .rej and .orig files.

@Xlaits
Copy link

Xlaits commented Mar 24, 2021

Getting errors attempting to build ovmf-*

=> ca-certificates-20210119_1: running pre-pkg hook: 90-set-timestamps ...
date: invalid date ‘@1616622037\n1616622037’
=> ERROR: ca-certificates-20210119_1: pre-pkg_90-set-timestamps: 'date --date "@$SOURCE_DATE_EPOCH"' exited with 1
=> ERROR:   in hook() at common/hooks/pre-pkg/90-set-timestamps.sh:7
=> ERROR:   in run_func() at common/xbps-src/shutils/common.sh:21
=> ERROR:   in run_pkg_hooks() at common/xbps-src/shutils/common.sh:245
=> ERROR:   in main() at common/xbps-src/libexec/xbps-src-prepkg.sh:47
=> ca-certificates-20210119_1: setting mtimes to 
touch: invalid date format ‘@1616622037\n1616622037’
=> ERROR: ca-certificates-20210119_1: pre-pkg_90-set-timestamps: 'xargs -0 touch -h --date "@$SOURCE_DATE_EPOCH"' exited with 123
=> ERROR:   in hook() at common/hooks/pre-pkg/90-set-timestamps.sh:8
=> ERROR:   in run_func() at common/xbps-src/shutils/common.sh:21
=> ERROR:   in run_pkg_hooks() at common/xbps-src/shutils/common.sh:245
=> ERROR:   in main() at common/xbps-src/libexec/xbps-src-prepkg.sh:47

@Logarithmus Logarithmus changed the title New packages: {edk2,ovmf-*}-202011 New packages: {edk2,ovmf-*}-202102 Mar 26, 2021
@Logarithmus Logarithmus marked this pull request as ready for review March 26, 2021 22:43
@Logarithmus
Copy link
Contributor Author

Getting errors attempting to build ovmf-*

=> ca-certificates-20210119_1: running pre-pkg hook: 90-set-timestamps ...
date: invalid date ‘@1616622037\n1616622037’
=> ERROR: ca-certificates-20210119_1: pre-pkg_90-set-timestamps: 'date --date "@$SOURCE_DATE_EPOCH"' exited with 1
=> ERROR:   in hook() at common/hooks/pre-pkg/90-set-timestamps.sh:7
=> ERROR:   in run_func() at common/xbps-src/shutils/common.sh:21
=> ERROR:   in run_pkg_hooks() at common/xbps-src/shutils/common.sh:245
=> ERROR:   in main() at common/xbps-src/libexec/xbps-src-prepkg.sh:47
=> ca-certificates-20210119_1: setting mtimes to 
touch: invalid date format ‘@1616622037\n1616622037’
=> ERROR: ca-certificates-20210119_1: pre-pkg_90-set-timestamps: 'xargs -0 touch -h --date "@$SOURCE_DATE_EPOCH"' exited with 123
=> ERROR:   in hook() at common/hooks/pre-pkg/90-set-timestamps.sh:8
=> ERROR:   in run_func() at common/xbps-src/shutils/common.sh:21
=> ERROR:   in run_pkg_hooks() at common/xbps-src/shutils/common.sh:245
=> ERROR:   in main() at common/xbps-src/libexec/xbps-src-prepkg.sh:47

Please, check now

@Logarithmus
Copy link
Contributor Author

CI passed, tested on x86_64-musl, works fine. Ready for review & merge I think.

@Xlaits
Copy link

Xlaits commented Mar 29, 2021

Still having the same issue.

@Logarithmus
Copy link
Contributor Author

Logarithmus commented Mar 29, 2021

Still having the same issue.

Maybe the issue is your date? Check if it's correct. The package have built successfully both on my laptop and CI/CD. Can someone else test it?

@Xlaits
Copy link

Xlaits commented Mar 29, 2021 via email

@noarchwastaken
Copy link
Contributor

The packages built with no problems for me on x86_64-glibc.

@noarchwastaken
Copy link
Contributor

I noticed that the VM starts up to a black screen if I have OpenGL enabled for Spice... the VM only starts to display when the OS has booted to a certain point. I'm not sure if it's an upstream issue though.

@eoli3n
Copy link
Contributor

eoli3n commented May 10, 2021

up

@eoli3n
Copy link
Contributor

eoli3n commented May 18, 2021

The packages built with no problems for me on x86_64-glibc.

Same here, i will test later.

@NeonOverflow
Copy link
Contributor

Please merge this!

@eoli3n
Copy link
Contributor

eoli3n commented May 31, 2021

ping @ericonr

@NeonOverflow
Copy link
Contributor

@ericonr

@ericonr
Copy link
Member

ericonr commented Jun 3, 2021

I only made a lint comment, and haven't claimed this PR. It's a big package that I'm not in a position to review rn.

@ahesford
Copy link
Member

ahesford commented Jun 3, 2021

I really don't see this being merged without massive upstream work. The template is a jumble of manual steps and questionable vendoring (brotli? openssl???). I suspect the only truly valuable part of this package is the half-dozen firmware blobs and associated JSON descriptors, all of which I just manually unpack from an Arch Linux package and be on my way.

@ericonr
Copy link
Member

ericonr commented Jun 3, 2021

I don't want to involve myself, but from https://github.com/tianocore/edk2/blob/master/CryptoPkg/Library/OpensslLib/OpenSSL-HOWTO.txt it would seem at least openssl is used to provide crypto stuff and it would have to be compiled specially for that, which is why they pull it in.

@NeonOverflow
Copy link
Contributor

@ahesford The firmware files are primarily used by GPU passthrough users.

@ahesford
Copy link
Member

ahesford commented Jun 4, 2021

I understand the utility of the firmware files; I use them in all of my VMs. My point is that the template requires a lot of manual effort because the EDK build system isn't sane, and these steps are likely to break from one release to the next. Void is a small team and fragile templates that require a lot of manual work become disproportionate time sinks.

In the meantime, the firmware blobs can be manually extracted from packages of other distributions and used in Qemu/KVM installations in Void with minimal effort.

@NeonOverflow
Copy link
Contributor

Understandable. I'll probably just do as you said in the meantime.

@eoli3n
Copy link
Contributor

eoli3n commented Jun 4, 2021

In the meantime, the firmware blobs can be manually extracted from packages of other distributions and used in Qemu/KVM installations in Void with minimal effort.

So why not pulling this in the package ?

@HadetTheUndying
Copy link
Contributor

In the meantime, the firmware blobs can be manually extracted from packages of other distributions and used in Qemu/KVM installations in Void with minimal effort.

So why not pulling this in the package ?

I would be under the assumption that this is against the package quality requirements since this package would not fall under the nonfree packages, it's just a pain to package.

@Matthew-Tate-Scarbrough

In the meantime, the firmware blobs can be manually extracted from packages of other distributions and used in Qemu/KVM installations in Void with minimal effort.

Would it be a advantageous/within scope of void-packages to just write a script that just steals them from Arch or another popular distro's repos?

@RononDex
Copy link

Is there any update on the state of the PR? Trying to setup UEFI with qemu

@apprehensions
Copy link
Contributor

uh? when?

@HadetTheUndying
Copy link
Contributor

uh? when?

The qemu package includes the following:

qemu-6.1.0_3	/usr/share/qemu/edk2-aarch64-code.fd
qemu-6.1.0_3	/usr/share/qemu/edk2-arm-code.fd
qemu-6.1.0_3	/usr/share/qemu/edk2-arm-vars.fd
qemu-6.1.0_3	/usr/share/qemu/edk2-i386-code.fd
qemu-6.1.0_3	/usr/share/qemu/edk2-i386-secure-code.fd
qemu-6.1.0_3	/usr/share/qemu/edk2-i386-vars.fd
qemu-6.1.0_3	/usr/share/qemu/edk2-licenses.txt
qemu-6.1.0_3	/usr/share/qemu/edk2-x86_64-code.fd
qemu-6.1.0_3	/usr/share/qemu/edk2-x86_64-secure-code.fd
qemu-6.1.0_3	/usr/share/qemu/firmware/50-edk2-i386-secure.json
qemu-6.1.0_3	/usr/share/qemu/firmware/50-edk2-x86_64-secure.json
qemu-6.1.0_3	/usr/share/qemu/firmware/60-edk2-aarch64.json
qemu-6.1.0_3	/usr/share/qemu/firmware/60-edk2-arm.json
qemu-6.1.0_3	/usr/share/qemu/firmware/60-edk2-i386.json
qemu-6.1.0_3	/usr/share/qemu/firmware/60-edk2-x86_64.json
```

I have tested the x86_64 firmware with GPU passthrough to a Windows VM and can confirm it works. 

@apprehensions
Copy link
Contributor

The qemu package includes the following:

...
qemu-6.1.0_3	/usr/share/qemu/edk2-x86_64-code.fd
qemu-6.1.0_3	/usr/share/qemu/edk2-x86_64-secure-code.fd
qemu-6.1.0_3	/usr/share/qemu/firmware/60-edk2-x86_64.json
...

I have tested the x86_64 firmware with GPU passthrough to a Windows VM and can confirm it works.

the fact that it was in qemu this whole time and i never noticed... thanks for telling me this!

@ahesford
Copy link
Member

Because it seems that qemu already ships viable EFI image and EDK2 is such a nightmare to build, let's close this and revisit if there is a compelling need and we can construct a more maintainable template.

@ahesford ahesford closed this Jan 11, 2022
@eoli3n
Copy link
Contributor

eoli3n commented Feb 3, 2022

I can't find a way to run that firmware with vagrant-libvirt : vagrant-libvirt/vagrant-libvirt#1443

@ghost
Copy link

ghost commented Jun 14, 2023

Has anyone gotten the EFI images shipped with qemu to work for enabling secure boot and creating a Windows 11 VM?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-package This PR adds a new package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Package Request: Tianocore/OVMF