 The "Kol HaTor", written by Rabbi Hillel Rivlin, deals at length with the Messiah ben Joseph and his role in bringing back the exiles and rebuilding the Land of Israel.The Kol HaTor states that Joshua is the ancestor of Messiah ben Ephraim.Joshua was the first to wage war against Amalek.