We can now use debugfs from e2fsprogs to generate ext[34] filesystems without root priveleges and without genext2fs. This is slower than it could be. Ideally this would be integrated into mke2fs from e2fsprogs. To do this we need to move some of the higher level functions (like copy) from debugfs into libext2fs so it is available to both debugfs as well as other programs, including mke2fs. There may be additional functionality required, Robert Yang should be able to provide details on what he has found lacking while integrating the debugfs solution. Once integrated into libext2fs, an argument to mke2fs can be added to populate the newly formatted filesystem from an initial directory. Once merged upstream we can then integrate this method into oe-core's image building routines.
Should be 'enhancement' since it's a feature request.
Robert, are you actively working this? Or is this pending the debugfs fixes and integration first?
(In reply to comment #2) > Robert, are you actively working this? Or is this pending the debugfs fixes > and integration first? Yes, I'm working on it now, the debugfs patches have been sent to the ext4 mailing list, I think that what shall we do next: 1) The draft design for this case: a) Add a [-d <directory>] option to mke2fs to specify the initial directory b) We need copy the following types of files: - directory - regular file | regular empty file - symbolic link - block special file - character special file - fifo c) The hard links d) The sparse file e) Use the following ways to verify the created image: - fsck.ext* -fn - diff -Nur <initial directory> <mounted image> - Verify the sparse file: find -type f -printf "%S\t%p\n" 2>/dev/null | gawk '{if ($1 < 1.0) print $1, $2}' - Use runqemu to test the image 2) Talk with the maintainer of e2fsprogs to see whether such a patch is acceptable. Please feel free to give your comments.
The patches have been sent to linux-ext4 mailing list, but it is not impossible to pass the review in 1.5, so move it 1.6.
Merged into master: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=5809ce0c895ddb96c4b1dd4c87ebd85dfbe5c1a0
Hi, Verified with da6926bc6a17478bd38f0df176116b6552c124f6. Cheers, Ionut C