Commit | Line | Data |
---|---|---|
b2441318 | 1 | # SPDX-License-Identifier: GPL-2.0 |
86feeaa8 SR |
2 | # |
3 | # Kbuild for top-level directory of the kernel | |
86feeaa8 | 4 | |
39664e2f | 5 | ##### |
01d509a4 | 6 | # Generate bounds.h |
39664e2f MY |
7 | |
8 | bounds-file := include/generated/bounds.h | |
9 | ||
5f2fb52f | 10 | always-y := $(bounds-file) |
8a58e162 | 11 | targets := kernel/bounds.s |
39664e2f | 12 | |
11fda148 | 13 | $(bounds-file): kernel/bounds.s FORCE |
70a4fd6c | 14 | $(call filechk,offsets,__LINUX_BOUNDS_H__) |
1cdf25d7 CL |
15 | |
16 | ##### | |
01d509a4 | 17 | # Generate timeconst.h |
0a227985 NMG |
18 | |
19 | timeconst-file := include/generated/timeconst.h | |
20 | ||
ba97df45 | 21 | filechk_gentimeconst = echo $(CONFIG_HZ) | bc -q $< |
0a227985 | 22 | |
11fda148 | 23 | $(timeconst-file): kernel/time/timeconst.bc FORCE |
0a227985 NMG |
24 | $(call filechk,gentimeconst) |
25 | ||
26 | ##### | |
01d509a4 | 27 | # Generate asm-offsets.h |
86feeaa8 | 28 | |
559df2e0 | 29 | offsets-file := include/generated/asm-offsets.h |
86feeaa8 | 30 | |
5f2fb52f | 31 | always-y += $(offsets-file) |
6752ed90 | 32 | targets += arch/$(SRCARCH)/kernel/asm-offsets.s |
1cdf25d7 | 33 | |
11fda148 | 34 | arch/$(SRCARCH)/kernel/asm-offsets.s: $(timeconst-file) $(bounds-file) |
86feeaa8 | 35 | |
11fda148 | 36 | $(offsets-file): arch/$(SRCARCH)/kernel/asm-offsets.s FORCE |
70a4fd6c | 37 | $(call filechk,offsets,__ASM_OFFSETS_H__) |
86feeaa8 | 38 | |
c53aeca0 | 39 | ##### |
01d509a4 | 40 | # Check for missing system calls |
c53aeca0 | 41 | |
5f2fb52f | 42 | always-y += missing-syscalls |
5f7efb4c | 43 | |
c53aeca0 | 44 | quiet_cmd_syscalls = CALL $< |
44656fa0 | 45 | cmd_syscalls = $(CONFIG_SHELL) $< $(CC) $(c_flags) $(missing_syscalls_flags) |
c53aeca0 | 46 | |
5f7efb4c | 47 | missing-syscalls: scripts/checksyscalls.sh $(offsets-file) FORCE |
c53aeca0 | 48 | $(call cmd,syscalls) |
1cdf25d7 | 49 | |
f197d75f | 50 | ##### |
ffd602eb | 51 | # Check atomic headers are up-to-date |
8d325880 | 52 | |
5f2fb52f | 53 | always-y += old-atomics |
8d325880 MR |
54 | |
55 | quiet_cmd_atomics = CALL $< | |
bdf37b4d | 56 | cmd_atomics = $(CONFIG_SHELL) $< |
8d325880 MR |
57 | |
58 | old-atomics: scripts/atomic/check-atomics.sh FORCE | |
59 | $(call cmd,atomics) |