How to build and setup for Raspberry PI QEMU native.md - tx00100xt/SeriousSamClassic GitHub Wiki

How to build and configure for Raspberry PI 3B/B+ using QEMU native mode.

First we need to install the QEMU packages and prepare an operating system image for further use with QEMU.

sudo apt-get update && upgrade
sudo apt-get install qemu-system-arm qemu-utils libvirt-daemon-system net-tools xz-utils wget
sudo systemctl enable libvirtd
sudo systemctl start libvirtd
sudo adduser $USER libvirt

Checking the status of the libvirt daemon.

sudo systemctl status libvirtd
● libvirtd.service - Virtualization daemon
   Loaded: loaded (/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2023-04-18 09:43:39 MSK; 1min 30s ago
     Docs: man:libvirtd(8)
           https://libvirt.org
 Main PID: 30662 (libvirtd)
    Tasks: 17 (limit: 32768)
   Memory: 21.2M
   CGroup: /system.slice/libvirtd.service
           └─30662 /usr/sbin/libvirtd

апр 18 09:43:39 debian systemd[1]: Starting Virtualization daemon...
апр 18 09:43:39 debian systemd[1]: Started Virtualization daemon.

Now start the 'default' network using virsh command.

sudo virsh net-start default

Checking the status of the libvirt daemon again.

sudo systemctl status libvirtd
 Loaded: loaded (/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2023-04-18 09:43:39 MSK; 15min ago
     Docs: man:libvirtd(8)
           https://libvirt.org
 Main PID: 30662 (libvirtd)
    Tasks: 19 (limit: 32768)
   Memory: 21.9M
   CGroup: /system.slice/libvirtd.service
           ├─ 5107 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
           ├─ 5108 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
           └─30662 /usr/sbin/libvirtd

апр 18 09:58:00 debian dnsmasq[5107]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify dumpfile
апр 18 09:58:00 debian dnsmasq-dhcp[5107]: DHCP, IP range 192.168.122.2 -- 192.168.122.254, lease time 1h
апр 18 09:58:00 debian dnsmasq-dhcp[5107]: DHCP, sockets bound exclusively to interface virbr0
апр 18 09:58:00 debian dnsmasq[5107]: reading /etc/resolv.conf
апр 18 09:58:00 debian dnsmasq[5107]: using nameserver 213.177.97.201#53
апр 18 09:58:00 debian dnsmasq[5107]: using nameserver 231.177.96.201#53
апр 18 09:58:00 debian dnsmasq[5107]: using nameserver 8.8.8.8#53
апр 18 09:58:00 debian dnsmasq[5107]: read /etc/hosts - 5 addresses
апр 18 09:58:00 debian dnsmasq[5107]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses
апр 18 09:58:00 debian dnsmasq-dhcp[5107]: read /var/lib/libvirt/dnsmasq/default.hostsfile

Checking the presence of the network interface virbr0:

ifconfig
virbr0: flags=4099  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:fe:5f:40  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

We will need this network interface later to communicate with the virtual machine.

We go to the page https://www.raspberrypi.com/software/operating-systems/ and select the desired system. In Let's take Raspbian bullseye as an example, the current version is 2023-02-22-raspios-bullseye-armhf.img and 2023-02-22-raspios-bullseye-arm64.img.

Download and unpack the compressed image:

mkdir ~/rpi_image
cd ~/rpi_image
wget http://downloads.raspberrypi.org/raspios_arm64/images/raspios_arm64-2023-02-22/2023-02-21-raspios-bullseye-arm64.img.xz
xz -d 2023-02-21-raspios-bullseye-arm64.img.xz

First, get information about the image:

fdisk -lu 2023-02-21-raspios-bullseye-arm64.img
Disk 2023-02-21-raspios-bullseye-arm64.img: 4.09 GiB, 4395630592 bytes, 8585216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x80558ef0

Device                                 Boot  Start     End Sectors  Size Id Type
2023-02-21-raspios-bullseye-arm64.img1        8192  532479  524288  256M  c W95 FAT32 (LBA)
2023-02-21-raspios-bullseye-arm64.img2      532480 8585215 8052736  3.8G 83 Linux

Since in the future we will need to install packages and build from source code, we need more free space in the image. Add 4Gb to the image:

chmod 775 2023-02-21-raspios-bullseye-arm64.img
dd if=/dev/zero bs=1M count=4096 >> 2023-02-21-raspios-bullseye-arm64.img

We hook the entire image to the loop0 device, and the second section (starts from sector 532480, each sector of 512 bytes) to loop1.

sudo losetup -f --show 2023-02-21-raspios-bullseye-arm64.img
sudo losetup -f --show -o $((532480*512)) 2023-02-21-raspios-bullseye-arm64.img

This will map /dev/loop0 to the entire image and /dev/loop1 to the partition we we want to expand.

We start parted, delete the second partition in the device /dev/loop0 and create it with a new size.

sudo parted /dev/loop0
GNU Parted 3.5
Using /dev/loop0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print 

Model: Loopback device (loopback)
Disk /dev/loop0: 8691MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      4194kB  273MB   268MB   primary  fat32        lba
 2      273MB   4396MB  4123MB  primary  ext4

(parted) rm 2
(parted) mkpart primary 273 8691 
(parted) print
Model: Loopback device (loopback)
Disk /dev/loop0: 8691MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      4194kB  273MB   268MB   primary  fat32        lba
 2      273MB   8691MB  8418MB  primary               lba

(parted) quit

Then we check and resize the new partition:

sudo e2fsck -f /dev/loop1
e2fsck 1.46.5 (30-Dec-2021)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
rootfs: 111912/251968 files (0.1% non-contiguous), 836980/1006592 blocks
sudo resize2fs /dev/loop1
resize2fs 1.46.5 (30-Dec-2021)
Resizing the filesystem on /dev/loop1 to 2055168 (4k) blocks.
The filesystem on /dev/loop1 is now 2055168 (4k) blocks long.

Now let's make sure that the size of the new partition has increased by 4 Gb:

sudo parted /dev/loop0
GNU Parted 3.5
Using /dev/loop0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: Loopback device (loopback)
Disk /dev/loop0: 8691MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      4194kB  273MB   268MB   primary  fat32        lba
 2      273MB   8691MB  8418MB  primary  ext4

(parted) quit

Clean up loop devices:

sudo losetup -d /dev/loop0 /dev/loop1

To run QEMU in native mode for Raspberry PI 3B/3B+, we need a kernel image and a device tree describing the system hardware. We will take them from the operating system image from the boot partition.

Mount /boot and extract the files we need:

mkdir ~/rpi_boot
mkdir ~/rpi_kernel
sudo -s mount ../rpi_image/2023-02-21-raspios-bullseye-arm64.img -o loop,offset=$((8192*512)),rw ../rpi_boot
cp ~/rpi_boot/kernel*.img ~/rpi_kernel
cp ~/rpi_boot/bcm2710-rpi-3-*.dtb ~/rpi_kernel
sudo -s umount ../rpi_boot

Convert the image to qcow2 format and fix the size.

qemu-img convert -O qcow2 2023-02-21-raspios-bullseye-arm64.img 2023-02-21-raspios-bullseye-arm64.qcow2
qemu-img resize 2023-02-21-raspios-bullseye-arm64.qcow2 16G

We compress the image 2021-10-30-raspios-bullseye-arm64.img and delete the uncompressed one. The size after compression is less than 1G.

XZ_DEFAULTS="-T 10" tar --use-compress-program=xz -cpvf 2023-02-21-raspios-bullseye-arm64.img.tar.xz 2023-02-21-raspios-bullseye-arm64.img

For the 2021-10-30-raspios-bullseye-armhf.img image, all steps are the same.

Next, create scripts to run QEMU.

launch-32bit.sh:

nano -w launch-32bit.sh
chmod a+x launch-32bit.sh
#!/bin/bash
qemu-system-aarch64 \
    -M raspi3b \
    -cpu cortex-a53 \
    -append "rw earlyprintk loglevel=8 console=ttyAMA0,115200 dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootdelay=1 bcm2708_fb.fbwidth=1600 bcm2708_fb.fbheight=900" \
    -dtb ~/rpi_kernel/bcm2710-rpi-3-b-plus.dtb \
    -kernel ~/rpi_kernel/kernel8.img \
    -sd ~/rpi_image/2023-02-21-raspios-bullseye-armhf.qcow2 \
    -m 1G -smp 4 \
    -serial stdio \
    -usb -device usb-mouse -device usb-kbd \
	-device usb-net,netdev=net0 \
	-netdev user,id=net0,hostfwd=tcp::2222-:22 \
    -display gtk \
    -serial telnet:localhost:4321,server,nowait \
    -monitor telnet:localhost:4322,server,nowait \
    -global bcm2835-fb.xres=1600 -global bcm2835-fb.yres=900 \

launch-64bit.sh:

nano -w launch-64bit.sh
chmod a+x launch-64bit.sh
#!/bin/bash
qemu-system-aarch64 \
    -M raspi3b \
    -cpu cortex-a53 \
    -append "rw earlyprintk loglevel=8 console=ttyAMA0,115200 dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootdelay=1 bcm2708_fb.fbwidth=1600 bcm2708_fb.fbheight=900" \
    -dtb ~/rpi_kernel/bcm2710-rpi-3-b-plus.dtb \
    -kernel ~/rpi_kernel/kernel8.img \
    -sd ~/rpi_image/2023-02-21-raspios-bullseye-arm64.qcow2 \
    -m 1G -smp 4 \
    -serial stdio \
    -usb -device usb-mouse -device usb-kbd \
	-device usb-net,netdev=net0 \
	-netdev user,id=net0,hostfwd=tcp::2222-:22 \
    -display gtk \
    -serial telnet:localhost:4321,server,nowait \
    -monitor telnet:localhost:4322,server,nowait \
    -global bcm2835-fb.xres=1600 -global bcm2835-fb.yres=900 \

We are now all set to run QEMU in native mode for Raspberry PI 3B/3B+.

Running QEMU machine.

Type in console to run:

cd ~/rpi_image
sh launch-64bit.sh

The QEMU will start up and the console will also show loading messages.

QEMU

Next, you will be greeted with a window with a request to configure the system. After the initial setup and user creation, a reboot is required.

After the reboot, you will be greeted by the usual Raspberry Pi OS window.

As a console for further operations, you can use the console inside the QEMU machine and the console in which the script was launched to run.

Inside the machine, we start the service ssh.

sudo systemctl enable ssh   
sudo systemctl start ssh

On the host system, we create a script for building the game along with modifications and transfer it to the guest system.

compile-32bit.sh:

nano -w compile-32bit.sh
#!/bin/bash

echo "*** install packages ***"
sudo apt-get update -y --allow-releaseinfo-change
sudo apt-get install --no-install-recommends -y git bison flex cmake make gcc libc6-dev libsdl2-dev libogg-dev libvorbis-dev zlib1g-dev libvulkan1 libvulkan-dev 

echo "*** Create release dir ***"
mkdir {armhf,armhf/SamTFE,armhf/SamTFE/Mods,armhf/SamTFE/Mods/XPLUS,armhf/SamTFE/Mods/XPLUS/Bin,armhf/SamTFE/Bin,armhf/SamTSE}
mkdir {armhf/SamTSE/Mods,armhf/SamTSE/Mods/XPLUS,armhf/SamTSE/Mods/XPLUS/Bin,armhf/SamTSE/Bin,armhf/SamTFE/Mods/SSA,armhf/SamTFE/Mods/SSA/Bin} 

echo "*** Clone repo ***"
git clone https://github.com/tx00100xt/SeriousSamClassic.git
git clone https://github.com/tx00100xt/SeriousSamAlphaRemake.git

echo "*** Run cmake ***"
cmake SeriousSamClassic/SamTFE/Sources -B SeriousSamClassic/SamTFE/Sources/build -DCMAKE_BUILD_TYPE=Release -DTFE=TRUE -DRPI4=TRUE
cmake SeriousSamClassic/SamTFE/Sources -B SeriousSamClassic/SamTFE/Sources/build-xplus -DCMAKE_BUILD_TYPE=Release -DTFE=TRUE -DRPI4=TRUE
cmake SeriousSamClassic/SamTSE/Sources -B SeriousSamClassic/SamTSE/Sources/build -DCMAKE_BUILD_TYPE=Release -DRPI4=TRUE
cmake SeriousSamClassic/SamTSE/Sources -B SeriousSamClassic/SamTSE/Sources/build-xplus -DCMAKE_BUILD_TYPE=Release -DRPI4=TRUE
cmake SeriousSamAlphaRemake/Sources -B SeriousSamAlphaRemake/Sources/build -DCMAKE_BUILD_TYPE=Release -DTFE=TRUE -DRPI4=TRIE

echo "*** build Alpha Remake***"
make -C SeriousSamAlphaRemake/Sources/build ecc
make -j4 -C SeriousSamAlphaRemake/Sources/build
cp -vfr SeriousSamAlphaRemake/Sources/build/Debug/*.so armhf/SamTFE/Mods/SSA/Bin

echo "*** build SamTFE ***"
make -C SeriousSamClassic/SamTFE/Sources/build ecc
make -j4 -C SeriousSamClassic/SamTFE/Sources/build
cp -vfr SeriousSamClassic/SamTFE/Sources/build/Debug/*.so armhf/SamTFE/Bin
cp -vfr SeriousSamClassic/SamTFE/Sources/build/{DedicatedServer,ecc,MakeFONT,SeriousSam} armhf/SamTFE/Bin

echo "*** build SamTFE XPLUS ***"
cp -vfr SeriousSamClassic/SamTFE/Sources/Entities/PlayerWeaponsHD.es SeriousSamClassic/SamTFE/Sources/Entities/PlayerWeapons.es
make -C SeriousSamClassic/SamTFE/Sources/build-xplus ecc
make -j4 -C SeriousSamClassic/SamTFE/Sources/build-xplus
cp -vfr SeriousSamClassic/SamTFE/Sources/build-xplus/Debug/libEntities.so armhf/SamTFE/Mods/XPLUS/Bin
cp -vfr SeriousSamClassic/SamTFE/Sources/build-xplus/Debug/libGame.so armhf/SamTFE/Mods/XPLUS/Bin

echo "*** build SamTSE ***"
make -C SeriousSamClassic/SamTSE/Sources/build ecc
make -j4 -C SeriousSamClassic/SamTSE/Sources/build
cp -vfr SeriousSamClassic/SamTSE/Sources/build/Debug/*.so armhf/SamTSE/Bin
cp -vfr SeriousSamClassic/SamTSE/Sources/build/{DedicatedServer,ecc,MakeFONT,SeriousSam} armhf/SamTSE/Bin

echo "*** build SamTSE XPLUS ***"
cp -vfr SeriousSamClassic/SamTSE/Sources/EntitiesMP/PlayerWeaponsHD.es SeriousSamClassic/SamTSE/Sources/EntitiesMP/PlayerWeapons.es
make -C SeriousSamClassic/SamTSE/Sources/build-xplus ecc
make -j4 -C SeriousSamClassic/SamTSE/Sources/build-xplus
cp -vfr SeriousSamClassic/SamTSE/Sources/build-xplus/Debug/libEntitiesMP.so armhf/SamTSE/Mods/XPLUS/Bin
cp -vfr SeriousSamClassic/SamTSE/Sources/build-xplus/Debug/libGameMP.so armhf/SamTSE/Mods/XPLUS/Bin

echo "*** Copy Data files ***"
cp -vfr SeriousSamClassic/{SamTFE/SE1_10b.gro,SamTFE/ModEXT.txt} armhf/SamTFE
cp -vfr SeriousSamClassic/{SamTSE/SE1_10b.gro,SamTSE/ModEXT.txt} armhf/SamTSE
cp -vfr SeriousSamAlphaRemake/x32/SamTFE/Mods/* arm64/SamTFE/Mods
cp -vfr SeriousSamClassic/SamTFE/Mods/* arm64/SamTFE/Mods
cp -vfr SeriousSamClassic/SamTSE/Mods/* arm64/SamTSE/Mods 

echo "*** Create archive ***"
XZ_DEFAULTS="-T 10" tar --use-compress-program=xz -cpvf SeriousSamClassic-rpios32-rpi3b-armhf-bin.tar.xz armhf

echo "*** Done ***"
chmod a+x compile-32bit.sh

compile-64bit.sh:

nano -w compile-64bit.sh
#!/bin/bash

echo "*** install packages ***"
sudo apt-get update -y --allow-releaseinfo-change
sudo apt-get install --no-install-recommends -y git bison flex cmake make gcc libc6-dev libsdl2-dev libogg-dev libvorbis-dev zlib1g-dev libvulkan1 libvulkan-dev 

echo "*** Create release dir ***"
mkdir {arm64,arm64/SamTFE,arm64/SamTFE/Mods,arm64/SamTFE/Mods/XPLUS,arm64/SamTFE/Mods/XPLUS/Bin,arm64/SamTFE/Bin,arm64/SamTSE}
mkdir {arm64/SamTSE/Mods,arm64/SamTSE/Mods/XPLUS,arm64/SamTSE/Mods/XPLUS/Bin,arm64/SamTSE/Bin,arm64/SamTFE/Mods/SSA,arm64/SamTFE/Mods/SSA/Bin}

echo "*** Clone repo ***"
git clone https://github.com/tx00100xt/SeriousSamClassic.git
git clone https://github.com/tx00100xt/SeriousSamAlphaRemake.git

echo "*** Run cmake ***"
cmake SeriousSamClassic/SamTFE/Sources -B SeriousSamClassic/SamTFE/Sources/build -DCMAKE_BUILD_TYPE=Release -DTFE=TRUE -DRPI4=TRUE
cmake SeriousSamClassic/SamTFE/Sources -B SeriousSamClassic/SamTFE/Sources/build-xplus -DCMAKE_BUILD_TYPE=Release -DTFE=TRUE -DRPI4=TRUE
cmake SeriousSamClassic/SamTSE/Sources -B SeriousSamClassic/SamTSE/Sources/build -DCMAKE_BUILD_TYPE=Release -DRPI4=TRUE
cmake SeriousSamClassic/SamTSE/Sources -B SeriousSamClassic/SamTSE/Sources/build-xplus -DCMAKE_BUILD_TYPE=Release -DRPI4=TRUE
cmake SeriousSamAlphaRemake/Sources -B SeriousSamAlphaRemake/Sources/build -DCMAKE_BUILD_TYPE=Release -DTFE=TRUE -DRPI4=TRIE

echo "*** build Alpha Remake***"
make -C SeriousSamAlphaRemake/Sources/build ecc
make -j4 -C SeriousSamAlphaRemake/Sources/build
cp -vfr SeriousSamAlphaRemake/Sources/build/Debug/*.so arm64/SamTFE/Mods/SSA/Bin

echo "*** build SamTFE ***"
make -C SeriousSamClassic/SamTFE/Sources/build ecc
make -j4 -C SeriousSamClassic/SamTFE/Sources/build
cp -vfr SeriousSamClassic/SamTFE/Sources/build/Debug/*.so arm64/SamTFE/Bin
cp -vfr SeriousSamClassic/SamTFE/Sources/build/{DedicatedServer,ecc,MakeFONT,SeriousSam} arm64/SamTFE/Bin

echo "*** build SamTFE XPLUS ***"
cp -vfr SeriousSamClassic/SamTFE/Sources/Entities/PlayerWeaponsHD.es SeriousSamClassic/SamTFE/Sources/Entities/PlayerWeapons.es
make -C SeriousSamClassic/SamTFE/Sources/build-xplus ecc
make -j4 -C SeriousSamClassic/SamTFE/Sources/build-xplus
cp -vfr SeriousSamClassic/SamTFE/Sources/build-xplus/Debug/libEntities.so arm64/SamTFE/Mods/XPLUS/Bin
cp -vfr SeriousSamClassic/SamTFE/Sources/build-xplus/Debug/libGame.so arm64/SamTFE/Mods/XPLUS/Bin

echo "*** build SamTSE ***"
make -C SeriousSamClassic/SamTSE/Sources/build ecc
make -j4 -C SeriousSamClassic/SamTSE/Sources/build
cp -vfr SeriousSamClassic/SamTSE/Sources/build/Debug/*.so arm64/SamTSE/Bin
cp -vfr SeriousSamClassic/SamTSE/Sources/build/{DedicatedServer,ecc,MakeFONT,SeriousSam} arm64/SamTSE/Bin

echo "*** build SamTSE XPLUS ***"
cp -vfr SeriousSamClassic/SamTSE/Sources/EntitiesMP/PlayerWeaponsHD.es SeriousSamClassic/SamTSE/Sources/EntitiesMP/PlayerWeapons.es
make -C SeriousSamClassic/SamTSE/Sources/build-xplus ecc
make -j4 -C SeriousSamClassic/SamTSE/Sources/build-xplus
cp -vfr SeriousSamClassic/SamTSE/Sources/build-xplus/Debug/libEntitiesMP.so arm64/SamTSE/Mods/XPLUS/Bin
cp -vfr SeriousSamClassic/SamTSE/Sources/build-xplus/Debug/libGameMP.so arm64/SamTSE/Mods/XPLUS/Bin

echo "*** Copy Data files ***"
cp -vfr SeriousSamClassic/{SamTFE/SE1_10b.gro,SamTFE/ModEXT.txt} arm64/SamTFE
cp -vfr SeriousSamClassic/{SamTSE/SE1_10b.gro,SamTSE/ModEXT.txt} arm64/SamTSE 
cp -vfr SeriousSamAlphaRemake/x64/SamTFE/Mods/* arm64/SamTFE/Mods
cp -vfr SeriousSamClassic/SamTFE/Mods/* arm64/SamTFE/Mods
cp -vfr SeriousSamClassic/SamTSE/Mods/* arm64/SamTSE/Mods

echo "*** Create archive ***"
XZ_DEFAULTS="-T 10" tar --use-compress-program=xz -cpvf SeriousSamClassic-rpios64-rpi3b-arm64-bin.tar.xz arm64

echo "*** Done ***"
chmod a+x compile-64bit.sh

Passing the script to the guest.

cp -P2222 -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" compile-64bit.sh [email protected]:/home/pi/
Warning: Permanently added '[192.168.122.1]:2222' (ED25519) to the list of known hosts.
[email protected]'s password: 
compile-64bit.sh                              100% 3582   152.3KB/s   00:00 

Run the script in the guest system and wait for the build to finish.

linux32
bash compile-32bit.sh

for 32-bit version OS or

bash compile-64bit.sh

for 64-bit version OS.

Full compilation for SamTFE, SamTSE, SamTFE XPLUS, SamTSE XPLUS and Alpha Remake on a Ryzen 5 5600G processor inside a QEMU virtual machine took 1 hour 25 minutes.

In the host, using scp, we get the result of work from the virtual machine.

scp -P2222 -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" [email protected]:/home/pi/SeriousSamClassic-rpios64-rpi3b-arm64-bin.tar.xz .
Warning: Permanently added '[192.168.122.1]:2222' (ED25519) to the list of known hosts.
[email protected]'s password: 
SeriousSamClassic-rpios64-rpi3b-arm64-bin.tar.xz                           100%   10MB 117.8KB/s   01:26

Now you can remove interface virbr0: and stop the service libvirtd.

sudo virsh net-destroy default
sudo systemctl stop libvirtd
sudo systemctl disable libvirtd

Now we can use the resulting archive on a real Raspberry PI 3B under the 64-bit Raspberry PI OS operating system.
Also, using the compiled binaries, you can create deb packages by following the instructions:
How to building a package for Debian or Ubuntu

⚠️ **GitHub.com Fallback** ⚠️