summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild_gfxoverlay.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/build_gfxoverlay.sh b/build_gfxoverlay.sh
index ef332b7..b9b0d78 100755
--- a/build_gfxoverlay.sh
+++ b/build_gfxoverlay.sh
@@ -68,7 +68,12 @@ eof
cat usr/local/bin/install-$drv-debian.sh >> overlay.sh
sed -i '/exit 3/d' overlay.sh
chmod +x overlay.sh
-chroot . /overlay.sh -v $ver -z
+if [ "$(uname -m)" = "x86_64" ] && ! file bin/true | grep -q 'ELF 64-bit'; then
+ echo "Found 32bit chroot, using linux32..."
+ chroot . linux32 /overlay.sh -v $ver -z
+else
+ chroot . /overlay.sh -v $ver -z
+fi
cd ..
umount root/proc root/sys root/dev root &>/dev/null
rm -rf root