forked from project-oak/oak
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Download and pin upstream linux kernel via nix (project-oak#4868)
First step towards attempting to build and cache it via nix too, but this is also useful in itself to make sure that the archive does not change. b/328294742
- Loading branch information
Showing
2 changed files
with
37 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
all: target/vmlinux | ||
|
||
target/vmlinux: target/bzImage | ||
target/linux-6.7.6/scripts/extract-vmlinux target/bzImage > target/vmlinux | ||
|
||
target/linux-6.7.6/scripts/extract-vmlinux target/bzImage > target/vmlinux | ||
|
||
target/bzImage: target/linux-6.7.6 configs/6.7.6/minimal.config | ||
KCONFIG_CONFIG=../../configs/6.7.6/minimal.config $(MAKE) -C target/linux-6.7.6 bzImage -j `nproc` | ||
KCONFIG_CONFIG=../../configs/6.7.6/minimal.config $(MAKE) --directory=target/linux-6.7.6 bzImage --jobs=$$(nproc) | ||
cp target/linux-6.7.6/arch/x86/boot/bzImage target/bzImage | ||
|
||
# LINUX_KERNEL_UPSTREAM is fetched by nix and pinned by its digest. See /flake.nix. | ||
target/linux-6.7.6: | ||
mkdir -p target | ||
curl -O -L --output-dir target https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.7.6.tar.xz | ||
tar -C target -Jxf target/linux-6.7.6.tar.xz | ||
tar --directory=target --xz --extract --file=$${LINUX_KERNEL_UPSTREAM} | ||
patch -p1 -d target/linux-6.7.6 < patches/virtio-dma.patch |