p1: move common stuff to common repo

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: I686ef7bf8c04ad93e78fbcae2d2388125ddaebb7