Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ophélie Gagnard
slapos
Commits
542362df
Commit
542362df
authored
Aug 18, 2022
by
Ophelie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for UEFI in KVMs.
parent
3474cec6
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
149 additions
and
3 deletions
+149
-3
component/edk2/buildout.cfg
component/edk2/buildout.cfg
+94
-0
component/libuuid/buildout.cfg
component/libuuid/buildout.cfg
+47
-0
software/kvm/buildout.hash.cfg
software/kvm/buildout.hash.cfg
+3
-3
software/kvm/instance-kvm.cfg.jinja2
software/kvm/instance-kvm.cfg.jinja2
+1
-0
software/kvm/instance.cfg.in
software/kvm/instance.cfg.in
+1
-0
software/kvm/software.cfg
software/kvm/software.cfg
+1
-0
software/kvm/template/template-kvm-run.in
software/kvm/template/template-kvm-run.in
+2
-0
No files found.
component/edk2/buildout.cfg
0 → 100644
View file @
542362df
[buildout]
extends =
../make/buildout.cfg
../git/buildout.cfg
../libuuid/buildout.cfg
../ffmpeg/buildout.cfg
../bison/buildout.cfg
../flex/buildout.cfg
../m4/buildout.cfg
parts =
edk2
[acpica]
recipe = slapos.recipe.cmmi
url = https://acpica.org/sites/acpica/files/acpica-unix-20200717.tar.gz
md5sum = c9b17a05afc285c48ebb3a8cbab006f3
location = ${buildout:parts-directory}/${:_buildout_section_name_}
configure-command = :
#XXXX why acpica ends with empty folder
make-targets = ${make:location}/bin/make iasl
&& mv * ${:location}
environment =
PATH=${bison:location}/bin:${flex:location}/bin:${m4:location}/bin:%(PATH)s
[edk2-config]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:_buildout_section_name_}/target.txt
template = inline:
ACTIVE_PLATFORM = OvmfPkg/OvmfPkgX64.dsc
TARGET_ARCH = X64
TARGET = RELEASE
TOOL_CHAIN_CONF = Conf/tools_def.txt
TOOL_CHAIN_TAG = GCC5
MAX_CONCURRENT_THREAD_NUMBER = 1
BUILD_RULE_CONF = Conf/build_rule.txt
[edk2xxxxxxxxxxx]
recipe = slapos.recipe.cmmi
path = ${edk2-src:location}
configure-command = :
make-binary =
make-targets = cd ${edk2-src:location}
&& ${git:location}/bin/git submodule update --init
&& ${make:location}/bin/make -C BaseTools
&& cp ${edk2-config:rendered} Conf/target.txt
&& bash -c ". edksetup.sh && build"
environment =
C_INCLUDE_PATH=${libuuid:location}/include
LIBRARY_PATH=${libuuid:location}/lib
PATH=${acpica:location}/generate/unix/bin:${nasm:location}/bin:%(PATH)s
[edk2UYYYYYYYYYYYYY]
recipe = plone.recipe.command
stop-on-error = true
repository = https://github.com/tianocore/edk2.git
commit= 872f953262d68a11da7bc2fb3ded16df234b8700
location = ${buildout:parts-directory}/${:_buildout_section_name_}
path = ${buildout:parts-directory}/${:_buildout_section_name_}
git-binary = ${git:location}/bin/git
#command = export GIT_SSL_NO_VERIFY=true; export HOME=${:location}; (${:git-binary} clone --quiet ${:repository} ${:location} && cd ${:location} && ${:git-binary} reset --hard ${:commit} && ${:git-binary} submodule update --init && cd support/jsdav && PATH=${nodejs-0.4:location}/bin:$PATH LDFLAGS=-L${libxml2:location}/lib ${:npm-binary} install) || (rm -fr ${:location}; exit 1)
#command = export C_INCLUDE_PATH=${libuuid:location}/include; export LIBRARY_PATH=${libuuid:location}/lib; export PATH=${acpica:location}/generate/unix/bin:${nasm:location}/bin:$PATH; (${:git-binary} clone --quiet ${:repository} ${:location} && cd ${:location} && ${:git-binary} reset --hard ${:commit} && ${:git-binary} submodule update --init && ${make:location}/bin/make -C BaseTools && cp ${edk2-config:rendered} Conf/target.txt && bash -c ". edksetup.sh && build") || (exit 1)
command = bash -c 'export C_INCLUDE_PATH=${libuuid:location}/include; export LIBRARY_PATH=${libuuid:location}/lib; export PATH=${acpica:location}/generate/unix/bin:${nasm:location}/bin:$PATH; (cd ${:location} && ${make:location}/bin/make -C BaseTools && cp ${edk2-config:rendered} Conf/target.txt && . edksetup.sh && build)'
update-command =
[edk2]
recipe = slapos.recipe.build
repository = https://github.com/tianocore/edk2.git
commit= 872f953262d68a11da7bc2fb3ded16df234b8700
location = ${buildout:parts-directory}/${:_buildout_section_name_}
path = ${buildout:parts-directory}/${:_buildout_section_name_}/Build/OvmfX64/RELEASE_GCC5/FV/OVMF.fd
git-binary = ${git:location}/bin/git
C_INCLUDE_PATH=${libuuid:location}/include
LIBRARY_PATH=${libuuid:location}/lib
PATH=${acpica:location}/generate/unix/bin:${nasm:location}/bin:%(PATH)s
rendered = ${edk2-config:rendered}
install =
import subprocess, os, shutil
env = {
'PATH':options['PATH'] + ':' + os.environ['PATH'],
'C_INCLUDE_PATH':options['C_INCLUDE_PATH'],
'LIBRARY_PATH':options['LIBRARY_PATH']
}
subprocess.check_call('bash -c "(git clone %s %s && cd %s && git reset --hard %s && git submodule update --init && make -C BaseTools && cp %s Conf/target.txt && . edksetup.sh && build -D SECURE_BOOT_ENABLE=TRUE) || (rm -fr %s; exit 1)"' %
(options['repository'], options['location'], options['location'], options['commit'], options['rendered'], options['location']), env=env, shell=True)
component/libuuid/buildout.cfg
0 → 100644
View file @
542362df
[buildout]
parts =
libuuid
extends =
../perl/buildout.cfg
[libuuid]
recipe = slapos.recipe.cmmi
shared = true
url = http://www.kernel.org/pub/linux/utils/util-linux/v2.18/util-linux-ng-2.18.tar.bz2
md5sum = 2f5f71e6af969d041d73ab778c141a77
configure-options =
--disable-static
--enable-libuuid
--disable-agetty
--disable-cramfs
--disable-fallocate
--disable-fsck
--disable-libblkid
--disable-libmount
--disable-makeinstall-chown
--disable-makeinstall-setuid
--disable-mount
--disable-nls
--disable-pivot_root
--disable-rename
--disable-require-password
--disable-schedutils
--disable-switch_root
--disable-tls
--disable-unshare
--disable-uuidd
--disable-wall
--without-libiconv-prefix
--without-libintl-prefix
--without-ncurses
--without-slang
--without-pam
--without-selinux
--without-audit
make-options =
-C shlibs/uuid
environment =
PATH=${perl:location}/bin:%(PATH)s
software/kvm/buildout.hash.cfg
View file @
542362df
...
@@ -15,11 +15,11 @@
...
@@ -15,11 +15,11 @@
[template]
[template]
filename = instance.cfg.in
filename = instance.cfg.in
md5sum =
7e90da1f6dac4233e1aa3248f48e357c
md5sum =
937cd01db35d01576dec003203f0eef7
[template-kvm]
[template-kvm]
filename = instance-kvm.cfg.jinja2
filename = instance-kvm.cfg.jinja2
md5sum =
fb8f9a962cc1c0d986305c6a6ce59082
md5sum =
0018cea75a04d4162db64323f85d9be9
[template-kvm-cluster]
[template-kvm-cluster]
filename = instance-kvm-cluster.cfg.jinja2.in
filename = instance-kvm-cluster.cfg.jinja2.in
...
@@ -55,7 +55,7 @@ md5sum = a8cf453d20f01c707f02c4b4014580d8
...
@@ -55,7 +55,7 @@ md5sum = a8cf453d20f01c707f02c4b4014580d8
[template-kvm-run]
[template-kvm-run]
filename = template/template-kvm-run.in
filename = template/template-kvm-run.in
md5sum =
6c100eec00de5e53f64b075dd69a9865
md5sum =
c0eeb285be972f94a347997dfc1f814f
[template-kvm-controller]
[template-kvm-controller]
filename = template/kvm-controller-run.in
filename = template/kvm-controller-run.in
...
...
software/kvm/instance-kvm.cfg.jinja2
View file @
542362df
...
@@ -398,6 +398,7 @@ ipv4 = ${slap-network-information:local-ipv4}
...
@@ -398,6 +398,7 @@ ipv4 = ${slap-network-information:local-ipv4}
ipv6 = ${slap-network-information:global-ipv6}
ipv6 = ${slap-network-information:global-ipv6}
vnc-ip = ${:ipv4}
vnc-ip = ${:ipv4}
vnc-port = 5901
vnc-port = 5901
edk2-path = {{ edk2_path }}
default-cdrom-iso = {{ debian_amd64_netinst_location }}
default-cdrom-iso = {{ debian_amd64_netinst_location }}
{% if virtual_hard_drive_url_enabled %}
{% if virtual_hard_drive_url_enabled %}
...
...
software/kvm/instance.cfg.in
View file @
542362df
...
@@ -90,6 +90,7 @@ extra-context =
...
@@ -90,6 +90,7 @@ extra-context =
raw novnc_location ${noVNC:location}
raw novnc_location ${noVNC:location}
raw netcat_bin ${netcat:location}/bin/netcat
raw netcat_bin ${netcat:location}/bin/netcat
raw python_executable ${buildout:executable}
raw python_executable ${buildout:executable}
raw edk2_path ${edk2:path}
raw python_eggs_executable ${buildout:bin-directory}/${python-with-eggs:interpreter}
raw python_eggs_executable ${buildout:bin-directory}/${python-with-eggs:interpreter}
raw qemu_executable_location ${qemu:location}/bin/qemu-system-x86_64
raw qemu_executable_location ${qemu:location}/bin/qemu-system-x86_64
raw qemu_img_executable_location ${qemu:location}/bin/qemu-img
raw qemu_img_executable_location ${qemu:location}/bin/qemu-img
...
...
software/kvm/software.cfg
View file @
542362df
...
@@ -12,6 +12,7 @@ extends =
...
@@ -12,6 +12,7 @@ extends =
../../component/pycurl/buildout.cfg
../../component/pycurl/buildout.cfg
../../component/numpy/buildout.cfg
../../component/numpy/buildout.cfg
../../component/gzip/buildout.cfg
../../component/gzip/buildout.cfg
../../component/edk2/buildout.cfg
../../stack/slapos.cfg
../../stack/slapos.cfg
../../stack/resilient/buildout.cfg
../../stack/resilient/buildout.cfg
buildout.hash.cfg
buildout.hash.cfg
...
...
software/kvm/template/template-kvm-run.in
View file @
542362df
...
@@ -21,6 +21,7 @@ disk_type = {{ repr(parameter_dict["disk-type"]) }}
...
@@ -21,6 +21,7 @@ disk_type = {{ repr(parameter_dict["disk-type"]) }}
network_adapter = {{ repr(parameter_dict["network-adapter"]) }}
network_adapter = {{ repr(parameter_dict["network-adapter"]) }}
edk2_path = '{{ parameter_dict.get("edk2-path") }}'
socket_path = '{{ parameter_dict.get("socket-path") }}'
socket_path = '{{ parameter_dict.get("socket-path") }}'
nbd_list = (('{{ parameter_dict.get("nbd-host") }}',
nbd_list = (('{{ parameter_dict.get("nbd-host") }}',
{{ parameter_dict.get("nbd-port") }}),
{{ parameter_dict.get("nbd-port") }}),
...
@@ -277,6 +278,7 @@ kvm_argument_list = [qemu_path,
...
@@ -277,6 +278,7 @@ kvm_argument_list = [qemu_path,
'-boot', 'order=cd,menu=on',
'-boot', 'order=cd,menu=on',
'-qmp', 'unix:%s,server,nowait' % socket_path,
'-qmp', 'unix:%s,server,nowait' % socket_path,
'-pidfile', pid_file_path, '-msg', 'timestamp=on',
'-pidfile', pid_file_path, '-msg', 'timestamp=on',
'-bios', edk2_path,
'-D', logfile,
'-D', logfile,
'-nodefaults',
'-nodefaults',
# switch to tablet mode for the mouse to have it synced with a client, see https://wiki.gentoo.org/wiki/QEMU/Options#USB
# switch to tablet mode for the mouse to have it synced with a client, see https://wiki.gentoo.org/wiki/QEMU/Options#USB
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment