File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,11 +62,21 @@ if [ "$(check_deps "$needed_deps")" ]; then
6262 if [ -f " /etc/debian_version" ]; then
6363 print_title " attempting to install build deps"
6464 apt-get install wget python3 unzip zip debootstrap cpio binwalk pcregrep cgpt kmod pv lz4 -y
65- if [ " $arch " != " $host_arch " ]; then
65+ fi
66+ assert_deps " $needed_deps "
67+ fi
68+
69+ # install qemu-user-static on debian if needed
70+ if [ " $arch " != " $host_arch " ]; then
71+ if [ -f " /etc/debian_version" ]; then
72+ if ! dpkg --get-selections | grep -v deinstall | grep " qemu-user-static\|box64\|fex-emu" > /dev/null; then
73+ print_info " automatically installing qemu-user-static because we are building for a different architecture"
6674 apt-get install qemu-user-static binfmt-support -y
6775 fi
76+ else
77+ print_error " Warning: You are building an image for a different CPU architecture. It may fail if you do not have qemu-user-static installed."
78+ sleep 1
6879 fi
69- assert_deps " $needed_deps "
7080fi
7181
7282cleanup_path=" "
You can’t perform that action at this time.
0 commit comments