-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
khadas-vim3: u-boot: bump to 2025.04-rc5
; boot SD first; enable setexpr
; patch 2025.04 for fileenv
; enable squashfs
support
#8044
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
khadas-vim3: u-boot: bump to 2025.04-rc5
; boot SD first; enable setexpr
; patch 2025.04 for fileenv
; enable squashfs
support
#8044
Conversation
Reminder: to be able to write u-boot to SPI, edit
then reboot and then run early bootlog (from SPI):
Complete bootlog from SPI+NVMe:
|
Also, for truth sake: I personally do not use HAOS on the board. Instead I use the |
""" WalkthroughThe pull request updates U-Boot related configurations and source code for the Khadas VIM3 board and the meson64 platform. The Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (2)
patch/u-boot/v2025.04/board_khadas-vim3/meson64-boot-usb-nvme-scsi-first.patch (1)
4-4
: Patch filename and subject line mismatchThe patch filename contains "usb-nvme-scsi-first" but the subject line indicates "SD -> USB -> NVMe -> eMMC" boot order. The filename should be updated to match the actual boot ordering being implemented.
config/boards/khadas-vim3.conf (1)
15-16
: Update of U-Boot to v2025.04-rc5 aligns with PR objectivesThe update to U-Boot version 2025.04-rc5 from 2024.01 is correctly implemented through these variable changes. This is an essential part of the PR objectives.
However, there's a minor inconsistency in the comment. It states this patch directory "has a patch to boot USB/NVMe/SCSI first" but the actual patch is changing the order to boot SD first.
-BOOTPATCHDIR="v2025.04" # this has 'board_khadas-vim3' which has a patch to boot USB/NVMe/SCSI first +BOOTPATCHDIR="v2025.04" # this has 'board_khadas-vim3' which has a patch to boot SD first, then USB/NVMe
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
config/boards/khadas-vim3.conf
(2 hunks)patch/u-boot/v2025.04/board_khadas-vim3/meson64-boot-usb-nvme-scsi-first.patch
(1 hunks)patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch
(1 hunks)
🔇 Additional comments (7)
patch/u-boot/v2025.04/board_khadas-vim3/meson64-boot-usb-nvme-scsi-first.patch (1)
18-20
:❓ Verification inconclusive
Verify the intended boot order is correctly implemented
The patch reorganizes the boot order to prioritize SD cards (MMC 0, MMC 1) first, followed by USB, NVMe, SCSI, and finally eMMC (MMC 2). This matches the subject line's intent of "SD -> USB -> NVMe -> eMMC" boot order, but includes SCSI in between NVMe and eMMC.
This change supports the PR objective of enhancing compatibility with Armbian u-boot deployed to SPI by ensuring SD cards are tried before internal storage.
Also applies to: 24-24
🏁 Script executed:
#!/bin/bash # Verify that other Meson64 boards don't have conflicting boot order implementations grep -r "BOOT_TARGET_DEVICES" --include="*.h" include/configs/Length of output: 112
Boot Order Implementation Verification
The patch appears to implement the intended boot order by prioritizing SD cards (MMC 0, MMC 1) before USB, NVMe, SCSI, and eMMC. However, the automated verification script failed because the expected directory (
include/configs/
) does not exist. Please verify manually (or update the search paths) that other Meson64 board configurations do not have conflicting boot order implementations. Also, double-check that inserting SCSI between NVMe and eMMC is intentional and aligns with the overall system requirements.
- File:
patch/u-boot/v2025.04/board_khadas-vim3/meson64-boot-usb-nvme-scsi-first.patch
(lines 18-20 and 24)- Action: Manually review other board configurations to ensure consistency.
config/boards/khadas-vim3.conf (1)
56-61
: Successfully enabled required U-Boot features for HAOS compatibilityThe changes successfully enable all features mentioned in the PR objectives:
squashfs
support via CONFIG_CMD_SQUASHFSsetexpr
feature via CONFIG_CMD_SETEXPRfileenv
feature via CONFIG_CMD_FILEENVThe additional commands (CAT, XXD) are also useful enhancements for debugging and file manipulation.
These changes align with the PR objectives to enhance Home Assistant Operating System (HAOS) compatibility.
patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch (5)
1-11
: Patch header clearly identifies the source and contributorsThe patch header correctly identifies:
- This is a new command for reading a file into an environment variable
- It's adapted from a vendor/legacy patch from 2018
- It has been reviewed and signed-off by multiple contributors
This establishes proper attribution and provenance.
25-29
: Kconfig entry appropriately addedThe Kconfig entry is correctly added with a simple but clear help text explaining the command's purpose.
41-41
: Makefile updated correctly to include the new source fileThe source file is correctly added to the build system when CONFIG_CMD_FILEENV is enabled.
59-72
: Correct command argument handlingThe function correctly:
- Checks for the required number of arguments
- Prepares arguments for the underlying fatload command
- Passes the arguments to do_fat_fsload
This is a good approach to leverage existing functionality.
91-96
: Command registration and documentation look goodThe U_BOOT_CMD registration is correctly formatted with appropriate help text. The documentation clearly explains the command's purpose and arguments.
6c1bfee
to
0e50acd
Compare
0e50acd
to
35568de
Compare
35568de
to
0389307
Compare
…texpr`; patch 2025.04 for `fileenv`; enable `squashfs` support - **CHANGE**: This version tries to boot SD first (thus SD -> USB -> NVMe -> eMMC); before it would boot USB before SD - as Armbian u-boot is possibly deployed to SPI, try to make as compatible as possible; eg enable squashfs support - enable `setexpr` and `fileenv`, used by HAOS - HAOS already has support for booting VIM3 from NVMe: home-assistant/operating-system#3784 - borrowed `fileenv` patch from v2025.01 to .04 - Similar treatment that `odroidm1` got in armbian#7769 - note: I will be leaving my VIM3 behind in the other side of the globe, so this is my last chance to test
0389307
to
169fa69
Compare
setexpr
andfileenv
, used by HAOSfileenv
patch from v2025.01 to .04odroidm1
got in odroidm1: u-boot: enablesetexpr
; patch 2025.01 forfileenv
; enable squashfs support #7769