One Direction for Rovers and Bluebell Wood Hospice
Tomlinson, 21, has been given the number 28 shirt and could be to appear for the team's development side at some point this season.
"This has always been a childhood dream for me," Tomlinson told Rovers website.
"I feel very honoured to have been asked to sign for Rovers and being able to help both the club and the amazing charity Bluebell Wood is what it's all about.
"I've been a massive football fan for some time and obviously growing up in Doncaster, so to be part of the club is incredible."
Doncaster chairman John Ryan added: "I am honoured to let Louis play to help raise money for the charity.