Skip to content

Commit 4649324

Browse files
authored
Merge pull request #1330 from kernelkit/qemu-add-sbin-to-path
qemu: fix /cfg mount failure due to missing mkfs.ext4 in PATH [skip ci]
2 parents b407452 + 9c351c7 commit 4649324

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

board/common/qemu/run.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
#
2020
# shellcheck disable=SC3037
2121

22+
# Add /sbin to PATH for mkfs.ext4 and such (not default in debian)
23+
export PATH="/sbin:/usr/sbin:$PATH"
24+
2225
qdir=$(dirname "$(readlink -f "$0")")
2326
imgdir=$(readlink -f "${qdir}/..")
2427
prognm=$(basename "$0")
@@ -174,6 +177,8 @@ rw_args()
174177
{
175178
[ "$CONFIG_QEMU_RW" ] || return
176179

180+
command -v mkfs.ext4 >/dev/null || die "$prognm: cannot find mkfs.ext4"
181+
177182
if ! [ -f "aux.ext4" ]; then
178183
dd if=/dev/zero of="aux.ext4" bs=1M count=1 >/dev/null 2>&1
179184
mkfs.ext4 -L aux "aux.ext4" >/dev/null 2>&1

0 commit comments

Comments
 (0)