fix: x86 not booting locally (#1959)

* fix: x86 not booting locally

* use cross instead of the host cargo
This commit is contained in:
Toshit Chawda
2025-11-13 18:01:48 -08:00
committed by GitHub
parent 5cad75e85a
commit 849beecd4f
4 changed files with 28 additions and 1 deletions
+10
View File
@@ -0,0 +1,10 @@
# Puter Emulator
To run locally:
1. Build the image in `image/`:
- `./build-epoxy.sh` or provide a musl+i686 epoxy in `assets/`
- `./build.sh`
2. Build the v86 frontend: `npm run start-webpack`
3. Build and run a local epoxy in `submodules/epoxy-tls/server/` or some other wisp server for the guest networking
4. Run Puter and log in as admin, then open the `puter-linux` app via URL
5. Optionally open the Terminal app if you want to test out the v86 integration
-1
View File
@@ -15,7 +15,6 @@ RUN apk add --update \
passwd -d root && \
chsh -s /bin/bash
RUN apk add neofetch
# programming language tools
RUN apk add --no-cache \
nodejs npm \
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail
if ! which cross >/dev/null 2>&1; then
echo "install https://github.com/cross-rs/cross to build epoxy with the simple script"
exit 1
fi
cd ../../../submodules/epoxy-tls/server/ || exit 1
# -lgcc is needed for __ffsdi2
RUSTFLAGS="-Clink-args=-lgcc" cross build --release --target i686-unknown-linux-musl --features twisp
cp ../target/i686-unknown-linux-musl/release/epoxy-server ../../../src/emulator/image/assets/
+6
View File
@@ -202,6 +202,10 @@ const bench_20ms = async (ctx) => {
window.onload = async function()
{
try {
await puter.fs.mkdir(puter.appDataPath)
} catch {}
const modules = {};
modules.bench = (await WebAssembly.instantiateStreaming(
fetch('./static/bench.wasm'))).instance.exports;
@@ -213,7 +217,9 @@ window.onload = async function()
} catch (e) {}
if ( ! emu_config ) {
console.log("writing emu config")
await puter.fs.write('config.json', JSON.stringify({}));
console.log("writing emu config1")
emu_config = {};
}