base-files: add generic preinit script to extract board/model info from device-tree