You misunderstood and I didn't explain very well.
Features of my little project which are out of cpio feature scope:
- Handles dependencies of modules and their firmware files
- Handles directories differently
- cds into the directory and adds all the files and directories using realtive paths (add them into cpio root)
- Can work as a drop-in file inside /etc/kernel/postinst.d
- Compresses the archive
All the files with absolute paths are added as-is but binaries are inspected if they need any dynanic libraries. Those library files are automatically added to the cpio.
Modules listed with their name only (no path given) are inspected for dependencies also.
If
--auto-firmware is being used then all the firmware files which are associated with listed modules are also added automatically.
All these features are not something cpio would need built-in.
The reason I want to concatenate cpio archives is to make it a little neat.
Normally there's an EOF marker inside every cpio archive: A pseudo file named 'TRAILER!!!' with zero size. I'm removing this marker. It's not really neccessary in case of initramfs images. But normally you'd need to run cpio inside a loop to be able to extract or list the files it contains.
So yes. cpio archives are files concatenated, but cpio still has the EOF marker.
man 5 cpio is really interesting read in its own right. I've been reading it quite many times now. :P
Anyway... Too much off-topic now.