You did perform the oil priming procedure prior to complete start up?
Have you replaced your Vanos Solenoids? If yes then how many miles ago?
Your battery was disconnected prior to any work done?
https://bmwfault.codes/
Type your codes when prompted in the link above, to give you a better idea of whats happening.