Skip to content

Commit

Permalink
chore(pkg/driverbuilder): small fixes for local builder.
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
  • Loading branch information
FedeDP committed Feb 28, 2024
1 parent 13171b6 commit 2d58a7c
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions pkg/driverbuilder/builder/templates/local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ rm -Rf "/tmp/falco-dkms-make"
{{ else }}
echo "* Building kmod"
{{ if .DownloadSrc }}
# Move to driver folder - cmake configured
cd {{ .DriverBuildDir }}/driver
{{ end }}
# Build the module - cmake configured
make CC={{ .GCCVersion }} driver
{{ else }}
# Build the module - preconfigured sources
make CC={{ .GCCVersion }}
{{ end }}
strip -g {{ .ModuleFullPath }}
# Print results
modinfo {{ .ModuleFullPath }}
Expand All @@ -71,9 +73,17 @@ if [ ! -d /sys/kernel/debug/tracing ]; then
echo "* Mounting debugfs"
mount -t debugfs nodev /sys/kernel/debug
fi
cd {{ .DriverBuildDir }}/bpf

{{ if .DownloadSrc }}
# Build the eBPF probe - cmake configured
make bpf
ls -l driver/bpf/probe.o
{{ else }}
# Build the eBPF probe - preconfigured sources
cd bpf
make
ls -l probe.o
{{ end }}
{{ end }}

rm -Rf /tmp/module-download

0 comments on commit 2d58a7c

Please sign in to comment.