I have a Debian rootfs as a tar file. I would like to specify it as the initramfs source in Kconfig (using PetaLinux), but the source must be a cpio archive.
How can I convert the .tar to .cpio, maintaining its structure, permissions, etc.?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
Try using bsd tar (not GNU tar) -- the magic is to put an
@ before your tarball filename:
bsdtar --format=cpio -cf - @root.tar.gz > root.cpio