genimage icon indicating copy to clipboard operation
genimage copied to clipboard

Add BTRFS Support

Open liberodark opened this issue 3 years ago • 9 comments

Hi,

I want to build a project on BTRFS. But genimage only support ext2, ext3, ext4... Can you have possibility to add btrfs support.

Best Regards.

liberodark avatar May 22 '21 15:05 liberodark

I don't use btrfs myself so this has a low priority for me. But I would be happy to review a merge request.

michaelolbrich avatar Jun 04 '21 14:06 michaelolbrich

Ok im poke @rtissera when you have time to check that.

liberodark avatar Jun 08 '21 14:06 liberodark

This would be great to have. Is there any kind of guide other than the source code for how to add new filesystems + tests?

lePereT avatar Aug 20 '21 08:08 lePereT

No docs really

About the implementation, this is split into two parts:

  • The setup function validates the configuration and maybe adds some stuff to the fs specific struct. Note, that the input files are not yet available at this point.
  • The generate function actually writes the filesystem image. We try to make things reproducible here. E.g. try to avoid system config files like we do with mke2fs.conf

For tests:

  • Define tools that are needed as prerequisites (that's the exec_test_set_prereq in other tests)
  • run genimage
  • do something to validate the result. Usually by comparing the output of some tool with a file that contains the expected output.

michaelolbrich avatar Oct 08 '21 13:10 michaelolbrich

Hi,

Any new about this feature ?

Best Regards

liberodark avatar Mar 06 '22 21:03 liberodark

Hi, @Harvie

I saw that you had added F2FS do you think you can add BTRFS ? I think it might be useful for you too for PR: https://github.com/pengutronix/genimage/issues/191 Because the BTRFS has a RAID system too and it is simpler than mdam.

Best Regards

liberodark avatar May 17 '22 10:05 liberodark

Hello some try to implent this i hope it help batocera ;) @liberodark

https://github.com/pengutronix/genimage/pull/206

yodatak avatar Nov 12 '22 03:11 yodatak

Hello some try to implent this i hope it help batocera ;)

Thanks for great work! It seems other guys have requested you to make few changes to your code in #206 before it can be merged to official genimage repository. This is not unusual thing to happen and it does help to maintain genimage codebase in top shape, so please don't get discouraged by it.

Harvie avatar Jan 12 '24 15:01 Harvie

Thank you @yodatak Have make a PR for try to merge this fonctionnality. Based on https://github.com/pengutronix/genimage/pull/206

liberodark avatar Jan 18 '24 14:01 liberodark