Skip to content

Ext4 xfs#1

Open
linmag7 wants to merge 4 commits intomasterfrom
ext4_xfs
Open

Ext4 xfs#1
linmag7 wants to merge 4 commits intomasterfrom
ext4_xfs

Conversation

@linmag7
Copy link
Owner

@linmag7 linmag7 commented Dec 2, 2025

This pull request adds EXT4 boot support and updates the existing XFS boot
support code. It includes four commits, tagged as:

  • ext4_support
  • xfs_initial
  • xfs_fix
  • xfs_fix_v4

Summary of changes

  • Add initial EXT4 support, including multi-extent reads and 64-bit group
    descriptor handling.
  • Add initial XFS filesystem support to aboot.
  • Fix XFS build issues and add debug output for troubleshooting.
  • Fix XFS DIR2 parsing and restore functional XFS boot support.

…i-extent reads

This adds basic ext4 support to aboot so it can mount and read modern ext4
filesystems commonly found on Alpha systems.

Key features:
  - 64-byte ext4 group descriptor support (using sb.s_desc_size)
  - Accept and whitelist common ext4 INCOMPAT/RO_COMPAT flags:
      64bit, flex_bg, mmp, csum_seed, metadata_csum
  - Implement multi-extent reading for inline extents (eh_depth == 0)
  - Clamp reads to i_size to avoid out-of-range extent lookups

With these changes aboot can successfully mount ext4 partitions and load
kernels stored in files using multiple inline extents. Full extent-tree
support (non-zero eh_depth) and full 64-bit block handling remain future
work.

Signed-off-by: Magnus Lindholm <linmag7@gmail.com>
The following patch is a modified version of the patch written by
j.j.vanderheijden@home.nl and allows aboot to handle XFS partitions.
It has been tested against a Digital Personal Workstation and seems
to work just fine. (patch modifications by Mike Hlavac)
debug output. This code does not work at the moment.
Fix two bugs in the XFS directory reader that prevented aboot from
finding files on XFS v4 (crc=0) filesystems:

  - Add missing read of the 4-byte DIR2 entry header. Without this,
    freetag/length values were uninitialized, causing corrupted
    filenames and incorrect directory offsets.

  - Skip nameless/invalid entries to avoid returning garbage names.

With these fixes, aboot can reliably load files from classic XFS v4
(naming version 2, no CRC). Modern CRC-enabled (v5) XFS filesystems
remain unsupported.

Signed-off-by: Magnus Lindholm <linmag7@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant