18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ci# 38c2ecf20Sopenharmony_ci# Kbuild for top-level directory of the kernel 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci##### 68c2ecf20Sopenharmony_ci# Generate bounds.h 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_cibounds-file := include/generated/bounds.h 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_cialways-y := $(bounds-file) 118c2ecf20Sopenharmony_citargets := kernel/bounds.s 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci$(bounds-file): kernel/bounds.s FORCE 148c2ecf20Sopenharmony_ci $(call filechk,offsets,__LINUX_BOUNDS_H__) 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci##### 178c2ecf20Sopenharmony_ci# Generate timeconst.h 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_citimeconst-file := include/generated/timeconst.h 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_cifilechk_gentimeconst = echo $(CONFIG_HZ) | bc -q $< 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci$(timeconst-file): kernel/time/timeconst.bc FORCE 248c2ecf20Sopenharmony_ci $(call filechk,gentimeconst) 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci##### 278c2ecf20Sopenharmony_ci# Generate asm-offsets.h 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_cioffsets-file := include/generated/asm-offsets.h 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_cialways-y += $(offsets-file) 328c2ecf20Sopenharmony_citargets += arch/$(SRCARCH)/kernel/asm-offsets.s 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ciarch/$(SRCARCH)/kernel/asm-offsets.s: $(timeconst-file) $(bounds-file) 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci$(offsets-file): arch/$(SRCARCH)/kernel/asm-offsets.s FORCE 378c2ecf20Sopenharmony_ci $(call filechk,offsets,__ASM_OFFSETS_H__) 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci##### 408c2ecf20Sopenharmony_ci# Check for missing system calls 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_cialways-y += missing-syscalls 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ciquiet_cmd_syscalls = CALL $< 458c2ecf20Sopenharmony_ci cmd_syscalls = $(CONFIG_SHELL) $< $(CC) $(c_flags) $(missing_syscalls_flags) 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_cimissing-syscalls: scripts/checksyscalls.sh $(offsets-file) FORCE 488c2ecf20Sopenharmony_ci $(call cmd,syscalls) 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ci##### 518c2ecf20Sopenharmony_ci# Check atomic headers are up-to-date 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_cialways-y += old-atomics 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ciquiet_cmd_atomics = CALL $< 568c2ecf20Sopenharmony_ci cmd_atomics = $(CONFIG_SHELL) $< 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_ciold-atomics: scripts/atomic/check-atomics.sh FORCE 598c2ecf20Sopenharmony_ci $(call cmd,atomics) 60