Skip to content

dev: update v86, switch twisp to epoxy-server with twisp feature #788

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/emulator/image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ COPY rootfs/ /
COPY basic-boot /etc/init.d/
RUN chmod +x /etc/init.d/basic-boot

COPY assets/twisp /bin/twisp
RUN chmod u+x /bin/twisp
COPY assets/epoxy-server /bin/epoxy-server
RUN chmod u+x /bin/epoxy-server
RUN rc-update add twisp-service default

RUN rc-update add debug-service default
Expand Down
12 changes: 12 additions & 0 deletions src/emulator/image/rootfs/etc/epoxyconf.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[server]
bind = "/dev/hvc0"
socket = "file"
transport = "lengthdelimitedle"
file_raw_mode = true # maybe?

[stream]
allow_twisp = true

[wisp]
wisp_v2 = true
buffer_size = 4294967295
10 changes: 6 additions & 4 deletions src/emulator/image/rootfs/etc/init.d/twisp-service
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/sbin/openrc-run

description="twisp daemon"
command="/bin/twisp"
command_args="--pty /dev/hvc0"
pidfile="/var/run/twisp.pid"
description="Epoxy Daemon"
command="/bin/epoxy-server"
command_args="/etc/epoxyconf.toml"
command_background="yes"
pidfile="/var/run/twisp.pid"
start_stop_daemon_args="--background --make-pidfile"
output_log="/dev/ttyS0"
error_log="/dev/ttyS0"

depend() {
need localmount
Expand Down
2 changes: 1 addition & 1 deletion submodules/v86
Submodule v86 updated 58 files
+0 −0 .cargo/config.toml
+24 −0 .github/ISSUE_TEMPLATE/issue.md
+2 −1 .github/workflows/ci.yml
+6 −4 Makefile
+3 −1 Readme.md
+65 −76 debug.html
+24 −0 docs/networking.md
+1 −1 examples/lua.html
+1 −2 examples/serial.html
+13 −3 examples/two_instances.html
+12 −14 index.html
+1 −3 lib/filesystem.js
+1 −2 nodejs-loader.mjs
+5 −0 package.json
+27 −93 src/browser/dummy_screen.js
+11 −1 src/browser/fetch_network.js
+0 −18 src/browser/filestorage.js
+67 −4 src/browser/keyboard.js
+546 −453 src/browser/main.js
+567 −173 src/browser/screen.js
+126 −70 src/browser/starter.js
+24 −23 src/cpu.js
+2 −21 src/ide.js
+22 −28 src/lib.js
+0 −4 src/main.js
+6 −6 src/rust/codegen.rs
+49 −31 src/rust/cpu/cpu.rs
+63 −132 src/rust/cpu/modrm.rs
+9 −1 src/rust/jit.rs
+229 −144 src/vga.js
+3 −3 src/virtio.js
+248 −0 src/virtio_net.js
+0 −1 tests/api/clean-shutdown.js
+29 −21 tests/api/floppy-insert-eject.js
+61 −0 tests/api/reboot.js
+0 −1 tests/api/reset.js
+7 −7 tests/api/serial.js
+7 −21 tests/api/state.js
+0 −1 tests/api/test.js
+0 −1 tests/benchmark/arch-bytemark.js
+0 −1 tests/benchmark/arch-python.js
+1 −2 tests/benchmark/linux-boot.js
+73 −180 tests/devices/fetch_network.js
+34 −119 tests/devices/virtio_9p.js
+50 −182 tests/devices/wisp_network.js
+1 −1 tests/expect/tests/indirect-call.wast
+1 −1 tests/expect/tests/mem32r.wast
+2 −2 tests/expect/tests/mem32rmw.wast
+1 −1 tests/expect/tests/mem32w.wast
+1 −1 tests/expect/tests/mov-immoffs.wast
+1 −1 tests/expect/tests/sti.wast
+1 −1 tests/expect/tests/task_switch_test.wast
+1 −1 tests/expect/tests/task_switch_test_sse.wast
+8 −11 tests/full/run.js
+1 −1 tests/jit-paging/run.js
+0 −1 tests/qemu/run.js
+0 −1 tools/docker/alpine/build-state.js
+3 −3 v86.css
12 changes: 4 additions & 8 deletions tools/build_v86.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,15 @@ cd -

echo -e "\x1B[36;1m<<< Building Twisp >>>\x1B[0m"

cd submodules/twisp
pwd
cd submodules/epoxy-tls/server

RUSTFLAGS="-C target-feature=+crt-static" cargo build \
--release \
--target i686-unknown-linux-gnu \
`# TODO: what are default features?` \
--no-default-features
RUSTFLAGS="-C target-feature=+crt-static" cargo +nightly b -F twisp -r --target i686-unknown-linux-gnu;

echo -e "\x1B[36;1m<<< Preparing to Build Imag >>>\x1B[0m"

cd -

cp submodules/twisp/target/i686-unknown-linux-gnu/release/twisp \
cp submodules/epoxy-tls/target/i686-unknown-linux-gnu/release/epoxy-server \
src/emulator/image/assets/

echo -e "\x1B[36;1m<<< Building Image >>>\x1B[0m"
Expand Down