Skip to content

Commit 1a0297c

Browse files
committed
fix: booting orangepi5 from nvme drive
For some reason test -e command that checks for armbianEnv.txt file existence fails to mount the first partition. This leads to ignoring of all boot environment, including the critical rootdev variable. This variable is hardcoded to /dev/mmcblk0p1 which works for the default sdcard case, but doesn't for nvme (and likely sata) At the same time the load command that comes after that works well Therefore the idea behind this change is to not test for file existence and attempt to load it instead on success - import the env variables
1 parent e4c5ae4 commit 1a0297c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

config/bootscripts/boot-rk35xx.cmd

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ test -n "${distro_bootpart}" || distro_bootpart=1
1818

1919
echo "Boot script loaded from ${devtype} ${devnum}:${distro_bootpart}"
2020

21-
if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}armbianEnv.txt; then
22-
load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}armbianEnv.txt
21+
if load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}armbianEnv.txt; then
2322
env import -t ${load_addr} ${filesize}
2423
fi
2524

config/bootscripts/boot-rockchip64.cmd

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ test -n "${distro_bootpart}" || distro_bootpart=1
1818

1919
echo "Boot script loaded from ${devtype} ${devnum}:${distro_bootpart}"
2020

21-
if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}armbianEnv.txt; then
22-
load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}armbianEnv.txt
21+
if load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}armbianEnv.txt; then
2322
env import -t ${load_addr} ${filesize}
2423
fi
2524

0 commit comments

Comments
 (0)