From: Joseph Marrero Corchado Date: Fri, 17 Mar 2023 15:09:19 +0000 (-0400) Subject: Merge pull request #2705 from cgwalters/always-boot X-Git-Tag: archive/raspbian/2023.7-3+rpi1~1^2~9^2~2^2~18 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4f0c13fb8b5ef6c779c106d7c862833a0175c6ca;p=ostree.git Merge pull request #2705 from cgwalters/always-boot Add `sysroot.bootprefix` option --- 4f0c13fb8b5ef6c779c106d7c862833a0175c6ca diff --cc src/libostree/ostree-repo.c index 11175db4,195ae667..515f51e5 --- a/src/libostree/ostree-repo.c +++ b/src/libostree/ostree-repo.c @@@ -3549,9 -3546,14 +3549,14 @@@ reload_sysroot_config (OstreeRep } char *key = g_strndup (key_value, sep - key_value); char *value = g_strdup (sep + 1); - g_hash_table_replace (self->bls_append_values, key, value); + g_hash_table_replace (self->bls_append_values, key, value); } + if (!ot_keyfile_get_boolean_with_default (self->config, "sysroot", + "bootprefix", FALSE, + &self->enable_bootprefix, error)) + return FALSE; + return TRUE; } diff --cc src/libostree/ostree-sysroot-deploy.c index 4d4f9bcb,4e8e2a2e..b128136a --- a/src/libostree/ostree-sysroot-deploy.c +++ b/src/libostree/ostree-sysroot-deploy.c @@@ -2093,33 -2061,9 +2095,33 @@@ install_deployment_kernel (OstreeSysroo ostree_kernel_args_replace_take (kargs, g_steal_pointer (&prepare_root_arg)); } + const char* aboot_fn = NULL; + if (kernel_layout->aboot_namever) + { + aboot_fn = kernel_layout->aboot_namever; + } + else if (kernel_layout->aboot_srcpath) + { + aboot_fn = kernel_layout->aboot_srcpath; + } + + if (aboot_fn) + { + g_autofree char * aboot_relpath = g_strconcat ("/", bootcsumdir, "/", aboot_fn, NULL); + ostree_bootconfig_parser_set (bootconfig, "aboot", aboot_relpath); + } + else + { + g_autofree char * aboot_relpath = g_strconcat ("/", deployment_dirpath, "/usr/lib/ostree-boot/aboot.img", NULL); + ostree_bootconfig_parser_set (bootconfig, "aboot", aboot_relpath); + } + + g_autofree char * abootcfg_relpath = g_strconcat ("/", deployment_dirpath, "/usr/lib/ostree-boot/aboot.cfg", NULL); + ostree_bootconfig_parser_set (bootconfig, "abootcfg", abootcfg_relpath); + if (kernel_layout->devicetree_namever) { - g_autofree char * dt_boot_relpath = g_strconcat ("/", bootcsumdir, "/", kernel_layout->devicetree_namever, NULL); + g_autofree char * dt_boot_relpath = g_strconcat (bootprefix, bootcsumdir, "/", kernel_layout->devicetree_namever, NULL); ostree_bootconfig_parser_set (bootconfig, "devicetree", dt_boot_relpath); } else if (kernel_layout->devicetree_srcpath)