Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) # Select broken dependency issue
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) # Test with:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) # make KBUILD_KCONFIG=Documentation/kbuild/Kconfig.select-break menuconfig
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) # kconfig will not complain and enable this layout for configuration. This is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) # currently a feature of kconfig, given select was designed to be heavy handed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) # Kconfig currently does not check the list of symbols listed on a symbol's
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) # "select" list, this is done on purpose to help load a set of known required
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) # symbols. Because of this use of select should be used with caution. An
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) # example of this issue is below.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) # The option B and C are clearly contradicting with respect to A.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) # However, when A is set, C can be set as well because Kconfig does not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) # visit the dependencies of the select target (in this case B).  And since
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) # Kconfig does not visit the dependencies, it breaks the dependencies of B
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) # (!A).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) mainmenu "Simple example to demo kconfig select broken dependency issue"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) config A
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 	bool "CONFIG A"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) config B
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) 	bool "CONFIG B"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) 	depends on !A
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) config C
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 	bool "CONFIG C"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) 	depends on A
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 	select B