mirror of
https://github.com/flatcar/scripts.git
synced 2025-12-10 11:51:42 +01:00
Merge pull request #3010 from ajeddeloh/ucode2
sys-kernel/coreos-{kernel,firmware}: include microcode
This commit is contained in:
commit
f8d9e3356c
@ -38,6 +38,7 @@ DEPEND="
|
|||||||
net-misc/curl
|
net-misc/curl
|
||||||
sys-apps/debianutils
|
sys-apps/debianutils
|
||||||
sys-apps/iproute2
|
sys-apps/iproute2
|
||||||
|
sys-apps/iucode_tool
|
||||||
sys-apps/seismograph
|
sys-apps/seismograph
|
||||||
sys-boot/grub
|
sys-boot/grub
|
||||||
sys-boot/shim
|
sys-boot/shim
|
||||||
|
|||||||
1
sdk_container/src/third_party/coreos-overlay/profiles/coreos/amd64/package.mask
vendored
Normal file
1
sdk_container/src/third_party/coreos-overlay/profiles/coreos/amd64/package.mask
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
>=sys-firmware/intel-microcode-20180100
|
||||||
@ -1 +1,2 @@
|
|||||||
DIST linux-firmware-20170622.tar.gz 104302528 SHA256 03d220c1747ed71b54b53ce04bfb178fe937ba585309b4a0b32eb351d709fcb0 SHA512 946b31666ef79a21e29a757340482dfdb70b43f7818ca47bf5e16fb6a79bb585822af014731b6c6034944dd37269ae948bbc23fc1f104bccfd7b7b405f41bbd5 WHIRLPOOL dedfef88d4ba7fdc9b5e7c07f6a04221d4d34256678e366f3182d4180d0e8de4071ded809d285c89aa0ab68bdf05cd9b9c0139084d9497df4d420e7e91ba48c8
|
DIST linux-firmware-20180103.tar.gz 138263360 SHA256 07b46a7ec8fc7337d5e64598b2aa9220c30c6bc03930787dfd15b08326391981 SHA512 ed95205c075b47a2f30d9c96181ca0047de017abb1b5904f7c504a0afb8ea673c179980eb92d5690dd1a5cfb29815f224f384b4dcc472f80ddc90af3b2cbd4ce WHIRLPOOL 7a00ed9795b394f09cd50fdecf3417d585d42513f7210025425cf2234a6f359652a92558a67ec7169a6c47bc4adc67fa1974d710bc4263b8fe103d09998434e9
|
||||||
|
DIST microcode_amd_fam17h.tar.gz 2204 SHA256 a09b9f9a799ed0124fc108783e4955f3dd3aa345a3424d3ac48acae4bf5b9499 SHA512 d3b52797a5968f8da76d39322780e61d04bab5d810b0b07d64e469fcd67998e4191b0e0a9ab7e4c27189941369ef1b2850bbbb1458fd9bbeb958c98f6e378510 WHIRLPOOL 227439fd174347fdc511d898baa366a05afd9246dc6fa52bb13438f9f059f32ada217bb31c47b3947e00141c3b8f2451833a8374e3f8753e26ce311b2114bda4
|
||||||
|
|||||||
@ -15,8 +15,11 @@ if [[ ${PV} == 99999999* ]]; then
|
|||||||
EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"
|
EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"
|
||||||
KEYWORDS=""
|
KEYWORDS=""
|
||||||
else
|
else
|
||||||
SRC_URI="mirror://gentoo/linux-firmware-${PV}.tar.gz"
|
GIT_COMMIT="2eefafb2e9dcbafdf4b83d8c43fcd6b75fd4ac78"
|
||||||
KEYWORDS="amd64 arm64"
|
SRC_URI="https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-${GIT_COMMIT}.tar.gz -> linux-firmware-${PV}.tar.gz
|
||||||
|
mirror://gentoo/microcode_amd_fam17h.tar.gz
|
||||||
|
https://dev.gentoo.org/~whissi/dist/${PN}/microcode_amd_fam17h.tar.gz"
|
||||||
|
KEYWORDS="~alpha amd64 ~arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DESCRIPTION="Linux firmware files"
|
DESCRIPTION="Linux firmware files"
|
||||||
@ -81,6 +84,10 @@ src_unpack() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
src_prepare() {
|
src_prepare() {
|
||||||
|
# Move the amd ucode as well. This can be dropped once gentoo drops it from
|
||||||
|
# their ebuild.
|
||||||
|
mv "${WORKDIR}"/microcode_amd_fam17h.bin "${S}"/amd-ucode || die
|
||||||
|
|
||||||
local kernel_mods="${ROOT}/lib/modules/${KV_FULL}"
|
local kernel_mods="${ROOT}/lib/modules/${KV_FULL}"
|
||||||
|
|
||||||
# Fail if any firmware is missing.
|
# Fail if any firmware is missing.
|
||||||
@ -104,6 +111,10 @@ src_prepare() {
|
|||||||
die "Missing firmware"
|
die "Missing firmware"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# AMD's microcode is shipped as part of coreos-firmware, but not a dependency to
|
||||||
|
# any module, so add it manually
|
||||||
|
use amd64 && find amd-ucode/ -type f -not -name "*.asc" >> "${T}/firmware-scan"
|
||||||
|
|
||||||
einfo "Pruning all unneeded firmware files..."
|
einfo "Pruning all unneeded firmware files..."
|
||||||
sort -u "${T}/firmware-scan" > "${T}/firmware"
|
sort -u "${T}/firmware-scan" > "${T}/firmware"
|
||||||
find * -not -type d \
|
find * -not -type d \
|
||||||
|
|||||||
@ -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() {
|
||||||
Loading…
x
Reference in New Issue
Block a user