main: work in progress [might break]
/ mirror_to_github (push) Successful in 19s Details
/ test (push) Successful in 4s Details

This commit is contained in:
Leon van Kammen 2024-08-30 10:35:27 +00:00
parent 4cdba16072
commit fdc1d55637
2 changed files with 10 additions and 12 deletions

View File

@ -107,7 +107,11 @@ AFRAME.registerComponent('isoterminal', {
instance.winbox.setTitle( `${w.titleBak} [${msg}]` ) instance.winbox.setTitle( `${w.titleBak} [${msg}]` )
} }
var emulator = window.emulator = dom.emulator = new V86({ let image = {}
if( this.data.iso.match(/\.iso$/) ) image.cdrom = { url: this.data.iso }
if( this.data.iso.match(/\.bin$/) ) image.bzImage.url = this.data.iso
var emulator = window.emulator = dom.emulator = new V86({ ...image,
wasm_path: "com/isoterminal/v86.wasm", wasm_path: "com/isoterminal/v86.wasm",
memory_size: 32 * 1024 * 1024, memory_size: 32 * 1024 * 1024,
vga_memory_size: 2 * 1024 * 1024, vga_memory_size: 2 * 1024 * 1024,
@ -120,13 +124,7 @@ AFRAME.registerComponent('isoterminal', {
url: "com/isoterminal/bios/vgabios.bin", url: "com/isoterminal/bios/vgabios.bin",
}, },
network_relay_url: "wss://relay.widgetry.org/", network_relay_url: "wss://relay.widgetry.org/",
cdrom: {
url: this.data.iso,
},
cmdline: "rw root=host9p rootfstype=9p rootflags=trans=virtio,cache=loose modules=virtio_pci tsc=reliable init_on_free=on", cmdline: "rw root=host9p rootfstype=9p rootflags=trans=virtio,cache=loose modules=virtio_pci tsc=reliable init_on_free=on",
bzimage:{
url: "com/isoterminal/images/buildroot-bzimage.bin"
},
//bzimage_initrd_from_filesystem: true, //bzimage_initrd_from_filesystem: true,
//filesystem: { //filesystem: {
// baseurl: "com/isoterminal/v86/images/alpine-rootfs-flat", // baseurl: "com/isoterminal/v86/images/alpine-rootfs-flat",

View File

@ -1,6 +1,9 @@
# install xrsh env # source xrsh env
source /mnt/profile.xrsh source /mnt/profile.xrsh
# source javascript functions
js "$(cat /mnt/profile.js)"
## forward not-found commands to javascript (via jsh) ## forward not-found commands to javascript (via jsh)
command_not_found_handle(){ command_not_found_handle(){
echo "$1 not found, did you mean $1(...) (javascript?)" echo "$1 not found, did you mean $1(...) (javascript?)"
@ -9,12 +12,9 @@ command_not_found_handle(){
alert 'js shellfunction:' "type 'alias $1=\"jsh $1\"' to run '$1 yo' as $1('yo')" alert 'js shellfunction:' "type 'alias $1=\"jsh $1\"' to run '$1 yo' as $1('yo')"
alert 'js logging: ' "type 'echo 0 > /dev/browser/console.tty' to disable" alert 'js logging: ' "type 'echo 0 > /dev/browser/console.tty' to disable"
alert 'js capture log: ' "type 'tail -f /dev/browser/console'" alert 'js capture log: ' "type 'tail -f /dev/browser/console'"
alert 'jsh<->sh hooks: ' "type 'chmod +x ~/hook.d/alert/* && alert helloworld'" alert 'jsh<->sh hooks: ' "type 'chmod +x ~/hook.d/*/* && alert helloworld'"
} }
# source javascript functions
#js "$(cat /mnt/profile.js)"
resize resize
#clear #clear
cat /mnt/motd cat /mnt/motd