Added arch detection for kernel compile process