fixed bug in chroot entry script by splitting it into 2 stages so it can source the cross-compiler properly.