File: jenkins.sh

package info (click to toggle)
osmocom-dahdi-linux 0.0~git20241003.b2ea348-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 7,996 kB
  • sloc: ansic: 116,373; perl: 2,391; sh: 982; makefile: 357
file content (39 lines) | stat: -rwxr-xr-x 848 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh -ex
# Build the kernel module against the linux tree in KSRC

DEFCONFIG="${DEFCONFIG:-x86_64_defconfig}"
TOPDIR="$(realpath "$(dirname "$(realpath "$0")")/..")"
KSRC="${KSRC:-$TOPDIR/../linux}"
JOBS="${JOBS:-9}"

if ! [ -d "$KSRC" ]; then
	set +x
	echo "ERROR: KSRC does not exist: $KSRC"
	echo "Let the KSRC env var point at a linux source tree and try again."
	exit 1
fi

cd "$KSRC"

if ! [ -e ".config" ]; then
	make "$DEFCONFIG"
fi

if [ "arch/x86/configs/$DEFCONFIG" -nt ".config" ]; then
	set +x
	echo "ERROR: .config inside kernel source tree is older than $DEFCONFIG"
	echo "Move/delete/touch .config and try again."
	exit 1
fi

git log -1 --pretty="%t - %s"

make -j "$JOBS" modules_prepare

# Wno-error=address: OS#6098
make \
	-j "$JOBS" \
	-C "$TOPDIR" \
	KSRC="$KSRC" \
	KBUILD_MODPOST_WARN=1 \
	KCFLAGS="-Wno-error=address"