Opened 7 years ago
Closed 7 years ago
#12987 closed task (fixed)
Add CPU microcode to the intramfs
| Reported by: | Pierre Labastie | Owned by: | Pierre Labastie |
|---|---|---|---|
| Priority: | normal | Milestone: | 9.1 |
| Component: | BOOK | Version: | SVN |
| Severity: | low | Keywords: | |
| Cc: |
Description
Almost all x86 CPU need some microcode to run without (too many) security flaws. When using an initramfs (for LVM, raid or another reason), it'd be nice to have it included into the initramfs, instead of having two initramfs.
Change History (3)
comment:1 by , 7 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:2 by , 7 years ago
Note:
See TracTickets
for help on using tickets.

Actually, the kernel documentation recommends the following:
#!/bin/bash if [ -z "$1" ]; then echo "You need to supply an initrd file" exit 1 fi INITRD="$1" DSTDIR=kernel/x86/microcode TMPDIR=/tmp/initrd rm -rf $TMPDIR mkdir $TMPDIR cd $TMPDIR mkdir -p $DSTDIR if [ -d /lib/firmware/amd-ucode ]; then cat /lib/firmware/amd-ucode/microcode_amd*.bin > $DSTDIR/AuthenticAMD.bin fi if [ -d /lib/firmware/intel-ucode ]; then cat /lib/firmware/intel-ucode/* > $DSTDIR/GenuineIntel.bin fi find . | cpio -o -H newc >../ucode.cpio cd .. mv $INITRD $INITRD.orig cat ucode.cpio $INITRD.orig > $INITRD rm -rf $TMPDIRThat is make the initrd first, then the microcode.img, then concat them.