Revert "fixes for kernel to compile with BFS"

This reverts commit 1a072be2bbffbd3aa585b5245b68a0e673bb6051.
Revert "Revert "Revert "BFS 404"""

This reverts commit 7e7f8022615be3eaf015fcbfa322318d7c8244d1.