Skip to content

Commit

Permalink
fix(pkg): fixed mainline kernel URLs.
Browse files Browse the repository at this point in the history
Moreover, properly enforce KBUILD_MODPOST_WARN in vanilla template.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
  • Loading branch information
FedeDP authored and poiana committed Jun 5, 2023
1 parent 56be153 commit 0fadc3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pkg/driverbuilder/builder/templates/vanilla.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ make KCONFIG_CONFIG=/tmp/kernel.config oldconfig
make KCONFIG_CONFIG=/tmp/kernel.config prepare
make KCONFIG_CONFIG=/tmp/kernel.config modules_prepare

export KBUILD_MODPOST_WARN=1

{{ if .BuildModule }}
# Build the kernel module
cd {{ .DriverBuildDir }}
Expand All @@ -51,4 +53,4 @@ modinfo {{ .ModuleFullPath }}
cd {{ .DriverBuildDir }}/bpf
make KERNELDIR=/tmp/kernel
ls -l probe.o
{{ end }}
{{ end }}
2 changes: 1 addition & 1 deletion pkg/driverbuilder/builder/vanilla.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func fetchVanillaKernelURLFromKernelVersion(kv kernelrelease.KernelRelease) stri
// and thus much quicker to download. Let's keep tar.xz for non RC!
// Numbers: 110M (tar.gz) vs 75M (tar.xz)
if isRC(kv) {
return fmt.Sprintf("https://git.kernel.org/torvalds/t/linux-%s%s.tar.gz", kv.Fullversion, kv.FullExtraversion)
return fmt.Sprintf("https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/snapshot/linux-%s%s.tar.gz", kv.Fullversion, kv.FullExtraversion)
}
return fmt.Sprintf("https://cdn.kernel.org/pub/linux/kernel/v%d.x/linux-%s.tar.xz", kv.Major, kv.Fullversion)
}
Expand Down

0 comments on commit 0fadc3b

Please sign in to comment.