tce-load -i compiletc python3.8-meson pulseaudio-dev perl5 curl-dev libusb-dev mesa-dev gnutls-dev gettext

wget https://download.qemu-project.org/qemu-6.2.0.tar.xz

cd qemu-6.2.0

mkdir build
cd build

CC="gcc -flto -march=armv8-a+crc -mtune=cortex-a72 -Os -pipe" CXX="g++ -flto -march=armv8-a+crc -mtune=cortex-a72 -Os -pipe -fno-exceptions -fno-rtti" ../configure --prefix=/usr/local --localstatedir=/var --libexecdir=/usr/local/lib/qemu --audio-drv-list=alsa,pa --target-list=i386-softmmu,i386-linux-user,x86_64-softmmu,x86_64-linux-user,arm-softmmu,arm-linux-user,aarch64-softmmu,aarch64-linux-user --smbd=/usr/local/sbin/smbd

find . -name build.ninja -type f -exec sed -i 's/-O2 -g//g' {} \;

make [1h 24m 17s]
sudo make install

sudo chgrp staff  /usr/local/lib/qemu/qemu-bridge-helper
sudo chmod 4750 /usr/local/lib/qemu/qemu-bridge-helper

qemu 6.2.0

  Directories
    Install prefix               : /usr/local
    BIOS directory               : share/qemu
    firmware path                : /usr/local/share/qemu-firmware
    binary directory             : bin
    library directory            : lib
    module directory             : lib/qemu
    libexec directory            : lib/qemu
    include directory            : include
    config directory             : /usr/local/etc
    local state directory        : /var
    Manual directory             : share/man
    Doc directory                : /usr/local/share/doc
    Build directory              : /usr/src/qemu-6.2.0/build
    Source path                  : /usr/src/qemu-6.2.0
    GIT submodules               : ui/keycodemapdb tests/fp/berkeley-testfloat-3 tests/fp/berkeley-softfloat-3 dtc capstone slirp

  Host binaries
    git                          : git
    make                         : make
    python                       : /usr/local/bin/python3.8 (version: 3.8)
    sphinx-build                 : NO
    genisoimage                  : 
    smbd                         : "/usr/local/sbin/smbd"

  Configurable features
    Documentation                : NO
    system-mode emulation        : YES
    user-mode emulation          : YES
    block layer                  : YES
    Install blobs                : YES
    module support               : NO
    fuzzing support              : NO
    Audio drivers                : alsa pa
    Trace backends               : log
    QOM debugging                : YES
    vhost-kernel support         : YES
    vhost-net support            : YES
    vhost-crypto support         : YES
    vhost-scsi support           : YES
    vhost-vsock support          : YES
    vhost-user support           : YES
    vhost-user-blk server support: YES
    vhost-user-fs support        : YES
    vhost-vdpa support           : YES
    build guest agent            : YES

  Compilation
    host CPU                     : aarch64
    host endianness              : little
    C compiler                   : gcc -flto -march=armv8-a+crc -mtune=cortex-a72 -Os -pipe
    Host C compiler              : gcc -flto -march=armv8-a+crc -mtune=cortex-a72 -Os -pipe
    C++ compiler                 : g++ -flto -march=armv8-a+crc -mtune=cortex-a72 -Os -pipe -fno-exceptions -fno-rtti
    CFLAGS                       : -O2 -g
    CXXFLAGS                     : -O2 -g
    QEMU_CFLAGS                  : -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong
    QEMU_LDFLAGS                 : -Wl,--warn-common -Wl,-z,relro -Wl,-z,now  -fstack-protector-strong
    profiler                     : NO
    link-time optimization (LTO) : NO
    PIE                          : YES
    static build                 : NO
    malloc trim support          : YES
    membarrier                   : NO
    debug stack usage            : NO
    mutex debugging              : NO
    memory allocator             : system
    avx2 optimization            : NO
    avx512f optimization         : NO
    gprof enabled                : NO
    gcov                         : NO
    thread sanitizer             : NO
    CFI support                  : NO
    strip binaries               : YES
    sparse                       : NO
    mingw32 support              : NO
    aarch64 tests                : gcc -flto -march=armv8-a+crc -mtune=cortex-a72 -Os -pipe

  Targets and accelerators
    KVM support                  : YES
    HAX support                  : NO
    HVF support                  : NO
    WHPX support                 : NO
    NVMM support                 : NO
    Xen support                  : NO
    TCG support                  : YES
    TCG backend                  : native (aarch64)
    TCG plugins                  : YES
    TCG debug enabled            : NO
    target list                  : i386-softmmu i386-linux-user x86_64-softmmu x86_64-linux-user arm-softmmu arm-linux-user aarch64-softmmu aarch64-linux-user
    default devices              : YES
    out of process emulation     : YES

  Block layer support
    coroutine backend            : ucontext
    coroutine pool               : YES
    Block whitelist (rw)         : 
    Block whitelist (ro)         : 
    Use block whitelist in tools : NO
    VirtFS support               : NO
    build virtiofs daemon        : NO
    Live block migration         : YES
    replication support          : YES
    bochs support                : YES
    cloop support                : YES
    dmg support                  : YES
    qcow v1 support              : YES
    vdi support                  : YES
    vvfat support                : YES
    qed support                  : YES
    parallels support            : YES
    FUSE exports                 : NO

  Crypto
    TLS priority                 : "NORMAL"
    GNUTLS support               : YES 3.6.14
      GNUTLS crypto              : YES
    libgcrypt                    : NO
    nettle                       : NO
    crypto afalg                 : NO
    rng-none                     : NO
    Linux keyring                : YES

  Dependencies
    SDL support                  : YES
    SDL image support            : YES 2.0.5
    GTK support                  : YES
    pixman                       : YES 0.40.0
    VTE support                  : NO
    slirp support                : internal
    libtasn1                     : YES 4.16.0
    PAM                          : NO
    iconv support                : YES
    curses support               : YES
    virgl support                : NO
    curl support                 : NO
    Multipath support            : NO
    VNC support                  : YES
    VNC SASL support             : NO
    VNC JPEG support             : YES 2.0.5
    VNC PNG support              : YES 1.6.37
    OSS support                  : YES
    ALSA support                 : YES 1.2.3.2
    PulseAudio support           : YES 13.0
    JACK support                 : NO
    brlapi support               : NO
    vde support                  : NO
    netmap support               : NO
    l2tpv3 support               : YES
    Linux AIO support            : NO
    Linux io_uring support       : NO
    ATTR/XATTR support           : YES
    RDMA support                 : NO
    PVRDMA support               : NO
    fdt support                  : internal
    libcap-ng support            : NO
    bpf support                  : NO
    spice protocol support       : NO
    rbd support                  : NO
    xfsctl support               : NO
    smartcard support            : NO
    U2F support                  : NO
    libusb                       : YES 1.0.23
    usb net redir                : NO
    OpenGL support               : YES
    GBM                          : YES 22.2.0-rc3
    libiscsi support             : NO
    libnfs support               : NO
    seccomp support              : NO
    GlusterFS support            : NO
    TPM support                  : YES
    libssh support               : NO
    lzo support                  : NO
    snappy support               : NO
    bzip2 support                : YES
    lzfse support                : NO
    zstd support                 : YES 1.4.5
    NUMA host support            : NO
    libxml2                      : YES 2.9.13
    capstone                     : internal
    libpmem support              : NO
    libdaxctl support            : NO
    libudev                      : YES 174
    FUSE lseek                   : NO
    selinux                      : NO

  Subprojects
    libvhost-user                : YES

  User defined options
    Native files                 : config-meson.cross
    bindir                       : /usr/local/bin
    datadir                      : /usr/local/share
    debug                        : true
    includedir                   : /usr/local/include
    libdir                       : /usr/local/lib
    libexecdir                   : /usr/local/lib/qemu
    localedir                    : /usr/local/share/locale
    localstatedir                : /var
    mandir                       : /usr/local/share/man
    optimization                 : 2
    prefix                       : /usr/local
    strip                        : true
    sysconfdir                   : /usr/local/etc
    werror                       : false
    b_coverage                   : false
    b_lto                        : false
    b_pie                        : true
    audio_drv_list               : alsa,pa
    capstone                     : auto
    cfi                          : false
    default_devices              : true
    docdir                       : /usr/local/share/doc
    fdt                          : auto
    qemu_firmwarepath            : /usr/local/share/qemu-firmware
    qemu_suffix                  : qemu
    slirp                        : auto
    sphinx_build                 : 
    tcg                          : enabled
    trace_file                   : trace
    xen                          : disabled
