Skip to content

Commit 0fadc3b

Browse files
FedeDPpoiana
authored andcommitted
fix(pkg): fixed mainline kernel URLs.
Moreover, properly enforce KBUILD_MODPOST_WARN in vanilla template. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
1 parent 56be153 commit 0fadc3b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pkg/driverbuilder/builder/templates/vanilla.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ make KCONFIG_CONFIG=/tmp/kernel.config oldconfig
3636
make KCONFIG_CONFIG=/tmp/kernel.config prepare
3737
make KCONFIG_CONFIG=/tmp/kernel.config modules_prepare
3838

39+
export KBUILD_MODPOST_WARN=1
40+
3941
{{ if .BuildModule }}
4042
# Build the kernel module
4143
cd {{ .DriverBuildDir }}
@@ -51,4 +53,4 @@ modinfo {{ .ModuleFullPath }}
5153
cd {{ .DriverBuildDir }}/bpf
5254
make KERNELDIR=/tmp/kernel
5355
ls -l probe.o
54-
{{ end }}
56+
{{ end }}

pkg/driverbuilder/builder/vanilla.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func fetchVanillaKernelURLFromKernelVersion(kv kernelrelease.KernelRelease) stri
5454
// and thus much quicker to download. Let's keep tar.xz for non RC!
5555
// Numbers: 110M (tar.gz) vs 75M (tar.xz)
5656
if isRC(kv) {
57-
return fmt.Sprintf("https://git.kernel.org/torvalds/t/linux-%s%s.tar.gz", kv.Fullversion, kv.FullExtraversion)
57+
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)
5858
}
5959
return fmt.Sprintf("https://cdn.kernel.org/pub/linux/kernel/v%d.x/linux-%s.tar.xz", kv.Major, kv.Fullversion)
6060
}

0 commit comments

Comments
 (0)