Rivian will keep a minority stake in the new company.