diff --git a/examples/arch.html b/examples/arch.html index 0272907e..a95dced5 100644 --- a/examples/arch.html +++ b/examples/arch.html @@ -9,7 +9,7 @@ window.onload = function() { var emulator = new V86Starter({ wasm_path: "../build/v86.wasm", - memory_size: 128 * 1024 * 1024, + memory_size: 512 * 1024 * 1024, vga_memory_size: 8 * 1024 * 1024, screen_container: document.getElementById("screen_container"), bios: { @@ -18,16 +18,17 @@ window.onload = function() vga_bios: { url: "../bios/vgabios.bin", }, - hda: { - url: "http://localhost/v86-images/arch3.img", - async: true, - size: 8 * 1024 * 1024 * 1024, - }, filesystem: { - baseurl: "http://localhost/v86-images/arch/", - basefs: "http://localhost/v86-images/fs.json", + baseurl: "../images/arch/", + basefs: "../images/fs.json", }, autostart: true, + bzimage_initrd_from_filesystem: true, + cmdline: [ + "rw", + "root=host9p rootfstype=9p rootflags=trans=virtio,cache=loose", + "init=/usr/bin/init-openrc", + ].join(" "), }); document.getElementById("save_file").onclick = function() diff --git a/examples/async_load.html b/examples/async_load.html index 5608d2e1..3440fa2e 100644 --- a/examples/async_load.html +++ b/examples/async_load.html @@ -25,7 +25,7 @@ window.onload = function() url: "../bios/vgabios.bin", }, cdrom: { - url: "https://dl.dropboxusercontent.com/u/61029208/dsl-4.11.rc2.iso", + url: "../images/dsl-4.11.rc2.iso", async: true, // size can be determined automatically, but costs an extra request diff --git a/examples/lang.html b/examples/lang.html index cb16fa3f..5f931604 100644 --- a/examples/lang.html +++ b/examples/lang.html @@ -16,7 +16,7 @@ window.onload = function() var emulator = new V86Starter({ wasm_path: "../build/v86.wasm", - memory_size: 128 * 1024 * 1024, + memory_size: 512 * 1024 * 1024, vga_memory_size: 8 * 1024 * 1024, screen_container: document.getElementById("screen_container"), bios: { @@ -25,17 +25,11 @@ window.onload = function() vga_bios: { url: "../bios/vgabios.bin", }, - hda: { - url: "http://localhost/v86-images/arch3.img", - size: 8 * 1024 * 1024 * 1024, - async: true, - }, initial_state: { - url: "http://localhost/v86-images/v86state.bin", + url: "../images/arch_state.bin.zst", }, filesystem: { - baseurl: "http://localhost/v86-images/arch/", - basefs: "http://localhost/v86-images/fs.json", + baseurl: "../images/arch/", }, autostart: true, }); diff --git a/examples/lang2.html b/examples/lang2.html deleted file mode 100644 index 22fa7f9e..00000000 --- a/examples/lang2.html +++ /dev/null @@ -1,105 +0,0 @@ - -Interpreter 2 - - - - -
0s -- 
-
- -
-
-
-
- - -
-
- -
- diff --git a/examples/lua.html b/examples/lua.html index 277f400c..03a7a8a7 100644 --- a/examples/lua.html +++ b/examples/lua.html @@ -21,8 +21,8 @@ window.onload = function() vga_bios: { url: "../bios/vgabios.bin", }, - cdrom: { - url: "../images/linux.iso", + bzimage: { + url: "../images/buildroot-bzimage.bin", }, autostart: true, disable_keyboard: true, @@ -37,12 +37,7 @@ window.onload = function() data += char; } - if(data.endsWith("login: ")) - { - console.log("Do login"); - emulator.serial0_send("root\n"); - } - else if(data.endsWith("/root% ")) + if(data.endsWith("~% ")) { console.log("Now ready"); document.getElementById("status").textContent = "Ready.\n"; diff --git a/examples/nodejs.js b/examples/nodejs.js index 9b1616a2..2cfdffff 100755 --- a/examples/nodejs.js +++ b/examples/nodejs.js @@ -10,15 +10,12 @@ function readfile(path) } var bios = readfile(__dirname + "/../bios/seabios.bin"); -var linux = readfile(__dirname + "/../images/linux.iso"); +var linux = readfile(__dirname + "/../images/linux4.iso"); process.stdin.setRawMode(true); process.stdin.resume(); process.stdin.setEncoding("utf8"); -var boot_start = Date.now(); -var booted = false; - console.log("Now booting, please stand by ..."); var emulator = new V86Starter({ @@ -29,14 +26,10 @@ var emulator = new V86Starter({ emulator.add_listener("serial0-output-char", function(chr) { - if(!booted) + if(chr <= "~") { - var now = Date.now(); - console.log("Took %dms to boot", now - boot_start); - booted = true; + process.stdout.write(chr); } - - process.stdout.write(chr); }); process.stdin.on("data", function(c) diff --git a/examples/nodejs_state.js b/examples/nodejs_state.js index ea79f8de..d3e829af 100755 --- a/examples/nodejs_state.js +++ b/examples/nodejs_state.js @@ -12,7 +12,7 @@ function readfile(path) console.log("Use F2 to save the state and F3 to restore."); var bios = readfile(__dirname + "/../bios/seabios.bin"); -var linux = readfile(__dirname + "/../images/linux.iso"); +var linux = readfile(__dirname + "/../images/linux4.iso"); process.stdin.setRawMode(true); process.stdin.resume(); @@ -28,7 +28,10 @@ var emulator = new V86Starter({ emulator.add_listener("serial0-output-char", function(chr) { - process.stdout.write(chr); + if(chr <= "~") + { + process.stdout.write(chr); + } }); var state; diff --git a/examples/serial.html b/examples/serial.html index 3dd0c5b4..42ebcf62 100644 --- a/examples/serial.html +++ b/examples/serial.html @@ -20,7 +20,7 @@ window.onload = function() url: "../bios/vgabios.bin", }, cdrom: { - url: "../images/linux.iso", + url: "../images/linux4.iso", }, autostart: true, disable_keyboard: true, diff --git a/examples/worker.js b/examples/worker.js index d85eb456..50268485 100644 --- a/examples/worker.js +++ b/examples/worker.js @@ -1,6 +1,7 @@ importScripts("../build/libv86.js"); var emulator = new V86Starter({ + wasm_path: "../build/v86.wasm", memory_size: 32 * 1024 * 1024, vga_memory_size: 2 * 1024 * 1024, bios: { @@ -10,7 +11,7 @@ var emulator = new V86Starter({ url: "../bios/vgabios.bin", }, cdrom: { - url: "../images/linux.iso", + url: "../images/linux4.iso", }, autostart: true, });