[PATCH 1/1 v2] fs: add uimagefs
Alexander Aring
alex.aring at gmail.com
Wed Sep 25 06:49:44 EDT 2013
Hi Christophe,
On Wed, Sep 25, 2013 at 07:31:20AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> this will provide the image data and information via file
>
> # ls -l /tmp/
> -rwxrwxrwx 3 arch
> -rwxrwxrwx 12 compression
> -rwxrwxrwx 16 name
> -rwxrwxrwx 5 os
> -rwxrwxrwx 24 time
> -rwxrwxrwx 12 type
> -rwxrwxrwx 10 load_addr
> -rwxrwxrwx 10 entry_point
> -rwxrwxrwx 2199875 data0
> -rwxrwxrwx 2199875 data
> -rwxrwxrwx 10 data.crc
>
> if it's multi image
>
> # ls -l /tmp-multi/
> -rwxrwxrwx 3 arch
> -rwxrwxrwx 12 compression
> -rwxrwxrwx 16 name
> -rwxrwxrwx 5 os
> -rwxrwxrwx 24 time
> -rwxrwxrwx 16 type
> -rwxrwxrwx 10 load_addr
> -rwxrwxrwx 10 entry_point
> -rwxrwxrwx 1292 data0
> -rwxrwxrwx 983 data1
> -rwxrwxrwx 2287 data
> -rwxrwxrwx 10 data.crc
>
> you can get the image header via an ioctl on any file
> UIMAGEFS_METADATA
>
> if you want to check the crc do
>
> # crc32 -f /tmp-multi/data -V /tmp-multi/data.crc
> CRC32 for /tmp-multi/data 0x00000000 ... 0x000008ee ==> 0x88d5a0db
>
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
> ---
> v2:
>
> add data entry to expose the all data and it's crc as data.crc
> this will allow to check the crc32 from the check
>
> as we do not have mount option
>
> Best Regards,
> J.
> fs/Kconfig | 4 +
> fs/Makefile | 1 +
> fs/uimagefs.c | 554 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> include/uimagefs.h | 53 +++++
> 4 files changed, 612 insertions(+)
> create mode 100644 fs/uimagefs.c
> create mode 100644 include/uimagefs.h
>
> diff --git a/fs/Kconfig b/fs/Kconfig
> index be4797f..d11431d 100644
> --- a/fs/Kconfig
> +++ b/fs/Kconfig
> @@ -44,6 +44,10 @@ config FS_NFS
> source fs/fat/Kconfig
> source fs/ubifs/Kconfig
>
> +config FS_UIMAGEFS
> + bool
> + prompt "uImage FS support"
> +
> config PARTITION_NEED_MTD
> bool
>
> diff --git a/fs/Makefile b/fs/Makefile
> index bd02d94..0bc9116 100644
> --- a/fs/Makefile
> +++ b/fs/Makefile
> @@ -9,3 +9,4 @@ obj-$(CONFIG_FS_UBIFS) += ubifs/
> obj-$(CONFIG_FS_TFTP) += tftp.o
> obj-$(CONFIG_FS_OMAP4_USBBOOT) += omap4_usbbootfs.o
> obj-$(CONFIG_FS_NFS) += nfs.o
> +obj-$(CONFIG_FS_UIMAGEFS) += uimagefs.o
> diff --git a/fs/uimagefs.c b/fs/uimagefs.c
> new file mode 100644
> index 0000000..9ed3cd5
> --- /dev/null
> +++ b/fs/uimagefs.c
> @@ -0,0 +1,554 @@
> +/*
> + * Copyright (c) 2013 Jean-Chritstophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
> + *
s/Jean-Chritstophe/Jean-Christophe/
same issue which Sascha already mentioned on the bpkfs patch.
- Alex
More information about the barebox
mailing list