Lissanro

Compile and install qemu 6.0.0 on Jetson Nano

May 25th, 2021
40
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. sudo apt-get remove \*qemu\* \
  2. && sudo perl -pin -e "s/#* *deb-src/deb-src/" /etc/apt/sources.list \
  3. && sudo update \
  4. && sudo sudo apt build-dep -y qemu \
  5. && cd /tmp/ \
  6. && wget -c http://ports.ubuntu.com/pool/main/k/krb5/libkrb5support0_1.17-6ubuntu4.1_arm64.deb \
  7. http://ports.ubuntu.com/pool/main/k/krb5/libkrb5-3_1.17-6ubuntu4.1_arm64.deb \
  8. http://ports.ubuntu.com/pool/main/k/krb5/libgssapi-krb5-2_1.17-6ubuntu4.1_arm64.deb \
  9. http://ports.ubuntu.com/pool/main/libs/libssh/libssh-4_0.9.3-2ubuntu2.1_arm64.deb \
  10. http://ports.ubuntu.com/pool/main/libs/libssh/libssh-dev_0.9.3-2ubuntu2.1_arm64.deb \
  11. && sudo apt -y install ./libkrb5support0_1.17-6ubuntu4.1_arm64.deb \
  12. ./libkrb5-3_1.17-6ubuntu4.1_arm64.deb \
  13. ./libgssapi-krb5-2_1.17-6ubuntu4.1_arm64.deb \
  14. ./libssh-4_0.9.3-2ubuntu2.1_arm64.deb \
  15. ./libssh-dev_0.9.3-2ubuntu2.1_arm64.deb \
  16. && sudo apt -y install binfmt-support debootstrap binutils alien ubuntu-dev-tools fakeroot \
  17. && wget -c https://download.qemu.org/qemu-6.0.0.tar.xz \
  18. && tar xvJf qemu-6.0.0.tar.xz \
  19. && rm -rf qemu-6.0.0 \
  20. && cd qemu-6.0.0 \
  21. && ./configure --prefix="/usr" --static --disable-system --enable-linux-user \
  22. && make \
  23. && DESTDIR="$PWD"/dest make install \
  24. && pkgname="qemu-user-static" \
  25. && fakeroot tar czf "$pkgname.tgz" -C dest . \
  26. && rm -f *.deb \
  27. && fakeroot alien --version="1:2.11+dfsg-1ubuntu7.36-1" -k "$pkgname.tgz" \
  28. && rm -rf dest "$pkgname.tgz" \
  29. && unset DESTDIR pkgname \
  30. && sudo apt -y install ./*.deb \
  31. && sudo cp -a ./scripts/qemu-binfmt-conf.sh /usr/local/bin/ \
  32. && sudo qemu-binfmt-conf.sh --qemu-path="/usr/bin" --qemu-suffix="-static" \
  33. && cd /usr/bin/ \
  34. && sudo rm -f qemu-*-static \
  35. && for exe in qemu-*; do sudo ln "$exe" "$exe-static"; done \
  36. && cd /tmp/ \
  37. && apt source qemu-user-static \
  38. && sudo cp -a qemu*/debian/qemu-debootstrap /usr/local/bin/
RAW Paste Data