A compilation problem

# include/toplevel.mk
prepare-tmpinfo: FORCE
	@+$(MAKE) -r -s staging_dir/host/.prereq-build $(PREP_MK)
	mkdir -p tmp/info
	$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f include/scan.mk SCAN_TARGET="packageinfo" SCAN_DIR="package" SCAN_NAME="package" SCAN_DEPTH=5 SCAN_EXTRA=""
	$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f include/scan.mk SCAN_TARGET="targetinfo" SCAN_DIR="target/linux" SCAN_NAME="target" SCAN_DEPTH=3 SCAN_EXTRA="" SCAN_MAKEOPTS="TARGET_BUILD=1"
	for type in package target; do \
		f=tmp/.$${type}info; t=tmp/.config-$${type}.in; \
		[ "$$t" -nt "$$f" ] || ./scripts/$${type}-metadata.pl $(_ignore) config "$$f" > "$$t" || { rm -f "$$t"; echo "Failed to build $$t"; false; break; }; \
	[ tmp/.config-feeds.in -nt tmp/.packageauxvars ] || ./scripts/feeds feed_config > tmp/.config-feeds.in
	./scripts/package-metadata.pl mk tmp/.packageinfo > tmp/.packagedeps || { rm -f tmp/.packagedeps; false; }
	./scripts/package-metadata.pl pkgaux tmp/.packageinfo > tmp/.packageauxvars || { rm -f tmp/.packageauxvars; false; }
	./scripts/package-metadata.pl usergroup tmp/.packageinfo > tmp/.packageusergroup || { rm -f tmp/.packageusergroup; false; }
	touch $(TOPDIR)/tmp/.build
# include/scan.mk
$(TMP_DIR)/info/.files-$(SCAN_TARGET).mk: $(FILELIST)
-include $(TMP_DIR)/info/.files-$(SCAN_TARGET).mk   #  $(FILELIST) file will be constructed here

	+( \
		$(NO_TRACE_MAKE) $(FILELIST); \  # Why is it necessary to construct $(FILELIST) here?
                                                                              #  This can cause some problems, such as when manually compiling.This will compile from the top-level Makefile
     # Makefile --> include/toplevel.mk:  %  ::--->  
                                         ---> include/toplevel.mk :$(PRE_MK) make prereq 
                                         ---> Makefile  include/toplevel.mk  # due to PRE_MK ,OPENWRT_BUILD=""
                                         ---> include/toplevel.mk: prepare-tmpinfo 
      # prepare-tmpinfo will scan and failed.
      # I don't think this command is needed for $(TARGET_STAMP)
		MD5SUM=$$(cat $(FILELIST) $(OVERRIDELIST) | $(MKHASH) md5 | awk '{print $$1}'); \
		[ -f "$@.$$MD5SUM" ] || { \
			rm -f $@.*; \
			touch $@.$$MD5SUM; \
			touch $@; \
		} \

	$(call progress,Collecting $(SCAN_NAME) info: merging...)
	-cat $(FILELIST) | awk '{gsub(/\//, "_", $$0);print "$(TMP_DIR)/info/.$(SCAN_TARGET)-" $$0}' | xargs cat > $@ 2>/dev/null 
	$(call progress,Collecting $(SCAN_NAME) info: done)

Refer to the method in toplevel.mk, I want to scan manually:

make  -j1 -r -s -f include/scan.mk SCAN_TARGET="targetinfo" SCAN_DIR="target/linux" SCAN_NAME="target" SCAN_DEPTH=3 SCAN_MAKEOPTS="TARGET_BUILD=1" TOPDIR=$(pwd) INCLUDEDIR=$(pwd)/include

But it failed

root@d33cdc59f198:/home/openwrt# cat logs/package/kernel/cryptodev-linux/dump.txt 
/home/openwrt/include/kernel-version.mk:11: *** Missing kernel version/hash file for . Please create /home/openwrt/include/kernel-.  Stop.
# include/target.mk
ifneq ($(TARGET_BUILD)$(if $(DUMP),,1),)   
  include $(INCLUDE_DIR)/kernel-version.mk

This message is descriptive enough I'd say. Note the space where it should print a kernel version.

As you can see, your kernel version is missing. Supported OpenWrt versions have include/kernel-5.{4,10,15}. Missing here as well:

I reckon this is again an SDK though, and you've probably been hacking at the script in it?

I want to know why need $(NO_TRACE_MAKE) $(FILELIST) for $(TARGET_STAMP) target´╝č