From: Henning Schild <henning.schild@siemens.com>
To: isar-users@googlegroups.com
Cc: Cedric Hombourger <Cedric_Hombourger@mentor.com>,
Andreas Reichel <andreas.reichel.ext@siemens.com>,
Henning Schild <henning.schild@siemens.com>
Subject: [PATCH v2 01/17] Revert "wic: Make the bootimg-efi plugin generate usable images"
Date: Fri, 13 Apr 2018 16:18:50 +0200 [thread overview]
Message-ID: <79af25e1d5c7397f90f93e2ad3b9ecb0a1f22c1f.1523628814.git.henning.schild@siemens.com> (raw)
In-Reply-To: <cover.1523628814.git.henning.schild@siemens.com>
In-Reply-To: <cover.1523628814.git.henning.schild@siemens.com>
This reverts commit c8f10e3f541643f6ed6bb3c971bf36267519fba8.
We will fork that plugin and leave the original as it is.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
scripts/lib/wic/plugins/source/bootimg-efi.py | 62 +++------------------------
1 file changed, 6 insertions(+), 56 deletions(-)
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py
index 45635f3..f631e3f 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -69,20 +69,12 @@ class BootimgEFIPlugin(SourcePlugin):
grubefi_conf += "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1\n"
grubefi_conf += "default=boot\n"
grubefi_conf += "timeout=%s\n" % bootloader.timeout
- grubefi_conf += "set root='hd0,gpt2'\n"
grubefi_conf += "menuentry 'boot'{\n"
- kernel_image = get_bitbake_var("KERNEL_IMAGE")
- kernel = "/boot/%s" % kernel_image
-
- grubefi_conf += "linux %s root=/dev/sda2 rootwait %s\n" \
- % (kernel, bootloader.append)
-
- initrd_image = get_bitbake_var("INITRD_IMAGE")
- initrd = "/boot/%s" % initrd_image
-
- grubefi_conf += "initrd %s\n" % initrd
+ kernel = "/bzImage"
+ grubefi_conf += "linux %s root=%s rootwait %s\n" \
+ % (kernel, creator.rootdev, bootloader.append)
grubefi_conf += "}\n"
logger.debug("Writing grubefi config %s/hdd/boot/EFI/BOOT/grub.cfg",
@@ -91,12 +83,6 @@ class BootimgEFIPlugin(SourcePlugin):
cfg.write(grubefi_conf)
cfg.close()
- cfg = open("%s/hdd/boot/EFI/BOOT/grub-mkimage.cfg" % cr_workdir, "w")
- mkimage_conf = "set root='hd0,gpt1'\n"
- mkimage_conf += "set prefix=($root)/EFI/BOOT\n"
- cfg.write(mkimage_conf)
- cfg.close()
-
@classmethod
def do_configure_systemdboot(cls, hdddir, creator, cr_workdir, source_params):
"""
@@ -148,8 +134,7 @@ class BootimgEFIPlugin(SourcePlugin):
if not custom_cfg:
# Create systemd-boot configuration using parameters from wks file
- kernel_name = get_bitbake_var("KERNEL_IMAGE")
- kernel = "/%s" % kernel_name
+ kernel = "/bzImage"
boot_conf = ""
boot_conf += "title boot\n"
@@ -206,9 +191,8 @@ class BootimgEFIPlugin(SourcePlugin):
hdddir = "%s/hdd/boot" % cr_workdir
- kernel_name = get_bitbake_var("KERNEL_IMAGE")
- install_cmd = "install -m 0644 %s/%s %s/%s" % \
- (staging_kernel_dir, kernel_name, hdddir, kernel_name)
+ install_cmd = "install -m 0644 %s/bzImage %s/bzImage" % \
+ (staging_kernel_dir, hdddir)
exec_cmd(install_cmd)
@@ -216,45 +200,11 @@ class BootimgEFIPlugin(SourcePlugin):
if source_params['loader'] == 'grub-efi':
shutil.copyfile("%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir,
"%s/grub.cfg" % cr_workdir)
- shutil.copyfile("%s/hdd/boot/EFI/BOOT/grub-mkimage.cfg" % cr_workdir,
- "%s/grub-mkimage.cfg" % cr_workdir)
for mod in [x for x in os.listdir(kernel_dir) if x.startswith("grub-efi-")]:
cp_cmd = "cp %s/%s %s/EFI/BOOT/%s" % (kernel_dir, mod, hdddir, mod[9:])
exec_cmd(cp_cmd, True)
shutil.move("%s/grub.cfg" % cr_workdir,
"%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir)
-
- distro_arch = get_bitbake_var("DISTRO_ARCH")
- if not distro_arch:
- raise WicError("Couldn't find target architecture")
-
- if distro_arch == "amd64":
- grub_target = 'x86_64-efi'
- grub_image = "bootx64.efi"
- elif distro_arch == "i386":
- grub_target = 'i386-efi'
- grub_image = "bootia32.efi"
- else:
- raise WicError("grub-efi is incompatible with target %s" %
- distro_arch)
-
- bootimg_dir = "%s/hdd/boot" % cr_workdir
- if not os.path.isfile("%s/EFI/BOOT/%s" \
- % (bootimg_dir, grub_image)):
-
- # TODO: check that grub-mkimage is available
- grub_cmd = "grub-mkimage -p /EFI/BOOT "
- grub_cmd += "-c %s/grub-mkimage.cfg " % cr_workdir
- grub_cmd += "-O %s -o %s/EFI/BOOT/%s " \
- % (grub_target, bootimg_dir, grub_image)
- grub_cmd += "part_gpt part_msdos ntfs ntfscomp fat ext2 "
- grub_cmd += "normal chain boot configfile linux multiboot "
- grub_cmd += "search efi_gop efi_uga font gfxterm gfxmenu "
- grub_cmd += "terminal minicmd test iorw loadenv echo help "
- grub_cmd += "reboot serial terminfo iso9660 loopback tar "
- grub_cmd += "memdisk ls search_fs_uuid udf btrfs xfs lvm "
- grub_cmd += "reiserfs ata "
- exec_cmd(grub_cmd)
elif source_params['loader'] == 'systemd-boot':
for mod in [x for x in os.listdir(kernel_dir) if x.startswith("systemd-")]:
cp_cmd = "cp %s/%s %s/EFI/BOOT/%s" % (kernel_dir, mod, hdddir, mod[8:])
--
2.16.1
next prev parent reply other threads:[~2018-04-13 14:19 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-13 14:18 [PATCH v2 00/16] wic integration Henning Schild
2018-04-13 14:18 ` Henning Schild [this message]
2018-04-13 14:18 ` [PATCH v2 02/17] Revert "wic: Introduce the `WicExecError` exception class" Henning Schild
2018-04-13 14:18 ` [PATCH v2 03/17] Revert "wic: Work around mcopy error" Henning Schild
2018-04-13 14:18 ` [PATCH v2 04/17] Revert "wic: Use sudo instead of pseudo" Henning Schild
2018-04-16 10:44 ` Andreas Reichel
2018-04-16 10:53 ` Andreas Reichel
2018-04-16 10:57 ` Henning Schild
2018-04-13 14:18 ` [PATCH v2 05/17] Revert "wic: Remove sysroot support" Henning Schild
2018-04-13 14:18 ` [PATCH v2 06/17] wic: now truly go for the wic version we claim to have Henning Schild
2018-04-13 14:18 ` [PATCH v2 07/17] Revert "isar-init-build-env: Add /sbin to PATH" Henning Schild
2018-04-13 14:18 ` [PATCH v2 08/17] classes: image: introduce size measuring function, for before do_*_image Henning Schild
2018-04-13 14:18 ` [PATCH v2 09/17] meta/image: Fix broken variables KERNEL_IMAGE and INITRD_IMAGE Henning Schild
2018-04-16 10:45 ` Andreas Reichel
2018-04-13 14:18 ` [PATCH v2 10/17] isar-init-build-env: make ISARROOT available in bitbake Henning Schild
2018-04-13 14:19 ` [PATCH v2 11/17] images: New class wic-img for wic intregration Henning Schild
2018-04-13 14:44 ` Henning Schild
2018-04-16 10:17 ` Claudius Heine
2018-04-16 10:25 ` Henning Schild
2018-04-16 10:31 ` Andreas Reichel
2018-04-13 14:19 ` [PATCH v2 12/17] wic: Add pcibios boot plugins and wks files Henning Schild
2018-04-16 10:52 ` Andreas Reichel
2018-04-16 11:48 ` Henning Schild
2018-04-13 14:19 ` [PATCH v2 13/17] scripts/start_vm: Enable booting of full disk images Henning Schild
2018-04-16 10:33 ` Andreas Reichel
2018-04-16 11:46 ` Henning Schild
2018-04-16 13:24 ` Andreas Reichel
2018-04-13 14:19 ` [PATCH v2 14/17] multiconfig: Switch qemuamd64-stretch to using wic by default Henning Schild
2018-04-16 10:25 ` Claudius Heine
2018-04-16 10:32 ` Henning Schild
2018-04-13 14:19 ` [PATCH v2 15/17] multiconfig: Switch qemui386-stretch " Henning Schild
2018-04-16 10:35 ` Andreas Reichel
2018-04-16 10:43 ` Henning Schild
2018-04-16 10:51 ` Henning Schild
2018-04-16 10:56 ` Claudius Heine
2018-04-13 14:19 ` [PATCH v2 16/17] docs: Change according to recent patches Henning Schild
2018-04-13 14:19 ` [PATCH v2 17/17] scripts/vm_smoke_test: double the timeout we wait for qemus Henning Schild
2018-04-16 10:47 ` Andreas Reichel
2018-04-16 11:45 ` Henning Schild
2018-04-25 15:53 ` [PATCH v2 00/16] wic integration Alexander Smirnov
2018-04-26 11:26 ` Henning Schild
2018-05-01 19:23 ` Alexander Smirnov
2018-05-03 16:32 ` Henning Schild
2018-05-03 16:39 ` Alexander Smirnov
2018-05-04 8:16 ` Henning Schild
2018-05-04 8:32 ` Alexander Smirnov
2018-05-04 9:30 ` Henning Schild
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=79af25e1d5c7397f90f93e2ad3b9ecb0a1f22c1f.1523628814.git.henning.schild@siemens.com \
--to=henning.schild@siemens.com \
--cc=Cedric_Hombourger@mentor.com \
--cc=andreas.reichel.ext@siemens.com \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox