On Fri, Jul 15, 2011 at 11:16:35AM +0200, Bernhard Walle wrote:
> Signed-off-by: Bernhard Walle <[email protected]>
> ---
>  platforms/image_ext2.in    |    8 ++++++++
>  rules/post/image_ext2.make |   13 +++++++++++++
>  2 files changed, 21 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..edddf56 100644
> --- a/rules/post/image_ext2.make
> +++ b/rules/post/image_ext2.make
> @@ -24,6 +24,19 @@ $(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 ..."
> +     @cd $(image/work_dir)

this line does not make any sense.

> +     @tune2fs -j "$(IMAGEDIR)/root.ext2" >> /dev/null
> +     @e2fsck -y "$(IMAGEDIR)/root.ext2" >> /dev/null 2>&1

use '>' instead of '>>'

Michael

> +     @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
> [email protected]
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
[email protected]

Reply via email to