]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
ovmf: add open virtual machine firmware
authorArne Fitzenreiter <arne_f@ipfire.org>
Wed, 5 Feb 2025 05:53:38 +0000 (06:53 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Wed, 5 Feb 2025 05:53:38 +0000 (06:53 +0100)
this is needed for booting kvm machines in uEFI mode.
Currently we unpack the firmware from the debain binary package.
Maybee later we wuill compile self, but currently the needed compilers
are missing in the IPFire build environment.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
config/rootfiles/packages/ovmf [new file with mode: 0644]
lfs/libvirt
lfs/ovmf [new file with mode: 0644]
make.sh

diff --git a/config/rootfiles/packages/ovmf b/config/rootfiles/packages/ovmf
new file mode 100644 (file)
index 0000000..afc4526
--- /dev/null
@@ -0,0 +1,21 @@
+#usr/share/OVMF
+usr/share/OVMF/OVMF_CODE_4M.fd
+usr/share/OVMF/OVMF_CODE_4M.ms.fd
+usr/share/OVMF/OVMF_CODE_4M.secboot.fd
+usr/share/OVMF/OVMF_CODE_4M.snakeoil.fd
+usr/share/OVMF/OVMF_VARS_4M.fd
+usr/share/OVMF/OVMF_VARS_4M.ms.fd
+usr/share/OVMF/OVMF_VARS_4M.snakeoil.fd
+#usr/share/doc/ovmf
+#usr/share/doc/ovmf/2M_VARS-to-4M_VARS.sh
+#usr/share/doc/ovmf/NEWS.Debian.gz
+#usr/share/doc/ovmf/README.Debian
+#usr/share/doc/ovmf/changelog.Debian.gz
+#usr/share/doc/ovmf/copyright
+#usr/share/doc/ovmf/howto-2M-to-4M-migration.md.gz
+#usr/share/ovmf
+usr/share/ovmf/OVMF.fd
+usr/share/ovmf/PkKek-1-snakeoil.key
+usr/share/ovmf/PkKek-1-snakeoil.pem
+usr/share/qemu/OVMF.fd
+usr/share/qemu/firmware/40-edk2-x86_64-secure-enrolled.json
index ed076a781c6d00f9c11d21a8954b064e1f72fa5c..df8d2b224e465d2aa4493ca216de4c390a3249b6 100644 (file)
@@ -1,7 +1,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2024  IPFire Team  <info@ipfire.org>                     #
+# Copyright (C) 2007-2025  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -35,9 +35,9 @@ DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 SUP_ARCH   = x86_64 aarch64
 PROG       = libvirt
-PAK_VER    = 37
+PAK_VER    = 38
 
-DEPS       = ebtables libpciaccess qemu
+DEPS       = ebtables libpciaccess ovmf qemu
 
 SERVICES   = libvirtd virtlogd
 
diff --git a/lfs/ovmf b/lfs/ovmf
new file mode 100644 (file)
index 0000000..097f391
--- /dev/null
+++ b/lfs/ovmf
@@ -0,0 +1,82 @@
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2007-2025  IPFire Team  <info@ipfire.org>                     #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+SUMMARY    = Open Virtual Machine Firmware
+
+VER        = 2024.11-5
+THISAPP    = ovmf_$(VER)
+DL_FILE    = $(THISAPP)_all.deb
+DL_FROM    = $(URL_IPFIRE)
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
+TARGET     = $(DIR_INFO)/$(THISAPP)
+PROG       = ovmf
+PAK_VER    = 1
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+
+$(DL_FILE)_BLAKE2 = 466692251a4da0a2140b27b7c07db1a754624c21605d0439a7d50d650e07297392df6982d9c065cc3f4ef0536ee5308235a43f78aba69e216250fb6469f33c98
+
+install : $(TARGET)
+
+check : $(patsubst %,$(DIR_CHK)/%,$(objects))
+
+download :$(patsubst %,$(DIR_DL)/%,$(objects))
+
+b2 : $(subst %,%_BLAKE2,$(objects))
+
+dist:
+       @$(PAK)
+
+###############################################################################
+# Downloading, checking, b2sum
+###############################################################################
+
+$(patsubst %,$(DIR_CHK)/%,$(objects)) :
+       @$(CHECK)
+
+$(patsubst %,$(DIR_DL)/%,$(objects)) :
+       @$(LOAD)
+
+$(subst %,%_BLAKE2,$(objects)) :
+       @$(B2SUM)
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
+       @$(PREBUILD)
+       @rm -rf $(DIR_APP) && mkdir -p $(DIR_APP)
+       cd $(DIR_APP) && ar xf $(DIR_DL)/$(DL_FILE)
+       tar xvf $(DIR_APP)/data.tar.xz -C /
+       @rm -rf $(DIR_APP)
+       @$(POSTBUILD)
diff --git a/make.sh b/make.sh
index 827ea9e77ae67a90ba3052a26e6800f19fdc2400..411107a3ad024cfeb145112efadc841d1064abe6 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -2035,6 +2035,7 @@ build_system() {
        lfsmake2 dmidecode
        lfsmake2 mcelog
        lfsmake2 libpciaccess
+       lfsmake2 ovmf
        lfsmake2 libvirt
        lfsmake2 freeradius
        lfsmake2 perl-common-sense
@@ -2188,6 +2189,7 @@ check_rootfiles_for_arch() {
                cmake
                gdb
                liburcu
+               ovmf
                qemu
                rust-memchr
                rust-libc