Support U_BOOT_SEPARATE_BOOT configuration

This commit is contained in:
2025-09-05 10:17:37 +08:00
parent 8ce4cf411f
commit 4330f8f597
3 changed files with 15 additions and 1 deletions

View File

@@ -10,6 +10,7 @@
#U_BOOT_PARAMETERS="ro quiet"
#U_BOOT_ROOT=""
#U_BOOT_TIMEOUT="50"
#U_BOOT_SEPARATE_BOOT="true"
#U_BOOT_FDT=""
#U_BOOT_FDT_DIR="/usr/lib/linux-image-"
#U_BOOT_FDT_OVERLAYS=""

View File

@@ -1,7 +1,11 @@
#!/bin/sh
has_separate_boot() {
[ "$(stat --printf %d /)" != "$(stat --printf %d /boot)" ]
if [ -z "${U_BOOT_SEPARATE_BOOT}" ]; then
[ "$(stat --printf %d /)" != "$(stat --printf %d /boot)" ]
else
"${U_BOOT_SEPARATE_BOOT}"
fi
}
# Reading the default file

View File

@@ -108,6 +108,15 @@ Values are in decisecond greater than 0
0 specifies to wait forever.
The default is 50.
.IP "U_BOOT_SEPARATE_BOOT=""\fB50\fR""" 4
This variable force setting the /boot detection result.
This is helpful when constructing bootable disk images.
Values are bool type if set,
true specifies that /boot will be mounted separately,
false specifies that /boot is stored inside /,
unset the variable to enable auto detection.
Unset by default.
.IP "U_BOOT_FDT_DIR=""\fB/usr/lib/linux-image-\fR""" 4
This variable specifies the unversioned stem of paths
where U\-BOOT should look for the flattened device tree binaries.