0013-sunxi-clean-up-modules-definitions.patch 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Thu, 4 May 2017 07:00:06 +0200
  3. Subject: sunxi: clean up modules definitions
  4. Module definitions for kmod-wdt-sunxi and kmod-eeprom-sunxi are removed
  5. (wdt-sunxi was builtin anyways; nvmem-sunxi, which is the new name of
  6. eeprom-sunxi is changed to builtin). As kmod-eeprom-sunxi was specified
  7. in DEFAULT_PACKAGES, but not available on kernel 4.4, it was breaking the
  8. image builder.
  9. Support for kmod-sunxi-ir is added for kernel 4.4 (it is unclear why it
  10. was disable before, it builds fine with with kernel 4.4).
  11. Condtionals only relevant for pre-4.4 kernels are removed from modules.mk,
  12. as sunxi does't support older kernels anymore.
  13. Fixes FS#755.
  14. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
  15. diff --git a/target/linux/sunxi/Makefile b/target/linux/sunxi/Makefile
  16. index b0bc1bab398af55b77909deccd8f059e17d96e67..3c2f14b8418e1d296a239027f6fdee9b5ba8f9b2 100644
  17. --- a/target/linux/sunxi/Makefile
  18. +++ b/target/linux/sunxi/Makefile
  19. @@ -27,7 +27,7 @@ KERNELNAME:=zImage dtbs
  20. include $(INCLUDE_DIR)/target.mk
  21. -DEFAULT_PACKAGES += uboot-envtools kmod-eeprom-sunxi kmod-wdt-sunxi
  22. +DEFAULT_PACKAGES += uboot-envtools
  23. DEFAULT_PACKAGES += mkf2fs e2fsprogs
  24. $(eval $(call BuildTarget))
  25. diff --git a/target/linux/sunxi/config-4.4 b/target/linux/sunxi/config-4.4
  26. index 2253afa124ad6c3d6b9d6798dc29f68437455341..a978e9d15b8c358f69669d3afdbf4a14bba83d31 100644
  27. --- a/target/linux/sunxi/config-4.4
  28. +++ b/target/linux/sunxi/config-4.4
  29. @@ -356,7 +356,7 @@ CONFIG_NO_HZ_COMMON=y
  30. CONFIG_NO_HZ_IDLE=y
  31. CONFIG_NR_CPUS=8
  32. CONFIG_NVMEM=y
  33. -# CONFIG_NVMEM_SUNXI_SID is not set
  34. +CONFIG_NVMEM_SUNXI_SID=y
  35. CONFIG_OF=y
  36. CONFIG_OF_ADDRESS=y
  37. CONFIG_OF_EARLY_FLATTREE=y
  38. diff --git a/target/linux/sunxi/modules.mk b/target/linux/sunxi/modules.mk
  39. index 6f4991798decb4a65f615d3a7282270960a7555a..99b82a3b5f17348049458ced5823f7c90f784269 100644
  40. --- a/target/linux/sunxi/modules.mk
  41. +++ b/target/linux/sunxi/modules.mk
  42. @@ -25,7 +25,7 @@ $(eval $(call KernelPackage,rtc-sunxi))
  43. define KernelPackage/sunxi-ir
  44. SUBMENU:=$(OTHER_MENU)
  45. TITLE:=Sunxi SoC built-in IR support (A20)
  46. - DEPENDS:=@TARGET_sunxi @!LINUX_4_4 +kmod-input-core
  47. + DEPENDS:=@TARGET_sunxi +kmod-input-core
  48. $(call AddDepends/rtc)
  49. KCONFIG:= \
  50. CONFIG_MEDIA_SUPPORT=y \
  51. @@ -42,22 +42,6 @@ endef
  52. $(eval $(call KernelPackage,sunxi-ir))
  53. -define KernelPackage/eeprom-sunxi
  54. - SUBMENU:=$(OTHER_MENU)
  55. - TITLE:=AllWinner Security ID fuse support
  56. - DEPENDS:=@TARGET_sunxi @!LINUX_4_4
  57. - KCONFIG:= \
  58. - CONFIG_EEPROM_SUNXI_SID
  59. - FILES:=$(LINUX_DIR)/drivers/misc/eeprom/sunxi_sid.ko
  60. - AUTOLOAD:=$(call AutoLoad,50,sunxi_sid)
  61. -endef
  62. -
  63. -define KernelPackage/eeprom-sunxi/description
  64. - Support for the AllWinner Security ID fuse support
  65. -endef
  66. -
  67. -$(eval $(call KernelPackage,eeprom-sunxi))
  68. -
  69. define KernelPackage/ata-sunxi
  70. TITLE:=AllWinner sunXi AHCI SATA support
  71. SUBMENU:=$(BLOCK_MENU)
  72. @@ -76,7 +60,7 @@ $(eval $(call KernelPackage,ata-sunxi))
  73. define KernelPackage/sun4i-emac
  74. SUBMENU:=$(NETWORK_DEVICES_MENU)
  75. TITLE:=AllWinner EMAC Ethernet support
  76. - DEPENDS:=@TARGET_sunxi +LINUX_4_4:kmod-of-mdio +LINUX_4_4:kmod-libphy
  77. + DEPENDS:=@TARGET_sunxi +kmod-of-mdio +kmod-libphy
  78. KCONFIG:=CONFIG_SUN4I_EMAC
  79. FILES:=$(LINUX_DIR)/drivers/net/ethernet/allwinner/sun4i-emac.ko
  80. AUTOLOAD:=$(call AutoProbe,sun4i-emac)
  81. @@ -85,35 +69,11 @@ endef
  82. $(eval $(call KernelPackage,sun4i-emac))
  83. -define KernelPackage/wdt-sunxi
  84. - SUBMENU:=$(OTHER_MENU)
  85. - TITLE:=AllWinner sunXi Watchdog timer
  86. - DEPENDS:=@TARGET_sunxi
  87. - KCONFIG:=CONFIG_SUNXI_WATCHDOG
  88. - FILES:=$(LINUX_DIR)/drivers/$(WATCHDOG_DIR)/sunxi_wdt.ko
  89. - AUTOLOAD:=$(call AutoLoad,51,sunxi_wdt)
  90. -endef
  91. -
  92. -define KernelPackage/wdt-sunxi/description
  93. - Kernel module for AllWinner sunXi watchdog timer.
  94. -endef
  95. -
  96. -$(eval $(call KernelPackage,wdt-sunxi))
  97. -
  98. -
  99. define KernelPackage/sound-soc-sunxi
  100. TITLE:=AllWinner built-in SoC sound support
  101. - KCONFIG:= \
  102. - CONFIG_SND_SUNXI_SOC_CODEC \
  103. - CONFIG_SND_SUN4I_CODEC
  104. -ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),lt,4.4.0)),1)
  105. - FILES+=$(LINUX_DIR)/sound/soc/sunxi/sunxi-codec.ko
  106. - AUTOLOAD:=$(call AutoLoad,65,sunxi-codec)
  107. -endif
  108. -ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,4.4.0)),1)
  109. + KCONFIG:=CONFIG_SND_SUN4I_CODEC
  110. FILES:=$(LINUX_DIR)/sound/soc/sunxi/sun4i-codec.ko
  111. AUTOLOAD:=$(call AutoLoad,65,sun4i-codec)
  112. -endif
  113. DEPENDS:=@TARGET_sunxi +kmod-sound-soc-core
  114. $(call AddDepends/sound)
  115. endef