Commit 6daeb014 authored by Chaoting Liu's avatar Chaoting Liu

revert efi installation in iso.py

parent 865db26a
Pipeline #1372 skipped with stages
......@@ -19,6 +19,7 @@ nbd
syslinux
grub
efibootmgr
efitools
os-prober
dmidecode
bc
......
......@@ -97,7 +97,7 @@ class IsoBuilder:
).split())
def prepare_efi_img(self):
prebootloader_path = "/usr/lib/efitools/efi"
prebootloader_path = "/usr/share/efitools/efi"
assert os.path.isdir(prebootloader_path), "efitools must be installed"
systemd_path = "/usr/lib/systemd/boot/efi"
assert os.path.isdir(systemd_path), "systemd >=220 must be installed"
......@@ -115,20 +115,12 @@ class IsoBuilder:
# copy the initramfs
shutil.copy(pjoin(self.outputdir, "chakra/boot/chakraiso.img"), pjoin(efi_root, "EFI/chakraiso/chakraiso.img"))
# copy the kernel
subprocess.check_call(["sbsign {} --key {} --cert {} --output {}"]
, pjoin(self.outputdir, "chakra/boot/vmlinuz-linux")
, pjoin(key_path, "microsoft-kekca-public.der")
, pjoin(key_path, "microsoft-uefica-public.crt")
, pjoin(self.outputdir, "chakra/boot/vmlinuz-linux"))
shutil.copy(pjoin(self.outputdir, "chakra/boot/vmlinuz-linux"), pjoin(efi_root, "EFI/chakraiso/chakraiso"))
os.makedirs(pjoin(efi_root, "EFI/boot"))
shutil.copy(pjoin(efi_path, "syslinux.efi"), pjoin(efi_root, "EFI/boot/BOOTX64.efi"))
subprocess.check_call(["sbsign {} --key {} --cert {} --output {}"]
, pjoin(efi_root, "EFI/boot/BOOTX64.efi")
, pjoin(key_path, "microsoft-kekca-public.der")
, pjoin(key_path, "microsoft-uefica-public.crt")
, pjoin(efi_root, "EFI/boot/BOOTX64.efi"))
os.makedirs(pjoin(efi_root, "EFI/boot"))
shutil.copy(pjoin(prebootloader_path, "PreLoader.efi"), pjoin(efi_root, "EFI/boot/BOOTX64.efi"))
shutil.copy(pjoin(prebootloader_path, "HashTool.efi"), pjoin(efi_root, "EFI/boot/"))
shutil.copy(pjoin(systemd_path, "systemd-bootx64.efi"), pjoin(efi_root, "EFI/boot/loader.efi"))
# shutil.copytree(pjoin(self.datadir, "efi/loader"), pjoin(efi_root, "loader"))
# for f in ["chakraiso.conf", "chakraiso-nonfree.conf"]:
# with open(pjoin(self.datadir, "efi/loader/entries", f)) as infile:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment