Overview
Context
Changes
Added Makefile version [53c5d86523].
|
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
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
# Copyright (C) 2011 Alessandro Ghedini <alessandro@ghedini.me>
# Updated 2012 by Mike Perry to extract syscall table addresses
# Updated 2014 by Francis Brosnan Blázquez to check for ia32 support
obj-m += nokeyctl.o
ifdef M
include $(M)/Makefile.inc
ifndef SYSTEM_MAP_FILE
SYSTEM_MAP_FILE := $(KERNEL_DIR)/System.map
endif
SCT := $(shell grep " sys_call_table" '$(SYSTEM_MAP_FILE)' | awk '{ print $$1; }')
SCT32 := $(shell grep "ia32_sys_call_table" '$(SYSTEM_MAP_FILE)' | awk '{ print $$1; }')
EXTRA_CFLAGS += -Dsys_call_table_addr="((void**)0x$(SCT))"
ifdef SCT32
EXTRA_CFLAGS += -Dia32_sys_call_table_addr="((void**)0x$(SCT32))" -D__enable_32bits_support
endif
else
include Makefile.inc
endif
all:
@echo "Building with " $(EXTRA_CFLAGS)
make -C '$(KERNEL_DIR)' 'M=$(PWD)'
install: all
-mkdir -p '$(DESTDIR)/lib/modules/$(KERNEL_VER)/misc'
cp nokeyctl.ko '$(DESTDIR)/lib/modules/$(KERNEL_VER)/misc/'
clean:
make -C '$(KERNEL_DIR)' 'M=$(PWD)' clean
rm -f Module.symvers built-in.o modules.order nokeyctl.ko nokeyctl.mod.c nokeyctl.mod.o nokeyctl.o
distclean: clean
rm -f Makefile.inc
|
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Added configure version [b512e69854].
|
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
40
41
42
43
44
45
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
#! /bin/bash
if [ -z "${KERNEL_DIR}" ]; then
for tryKernelDir in "/lib/modules/$(uname -r)"/{build,source} "/usr/src/linux-$(uname -r)"; do
if [ -f "${tryKernelDir}/.config" ]; then
kernelDir="${tryKernelDir}"
break
fi
done
else
kernelDir="${KERNEL_DIR}"
fi
if [ -z "${kernelDir}" ]; then
echo "error: Unable to determine kernel build directory. Try specifying the KERNEL_DIR environment variable" >&2
exit 1
fi
if [ -z "${SYSTEM_MAP_FILE}" ]; then
for trySystemMapFile in /proc/kallsyms "${kernelDir}/System.map" "/boot/System.map"; do
if grep ' sys_call_table' "${trySystemMapFile}" >/dev/null 2>/dev/null; then
systemMapFile="${trySystemMapFile}"
break
fi
done
else
systemMapFile="${SYSTEM_MAP_FILE}"
fi
if [ -z "${systemMapFile}" ]; then
echo "error: Unable to determine system map file. Try specifying the SYSTEM_MAP_FILE environment variable." >&2
exit 1
fi
rm -f Makefile.inc
echo "SYSTEM_MAP_FILE = ${systemMapFile}" > Makefile.inc
echo "KERNEL_DIR = ${kernelDir}" >> Makefile.inc
echo "KERNEL_VER = $(uname -r)" >> Makefile.inc
exit 0
|
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Added nokeyctl.c version [4f334e08a5].