Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0
0002 #
0003 # Kbuild for top-level directory of the kernel
0004 
0005 #####
0006 # Generate bounds.h
0007 
0008 bounds-file := include/generated/bounds.h
0009 
0010 always-y := $(bounds-file)
0011 targets := kernel/bounds.s
0012 
0013 $(bounds-file): kernel/bounds.s FORCE
0014         $(call filechk,offsets,__LINUX_BOUNDS_H__)
0015 
0016 #####
0017 # Generate timeconst.h
0018 
0019 timeconst-file := include/generated/timeconst.h
0020 
0021 filechk_gentimeconst = echo $(CONFIG_HZ) | bc -q $<
0022 
0023 $(timeconst-file): kernel/time/timeconst.bc FORCE
0024         $(call filechk,gentimeconst)
0025 
0026 #####
0027 # Generate asm-offsets.h
0028 
0029 offsets-file := include/generated/asm-offsets.h
0030 
0031 always-y += $(offsets-file)
0032 targets += arch/$(SRCARCH)/kernel/asm-offsets.s
0033 
0034 arch/$(SRCARCH)/kernel/asm-offsets.s: $(timeconst-file) $(bounds-file)
0035 
0036 $(offsets-file): arch/$(SRCARCH)/kernel/asm-offsets.s FORCE
0037         $(call filechk,offsets,__ASM_OFFSETS_H__)
0038 
0039 #####
0040 # Check for missing system calls
0041 
0042 always-y += missing-syscalls
0043 
0044 quiet_cmd_syscalls = CALL    $<
0045       cmd_syscalls = $(CONFIG_SHELL) $< $(CC) $(c_flags) $(missing_syscalls_flags)
0046 
0047 missing-syscalls: scripts/checksyscalls.sh $(offsets-file) FORCE
0048         $(call cmd,syscalls)
0049 
0050 #####
0051 # Check atomic headers are up-to-date
0052 
0053 always-y += old-atomics
0054 
0055 quiet_cmd_atomics = CALL    $<
0056       cmd_atomics = $(CONFIG_SHELL) $<
0057 
0058 old-atomics: scripts/atomic/check-atomics.sh FORCE
0059         $(call cmd,atomics)