summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2019-11-29 11:35:21 +0100
committerPatrick Vacek <patrickvacek@gmail.com>2019-12-03 14:25:29 +0100
commita1d5e04952725f64e268aa12b089841825a5f2b5 (patch)
tree63b43fb02082d11d1a867aacfa0dff36f6094445
parent11c74182b23a4d4fd3ddf3f756522c1df54a8653 (diff)
downloadmeta-updater-feat/custom-uboot.tar.gz
Add --bootloader flag to specify path to a custom u-boot rom.feat/custom-uboot
Also should work for other bootloaders. This is intended to help with keeping around older versions of images with a similarly old bootloader. Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
-rw-r--r--lib/oeqa/selftest/cases/testutils.py1
-rw-r--r--scripts/qemucommand.py2
-rwxr-xr-xscripts/run-qemu-ota1
3 files changed, 4 insertions, 0 deletions
diff --git a/lib/oeqa/selftest/cases/testutils.py b/lib/oeqa/selftest/cases/testutils.py
index 802d665..ea7781b 100644
--- a/lib/oeqa/selftest/cases/testutils.py
+++ b/lib/oeqa/selftest/cases/testutils.py
@@ -33,6 +33,7 @@ def qemu_boot_image(imagename, **kwargs):
33 # subdirectory. 33 # subdirectory.
34 args.dir = 'tmp/deploy/images' 34 args.dir = 'tmp/deploy/images'
35 args.efi = kwargs.get('efi', False) 35 args.efi = kwargs.get('efi', False)
36 args.bootloader = kwargs.get('bootloader', None)
36 args.machine = kwargs.get('machine', None) 37 args.machine = kwargs.get('machine', None)
37 args.mem = kwargs.get('mem', '128M') 38 args.mem = kwargs.get('mem', '128M')
38 qemu_use_kvm = get_bb_var("QEMU_USE_KVM") 39 qemu_use_kvm = get_bb_var("QEMU_USE_KVM")
diff --git a/scripts/qemucommand.py b/scripts/qemucommand.py
index 9b23c54..cef434d 100644
--- a/scripts/qemucommand.py
+++ b/scripts/qemucommand.py
@@ -58,6 +58,8 @@ class QemuCommand(object):
58 if args.efi: 58 if args.efi:
59 self.bios = 'OVMF.fd' 59 self.bios = 'OVMF.fd'
60 else: 60 else:
61 if args.bootloader:
62 uboot_path = args.bootloader
61 uboot_path = abspath(join(args.dir, self.machine, 'u-boot-qemux86-64.rom')) 63 uboot_path = abspath(join(args.dir, self.machine, 'u-boot-qemux86-64.rom'))
62 if self.overlay: 64 if self.overlay:
63 new_uboot_path = self.overlay + '.u-boot.rom' 65 new_uboot_path = self.overlay + '.u-boot.rom'
diff --git a/scripts/run-qemu-ota b/scripts/run-qemu-ota
index 232ee11..e2a4103 100755
--- a/scripts/run-qemu-ota
+++ b/scripts/run-qemu-ota
@@ -20,6 +20,7 @@ def main():
20 help='Boot using UEFI rather than U-Boot. This requires the image to be built with ' + 20 help='Boot using UEFI rather than U-Boot. This requires the image to be built with ' +
21 'OSTREE_BOOTLOADER = "grub" and OVMF.fd firmware to be installed (try "apt install ovmf")', 21 'OSTREE_BOOTLOADER = "grub" and OVMF.fd firmware to be installed (try "apt install ovmf")',
22 action='store_true') 22 action='store_true')
23 parser.add_argument('--bootloader', default=None, help="Path to bootloader, e.g. a u-boot ROM")
23 parser.add_argument('--machine', default=None, help="Target MACHINE") 24 parser.add_argument('--machine', default=None, help="Target MACHINE")
24 kvm_group = parser.add_argument_group() 25 kvm_group = parser.add_argument_group()
25 kvm_group.add_argument('--force-kvm', help='Force use of KVM (default is to autodetect)', 26 kvm_group.add_argument('--force-kvm', help='Force use of KVM (default is to autodetect)',