[PATCH] ext4 filesystem support

Sascha Hauer s.hauer at pengutronix.de
Mon Dec 3 05:27:44 EST 2012


Hi All,

The following adds ext4 readonly filesystem support to barebox.
The implementation is from U-Boot which recently gained ext4
support.
ext filesystems can automatically be detected, so the -t option
to mount is not necessary. Some preparation is needed because
ext filesystems have their magic at byte offset 1080. Currently
we do not pass in such a big buffer into the filesystem detection
code. To fix this we now pass the buffer size to the file detection
code so that we do not read past the buffer.

Sascha

----------------------------------------------------------------
Sascha Hauer (4):
      ls command: call stat() only when necessary
      filetype: Pass bufsize
      add ext fs detection support
      fs: implement initial ext4 support from U-Boot

 arch/arm/lib/bootm.c                 |    2 +-
 arch/arm/mach-imx/imx-bbu-internal.c |    4 +-
 commands/bootm.c                     |    2 +-
 commands/ls.c                        |    9 +-
 common/filetype.c                    |   47 ++-
 common/uimage.c                      |    2 +-
 fs/Kconfig                           |    2 +
 fs/Makefile                          |    1 +
 fs/ext4/Kconfig                      |    3 +
 fs/ext4/Makefile                     |    1 +
 fs/ext4/ext4_common.c                |  551 ++++++++++++++++++++++++++++++++++
 fs/ext4/ext4_common.h                |   58 ++++
 fs/ext4/ext4fs.c                     |  153 ++++++++++
 fs/ext4/ext4fs.h                     |  127 ++++++++
 fs/ext4/ext_barebox.c                |  293 ++++++++++++++++++
 fs/ext4/ext_common.h                 |  195 ++++++++++++
 include/filetype.h                   |    5 +-
 lib/gui/image_renderer.c             |    6 +-
 lib/uncompress.c                     |    4 +-
 19 files changed, 1438 insertions(+), 27 deletions(-)
 create mode 100644 fs/ext4/Kconfig
 create mode 100644 fs/ext4/Makefile
 create mode 100644 fs/ext4/ext4_common.c
 create mode 100644 fs/ext4/ext4_common.h
 create mode 100644 fs/ext4/ext4fs.c
 create mode 100644 fs/ext4/ext4fs.h
 create mode 100644 fs/ext4/ext_barebox.c
 create mode 100644 fs/ext4/ext_common.h



More information about the barebox mailing list