kentjhall / horizon-linux

arm64 Linux patched to run programs for the Nintendo Switch’s Horizon OS
Other
660 stars 16 forks source link

Fix unmet dependency bug in Kconfig #1

Closed julianbraha closed 2 years ago

julianbraha commented 2 years ago

When CONFIG_HORIZON is enabled in the kernel configuration, it force-enables CONFIG_MEM_SOFT_DIRTY without ensuring that its dependencies (CONFIG_TRANSPARENT_HUGEPAGE=n and CONFIG_CHECKPOINT_RESTORE=y) are satisfied.

The solution: we can safely force-enable CONFIG_CHECKPOINT_RESTORE too, but since we cannot force-disable CONFIG_TRANSPARENT_HUGEPAGE, we can depend on disabling it.

The other option would be to make CONFIG_HORIZON use depends on MEM_SOFT_DIRTY instead of select MEM_SOFT_DIRTY, but this would require more effort on the user's part.

kentjhall commented 2 years ago

Thanks @julianbraha, yeah I guess I was aware that that wasn't the best way to do it but I didn't want CONFIG_HORIZON to be disabled implicitly due to this dependency. I agree this is probably more correct though, I will just make it clear in the wiki page that CONFIG_TRANSPARENT_HUGEPAGE needs to be disabled.

julianbraha commented 2 years ago

I didn't want CONFIG_HORIZON to be disabled implicitly due to this dependency

This is a good point. I've created #2 to add a default horizon configuration.