--- zzzz-none-000/linux-5.15.111/Makefile 2023-05-11 14:00:40.000000000 +0000 +++ puma7-atom-6670-761/linux-5.15.111/Makefile 2024-02-07 10:22:26.000000000 +0000 @@ -507,6 +507,7 @@ -I$(srctree)/include/uapi \ -I$(objtree)/include/generated/uapi \ -include $(srctree)/include/linux/compiler-version.h \ + $(USERINCLUDE_AVM_SUBPROJECTS) \ -include $(srctree)/include/linux/kconfig.h # Use LINUXINCLUDE when you must reference the include/ directory. @@ -516,13 +517,16 @@ -I$(objtree)/arch/$(SRCARCH)/include/generated \ $(if $(building_out_of_srctree),-I$(srctree)/include) \ -I$(objtree)/include \ + -I$(srctree)/include/linux/avalanche/generic \ + $(LINUXINCLUDE_AVM_SUBPROJECTS) \ $(USERINCLUDE) KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE -KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \ +KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \ -Werror=implicit-function-declaration -Werror=implicit-int \ -Werror=return-type -Wno-format-security \ + -Wno-unused-parameter \ -std=gnu89 KBUILD_CPPFLAGS := -D__KERNEL__ KBUILD_AFLAGS_KERNEL := @@ -1335,6 +1339,23 @@ rsync -mrl --include='*/' --include='*\.h' --exclude='*' \ usr/include $(INSTALL_HDR_PATH) +## Special cmd defines to fix up MXL/Intel header installation (AVM fixup for SDK delivery) +# In case of merge conflicts, contact your local kbuild team. + +# Header files that shall be exported to user space, are placed below +# include/uapi/, usually, while all other paths are used for kernel-internal +# header files only. Fix misplacement with an ugly 'install' +# (scripts/headers_install.sh cannot be used instead, as it does not allow +# leakage of Kconfig symbols). +quiet_cmd_headers_install_mxl_kapi = HDRINST (MXL: KAPI -> UAPI) usr/include/linux/$(2) + cmd_headers_install_mxl_kapi = \ + install -m 0644 -D $(srctree)/include/linux/$(2) usr/include/linux/$(2) + +# Fix location of misplaced header files, cp. comment above. +quiet_cmd_headers_install_mxl_puma7 = HDRINST (MXL: puma7/ -> linux/) usr/include/linux/$(2) + cmd_headers_install_mxl_puma7 = \ + install -m 0644 -D usr/include/linux/avalanche/puma7/$(2) usr/include/linux/$(2) + PHONY += headers_install headers_install: headers $(call cmd,headers_install) @@ -1348,6 +1369,17 @@ $(if $(filter um, $(SRCARCH)), $(error Headers not exportable for UML)) $(Q)$(MAKE) $(hdr-inst)=include/uapi $(Q)$(MAKE) $(hdr-inst)=arch/$(SRCARCH)/include/uapi + $(Q)$(MAKE) $(hdr-inst)=include/linux/avalanche/ + @# Fix up MXL/Intel header installation (AVM fixup for SDK delivery), + @# list files that need fixup explicitly (no wildcard support) to keep + @# the pain up. + $(call cmd,headers_install_mxl_kapi,ce_mailbox.h) + $(call cmd,headers_install_mxl_kapi,hw_mbox_defs.h) + $(call cmd,headers_install_mxl_kapi,hw_mbox_socket.h) + $(call cmd,headers_install_mxl_kapi,hwMbox_types.h) + $(call cmd,headers_install_mxl_puma7,puma7_npcpu_appcpu_defs.h) + $(call cmd,headers_install_mxl_puma7,synopsys_gbe_interface.h) + $(Q)$(MAKE) lisi-headers # Deprecated. It is no-op now. PHONY += headers_check @@ -2027,6 +2059,8 @@ endif # config-build endif # mixed-build + +-include $(srctree)/avm/make/generated/linux.make endif # need-sub-make PHONY += FORCE