Skip to content

Conversation

@sensei-hacker
Copy link
Member

Summary

Adds documentation about using CMAKE_BUILD_TYPE=Release to save disk space when building firmware for production, CI, or release purposes.

Problem

By default, INAV builds with CMAKE_BUILD_TYPE=RelWithDebInfo which includes maximum debug symbols (-ggdb3). When building all ~100 targets, this consumes ~109 GB of disk space. The debug symbols are automatically stripped from the final .hex files, so they provide no benefit for production builds.

Solution

Document the use of CMAKE_BUILD_TYPE=Release for production builds, which reduces disk usage to ~4-6 GB (96% reduction) while producing identical final binaries.

Changes

docs/development/Building in Linux.md

  • Added brief note about debug symbols in single target build section
  • Added new "Building All Targets or Release Builds" section with:
    • Warning about 109 GB disk usage with default mode
    • Instructions for using Release mode
    • Disk usage comparison table

docs/development/release-create.md

  • Added "Building Firmware Locally (if needed)" section with:
    • Release mode build commands
    • Disk usage comparison
    • Explanation that final binaries are identical

Key Points Documented

  • Default (RelWithDebInfo): ~109 GB for all targets
  • Release mode: ~4-6 GB for all targets (96% reduction)
  • Command: cmake -DCMAKE_BUILD_TYPE=Release ..
  • Use cases: Production builds, CI, building many targets
  • Important: Final .hex and .bin files are identical in both modes

Also Includes

  • Typo fix: "Bulding" → "Building"

Testing

Documentation changes only. No code modifications.

Add documentation about using CMAKE_BUILD_TYPE=Release to save disk space
when building firmware for production/CI/releases.

Key points:
- Default RelWithDebInfo mode uses ~109 GB for all targets
- Release mode uses ~4-6 GB (96% reduction)
- Debug symbols are stripped from final .hex files anyway
- Final binaries are identical in both modes

Updated files:
- docs/development/Building in Linux.md
  - Add brief note about debug symbols in single target section
  - Add new "Building All Targets or Release Builds" section with
    disk usage comparison and Release mode instructions

- docs/development/release-create.md
  - Add "Building Firmware Locally" section with Release mode
    instructions and disk usage information

Also fixes typo: "Bulding" -> "Building"
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