[Concept,00/26] fs: ext4l: Add support for mounting ext4 filesystems (part G)

Message ID 20251222115639.700578-1-sjg@u-boot.org
Headers
Series fs: ext4l: Add support for mounting ext4 filesystems (part G) |

Message

Simon Glass Dec. 22, 2025, 11:56 a.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

This series adds the ext4l filesystem driver, which is a port of the
Linux ext4 driver to U-Boot. It allows mounting ext4 filesystems in
read-only mode.

The driver uses Linux kernel code directly where possible, with
compatibility shims to handle differences between Linux and U-Boot.
This approach makes it easier to keep the driver up to date with
upstream changes.

Key features:
- Read-only mounting of ext4 filesystems
- Support for extents, flex_bg, and other ext4 features
- Buffer cache for improved performance
- CRC32C checksums for metadata verification


Simon Glass (26):
  fs: ext4l: Add minimal probe support
  linux: Move common types to types.h
  fs: ext4l: Add CONFIG_EXT4_JOURNAL option
  linux: Add jiffies.h with MAX_JIFFY_OFFSET
  linux: Add blk_types.h with blk_opf_t
  linux: Add BDEVNAME_SIZE to blkdev.h
  linux: Update jbd2.h includes
  linux: printk: Fix KERN_* macros for string concatenation
  linux: Add rwlock support to spinlock.h
  fs: ext4l: Use types from linux headers
  fs: jbd2: Add jbd2_journal_init_global() for ext4l
  fs: ext4: Allow EXT4_WRITE with FS_EXT4L
  fs: ext4l: Initialise multi-block allocator
  fs: ext4l: Initialise extent status cache
  fs: ext4l: Add super_block and block_device allocations
  fs: ext4l: Allocate fs_context
  fs: ext4l: Allocate ext4_fs_context
  fs: ext4l: Initialise super_block and call ext4_fill_super()
  fs: ext4l: Add buffer_head I/O infrastructure
  fs: ext4l: Add CONFIG_EXT4L_DEBUG to control messages
  fs: ext4l: Use real rbtree implementation
  fs: ext4l: Add CRC32C implementation
  linux: crc32c: Use ext4l CRC32C implementation
  fs: ext4l: Mount filesystems read-only
  fs: ext4l: Add inode and bmap functions
  fs: ext4l: Support mounting a filesystem read-only

 .pickman-history                              | 121 +++
 arch/arm/dts/k3-am62a-ddr.dtsi                |   7 +-
 arch/arm/dts/k3-j721s2-ddr.dtsi               |  12 +-
 arch/arm/dts/k3-j784s4-ddr.dtsi               |  24 +-
 arch/arm/mach-k3/Kconfig                      |   3 +
 arch/arm/mach-k3/Makefile                     |   2 +-
 arch/arm/mach-k3/am62px/am62p5_fdt.c          |  83 ++
 arch/arm/mach-k3/am62px/am62p5_init.c         |  62 ++
 .../arm/mach-k3/include/mach/am62p_hardware.h |  65 ++
 arch/arm/mach-k3/include/mach/k3-ddr.h        |  15 +
 arch/arm/mach-k3/k3-ddr.c                     |  72 ++
 board/ti/am62ax/evm.c                         |  17 +-
 board/ti/am62px/evm.c                         |  17 +-
 board/ti/am62x/evm.c                          |  63 +-
 board/ti/am64x/evm.c                          |  73 +-
 board/ti/am65x/evm.c                          |  29 +-
 board/ti/common/Makefile                      |   1 +
 board/ti/common/k3-ddr.c                      |  33 +
 board/ti/common/k3-ddr.h                      |  12 +
 board/ti/j721e/evm.c                          |  29 +-
 board/ti/j721s2/evm.c                         |  35 +-
 board/ti/j722s/evm.c                          |  17 +-
 board/ti/j784s4/evm.c                         |  17 +-
 configs/am62ax_evm_a53_defconfig              |   1 -
 configs/am62px_evm_a53_defconfig              |   1 -
 configs/am62x_evm_a53_defconfig               |   1 -
 configs/am62x_evm_r5_defconfig                |   1 -
 configs/am64x_evm_a53_defconfig               |   1 -
 configs/am64x_evm_r5_defconfig                |   1 -
 configs/am65x_evm_a53_defconfig               |   1 -
 configs/am65x_evm_r5_defconfig                |   1 -
 configs/am65x_evm_r5_usbdfu_defconfig         |   1 -
 configs/am65x_evm_r5_usbmsc_defconfig         |   1 -
 configs/j7200_evm_a72_defconfig               |   1 -
 configs/j721e_evm_a72_defconfig               |   1 -
 configs/j721s2_evm_a72_defconfig              |   1 -
 configs/j722s_evm_a53_defconfig               |   1 -
 configs/j784s4_evm_a72_defconfig              |   1 -
 drivers/ram/Kconfig                           |  10 +
 drivers/ram/k3-ddrss/k3-ddrss.c               | 219 +++++-
 fs/Makefile                                   |   2 +-
 fs/ext4/Kconfig                               |   2 +-
 fs/ext4l/Kconfig                              |  23 +
 fs/ext4l/Makefile                             |   2 +-
 fs/ext4l/ext4.h                               |  31 +
 fs/ext4l/ext4_uboot.h                         | 151 ++--
 fs/ext4l/extents_status.c                     |   5 +-
 fs/ext4l/interface.c                          | 224 +++++-
 fs/ext4l/stub.c                               |  49 +-
 fs/ext4l/super.c                              |  38 +-
 fs/ext4l/support.c                            | 555 +++++++++++++
 fs/fs_legacy.c                                |   5 +-
 fs/jbd2/journal.c                             |  22 +
 include/ext4l.h                               |  31 +
 include/linux/blk_types.h                     |  18 +
 include/linux/blkdev.h                        |   3 +
 include/linux/buffer_head.h                   |   8 +-
 include/linux/compat.h                        |  16 +-
 include/linux/crc32c.h                        |  19 +-
 include/linux/jbd2.h                          |   5 +
 include/linux/jiffies.h                       |  18 +
 include/linux/printk.h                        |  18 +-
 include/linux/spinlock.h                      |  21 +
 include/linux/types.h                         |  36 +
 tools/buildman/func_test.py                   |   1 +
 tools/buildman/main.py                        |   4 +-
 tools/buildman/test_boards.py                 | 739 ++++++++++++++++++
 tools/pickman/README.rst                      |  70 +-
 tools/pickman/agent.py                        |  69 +-
 tools/pickman/control.py                      |  73 ++
 tools/pickman/ftest.py                        |  82 ++
 71 files changed, 2907 insertions(+), 486 deletions(-)
 create mode 100644 arch/arm/mach-k3/include/mach/k3-ddr.h
 create mode 100644 arch/arm/mach-k3/k3-ddr.c
 create mode 100644 board/ti/common/k3-ddr.c
 create mode 100644 board/ti/common/k3-ddr.h
 create mode 100644 fs/ext4l/support.c
 create mode 100644 include/ext4l.h
 create mode 100644 include/linux/blk_types.h
 create mode 100644 include/linux/jiffies.h
 create mode 100644 tools/buildman/test_boards.py