card script: factor this out

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
bone: auto select dtb or not

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>