make_ext4fs to generate filesystem
make_ext4fs to generate filesystem
Posted Oct 12, 2020 16:36 UTC (Mon) by mebrown (subscriber, #7960)In reply to: make_ext4fs to generate filesystem by jhhaller
Parent article: The ABI status of filesystem formats
The yocto build system has a utility called 'pseudo'.
It uses an LD_PRELOAD library such that anything doing a mknod() libc call is saved to a database instead of invoking the underlying mknod() call, and instead just creates a regular placeholder file.
Then when you run mke2fs, similarly the LD_PRELOAD then hooks stat() such that mke2fs reading the placeholder file actually reads the details from the database instead of the filesystem.
Seems a little hacky at first, but seems to work well enough in practice.
