Skip to content

Conversation

@renatolfc
Copy link

Type of Change

  • Bug fix
  • New feature
  • Code quality improvement
  • Other (describe): Add support for building on ARMv7 (Raspberry Pi 4, 3)

Description

This Pull request adds support for ARMv7 and fixes #879.

  • Feature / Bug Fix: (Brief description of the feature or issue being addressed)

This Pull request adds support for ARMv7 and fixes #879.

How Has This Been Tested?

  • Built the binary
  • Mounted a storage container with SAS token using blobfuse2 on Arch Linux
  • Used it

Checklist

  • The purpose of this PR is explained in this or a referenced issue.
  • Tests are included and/or updated for code changes.
  • Documentation update required.
  • Updates to module CHANGELOG.md are included.
  • License headers are included in each file.

Related Links

@Copilot Copilot AI review requested due to automatic review settings July 31, 2025 18:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for building Blobfuse2 on ARMv7 architecture (Raspberry Pi 3/4) by addressing platform-specific type compatibility issues between 32-bit and 64-bit systems.

  • Updated C type conversions to use platform-appropriate types (C.off_t, C.off64_t, C.uint64_t)
  • Added platform-specific helper functions for handling word size differences
  • Fixed timestamp conversions to handle different integer sizes across architectures

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
component/libfuse/libfuse_handler_test_wrapper.go Updated test truncate function calls to use C.off_t instead of C.long
component/libfuse/libfuse_handler.go Added platform detection functions and updated C type conversions for cross-platform compatibility
component/file_cache/file_cache.go Fixed timestamp conversions by casting to int64 for ARMv7 compatibility
component/block_cache/frsize_helper_arm.go Added ARM-specific helper for Frsize field assignment
component/block_cache/frsize_helper_amd64.go Added AMD64-specific helper for Frsize field assignment
component/block_cache/block_cache.go Updated to use platform-specific assignFrSize function
component/azstorage/config.go Fixed string formatting issue for integer conversion

@renatolfc
Copy link
Author

image

Screenshot of test above.

I'm new to go, so not quite sure if the platform-dependent files are complete. Would like some advice on that.

@syeleti-msft
Copy link
Member

syeleti-msft commented Aug 1, 2025

Hi @renatolfc, Thanks for contributing. Currently I see no way to test this out as Azure market place neither offer ARM-32 based architectures nor the OS images that can support ARMv7(pls correct me if I'm wrong). are you testing this on a bare metal?

@renatolfc
Copy link
Author

Hello @syeleti-msft, yes. I’m running on bare metal.

One way I was thinking about testing this was by using a GitHub action runner that supports ARM-32. See https://github.com/marketplace/actions/arm-runner.

Another option would be to run this on a virtualized ARMv7 with qemu on a Linux VM. If you think this is a viable way to test, let me know and I can try helping you set up a VM for testing this (in case you need/want help, of course).

In the meanwhile, I have to say that I tried running the test suite without much luck. I might have missed a step. (I only tried running go test, but it complained about the binary not being found.)

I’ll review the docs, but in case you have an easy pointer to follow, please share.

Thanks!

@vibhansa-msft vibhansa-msft modified the milestones: v2-2.5.1, v2-2.5.2 Sep 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

errors when building on PI

3 participants