Revert "A lot of linaro fixes"

This reverts commit 62567d0124b42d3ec38314f4515a79908df14982.