sys-kernel/coreos-kernel: include microcode

Include microcode via the CONFIG_EXTRA_FIRMWARE option since prepending
a cpio archive to bootengine.cpio doesn't work (needs to be a seperate
initrd).
This commit is contained in:
Andrew Jeddeloh 2018-01-16 17:22:15 -08:00
parent 34672dbe01
commit e2158041dc
2 changed files with 9 additions and 2 deletions

View File

@ -26,10 +26,11 @@ DEPEND="${RDEPEND}
sys-fs/e2fsprogs sys-fs/e2fsprogs
sys-fs/mdadm sys-fs/mdadm
sys-fs/xfsprogs sys-fs/xfsprogs
>=sys-kernel/coreos-firmware-20160331-r1:= >=sys-kernel/coreos-firmware-20180103-r1:=
>=sys-kernel/bootengine-0.0.4:= >=sys-kernel/bootengine-0.0.4:=
sys-kernel/dracut sys-kernel/dracut
virtual/udev" virtual/udev
amd64? ( sys-firmware/intel-microcode )"
# We are bad, we want to get around the sandbox. So do the creation of the # We are bad, we want to get around the sandbox. So do the creation of the
# cpio image in pkg_setup() where we are free to mount filesystems, chroot, # cpio image in pkg_setup() where we are free to mount filesystems, chroot,
@ -60,6 +61,12 @@ src_prepare() {
# Symlink to bootengine.cpio so we can stick with relative paths in .config # Symlink to bootengine.cpio so we can stick with relative paths in .config
ln -sv "${ROOT}"/usr/share/bootengine/bootengine.cpio build/ || die ln -sv "${ROOT}"/usr/share/bootengine/bootengine.cpio build/ || die
config_update 'CONFIG_INITRAMFS_SOURCE="bootengine.cpio"' config_update 'CONFIG_INITRAMFS_SOURCE="bootengine.cpio"'
# include all intel and amd microcode files, avoiding the signatures
local fw_dir="${ROOT}lib/firmware"
use amd64 && config_update "CONFIG_EXTRA_FIRMWARE=\"$(find ${fw_dir} -type f \
\( -path ${fw_dir}'/intel-ucode/*' -o -path ${fw_dir}'/amd-ucode/*' \) -printf '%P ')\""
use amd64 && config_update "CONFIG_EXTRA_FIRMWARE_DIR=\"${fw_dir}\""
} }
src_compile() { src_compile() {