Signed-off-by: Bernhard Walle <bernh...@bwalle.de> --- platforms/image_ext2.in | 8 ++++++++ rules/post/image_ext2.make | 12 ++++++++++++ 2 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/platforms/image_ext2.in b/platforms/image_ext2.in index b28c5e3..c26efd0 100644 --- a/platforms/image_ext2.in +++ b/platforms/image_ext2.in @@ -30,4 +30,12 @@ config IMAGE_EXT2_GZIP help FIXME: This item needs to be documented +config IMAGE_EXT2_JOURNAL + bool + select HOST_E2FSPROGS + prompt "Add a journal to the ext2 file system image, making it ext3" + help + Enable this option if you want to mount the root file system as + ext3 image. + endif diff --git a/rules/post/image_ext2.make b/rules/post/image_ext2.make index 849c8fe..ed7d037 100644 --- a/rules/post/image_ext2.make +++ b/rules/post/image_ext2.make @@ -24,6 +24,18 @@ $(IMAGEDIR)/root.ext2: $(STATEDIR)/image_working_dir ) | $(FAKEROOT) -- @echo "done." +ifdef PTXCONF_IMAGE_EXT2_JOURNAL +# # Since genext2fs cannot generate ext3 images, we use tune2fs to create +# # the journal entry and then run e2fsck to update the revision from 0 +# # to 1 to prevent a mount warning. Since both programs lack a quiet +# # mode we use output redirection (and since we're operating on files +# # and not on real block devices, it's very unlikely that there are +# # errors we want to see. + @echo -n "Adding a journal to root.ext2 ..." + @tune2fs -j "$(IMAGEDIR)/root.ext2" > /dev/null + @e2fsck -y "$(IMAGEDIR)/root.ext2" > /dev/null 2>&1 + @echo "done." +endif $(IMAGEDIR)/root.ext2.gz: $(IMAGEDIR)/root.ext2 @echo -n "Creating root.ext2.gz from root.ext2..."; -- 1.7.6 -- ptxdist mailing list ptxdist@pengutronix.de