Unlocked bootloaders and open source drivers are the only viable way to get 5+ years of OS support on Android phones. Even with a regulatory mandate, most Android phone manufacturers would be unable to provide satisfactory software maintenance on that kind of time scale. But community projects would be able to do so, and are already doing so in niches where bootloaders and drivers are not a barrier.