p1: move common stuff to p1-common

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