File tree Expand file tree Collapse file tree 6 files changed +32
-3
lines changed Expand file tree Collapse file tree 6 files changed +32
-3
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ This directory includes scripts to run FeOS as the pid 1 process within a VM.
66 make build-container
77 make kernel
88 make initramfs
9+ make ucode
910 make uki
1011
1112 # create `vm-br0` bridge on your machine:
@@ -41,5 +42,3 @@ If you want to run FeOS within a [cloud-hypervisor](https://www.cloudhypervisor.
4142 --kernel target/kernel/vmlinuz \
4243 --initramfs target/initramfs.zst \
4344 --cmdline "`cat target/cmdline`"
44-
45-
Original file line number Diff line number Diff line change @@ -9,7 +9,9 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y \
99 libprotobuf-dev \
1010 sbsigntool python3-pefile systemd-boot \
1111 musl-tools \
12- ca-certificates
12+ ca-certificates \
13+ iucode-tool \
14+ libarchive-tools
1315
1416RUN cargo new xyz; cd xyz; cargo fetch; cd ..; rm -rf xyz
1517RUN rustup component add clippy
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ SHELL := /bin/bash
33include hack/build-container/make.mk
44include hack/kernel/make.mk
55include hack/initramfs/make.mk
6+ include hack/ucode/make.mk
67include hack/cloud-hypervisor/make.mk
78include hack/cloud-hypervisor-firmware/make.mk
89include hack/uki/make.mk
Original file line number Diff line number Diff line change 1+ ucode :
2+ docker run --rm -u $$ {UID} -v " ` pwd` :/feos" feos-builder ./hack/ucode/mk-ucode
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -exuo pipefail
4+
5+ target_dir=" $( realpath target) "
6+
7+ on_exit () {
8+ cd /
9+ [ -z " ${tmp_dir-} " ] || rm -rf " $tmp_dir "
10+ }
11+
12+ trap on_exit EXIT
13+
14+ tmp_dir=" $( mktemp -d) "
15+ cd " $tmp_dir "
16+
17+ git clone --depth 1 https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files.git intel-microcode
18+ git clone --depth 1 https://gitlab.com/kernel-firmware/linux-firmware.git linux-firmware
19+
20+ mkdir -p kernel/x86/microcode
21+ iucode_tool --write-to=kernel/x86/microcode/GenuineIntel.bin intel-microcode/intel-ucode
22+ cat linux-firmware/amd-ucode/microcode_amd* .bin > kernel/x86/microcode/AuthenticAMD.bin
23+
24+ bsdtar --uid 0 --gid 0 -cf - kernel | bsdtar -cf - --format=newc @- > " $target_dir /ucode.cpio"
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ uki: keys
1111 --os-release @/feos/hack/uki/os-release.txt \
1212 --linux /feos/target/kernel/vmlinuz \
1313 --initrd /feos/target/initramfs.zst \
14+ --microcode /feos/target/ucode.cpio \
1415 --cmdline @/feos/target/cmdline \
1516 --secureboot-private-key /feos/keys/secureboot.key \
1617 --secureboot-certificate /feos/keys/secureboot.pem \
You can’t perform that action at this time.
0 commit comments