• Home
  • Raw
  • Download

Lines Matching +full:json +full:- +full:schema

1 # SPDX-License-Identifier: GPL-2.0
3 asflags-y += $(EXTRA_AFLAGS)
4 ccflags-y += $(EXTRA_CFLAGS)
5 cppflags-y += $(EXTRA_CPPFLAGS)
6 ldflags-y += $(EXTRA_LDFLAGS)
8 $(warning 'always' is deprecated. Please use 'always-y' instead)
9 always-y += $(always)
11 ifneq ($(hostprogs-y),)
12 $(warning 'hostprogs-y' is deprecated. Please use 'hostprogs' instead)
13 hostprogs += $(hostprogs-y)
15 ifneq ($(hostprogs-m),)
16 $(warning 'hostprogs-m' is deprecated. Please use 'hostprogs' instead)
17 hostprogs += $(hostprogs-m)
21 KBUILD_AFLAGS += $(subdir-asflags-y)
22 KBUILD_CFLAGS += $(subdir-ccflags-y)
27 # When an object is listed to be built compiled-in and modular,
28 # only build the compiled-in version
29 obj-m := $(filter-out $(obj-y),$(obj-m))
32 # Filter out objects already built-in
33 lib-y := $(filter-out $(obj-y), $(sort $(lib-y) $(lib-m)))
36 subdir-ym := $(sort $(subdir-y) $(subdir-m) \
37 $(patsubst %/,%, $(filter %/, $(obj-y) $(obj-m))))
40 # - If we encounter foo/ in $(obj-y), replace it by foo/built-in.a and
42 # - If we encounter foo/ in $(obj-m), replace it by foo/modules.order
45 # information about ordering between -y and -m subdirs. Just put -y's first.
47 ifdef need-modorder
48 obj-m := $(patsubst %/,%/modules.order, $(filter %/, $(obj-y)) $(obj-m))
50 obj-m := $(filter-out %/, $(obj-m))
53 ifdef need-builtin
54 obj-y := $(patsubst %/, %/built-in.a, $(obj-y))
56 obj-y := $(filter-out %/, $(obj-y))
59 # If $(foo-objs), $(foo-y), $(foo-m), or $(foo-) exists, foo.o is a composite object
60 multi-used-y := $(sort $(foreach m,$(obj-y), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-
61 multi-used-m := $(sort $(foreach m,$(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-
62 multi-used := $(multi-used-y) $(multi-used-m)
64 # Replace multi-part objects by their individual parts,
65 # including built-in.a from subdirectories
66 real-obj-y := $(foreach m, $(obj-y), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-))),$($(…
67 …eal-obj-m := $(foreach m, $(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m)) $($(…
69 always-y += $(always-m)
71 # hostprogs-always-y += foo
74 # always-y += foo
75 hostprogs += $(hostprogs-always-y) $(hostprogs-always-m)
76 always-y += $(hostprogs-always-y) $(hostprogs-always-m)
78 # userprogs-always-y is likewise.
79 userprogs += $(userprogs-always-y) $(userprogs-always-m)
80 always-y += $(userprogs-always-y) $(userprogs-always-m)
84 extra-y += $(dtb-y)
85 extra-$(CONFIG_OF_ALL_DTBS) += $(dtb-)
88 extra-y += $(patsubst %.dtb,%.dt.yaml, $(dtb-y))
89 extra-$(CONFIG_OF_ALL_DTBS) += $(patsubst %.dtb,%.dt.yaml, $(dtb-))
94 extra-y := $(addprefix $(obj)/,$(extra-y))
95 always-y := $(addprefix $(obj)/,$(always-y))
97 obj-m := $(addprefix $(obj)/,$(obj-m))
98 lib-y := $(addprefix $(obj)/,$(lib-y))
99 real-obj-y := $(addprefix $(obj)/,$(real-obj-y))
100 real-obj-m := $(addprefix $(obj)/,$(real-obj-m))
101 multi-used-m := $(addprefix $(obj)/,$(multi-used-m))
102 subdir-ym := $(addprefix $(obj)/,$(subdir-ym))
104 # Finds the multi-part object the current object will be linked into.
105 # If the object belongs to two or more multi-part objects, list them all.
106 modname-multi = $(sort $(foreach m,$(multi-used),\
107 $(if $(filter $*.o, $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m))),$(m:.o=))))
109 __modname = $(if $(modname-multi),$(modname-multi),$(basetarget))
115 target-stem = $(basename $(patsubst $(obj)/%,%,$@))
120 name-fix-token = $(subst $(comma),_,$(subst -,_,$1))
121 name-fix = $(call stringify,$(call name-fix-token,$1))
122 basename_flags = -DKBUILD_BASENAME=$(call name-fix,$(basetarget))
123 modname_flags = -DKBUILD_MODNAME=$(call name-fix,$(modname)) \
124 -D__KBUILD_MODNAME=kmod_$(call name-fix-token,$(modname))
125 modfile_flags = -DKBUILD_MODFILE=$(call stringify,$(modfile))
127 _c_flags = $(filter-out $(CFLAGS_REMOVE_$(target-stem).o), \
128 $(filter-out $(ccflags-remove-y), \
129 $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(ccflags-y)) \
130 $(CFLAGS_$(target-stem).o))
131 _a_flags = $(filter-out $(AFLAGS_REMOVE_$(target-stem).o), \
132 $(filter-out $(asflags-remove-y), \
133 $(KBUILD_CPPFLAGS) $(KBUILD_AFLAGS) $(asflags-y)) \
134 $(AFLAGS_$(target-stem).o))
135 _cpp_flags = $(KBUILD_CPPFLAGS) $(cppflags-y) $(CPPFLAGS_$(target-stem).lds)
184 _c_flags += -I $(srctree)/$(src) -I $(objtree)/$(obj)
185 _a_flags += -I $(srctree)/$(src) -I $(objtree)/$(obj)
186 _cpp_flags += -I $(srctree)/$(src) -I $(objtree)/$(obj)
190 part-of-module = $(if $(filter $(basename $@).o, $(real-obj-m)),y)
191 quiet_modtag = $(if $(part-of-module),[M], )
194 $(if $(part-of-module), \
198 modkern_aflags = $(if $(part-of-module), \
202 c_flags = -Wp,-MMD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \
203 -include $(srctree)/include/linux/compiler_types.h \
207 a_flags = -Wp,-MMD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \
210 cpp_flags = -Wp,-MMD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \
213 ld_flags = $(KBUILD_LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F))
215 DTC_INCLUDE := $(srctree)/scripts/dtc/include-prefixes
217 dtc_cpp_flags = -Wp,-MMD,$(depfile).pre.tmp -nostdinc \
218 $(addprefix -I,$(DTC_INCLUDE)) \
219 -undef -D__DTS__
250 # and add target to extra-y so that we know we have to
254 # ---------------------------------------------------------------------------
257 cmd_ld = $(LD) $(ld_flags) $(real-prereqs) -o $@
260 # ---------------------------------------------------------------------------
263 cmd_ar = rm -f $@; $(AR) cDPrsT $@ $(real-prereqs)
266 # ---------------------------------------------------------------------------
272 # ---------------------------------------------------------------------------
275 cmd_gzip = cat $(real-prereqs) | $(KGZIP) -n -f -9 > $@
278 # ---------------------------------------------------------------------------
280 DTC_FLAGS += -Wno-interrupt_provider
284 DTC_FLAGS += -Wno-unit_address_vs_reg \
285 -Wno-unit_address_format \
286 -Wno-avoid_unnecessary_addr_size \
287 -Wno-alias_paths \
288 -Wno-graph_child_address \
289 -Wno-simple_bus_reg \
290 -Wno-unique_unit_address \
291 -Wno-pci_device_reg
295 DTC_FLAGS += -Wnode_name_chars_strict \
296 -Wproperty_name_chars_strict \
297 -Winterrupt_provider
306 echo '\#include <asm-generic/vmlinux.lds.h>'; \
309 echo '.global __dtb_$(subst -,_,$(*F))_begin'; \
310 echo '__dtb_$(subst -,_,$(*F))_begin:'; \
312 echo '__dtb_$(subst -,_,$(*F))_end:'; \
313 echo '.global __dtb_$(subst -,_,$(*F))_end'; \
321 cmd_dtc = $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
322 $(DTC) -O $(patsubst .%,%,$(suffix $@)) -o $@ -b 0 \
323 $(addprefix -i,$(dir $<) $(DTC_INCLUDE)) $(DTC_FLAGS) \
324 -d $(depfile).dtc.tmp $(dtc-tmp) ; \
330 DT_CHECKER ?= dt-validate
333 DT_TMP_SCHEMA ?= $(objtree)/$(DT_BINDING_DIR)/processed-schema.json
336 cmd_dtb_check = $(DT_CHECKER) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA) $@
346 dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
349 # ---------------------------------------------------------------------------
352 # append the size as a 32-bit littleendian number as gzip does.
355 for F in $(real-prereqs); do \
356 fsize=$$($(CONFIG_SHELL) $(srctree)/scripts/file-size.sh $$F); \
369 cmd_bzip2 = { cat $(real-prereqs) | $(KBZIP2) -9; $(size_append); } > $@
372 # ---------------------------------------------------------------------------
375 cmd_lzma = { cat $(real-prereqs) | $(LZMA) -9; $(size_append); } > $@
378 cmd_lzo = { cat $(real-prereqs) | $(KLZOP) -9; $(size_append); } > $@
381 cmd_lz4 = { cat $(real-prereqs) | $(LZ4) -l -c1 stdin stdout; \
384 # U-Boot mkimage
385 # ---------------------------------------------------------------------------
393 UIMAGE_OPTS-y ?=
397 UIMAGE_NAME ?= 'Linux-$(KERNELRELEASE)'
400 cmd_uimage = $(BASH) $(MKIMAGE) -A $(UIMAGE_ARCH) -O linux \
401 -C $(UIMAGE_COMPRESSION) $(UIMAGE_OPTS-y) \
402 -T $(UIMAGE_TYPE) \
403 -a $(UIMAGE_LOADADDR) -e $(UIMAGE_ENTRYADDR) \
404 -n $(UIMAGE_NAME) -d $< $@
407 # ---------------------------------------------------------------------------
421 # big dictionary would increase the memory usage too much in the multi-call
424 cmd_xzkern = { cat $(real-prereqs) | sh $(srctree)/scripts/xz_wrap.sh; \
428 cmd_xzmisc = cat $(real-prereqs) | $(XZ) --check=crc32 --lzma2=dict=1MiB > $@
431 # ---------------------------------------------------------------------------
447 cmd_zstd = { cat $(real-prereqs) | $(ZSTD) -19; $(size_append); } > $@
450 cmd_zstd22 = { cat $(real-prereqs) | $(ZSTD) -22 --ultra; $(size_append); } > $@
453 # ---------------------------------------------------------------------------
455 # Default sed regexp - multiline due to syntax constraints
458 # the .ascii directive whereas GCC keeps the <space> as-is.
459 define sed-offsets
461 /^->/{s:->#\(.*\):/* \1 */:; \
462 s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \
463 s:->::; p;}'
477 sed -ne $(sed-offsets) < $<; \