Closed Harvie closed 2 years ago
I've been doing some research and f2fs-tools come with tool called sload.f2fs
which allows to load files to filesystem image without mounting it. so i guess implementing this would be quite similar to jffs2 for example. but we need to call both mkfs.f2fs
and sload.f2fs
.
That sound like it's technically possible. But I probably won't have time for it any time soon. But I would be happy to review a pull request for this.
Ok, i might take a look at it today. In the meantime, would you be so kind to take a look at my other PR, which is already pending? :-)
I have some rough code in f2fs branch: https://github.com/Harvie/genimage/tree/f2fs
However when i run it, i get following:
$ ./genimage --config testuj.cfg
INFO: cmd: "rm -rf "/home/harvie/Temp/genimage/tmp"/*" (stderr):
INFO: cmd: "mkdir -p "/home/harvie/Temp/genimage/tmp"" (stderr):
INFO: cmd: "cp -a "/home/harvie/Temp/genimage/root" "/home/harvie/Temp/genimage/tmp/root"" (stderr):
INFO: cmd: "mkdir -p "/home/harvie/Temp/genimage/images"" (stderr):
INFO: f2fs(test.f2fs): cmd: "mkfs.f2fs -l 'f2fstest' -w 512 '/home/harvie/Temp/genimage/images/test.f2fs' 131072" (stderr):
INFO: f2fs(test.f2fs): cmd: "rm -f "/home/harvie/Temp/genimage/images/test.f2fs"" (stderr):
ERROR: f2fs(test.f2fs): failed to generate test.f2fs
INFO: cmd: "rm -rf "/home/harvie/Temp/genimage/tmp"/*" (stderr):
It seems to me that images/test.f2fs
file is not created by the time the mkfs.f2fs
is run. is not genimage supposed to create that file for me before calling the filesystem module?
Yes, now i can confirm that images/test.f2fs
does not exist by the time mkfs is called. weird.
Now i see that mkfs.ext2 does create the image file if it does not exist, while mkfs.f2fs does not create it. @michaelolbrich should i just call /bin/fallocate in such case?
Ok, so i've copied code from image-vfat which solves exactly the same thing.
@michaelolbrich Ok, this PR seems to be working fine: https://github.com/pengutronix/genimage/pull/185
Hello, i would like to use f2fs partitions in my images. would that be possible to add please?