From 6f26999e0651eff7bbd77c321298357a8eabc282 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 16 Jul 2013 22:19:34 -0700 Subject: [PATCH] feat(sys-kernel/coreos-bootkernel) fix up the cpio file location This lets us rely on the kernel configuration, and not have to edit it "by hand" with the location of the cpio file, as the cpio initrd is now placed within the kernel output directory, where the build system picks it up automatically. --- .../coreos-overlay/eclass/cros-kernel/x86_64_defconfig_boot | 2 +- .../third_party/coreos-overlay/eclass/cros-kernel2.eclass | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/eclass/cros-kernel/x86_64_defconfig_boot b/sdk_container/src/third_party/coreos-overlay/eclass/cros-kernel/x86_64_defconfig_boot index 97828a2965..4103722600 100644 --- a/sdk_container/src/third_party/coreos-overlay/eclass/cros-kernel/x86_64_defconfig_boot +++ b/sdk_container/src/third_party/coreos-overlay/eclass/cros-kernel/x86_64_defconfig_boot @@ -171,7 +171,7 @@ CONFIG_MM_OWNER=y # CONFIG_SYSFS_DEPRECATED is not set CONFIG_RELAY=y CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="XXXXX" +CONFIG_INITRAMFS_SOURCE="bootengine.cpio" CONFIG_INITRAMFS_ROOT_UID=0 CONFIG_INITRAMFS_ROOT_GID=0 CONFIG_RD_GZIP=y diff --git a/sdk_container/src/third_party/coreos-overlay/eclass/cros-kernel2.eclass b/sdk_container/src/third_party/coreos-overlay/eclass/cros-kernel2.eclass index 9de768c567..117a018a72 100644 --- a/sdk_container/src/third_party/coreos-overlay/eclass/cros-kernel2.eclass +++ b/sdk_container/src/third_party/coreos-overlay/eclass/cros-kernel2.eclass @@ -278,10 +278,10 @@ cros-kernel2_src_configure() { fi fi - # if this is the boot kernel, set up the initrd location + # if this is the boot kernel, copy the cpio initrd to the output build + # directory so we can tack it onto the kernel image itself. if [ "$(get_boot_kernel)" = "true" ]; then - cp "${ROOT}"/usr/share/bootengine/bootengine.cpio "${S}" || die "copy of dracut cpio failed." - sed -i -e 's/XXXXX/\/build\/amd64-generic\/usr\/share\/bootengine\/bootengine\.cpio/g' "$(get_build_cfg)" || die "sed failed" + cp "${ROOT}"/usr/share/bootengine/bootengine.cpio "$(cros-workon_get_build_dir)" || die "copy of dracut cpio failed." fi # Use default for any options not explitly set in splitconfig