mirror of
https://github.com/Creased/RCM-Emulator.git
synced 2026-12-06 02:48:11 +01:00
Fix the Windows and CI builds
This commit is contained in:
1 parent
e2feebf9f7
commit
ee96a1b8ca
4 files changed
+39
-18
No files matched your search
@@ -204,7 +204,7 @@ real consoles. Details in [DESIGN.md](DESIGN.md#ccplex-cpu0).
|
|||||||
way a bootloader would hand over to it:
|
way a bootloader would hand over to it:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
linux/build.sh # linux/boot.bin (devkitARM + devkitA64)
|
linux/build.sh # linux/boot.bin (arm-none-eabi + aarch64 gcc)
|
||||||
linux/mkdtb.sh tegra210-odin.dtb odin-emu.dtb # console on UART-B, one CPU
|
linux/mkdtb.sh tegra210-odin.dtb odin-emu.dtb # console on UART-B, one CPU
|
||||||
linux/run.sh Image odin-emu.dtb boot.log 120
|
linux/run.sh Image odin-emu.dtb boot.log 120
|
||||||
```
|
```
|
||||||
@@ -228,7 +228,7 @@ initialisation.
|
|||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make test # CCPLEX, kernel CPU, SE, USB + display regression payloads (arm-none-eabi-gcc, devkitA64, python3)
|
make test # CCPLEX, kernel CPU, SE, USB + display regression payloads (arm-none-eabi-gcc, aarch64 gcc, python3)
|
||||||
tests/hwtest/build.sh build-hwtest # build hwtest-rcm (+ gcc-aarch64-linux-gnu)
|
tests/hwtest/build.sh build-hwtest # build hwtest-rcm (+ gcc-aarch64-linux-gnu)
|
||||||
tests/hwtest/run.sh ./rcm_emu build-hwtest/hwtest-rcm/build/hwtest.bin
|
tests/hwtest/run.sh ./rcm_emu build-hwtest/hwtest-rcm/build/hwtest.bin
|
||||||
```
|
```
|
||||||
|
|||||||
+13
-10
@@ -6,7 +6,6 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <mutex>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
@@ -260,20 +259,24 @@ struct EmuState {
|
|||||||
|
|
||||||
// Framebuffer snapshots asked for by the input script (SNAP), written by
|
// Framebuffer snapshots asked for by the input script (SNAP), written by
|
||||||
// the display thread from the next frame it shows. CPU thread produces,
|
// the display thread from the next frame it shows. CPU thread produces,
|
||||||
// display thread consumes.
|
// display thread consumes. A spin lock, not std::mutex: the Windows
|
||||||
std::mutex snap_mtx;
|
// build's MinGW uses the win32 thread model, which has none.
|
||||||
|
std::atomic<bool> snap_busy{false};
|
||||||
std::vector<std::string> snap_paths;
|
std::vector<std::string> snap_paths;
|
||||||
void snap_request(const std::string &path) {
|
void snap_request(const std::string &path) {
|
||||||
std::lock_guard<std::mutex> lk(snap_mtx);
|
while (snap_busy.exchange(true, std::memory_order_acquire)) {}
|
||||||
snap_paths.push_back(path);
|
snap_paths.push_back(path);
|
||||||
|
snap_busy.store(false, std::memory_order_release);
|
||||||
}
|
}
|
||||||
bool snap_take(std::string *path) {
|
bool snap_take(std::string *path) {
|
||||||
std::lock_guard<std::mutex> lk(snap_mtx);
|
while (snap_busy.exchange(true, std::memory_order_acquire)) {}
|
||||||
if (snap_paths.empty())
|
bool got = !snap_paths.empty();
|
||||||
return false;
|
if (got) {
|
||||||
*path = snap_paths.front();
|
*path = snap_paths.front();
|
||||||
snap_paths.erase(snap_paths.begin());
|
snap_paths.erase(snap_paths.begin());
|
||||||
return true;
|
}
|
||||||
|
snap_busy.store(false, std::memory_order_release);
|
||||||
|
return got;
|
||||||
}
|
}
|
||||||
// last_rot mirrors the rotation last applied by sdl_display_update.
|
// last_rot mirrors the rotation last applied by sdl_display_update.
|
||||||
// Read from the SDL event handler to invert the display→window transform.
|
// Read from the SDL event handler to invert the display→window transform.
|
||||||
|
|||||||
+12
-3
@@ -1,9 +1,18 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Builds linux/boot.bin: shim.S (devkitA64) embedded in the BPMP payload.
|
# Builds linux/boot.bin: shim.S (an AArch64 assembler) embedded in the BPMP payload.
|
||||||
set -e
|
set -e
|
||||||
D=$(dirname "$0")
|
D=$(dirname "$0")
|
||||||
A64=${A64:-/opt/devkitpro/devkitA64/bin/aarch64-none-elf-}
|
# devkitPro when it is installed, else the distribution's cross compilers
|
||||||
ARM=${ARM:-/opt/devkitpro/devkitARM/bin/arm-none-eabi-}
|
# (gcc-aarch64-linux-gnu, gcc-arm-none-eabi), as on CI.
|
||||||
|
DKP=${DEVKITPRO:-/opt/devkitpro}
|
||||||
|
if [ -z "$A64" ]; then
|
||||||
|
A64=aarch64-linux-gnu-
|
||||||
|
if [ -x "$DKP/devkitA64/bin/aarch64-none-elf-gcc" ]; then A64=$DKP/devkitA64/bin/aarch64-none-elf-; fi
|
||||||
|
fi
|
||||||
|
if [ -z "$ARM" ]; then
|
||||||
|
ARM=arm-none-eabi-
|
||||||
|
if [ -x "$DKP/devkitARM/bin/arm-none-eabi-gcc" ]; then ARM=$DKP/devkitARM/bin/arm-none-eabi-; fi
|
||||||
|
fi
|
||||||
${A64}gcc -c -o "$D/shim.o" "$D/shim.S"
|
${A64}gcc -c -o "$D/shim.o" "$D/shim.S"
|
||||||
${A64}ld -Ttext=0xA0000000 -o "$D/shim.elf" "$D/shim.o"
|
${A64}ld -Ttext=0xA0000000 -o "$D/shim.elf" "$D/shim.o"
|
||||||
${A64}objcopy -O binary "$D/shim.elf" "$D/shim.bin"
|
${A64}objcopy -O binary "$D/shim.elf" "$D/shim.bin"
|
||||||
|
|||||||
@@ -1,10 +1,19 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Builds tests/kernelcpu/payload.bin: cpu0.S with devkitA64's assembler,
|
# Builds tests/kernelcpu/payload.bin: cpu0.S with an AArch64 assembler,
|
||||||
# embedded as a word array into the BPMP payload built with arm-none-eabi.
|
# embedded as a word array into the BPMP payload built with arm-none-eabi.
|
||||||
set -e
|
set -e
|
||||||
D=$(dirname "$0")
|
D=$(dirname "$0")
|
||||||
A64=${A64:-/opt/devkitpro/devkitA64/bin/aarch64-none-elf-}
|
# devkitPro when it is installed, else the distribution's cross compilers
|
||||||
ARM=${ARM:-/opt/devkitpro/devkitARM/bin/arm-none-eabi-}
|
# (gcc-aarch64-linux-gnu, gcc-arm-none-eabi), as on CI.
|
||||||
|
DKP=${DEVKITPRO:-/opt/devkitpro}
|
||||||
|
if [ -z "$A64" ]; then
|
||||||
|
A64=aarch64-linux-gnu-
|
||||||
|
if [ -x "$DKP/devkitA64/bin/aarch64-none-elf-gcc" ]; then A64=$DKP/devkitA64/bin/aarch64-none-elf-; fi
|
||||||
|
fi
|
||||||
|
if [ -z "$ARM" ]; then
|
||||||
|
ARM=arm-none-eabi-
|
||||||
|
if [ -x "$DKP/devkitARM/bin/arm-none-eabi-gcc" ]; then ARM=$DKP/devkitARM/bin/arm-none-eabi-; fi
|
||||||
|
fi
|
||||||
${A64}gcc -c -o "$D/cpu0.o" "$D/cpu0.S"
|
${A64}gcc -c -o "$D/cpu0.o" "$D/cpu0.S"
|
||||||
${A64}ld -Ttext=0xA0000000 -o "$D/cpu0.elf" "$D/cpu0.o"
|
${A64}ld -Ttext=0xA0000000 -o "$D/cpu0.elf" "$D/cpu0.o"
|
||||||
${A64}objcopy -O binary "$D/cpu0.elf" "$D/cpu0.bin"
|
${A64}objcopy -O binary "$D/cpu0.elf" "$D/cpu0.bin"
|
||||||
|
|||||||
Reference in new issue
Block a user