curtin-dev team mailing list archive
-
curtin-dev team
-
Mailing list archive
-
Message #03180
[Merge] ~xnox/curtin:fix-fk-arm64 into curtin:master
Dimitri John Ledkov has proposed merging ~xnox/curtin:fix-fk-arm64 into curtin:master.
Commit message:
Fix flash-kernel support in curtin on arm64, on distributions newer than focal.
If this merged, 10_flash_kernel hook can be dropped in ubuntu-desktop-installer
Requested reviews:
curtin developers (curtin-dev)
For more details, see:
https://code.launchpad.net/~xnox/curtin/+git/curtin/+merge/453321
--
Your team curtin developers is requested to review the proposed merge of ~xnox/curtin:fix-fk-arm64 into curtin:master.
diff --git a/curtin/commands/curthooks.py b/curtin/commands/curthooks.py
index 10a12bd..f3cd2dc 100644
--- a/curtin/commands/curthooks.py
+++ b/curtin/commands/curthooks.py
@@ -109,7 +109,7 @@ def disable_overlayroot(cfg, target):
shutil.move(local_conf, local_conf + ".old")
-def _update_initramfs_tools(machine=None):
+def _update_initramfs_tools(machine=None, target=None):
""" Return a list of binary names used to update an initramfs.
On some architectures there are helper binaries that are also
@@ -121,14 +121,16 @@ def _update_initramfs_tools(machine=None):
if machine == 's390x':
tools.append('zipl')
elif machine == 'aarch64':
- tools.append('flash-kernel')
+ old_distro = distro.os_release(target).get("UBUNTU_CODENAME","focal")
+ if old_distro == "focal":
+ tools.append('flash-kernel')
return tools
def disable_update_initramfs(cfg, target, machine=None):
""" Find update-initramfs tools in target and change their name. """
with util.ChrootableTarget(target) as in_chroot:
- for tool in _update_initramfs_tools(machine=machine):
+ for tool in _update_initramfs_tools(machine=machine, target=target):
found = util.which(tool, target=target)
if found:
LOG.debug('Diverting original %s in target.', tool)
References