Fix DKMS include path parsing
filter-out first argument is the space separated list of patterns. Current implementation will remove any individual "-include" positional arguments which will make cmdline invalid.
more details can be found in https://github.com/RadeonOpenCompute/ROCm/issues/1601
This was also just found and fixed internally. I don't think the fix made it into ROCm 4.5, which was just released last night. It should make it into the next release after that. Our internal patch looks different, though:
--- a/drivers/gpu/drm/amd/dkms/Makefile
+++ b/drivers/gpu/drm/amd/dkms/Makefile
@@ -125,7 +125,7 @@ endif
export OS_NAME OS_VERSION
LINUX_SRCTREE_INCLUDE := \
- $(filter-out -I%/uapi -include %/kconfig.h,$(LINUXINCLUDE))
+ $(filter-out -I%/uapi "-include %/kconfig.h",$(LINUXINCLUDE))
USER_INCLUDE := $(filter-out $(LINUX_SRCTREE_INCLUDE), $(LINUXINCLUDE))
LINUXINCLUDE := \
There was some discussion about a more reliable way to fix this. I'm pointing them at your patch for reference. Thank you for reporting the issue and working out a fix.
"-include %/kconfig.h" works too. Feel free to close PR if you think it's irrelevant or let me know if you want me to change it from sed to "filter-out" stanza.