Skip to content

ODroidM1: add BOOTFS_TYPE=ext4 into board config to fix after #8751#8829

Closed
iav wants to merge 2 commits intoarmbian:mainfrom
iav:odroidn2bootfrom
Closed

ODroidM1: add BOOTFS_TYPE=ext4 into board config to fix after #8751#8829
iav wants to merge 2 commits intoarmbian:mainfrom
iav:odroidn2bootfrom

Conversation

@iav
Copy link
Contributor

@iav iav commented Oct 27, 2025

After #8751 ODroid-M1 not boots.
With this string it boots again.

How Has This Been Tested?

Build image for ODroid-M1 with root on btrfs without patch. System not boots from image.
Build image for ODroid-M1 with root on btrfs with patch. System boots from image.

Checklist:

  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

@iav iav requested a review from rpardini as a code owner October 27, 2025 04:09
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 27, 2025

Walkthrough

Added a new board configuration variable BOOTFS_TYPE="ext4" in config/boards/odroidm1.conf. Updated boot partition creation logic in lib/functions/image/partitioning.sh so a boot partition is created when BOOTSIZE != "0" and either BOOTFS_TYPE != ROOTFS_TYPE or BOOTPART_REQUIRED == "yes" (previously the condition checked for a non-empty BOOTFS_TYPE). No other functional or control-flow changes detected.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Verify BOOTFS_TYPE naming and default value in config/boards/odroidm1.conf.
  • Check the new conditional for edge cases (unset/empty BOOTFS_TYPE or ROOTFS_TYPE) and proper shell quoting/word-splitting.
  • Search for other code paths or docs that assumed the old presence-check behavior for BOOTFS_TYPE.
  • Confirm interaction with callers that set BOOTPART_REQUIRED.

Possibly related PRs

