diff --git a/meta/classes-recipe/uki.bbclass b/meta/classes-recipe/uki.bbclass
index d16f3c95561e..c2d21304c793 100644
--- a/meta/classes-recipe/uki.bbclass
+++ b/meta/classes-recipe/uki.bbclass
@@ -59,6 +59,17 @@
 #   - see efi-uki-bootdisk.wks.in how to create ESP partition which hosts systemd-boot,
 #     config file(s) for systemd-boot and the UKI binaries.
 #
+#   - to generate multi-profile UKI (currently only supports .cmdline section)
+#
+#     UKI_PROFILE[0] = "TITLE=Recovery boot"
+#     UKI_PROFILE_CMDLINE[0] = "rootwait recovery"
+#
+#     UKI_PROFILE[1] = "TITLE=Boot from slot A"
+#     UKI_PROFILE_CMDLINE[1] = "rootwait root=LABEL=root_a"
+#
+#     UKI_PROFILE[2] = "TITLE=Boot from slot B"
+#     UKI_PROFILE_CMDLINE[2] = "rootwait root=LABEL=root_b"
+#
 
 DEPENDS += "\
     os-release \
@@ -109,21 +120,46 @@ python do_uki() {
     import glob
     import bb.process
 
-    # base ukify command, can be extended if needed
-    ukify_cmd = d.getVar('UKIFY_CMD')
+    def generate_profiles(ukify_cmd):
+        join_profiles = ""
+        profile_num = 0
+        while (profile := d.getVarFlag("UKI_PROFILE", str(profile_num))):
+            ukify_cmd += " --profile='%s'" % (profile)
+
+            cmdline = d.getVarFlag("UKI_PROFILE_CMDLINE", str(profile_num))
+            if cmdline:
+                ukify_cmd += " --cmdline='%s'" % (cmdline)
+
+            profile_file = "%s/uki-profile%s.efi" % (d.getVar('DEPLOY_DIR_IMAGE') , profile_num)
+            ukify_cmd += " --output=%s" % (profile_file)
+            join_profiles += " --join-profile=%s" % (profile_file)
+
+            bb.debug(2, "uki: running command: %s" % (ukify_cmd))
+            out, err = bb.process.run(ukify_cmd, shell=True)
+            bb.debug(2, "%s\n%s" % (out, err))
+
+            profile_num += 1
+
+        return join_profiles
+
 
     deploy_dir_image = d.getVar('DEPLOY_DIR_IMAGE')
 
+    # base ukify command, can be extended if needed
+    ukify_common_cmd = d.getVar('UKIFY_CMD')
+
     # architecture
     target_arch = d.getVar('EFI_ARCH')
     if target_arch:
-        ukify_cmd += " --efi-arch %s" % (target_arch)
+        ukify_common_cmd += " --efi-arch %s" % (target_arch)
 
-    # systemd stubs
+    # systemd stubs, required even for UKI profile generation
     stub = "%s/linux%s.efi.stub" % (d.getVar('DEPLOY_DIR_IMAGE'), target_arch)
     if not os.path.exists(stub):
         bb.fatal(f"ERROR: cannot find {stub}.")
-    ukify_cmd += " --stub %s" % (stub)
+    ukify_common_cmd += " --stub %s" % (stub)
+
+    ukify_cmd = ukify_common_cmd
 
     # initrd
     uki_fstype = d.getVar("INITRAMFS_FSTYPES").split()[0]
@@ -185,6 +221,8 @@ python do_uki() {
     if cert:
         ukify_cmd += " --secureboot-certificate='%s'" % (cert)
 
+    ukify_cmd += generate_profiles(ukify_common_cmd)
+
     # custom output UKI filename
     output = " --output=%s/%s" % (d.getVar('DEPLOY_DIR_IMAGE'), d.getVar('UKI_FILENAME'))
     ukify_cmd += " %s" % (output)
