Revert edit on main.mk and fix kernel compile

Change-Id: I43289de071c552dbd2d5b5efacc27b8279357270