Suggested reviewers

  • rpardini
  • chraac
  • igorpecovnik
  • catalinii

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title "ODroidM1: add BOOTFS_TYPE=ext4 into board config to fix after #8751" accurately and specifically describes the main change in the pull request: adding the BOOTFS_TYPE configuration variable with ext4 value to the ODroid-M1 board configuration file. The title references the relevant prior PR (#8751) that provides necessary context for the fix, making it clear to reviewers scanning the history. The phrasing is concise, specific, and free of vague terminology or noise.
Description Check ✅ Passed The description is directly related to the changeset, clearly stating that the added BOOTFS_TYPE=ext4 configuration resolves an ODroid-M1 boot failure introduced by PR #8751. It includes concrete testing information demonstrating the issue (system fails to boot without the patch on btrfs-root images) and the fix (system boots with the patch), along with a completed checklist confirming no new warnings were generated. While the description is concise and could include additional technical details about the underlying issue, it conveys sufficient and meaningful information about the problem and solution.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between d313443 and 94feb15.

📒 Files selected for processing (2)
  • config/boards/odroidm1.conf (1 hunks)
  • lib/functions/image/partitioning.sh (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • config/boards/odroidm1.conf
🧰 Additional context used
🧠 Learnings (25)
📓 Common learnings
Learnt from: EvilOlaf
Repo: armbian/build PR: 8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub or the PR API to get the complete picture of what files are being added or modified.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub API (https://api.github.com/repos/armbian/build/pulls/{pr_number}/files) to get the complete picture of what files are being added or modified, especially for U-Boot patches that will be applied during the build process.
Learnt from: rpardini
Repo: armbian/build PR: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:76-86
Timestamp: 2025-03-31T22:20:48.475Z
Learning: For the Armbian build project, maintaining consistency with existing patches across U-Boot versions (such as between 2025.01 and 2025.04) is prioritized over refactoring individual patches for code improvements.
Learnt from: tabrisnet
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-10-24T04:46:22.901Z
Learning: In lib/functions/rootfs/rootfs-create.sh, the FIXME comment about mmdebstrap usage with --aptopt is a future note related to PR #8785, which hasn't been merged yet.
Learnt from: rpardini
Repo: armbian/build PR: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:73-75
Timestamp: 2025-03-31T22:20:41.849Z
Learning: When porting patches between U-Boot versions (like from 2025.01 to 2025.04), rpardini prefers to maintain patches as-is rather than introducing refactoring changes, even when potential improvements are identified. This approach prioritizes consistency and reduces the risk of introducing new issues.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8417
File: config/boards/orangepi5pro.csc:57-58
Timestamp: 2025-07-23T07:30:52.265Z
Learning: In the Armbian build system, BOOTPATCHDIR can contain board-specific subdirectories (e.g., board_orangepi5pro) for applying patches to specific boards only. The framework automatically checks if such board-specific subdirectories exist for the board being built and applies those patches accordingly.
Learnt from: pyavitz
Repo: armbian/build PR: 8421
File: config/kernel/linux-sunxi64-edge.config:2664-2671
Timestamp: 2025-07-27T13:03:53.146Z
Learning: In the Armbian build system's kernel configuration, when CONFIG_EXT2_FS=y and CONFIG_EXT3_FS=y are both set to built-in, EXT4 filesystem support becomes automatically available/hard-coded without requiring an explicit CONFIG_EXT4_FS line in the configuration file. This is specific to how Armbian handles kernel configuration and differs from typical standalone Linux kernel configuration behavior.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8754
File: config/boards/bestv-r3300-l.csc:14-16
Timestamp: 2025-10-14T05:08:11.785Z
Learning: In the Armbian build system, BOOTBRANCH_BOARD is a valid framework variable used as a fallback when BOOTBRANCH is unset. The framework checks BOOTBRANCH_BOARD before applying the default bootloader branch value (see config/sources/common.conf). Board configuration files can use BOOTBRANCH_BOARD to specify the bootloader branch.
Learnt from: djurny
Repo: armbian/build PR: 8287
File: config/bootscripts/boot-sunxi.cmd:38-44
Timestamp: 2025-06-12T21:14:36.024Z
Learning: In config/bootscripts/boot-sunxi.cmd the unconditional "+1" increment in func_align_addr_next (when align_overlap_oboe_avoidance="on") is intentional. It compensates for a known off-by-one error in U-Boot where the end address is calculated as start+size instead of start+size-1, so the extra page prevents overlap. This behavior should not be “optimized away”.
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:222-230
Timestamp: 2025-09-14T06:32:29.806Z
Learning: In the Armbian build system, the write_uboot_platform() function implementations follow different patterns across Rockchip family files. The newer standard (used in rockchip64_common.inc and rk3506) includes 'status=none' parameter in dd commands, while older implementations (rk3288, rk322x) use an older pattern without this parameter. The rk3506 implementation correctly follows the current Rockchip family standard.
📚 Learning: 2025-10-24T04:46:22.901Z
Learnt from: tabrisnet
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-10-24T04:46:22.901Z
Learning: In lib/functions/rootfs/rootfs-create.sh, the FIXME comment about mmdebstrap usage with --aptopt is a future note related to PR #8785, which hasn't been merged yet.

Applied to files:

  • lib/functions/image/partitioning.sh
📚 Learning: 2025-08-30T06:48:09.091Z
Learnt from: tabrisnet
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-08-30T06:48:09.091Z
Learning: In lib/functions/compilation/armbian-kernel.sh, the user prefers flexible grep patterns over anchored ones for BTRFS configuration checks, but agrees to use quiet grep (-q) to avoid polluting build logs.

Applied to files:

  • lib/functions/image/partitioning.sh
📚 Learning: 2025-05-07T20:49:40.969Z
Learnt from: djurny
Repo: armbian/build PR: 8166
File: config/bootscripts/boot-mvebu.cmd:38-50
Timestamp: 2025-05-07T20:49:40.969Z
Learning: In U-Boot scripts, `itest.s` should be used for explicit string comparisons rather than plain `itest` with string operators like `==`.

Applied to files:

  • lib/functions/image/partitioning.sh
📚 Learning: 2025-06-12T21:14:36.024Z
Learnt from: djurny
Repo: armbian/build PR: 8287
File: config/bootscripts/boot-sunxi.cmd:38-44
Timestamp: 2025-06-12T21:14:36.024Z
Learning: In config/bootscripts/boot-sunxi.cmd the unconditional "+1" increment in func_align_addr_next (when align_overlap_oboe_avoidance="on") is intentional. It compensates for a known off-by-one error in U-Boot where the end address is calculated as start+size instead of start+size-1, so the extra page prevents overlap. This behavior should not be “optimized away”.

Applied to files:

  • lib/functions/image/partitioning.sh
📚 Learning: 2025-10-14T05:08:11.785Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8754
File: config/boards/bestv-r3300-l.csc:14-16
Timestamp: 2025-10-14T05:08:11.785Z
Learning: In the Armbian build system, BOOTBRANCH_BOARD is a valid framework variable used as a fallback when BOOTBRANCH is unset. The framework checks BOOTBRANCH_BOARD before applying the default bootloader branch value (see config/sources/common.conf). Board configuration files can use BOOTBRANCH_BOARD to specify the bootloader branch.

Applied to files:

  • lib/functions/image/partitioning.sh
📚 Learning: 2025-09-01T06:11:43.476Z
Learnt from: wei633
Repo: armbian/build PR: 8557
File: config/bootscripts/boot-xpressreal-t3.cmd:0-0
Timestamp: 2025-09-01T06:11:43.476Z
Learning: In Armbian boot scripts without initramfs support, UUID= and LABEL= style device paths cannot be used for rootdev as they require initramfs to resolve during boot. Only direct device paths (/dev/mmcblkXpY) or PARTUUID= references (which U-Boot can resolve) will work.

Applied to files:

  • lib/functions/image/partitioning.sh
📚 Learning: 2025-07-27T13:03:53.146Z
Learnt from: pyavitz
Repo: armbian/build PR: 8421
File: config/kernel/linux-sunxi64-edge.config:2664-2671
Timestamp: 2025-07-27T13:03:53.146Z
Learning: In the Armbian build system's kernel configuration, when CONFIG_EXT2_FS=y and CONFIG_EXT3_FS=y are both set to built-in, EXT4 filesystem support becomes automatically available/hard-coded without requiring an explicit CONFIG_EXT4_FS line in the configuration file. This is specific to how Armbian handles kernel configuration and differs from typical standalone Linux kernel configuration behavior.

Applied to files:

  • lib/functions/image/partitioning.sh
📚 Learning: 2025-07-23T07:30:52.265Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8417
File: config/boards/orangepi5pro.csc:57-58
Timestamp: 2025-07-23T07:30:52.265Z
Learning: In the Armbian build system, BOOTPATCHDIR can contain board-specific subdirectories (e.g., board_orangepi5pro) for applying patches to specific boards only. The framework automatically checks if such board-specific subdirectories exist for the board being built and applies those patches accordingly.

Applied to files:

  • lib/functions/image/partitioning.sh
📚 Learning: 2025-08-30T06:56:33.372Z
Learnt from: tabrisnet
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-08-30T06:56:33.372Z
Learning: In Armbian kernel configuration, the BTRFS configuration logic preserves existing settings (whether built-in 'y' or module 'm') and only sets BTRFS_FS to module when it was previously disabled or not set, achieving "allow but not require" flexibility while maintaining backward compatibility.

Applied to files:

  • lib/functions/image/partitioning.sh
📚 Learning: 2025-07-27T13:03:53.146Z
Learnt from: pyavitz
Repo: armbian/build PR: 8421
File: config/kernel/linux-sunxi64-edge.config:2664-2671
Timestamp: 2025-07-27T13:03:53.146Z
Learning: In Linux kernel configuration for the Armbian build system, when CONFIG_EXT2_FS and CONFIG_EXT3_FS are both set to =y (built-in), CONFIG_EXT4_FS is automatically enabled/hard-coded and does not need to be explicitly specified in the configuration file. This dependency relationship means that EXT4 support is implicitly included when EXT2 and EXT3 are built into the kernel.

Applied to files:

  • lib/functions/image/partitioning.sh
📚 Learning: 2025-09-12T21:44:09.061Z
Learnt from: Grippy98
Repo: armbian/build PR: 8624
File: config/boards/sk-am62p.conf:8-8
Timestamp: 2025-09-12T21:44:09.061Z
Learning: For TI K3 family boards in Armbian, BOOT_FDT_FILE uses .dts extension (not .dtb) as the standard convention. The build system handles this correctly by automatically compiling .dts to .dtb during kernel build and using the BOOT_FDT_FILE value directly in bootloader configurations.

Applied to files:

  • lib/functions/image/partitioning.sh
📚 Learning: 2025-06-04T23:45:38.860Z
Learnt from: djurny
Repo: armbian/build PR: 8272
File: config/bootscripts/boot-mvebu.cmd:182-186
Timestamp: 2025-06-04T23:45:38.860Z
Learning: In config/bootscripts/boot-mvebu.cmd, the `fdtfile` variable is mandatory for booting and is pre-set by U-Boot, but can be overridden via armbianEnv.txt. If `fdtfile` is empty, the subsequent device tree file search logic will eventually fail and trigger the critical error "Cannot find DT!" with proper error handling.

Applied to files:

  • lib/functions/image/partitioning.sh
📚 Learning: 2025-09-12T19:28:38.491Z
Learnt from: Grippy98
Repo: armbian/build PR: 8622
File: config/sources/families/k3.conf:66-66
Timestamp: 2025-09-12T19:28:38.491Z
Learning: In the Armbian k3 family build system (config/sources/families/k3.conf), builds do not fail when TIBOOT3_BOOTCONFIG is unset, even though tiboot3.bin is still listed in UBOOT_TARGET_MAP. The gating mechanism in pre_config_uboot_target__build_first_stage function works as intended to conditionally build/copy tiboot3.bin only when TIBOOT3_BOOTCONFIG is defined.

Applied to files:

  • lib/functions/image/partitioning.sh
📚 Learning: 2025-03-31T22:20:48.475Z
Learnt from: rpardini
Repo: armbian/build PR: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:76-86
Timestamp: 2025-03-31T22:20:48.475Z
Learning: For the Armbian build project, maintaining consistency with existing patches across U-Boot versions (such as between 2025.01 and 2025.04) is prioritized over refactoring individual patches for code improvements.

Applied to files:

  • lib/functions/image/partitioning.sh
📚 Learning: 2025-09-14T06:32:29.806Z
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:222-230
Timestamp: 2025-09-14T06:32:29.806Z
Learning: In the Armbian build system, the write_uboot_platform() function implementations follow different patterns across Rockchip family files. The newer standard (used in rockchip64_common.inc and rk3506) includes 'status=none' parameter in dd commands, while older implementations (rk3288, rk322x) use an older pattern without this parameter. The rk3506 implementation correctly follows the current Rockchip family standard.

Applied to files:

  • lib/functions/image/partitioning.sh
📚 Learning: 2025-09-14T11:37:35.089Z
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:65-72
Timestamp: 2025-09-14T11:37:35.089Z
Learning: In the Armbian build system, patch directories referenced in BOOTPATCHDIR and KERNELPATCHDIR configurations can be non-existent without causing build failures. Empty patch directories are also ignored by git, so missing patch directories should not be flagged as errors during code review.

Applied to files:

  • lib/functions/image/partitioning.sh
📚 Learning: 2025-07-17T04:12:33.125Z
Learnt from: pyavitz
Repo: armbian/build PR: 8388
File: config/boards/kickpik2b.conf:1-14
Timestamp: 2025-07-17T04:12:33.125Z
Learning: In the Armbian build system, board configuration files (*.conf) follow a project standard of not including shebang lines, even though they contain bash code and are sourced by the build system. This is an established Armbian convention that individual contributors are expected to follow, and changes to this standard would require broader project maintainer approval.

Applied to files:

  • lib/functions/image/partitioning.sh
📚 Learning: 2025-09-07T17:39:32.272Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8586
File: config/boards/nanopi-r76s.conf:15-21
Timestamp: 2025-09-07T17:39:32.272Z
Learning: In the Armbian build system, the variables $BOARD and $SDCARD are always set by the build framework, so guard checks for these variables are unnecessary in board configuration files and hook functions.

Applied to files:

  • lib/functions/image/partitioning.sh
📚 Learning: 2025-08-02T05:46:10.664Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-08-02T05:46:10.664Z
Learning: In the Armbian build system, the modern recommended approach for kernel configuration is to use the kernel-config command via "./compile.sh BOARD=boardname BRANCH=branchname kernel-config" instead of the deprecated KERNEL_CONFIGURE=yes flag. This provides a two-step workflow: configure using menuconfig, then build, with better transparency and control over configuration changes.

Applied to files:

  • lib/functions/image/partitioning.sh
📚 Learning: 2025-03-31T22:20:41.849Z
Learnt from: rpardini
Repo: armbian/build PR: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:73-75
Timestamp: 2025-03-31T22:20:41.849Z
Learning: When porting patches between U-Boot versions (like from 2025.01 to 2025.04), rpardini prefers to maintain patches as-is rather than introducing refactoring changes, even when potential improvements are identified. This approach prioritizes consistency and reduces the risk of introducing new issues.

Applied to files:

  • lib/functions/image/partitioning.sh
📚 Learning: 2025-07-27T15:53:30.629Z
Learnt from: pyavitz
Repo: armbian/build PR: 8421
File: config/kernel/linux-sunxi64-edge.config:805-825
Timestamp: 2025-07-27T15:53:30.629Z
Learning: In the Armbian build system, kernel configurations prioritize broad hardware compatibility over optimization concerns. Even when including numerous legacy/obsolete drivers causes technical issues like increased initramfs size and slower enumeration, the project philosophy is to "appease the masses" by ensuring maximum device compatibility rather than optimizing for specific use cases.

Applied to files:

  • lib/functions/image/partitioning.sh
📚 Learning: 2025-05-07T20:49:40.969Z
Learnt from: djurny
Repo: armbian/build PR: 8166
File: config/bootscripts/boot-mvebu.cmd:38-50
Timestamp: 2025-05-07T20:49:40.969Z
Learning: The 4KB (0x1000) boundary used for device tree size calculations in U-Boot scripts is specific to how the `fdt resize` command works internally and should remain hardcoded rather than being tied to adjustable alignment variables.

Applied to files:

  • lib/functions/image/partitioning.sh
📚 Learning: 2025-07-25T03:51:50.830Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub or the PR API to get the complete picture of what files are being added or modified.

Applied to files:

  • lib/functions/image/partitioning.sh
📚 Learning: 2025-07-25T03:51:50.830Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub API (https://api.github.com/repos/armbian/build/pulls/{pr_number}/files) to get the complete picture of what files are being added or modified, especially for U-Boot patches that will be applied during the build process.

Applied to files:

  • lib/functions/image/partitioning.sh
🔇 Additional comments (1)
lib/functions/image/partitioning.sh (1)

116-121: Condition logic is sound and properly quoted.

The boot partition creation condition correctly handles the three cases: (1) when boot filesystem differs from root (separate /boot needed), (2) when boot partition is explicitly required, and (3) when neither applies (BOOTSIZE set to 0). All variable comparisons are properly quoted to prevent glob expansion, addressing the prior ShellCheck SC2053 concern. The default fallback to ext4 (line 118) is appropriate.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size/small PR with less then 50 lines 11 Milestone: Fourth quarter release Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... labels Oct 27, 2025
@github-actions github-actions bot added the Ready to merge Reviewed, tested and ready for merge label Oct 27, 2025
@github-actions
Copy link
Contributor

✅ This PR has been reviewed and approved — all set for merge!

@github-actions github-actions bot removed the Needs review Seeking for review label Oct 27, 2025
@rpardini
Copy link
Member

This looks like it's forcing a separate /boot partition to address the btrfs case.
Simple builds with full-ext4 shouldn't need it.
I'd fix whatever is broken with the btrfs instead of crippling ext4 rootfs.

@igorpecovnik igorpecovnik added Work in progress Unfinished / work in progress Discussion Being discussed - Voice your opinions :) and removed Ready to merge Reviewed, tested and ready for merge labels Oct 27, 2025
@iav iav requested a review from a team as a code owner October 27, 2025 19:51
@github-actions github-actions bot added Needs review Seeking for review Framework Framework components labels Oct 27, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 22a8ffd and 121b463.

📒 Files selected for processing (1)
  • lib/functions/image/partitioning.sh (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
lib/functions/image/partitioning.sh (1)
extensions/cloud-init/cloud-init.sh (1)
  • extension_prepare_config__ci_compatibility_check (30-40)
🪛 GitHub Actions: Shellcheck - PR #8829 ("ODroidM1: add BOOTFS_TYPE=ext4 into board config to fix after #8751")
lib/functions/image/partitioning.sh

[error] 116-116: ShellCheck SC2053: Quote the right-hand side of != in [[ ]] to prevent glob matching. (lib/ code detected as critical; exit code 1)

@iav iav requested a review from amazingfate October 27, 2025 19:55
@iav iav force-pushed the odroidn2bootfrom branch from 121b463 to d313443 Compare October 27, 2025 20:04
# Check if we need boot partition
# Specialized storage extensions like cryptroot or lvm may require a boot partition
if [[ $BOOTSIZE != "0" && (-n $BOOTFS_TYPE || $BOOTPART_REQUIRED == yes) ]]; then
if [[ $BOOTSIZE != "0" && ( $BOOTFS_TYPE != "$ROOTFS_TYPE" || $BOOTPART_REQUIRED == "yes" ) ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

What about the condition that user just want a seperate boot partition with same filesystem type as root? There are other declarations like BOOTFS_TYPE="ext4" in config/boards.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

User just want a separate boot partition with same filesystem can use BOOTPART_REQUIRED == "yes".
Other declarations like BOOTFS_TYPE="ext4" in config/boards will work, I suppose.
BOOTFS_TYPE I test, it works. If you worries about other declarations — just say, will think about it.

BOOTFS_TYPE have to be filled in boadrconfigs for boards that can boot only from ext4 or fat fs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would like to remind you that sometimes, albeit rarely, not only ext4 and btrfs fs are used.

Copy link
Contributor

Choose a reason for hiding this comment

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

Here is the build log before this change: https://paste.armbian.com/gatonibeha.
Here is the build log after this change: https://paste.armbian.com/eqohipewax.
This change will let us not create seperate ext4 boot partition if there is BOOTFS_TYPE="ext4" declared in board config. And the reason of declaring this should be that u-boot of this board doesn't support single root partition well. We should not break this logic.

Copy link
Member

@rpardini rpardini Oct 28, 2025

Choose a reason for hiding this comment

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

Yeah. Seems to me the information needed is "what kinds of filesystems is u-boot able to boot from?" and "how well can u-boot tolerate a mixed root/boot filesystem (prefix handling)?"
If u-boot directly supports btrfs, a separate /boot is not required (but possible/optional).
Unless we make btrfs default somehow, I wouldn't go introducing separate /boot where there wasn't one.
For boards that currently have an ext4 rootfs, and an ext4 bootfs, it shouldn't be changed either (prefix-challenged case).

Copy link
Member

Choose a reason for hiding this comment

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

That could be a compromise, but I still think introducing a separate /boot per default, when using an ext4 rootfs, is a regression.

Again: the board/u-boot should advertise that it can or not boot btrfs (and what to use instead), and the brtfs-enabling code should adapt to that, only when using a non-default arrangement.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the board/u-boot should advertise that it can or not boot btrfs (and what to use instead), and the brtfs-enabling code should adapt to that

What to you mean "should advertise" in context of build system?
If you mean info in boardconfig file — then it is what I want andI believe that this is what should be done.

In case I am wrong — please, еxplain your wish with more details.

Copy link
Member

Choose a reason for hiding this comment

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

We could introduce something like:

declare -A -g BOARD_BOOTLOADER_FS_BOOT_SUPPORT=()
BOARD_BOOTLOADER_FS_BOOT_SUPPORT+=(["ext4"]="yes"]) # supports booting from ext4
BOARD_BOOTLOADER_FS_BOOT_SUPPORT+=(["btrfs"]="ext4"]) # does NOT support booting from btrfs, use ext4 instead

And use that information in the brtfs/fsfs/whatever code and partitioning code to determine the ideal setup given the restrictions of the bootloader for that board.

Copy link
Member

Choose a reason for hiding this comment

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

Further, since u-boot artifact is available when building image, one could even peek into the final defconfig and decide based on things like CMD_BTRFS being available or not.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but I still think introducing a separate /boot per default, when using an ext4 rootfs, is a regression.

ok, don't need to do that, there will be no regression if do this:
if [[ $BOOTSIZE != "0" && ( $BOOTFS_TYPE != "ext4" ||$BOOTFS_TYPE != "$ROOTFS_TYPE" || $BOOTPART_REQUIRED == "yes" ) ]];

Looking inside the uBoot artifact is way, way too complicated, in my opinion. I definitely can't code it.

@iav
Copy link
Contributor Author

iav commented Oct 28, 2025

@rpardini then return check for $ROOTFS_TYPE != ext4, removed in #8751? @amazingfate?

@rpardini
Copy link
Member

Hmm, the plot thickens.

In this case, maybe add support for BTRFS to odroidm1's u-boot? Should be simple to do, using post_config_uboot_target__extra_configs_for_odroid-m1() in odroidm1.conf and enabling CONFIG_CMD_BTRFS.

That way everyone (with this board) is happy and you get full BTRFS goodness without needing a separate /boot?

@iav
Copy link
Contributor Author

iav commented Oct 28, 2025

If the issue is personal to me, then I can simply set any necessary setting in my config in userpatches, easy.

I started this topic because it seemed wrong to me that every person (except for the one who build image with rootfs to which his uboot can boot correctly but fs != ext4 - but such devices are probably few and far between) after #8751 will get an inoperable image, if he doesn’t know in advance that in addition to specifying the root file system type, he should also specify that there should be a separate /boot, and, possibly, the file system type /boot.
I think it's a door to tons of WTF for armbian build system users.

But if I'm wrong, then okay, you know better.

@iav
Copy link
Contributor Author

iav commented Oct 28, 2025

Search for CONFIG_CMD_BTRFS in config\boards show me only one occurrence, bananapif3.conf.

@rpardini
Copy link
Member

I started this topic because it seemed wrong to me that every person (except for the one who build image with rootfs to which his uboot can boot correctly but fs != ext4 - but such devices are probably few and far between) after #8751 will get an inoperable image, if he doesn’t know in advance that in addition to specifying the root file system type, he should also specify that there should be a separate /boot, and, possibly, the file system type /boot.
I think it's a door to tons of WTF for armbian build system users.

Armbian's default is ext4 root. If user is building a custom image, with a custom root filesystem, then they should be aware of the implications: either make sure the bootloader supports it, or adapt their config to use a separate, supported, boot partition.

Making life worse for default/ext4 users (which are unaware of btrfs even existing), by introducing a separate /boot, is not the solution. It was bad enough when we had fat32 /boot.

Search for CONFIG_CMD_BTRFS in config\boards show me only one occurrence, bananapif3.conf.

Yes, and?...

Other boards do the equivalent by patching the defconfig, which makes bumping u-boot versions much harder as defconfigs change upstream constantly and then patches need to be re-worked.

@iav
Copy link
Contributor Author

iav commented Oct 30, 2025

In this case, maybe add support for BTRFS to odroidm1's u-boot? Should be simple to do, using post_config_uboot_target__extra_configs_for_odroid-m1() in odroidm1.conf and enabling CONFIG_CMD_BTRFS.

I add

function post_config_uboot_target__extra_configs_for_odroid-m1() {
	display_alert "u-boot for ${BOARD}" "u-boot: enabling BTRFS" "info"
	run_host_command_logged scripts/config --enable CONFIG_FS_BTRFS
	run_host_command_logged scripts/config --enable CONFIG_CMD_BTRFS

into odroidm1.conf and build image with btrfs rootfs without separated /boot.
It not boots.

@rpardini
Copy link
Member

Hmm. Get (ofc...) u-boot UART logs, and poke around the partitions and filesystems (ls et al, ? will give you a list in u-boot prompt). Can u-boot actually read it?

My odroidm1 is in production role so I can't test with this exact device but might try on some 3588 also with mainline u-boot to see. How do I build a BTRFS image?

@iav
Copy link
Contributor Author

iav commented Oct 30, 2025

build log https://paste.armbian.com/ofaxufuxic
partitions

parted Armbian-unofficial_25.11.0-trunk_Odroidm1_plucky_edge_6.18.0-rc3.img print
WARNING: You are not superuser.  Watch out for permissions.
Model:  (file)
Disk /home/iav/armbian/output/images/Armbian-unofficial_25.11.0-trunk_Odroidm1_plucky_edge_6.18.0-rc3.img: 2416MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name    Flags
 1      16.8MB  2415MB  2398MB  btrfs        rootfs

try to boot log http://paste.armbian.com/piyonofoxu.vbnet
try to list files from just created boot usb drive (brfs rootfs, single partition)

=> bootdev list
Seq  Probed  Status  Uclass    Name
---  ------  ------  --------  ------------------
  0   [ + ]      OK  mmc       mmc@fe2b0000.bootdev
  1   [ + ]      OK  mmc       mmc@fe310000.bootdev
  2   [   ]      OK  ethernet  ethernet@fe2a0000.bootdev
  3   [ + ]      OK  nvme      nvme#0.blk#1.bootdev
  4   [ + ]      OK  usb_mass_ usb_mass_storage.lun0.bootdev
---  ------  ------  --------  ------------------
(5 bootdevs)
=> mtd list
List of MTD devices:
* nor0
  - device: flash@0
  - parent: spi@fe300000
  - driver: jedec_spi_nor
  - path: /spi@fe300000/flash@0
  - type: NOR flash
  - block size: 0x1000 bytes
  - min I/O: 0x1 bytes
  - 0x000000000000-0x000001000000 : "nor0"
          - 0x000000000000-0x000000100000 : "reserved"
          - 0x000000100000-0x000000300000 : "uboot"
          - 0x000000300000-0x000000400000 : "splash"
          - 0x000000400000-0x000001000000 : "Firmware"
=> ls usb_mass_storage 0
** Bad device specification usb_mass_storage 0 **
Couldn't find partition usb_mass_storage 0
=> ls usb_mass_storage.lun0
** No device specified **
Couldn't find partition usb_mass_storage.lun0 <NULL>
=> usb reset
resetting USB...
Host not halted after 16000 microseconds.
Bus usb@fd000000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
Bus usb@fd800000: USB EHCI 1.00
Bus usb@fd840000: USB OHCI 1.0
Bus usb@fd880000: USB EHCI 1.00
Bus usb@fd8c0000: USB OHCI 1.0
scanning bus usb@fd000000 for devices... 1 USB Device(s) found
scanning bus usb@fd800000 for devices... 2 USB Device(s) found
scanning bus usb@fd840000 for devices... 1 USB Device(s) found
scanning bus usb@fd880000 for devices... 2 USB Device(s) found
scanning bus usb@fd8c0000 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
=> usb storage
  Device 0: Vendor: Kingston Rev: PMAP Prod: DataTraveler 2.0
            Type: Removable Hard Disk
            Capacity: 15000.0 MB = 14.6 GB (30720000 x 512)
=> ls usb 0
=> ls usb 0:1
=> ls usb 0:1 /
=> ls usb 0:0 /
=> ls usb 0:0 /boot

what can I try more?

@rpardini
Copy link
Member

rpardini commented Oct 31, 2025

I tried with a 3588 using mainline 2025.10 + CMD_BTRFS and it works fine. I built image with ROOTFS_TYPE=btrfs BTRFS_COMPRESSION=zstd and pre-deployed the btrfs-enabled u-boot to SPI.

From your logs seems like you're falling into unrelated traps (u-boot with btrfs support not being used; remember it is never loaded from USB or NVMe, instead only from SPI/eMMC/SD).

Here's me fiddling with it:

=> reset
resetting ...
DDR 9fa84341ce typ 24/09/06-09:51:11,fwver: v1.18
ch0 ttot10
ch1 ttot10
ch2 ttot10
ch3 ttot10
ch0 ttot18
LPDDR4X, 2112MHz
channel[0] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=4096MB
ch1 ttot18
channel[1] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=4096MB
ch2 ttot18
channel[2] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=4096MB
ch3 ttot18
channel[3] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=4096MB
Manufacturer ID:0x1
DQS rds:h1,l0
CH0 RX Vref:28.9%, TX Vref:23.8%,21.8%
DQ rds:l0 l0 h2 h3 h1 h5 h1 h3, h3 h2 h7 h6 h1 h3 h1 l0

DQS rds:h2,h2
CH1 RX Vref:29.3%, TX Vref:24.8%,22.8%
DQ rds:h3 h7 h7 h3 h3 h2 h4 h5, h3 h5 l0 h2 h2 h5 h2 l0

DQS rds:l0,l1
CH2 RX Vref:29.3%, TX Vref:23.8%,22.8%
DQ rds:h7 h1 h3 l1 h1 l0 h1 h6, h1 l0 l0 l1 h2 h1 h1 l0

DQS rds:l0,h1
CH3 RX Vref:30.1%, TX Vref:20.8%,18.8%
DQ rds:h2 h3 h2 l0 h2 l0 l0 h1, h6 h2 h4 l0 h1 h4 h3 h1

stride=0x2, ddr_config=0x4
hash ch_mask0-1 0x20 0x40, bank_mask0-3 0xa00 0x1400 0x2800 0x0, rank_mask0 0x401000
change to F1: 528MHz
ch0 ttot10
ch1 ttot10
ch2 ttot10
ch3 ttot10
change to F2: 1068MHz
ch0 ttot14
ch1 ttot14
ch2 ttot14
ch3 ttot14
change to F3: 1560MHz
ch0 ttot16
ch1 ttot16
ch2 ttot16
ch3 ttot16
change to F0: 2112MHz
ch0 ttot18
ch1 ttot18
ch2 ttot18
ch3 ttot18
out

U-Boot SPL 2025.10armbian-2025.10-Se50b-P3ebd-H31ca-V0d2b-B2db6-R448a (Oct 31 2025 - 12:48:02 +0000)
Trying to boot from SPI
## Checking hash(es) for config config-2 ... OK
## Checking hash(es) for Image atf-1 ... sha256+ OK
## Checking hash(es) for Image u-boot ... sha256+ OK
## Checking hash(es) for Image fdt-2 ... sha256+ OK
## Checking hash(es) for Image atf-2 ... sha256+ OK
## Checking hash(es) for Image atf-3 ... sha256+ OK
NOTICE:  BL31: v2.13.0(release):armbian
NOTICE:  BL31: Built : 12:47:29, Oct 31 2025
INFO:    GICv3 without legacy support detected.
INFO:    ARM GICv3 driver initialized in EL3
INFO:    Maximum SPI INTID supported: 511
INFO:    BL31: Initializing runtime services
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0xa00000
INFO:    SPSR = 0x3c9


U-Boot 2025.10armbian-2025.10-Se50b-P3ebd-H31ca-V0d2b-B2db6-R448a (Oct 31 2025 - 12:48:02 +0000)

Model: FriendlyElec NanoPC-T6 LTS
SoC:   RK3588
DRAM:  16 GiB
rockchip_rk805 pmic@0: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19
rockchip_rk805 pmic@0: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19
rockchip_rk805 pmic@0: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19
PMIC:  RK806 (on=0x80, off=0x04)
Core:  403 devices, 35 uclasses, devicetree: separate
MMC:   mmc@fe2c0000: 1, mmc@fe2e0000: 0
Loading Environment from SPIFlash... SF: Detected w25q256fw with page size 256 Bytes, erase size 4 KiB, total 32 MiB
OK
In:    serial@feb50000
Out:   serial@feb50000
Err:   serial@feb50000
Model: FriendlyElec NanoPC-T6 LTS
SoC:   RK3588
rockchip_dnl_key_pressed: no saradc device found
Net:   No ethernet found.
Hit any key to stop autoboot: 0
=>
=>
=> pci enum
pcie_dw_rockchip pcie@fe180000: PCIe-0 Link Fail
=> nvme scan
=> nvme info
Device 0: Vendor: 0x15b7 Rev: 281010WD Prod: 23285G400246
            Type: Hard Disk
            Capacity: 953869.7 MB = 931.5 GB (1953525168 x 512)
=> part list nvme 0

Partition Map for nvme device 0  --   Partition Type: EFI

Part	Start LBA	End LBA		Name
	Attributes
	Type GUID
	Partition GUID
  1	0x00008000	0x74706d8e	"rootfs"
	attrs:	0x0000000000000000
	type:	b921b045-1df0-41c3-af44-4c6f280d3fae
	guid:	8fe2225b-9c00-41d5-b9d0-3fcad0819272
=> ?
?         - alias for 'help'
<...>
btrsubvol - list subvolumes of a BTRFS filesystem
<...>
=> btrsubvol ?
btrsubvol - list subvolumes of a BTRFS filesystem

Usage:
btrsubvol <interface> <dev[:part]>
     - List subvolumes of a BTRFS filesystem.
=> btrsubvol nvme 0
ID 256 gen 45 path /@/
ID 256 gen 45 path /@/
=> fstypes
Supported filesystems: fat, ext4, btrfs
=> fstype nvme 0
btrfs
=> ls nvme 0:1 /boot
<SYM>         34  Fri Oct 31 12:48:35 2025  Image -> vmlinuz-6.18.0-rc3-edge-rockchip64
<SYM>         30  Fri Oct 31 12:48:36 2025  dtb -> dtb-6.18.0-rc3-edge-rockchip64
<DIR>         16  Fri Oct 31 12:48:36 2025  dtb-6.18.0-rc3-edge-rockchip64
<   >          0  Fri Oct 31 12:48:35 2025  .next
<   >    5950052  Tue Oct 28 15:38:23 2025  System.map-6.18.0-rc3-edge-rockchip64
<   >        125  Fri Oct 31 12:48:50 2025  armbianEnv.txt
<   >      38518  Fri Oct 31 12:48:46 2025  boot.bmp
<   >       3834  Fri Oct 31 10:51:40 2025  boot.cmd
<   >       3906  Fri Oct 31 12:48:50 2025  boot.scr
<   >     268097  Tue Oct 28 15:38:23 2025  config-6.18.0-rc3-edge-rockchip64
<   >   43657728  Tue Oct 28 15:38:23 2025  vmlinuz-6.18.0-rc3-edge-rockchip64
<   >   27190044  Fri Oct 31 12:55:30 2025  uInitrd-6.18.0-rc3-edge-rockchip64
<   >        305  Fri Oct 31 12:49:03 2025  meta-data
<   >         90  Fri Oct 31 12:49:03 2025  user-data
<   >        107  Fri Oct 31 12:49:03 2025  network-config.sample
<   >   27189980  Fri Oct 31 12:55:30 2025  initrd.img-6.18.0-rc3-edge-rockchip64
<SYM>         34  Fri Oct 31 12:55:30 2025  uInitrd -> uInitrd-6.18.0-rc3-edge-rockchip64
=> boot
Scanning for bootflows in all bootdevs
Seq  Method       State   Uclass    Part  Name                      Filename
---  -----------  ------  --------  ----  ------------------------  ----------------
Scanning global bootmeth 'efi_mgr':
Card did not respond to voltage select! : -110
<...>
pcie_dw_rockchip pcie@fe180000: PCIe-0 Link Fail
Scanning bootdev 'nvme#0.blk#1.bootdev':
  1  script       ready   nvme         1  nvme#0.blk#1.bootdev.part /boot/boot.scr
** Booting bootflow 'nvme#0.blk#1.bootdev.part_1' with script
Boot script loaded from nvme 0:1
125 bytes read in 8 ms (14.6 KiB/s)
27190044 bytes read in 46 ms (563.7 MiB/s)
43657728 bytes read in 2799 ms (14.9 MiB/s)
191490 bytes read in 35 ms (5.2 MiB/s)
Working FDT set to 12000000
Trying kaslrseed command... Info: Unknown command can be safely ignored since kaslrseed does not apply to all boards.
Unknown command 'kaslrseed' - try 'help'
## Loading init Ramdisk from Legacy Image at 12180000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    27189980 Bytes = 25.9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 12000000
   Booting using the fdt blob at 0x12000000
Working FDT set to 12000000
   Loading Ramdisk to eae11000, end ec7ff2dc ... OK
   Loading Device Tree to 00000000ecb0f000, end 00000000ecba6fff ... OK
Working FDT set to ecb0f000

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x412fd050]
[    0.000000] Linux version 6.18.0-rc3-edge-rockchip64 (build@armbian) (aarch64-linux-gnu-gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0, GNU ld (GNU Binutils for Ubuntu) 2.42) #5 SMP PREEMPT Sun Oct 26 22:59:49 UTC 2025
<...>
Begin: Will now check root file system ... fsck from util-linux 2.41
[/sbin/fsck.btrfs (1) -- /dev/nvme0n1p1] fsck.btrfs -a /dev/nvme0n1p1
done.
[    4.797161] BTRFS: device label armbi_root devid 1 transid 45 /dev/nvme0n1p1 (259:1) scanned by mount (242)
[    4.798868] BTRFS info (device nvme0n1p1): first mount of filesystem 935e782a-e73b-4e05-81a4-1ee20077b4f1
[    4.799754] BTRFS info (device nvme0n1p1): using crc32c (crc32c-lib) checksum algorithm
[    4.811237] BTRFS info (device nvme0n1p1): enabling ssd optimizations
[    4.811823] BTRFS info (device nvme0n1p1): turning on async discard
[    4.812378] BTRFS info (device nvme0n1p1): enabling free space tree
<...>
done.

I also notice the image ends up missing btrfs-progs installed, which is a separate issue, but it still works fine.

@iav
Copy link
Contributor Author

iav commented Nov 1, 2025

So my mistake was that I used a USB drive for testing, instead if sdcard or emmc.
Will try again.

Then I have another question: in case btrfs is available at least on "fresh" devices with fresh uboot, are there a reason to not switch btrfs support in uboot on where possible?

@iav
Copy link
Contributor Author

iav commented Nov 1, 2025

I flash my image to microsdcard, remove usb flash disk and emmc module.
http://paste.armbian.com/evegazepaz.vbnet
I note lines
U-Boot SPL 2025.01-armbian-2025.01-S6d41-Pf0ba-H8b99-V390e-Bb703-R448a (Feb 17 2025 - 03:55:13 +0000)
and
U-Boot 2025.01-armbian-2025.01-S6d41-Pf0ba-H8b99-V390e-Bb703-R448a (Feb 17 2025 - 03:55:13 +0000)

But when I see into output/debs folder on builder computer, I see file
Oct 30 19:57 linux-u-boot-odroidm1-edge_25.11.0-trunk_arm64__2025.01-S6d41-P0b83-H2ef2-V390e-Bb703-R448a.deb — build yesterday.

Does it mean it not used uboot from sdcard at all? then where it is? And if it not used uboot from boot device — then I can't boot from btrfs image, even if btrfs supported by uboot on image?
What I miss?

@rpardini
Copy link
Member

rpardini commented Nov 1, 2025

From the logs it seems your machine is loading u-boot from SPI.
ODROIDM1's bootorder is SPI -> eMMC -> SD, so that checks.
If you hold the button it will skip SPI & eMMC and boot from SD (if there is one) or just go into maskrom mode if there isn't one.

Again, none of this is related to BTRFS support.

@iav
Copy link
Contributor Author

iav commented Nov 1, 2025

Seems ODroidM1 run uboot from MTD, not from sdcard.
After I boot from ext4, did 7 Install/Update the bootloader on MTD Flash in armbian-install — my odroid successfully boot from sdcard with btrfs without dedicated /boot.

Ok, you right, thank you.

However, for this to be true, special preparation of the device was required. I don't think this is the same as simply creating a working system image.

@iav
Copy link
Contributor Author

iav commented Nov 1, 2025

are there a reason to not switch btrfs support in uboot on where possible (excluding tiny devices)?
Maybe just turn btrfs support on by default?

@iav iav force-pushed the odroidn2bootfrom branch from d313443 to 94feb15 Compare November 1, 2025 16:23
@rpardini
Copy link
Member

rpardini commented Nov 2, 2025

However, for this to be true, special preparation of the device was required. I don't think this is the same as simply creating a working system image.

That's always true of ODROID devices, which come from factory with MTD (SPI-NOR) infected with "Petitboot".

are there a reason to not switch btrfs support in uboot on where possible (excluding tiny devices)?
Maybe just turn btrfs support on by default?

No reason, except the fact in Armbian we've fragmented u-boot configs, some done in patches, some done in hooks, some done nowhere, some boards using mainline uboot, some boards using vendor, etc. So this is effectively per-board. My suggestion for now is to enable as we go.

@igorpecovnik
Copy link
Member

This PR is probably deprecated now due to #8857 ?

@iav
Copy link
Contributor Author

iav commented Nov 2, 2025

This PR is probably deprecated now due to #8857 ?

yes.

@iav iav deleted the odroidn2bootfrom branch December 1, 2025 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

11 Milestone: Fourth quarter release Discussion Being discussed - Voice your opinions :) Framework Framework components Hardware Hardware related like kernel, U-Boot, ... Needs review Seeking for review size/small PR with less then 50 lines Work in progress Unfinished / work in progress

Development

Successfully merging this pull request may close these issues.

5 participants