Fantastic. I love that it's OpenRISC based rather than the "obvious" choice of yet another x86 emulator. And framebuffer support, though slow.
Sadly, the choice of OpenRISC also means it's hard to get Xorg working, since it wasn't tested on OpenRISC. Also, the gcc OpenRISC target has a number of bugs, I've heard.
jor1k: OR1000 Javascript Emulator Running Linux
61–70 of 71 posts
Re: jor1k: OR1000 Javascript Emulator Running Linux
#62Earlier quoted context omitted.
I'd have to look at the code, but it might not be too awful to get tun/tap to work over WebSockets... Regarding the heat, I wonder if the architecture has support for idle states. If so, the VM should "clock down" by executing its loop from a timer instead of full-bore. I wonder if this is already happening, though.
See https://github.com/s-macke/jor1k/issues/3 I tried adding an extra serial port some months ago, but I didn't succeed. It would be really cool if you made this. Here's a use case I had in mind: You go to emulator.html# http://otherwebsite.com/packages.json . The emulator's JavaScript part detects the fragment, and downloads a list of dpkg packages to the HTML5 file system. The emulator boots up, checks the HTML5 fi…
Are you Sebastian Macke? [Edit: scratch that, I see he's commented elsewhere.] Either way, get in touch (info in my profile). I'm curious to hear what issues you ran into in trying to add another serial port. I'm not terribly familiar (read: not at all familiar) with OpenRISC, but I'd imagine it's just a matter of creating a second instance of UARTdev in system.js and adding it to the 'ram' object at an appropriate base address. If OpenRISC is similar to ARM, you may need to add the second uart to your platform/chip/board init as well so the system is aware of it.
Regarding networking, I intend to actually implement eth.js and wire it to a WebSocket, then on the other end I'll write a receiver which hands the frames to/polls a TAP device. At that point, you can do whatever you want on the backend with that interface. I'd like to start this weekend, but (how often does one get to say this?) I'll be at the governor's mansion and that's going to take a bunch of my time.
I'm not sure I follow on the package management bit. Would these be emulator extensions, or packages which the image would use?
Re: jor1k: OR1000 Javascript Emulator Running Linux
#63Honest question: How do you write so much JS code? (i.e. editor, testing, debugging, running, dev environment, etc.) Thank you.
Editor: Normal text editor with syntax highlightning Testing: Firefox and Chrome Debugging: Function console.log Optimization: JIT inspector for Firefox (incompatible since FF 23) and profiling tools from both browsers So, nothing special involved. Neglecting the redundancy, the source code contains 4000 lines of code. The complicated part was the building of the Linux image and libraries with a toolchain in beta sta…
Great work and very impressive.
Thanks!
Re: jor1k: OR1000 Javascript Emulator Running Linux
#64Honest question: How do you write so much JS code? (i.e. editor, testing, debugging, running, dev environment, etc.) Thank you.
Editor: Normal text editor with syntax highlightning Testing: Firefox and Chrome Debugging: Function console.log Optimization: JIT inspector for Firefox (incompatible since FF 23) and profiling tools from both browsers So, nothing special involved. Neglecting the redundancy, the source code contains 4000 lines of code. The complicated part was the building of the Linux image and libraries with a toolchain in beta sta…
Also please do feel free to contact me out of band (info in profile). I'd like to implement ethernet support, but if you're halfway through I'd hate to duplicate your effort.
Re: jor1k: OR1000 Javascript Emulator Running Linux
#65Earlier quoted context omitted.
Editor: Normal text editor with syntax highlightning Testing: Firefox and Chrome Debugging: Function console.log Optimization: JIT inspector for Firefox (incompatible since FF 23) and profiling tools from both browsers So, nothing special involved. Neglecting the redundancy, the source code contains 4000 lines of code. The complicated part was the building of the Linux image and libraries with a toolchain in beta sta…
Thank you so much for the reply. I was thinking I was doing something wrong with the cycle: edit, save, reload in browser, test it, repeat. Great work and very impressive. Thanks!
Re: jor1k: OR1000 Javascript Emulator Running Linux
#66Fantastic. I love that it's OpenRISC based rather than the "obvious" choice of yet another x86 emulator. And framebuffer support, though slow.
Sadly, the choice of OpenRISC also means it's hard to get Xorg working, since it wasn't tested on OpenRISC. Also, the gcc OpenRISC target has a number of bugs, I've heard.
I am working on it. But it is extremely unstable. In the picture you see the best shot I ever got.
Re: jor1k: OR1000 Javascript Emulator Running Linux
#67Earlier quoted context omitted.
Thank you so much for the reply. I was thinking I was doing something wrong with the cycle: edit, save, reload in browser, test it, repeat. Great work and very impressive. Thanks!
Problem is almost nobody writes JavaScript which doesn't manipulate the DOM in some way, so you almost always need to test in-browser. Otherwise, there's no reason why you couldn't write automated tests to exercise most of this in a headless v8. Won't be good for profiling, but it will at least be good for validation/regressions.
Re: jor1k: OR1000 Javascript Emulator Running Linux
#68Earlier quoted context omitted.
Editor: Normal text editor with syntax highlightning Testing: Firefox and Chrome Debugging: Function console.log Optimization: JIT inspector for Firefox (incompatible since FF 23) and profiling tools from both browsers So, nothing special involved. Neglecting the redundancy, the source code contains 4000 lines of code. The complicated part was the building of the Linux image and libraries with a toolchain in beta sta…
Curious to know more about the toolchain bit. Have you messed around with getting it to work with OpenEmbedded or Poky? Also please do feel free to contact me out of band (info in profile). I'd like to implement ethernet support, but if you're halfway through I'd hate to duplicate your effort.
My scripts for the toolchain are published here: https://github.com/s-macke/jor1k-toolchain-builder
Unfortunately the scripts are broken but show the overall complexity to build the linux image.
The ethernet device in jor1k is a dummy right now but the kernel is already prepared to work with this device. So everything I have to do is implementing the correct device which is defined here: https://github.com/openrisc/or1ksim/blob/or32-master/periphe...
But nothing has been done right now. It is not my main priority right now because it would need a server script. And github does not allow this. And there could be a lot of security issues as well if I would add this to a demo.
Re: jor1k: OR1000 Javascript Emulator Running Linux
#69Earlier quoted context omitted.
I'd have to look at the code, but it might not be too awful to get tun/tap to work over WebSockets... Regarding the heat, I wonder if the architecture has support for idle states. If so, the VM should "clock down" by executing its loop from a timer instead of full-bore. I wonder if this is already happening, though.
See https://github.com/s-macke/jor1k/issues/3 I tried adding an extra serial port some months ago, but I didn't succeed. It would be really cool if you made this. Here's a use case I had in mind: You go to emulator.html# http://otherwebsite.com/packages.json . The emulator's JavaScript part detects the fragment, and downloads a list of dpkg packages to the HTML5 file system. The emulator boots up, checks the HTML5 fi…
Problem is the server and security issues. At the moment everything runs out of the box even on the simplest web server. This would change. And at the moment I don't want to implement features which you can't use on the demo web-site. But of course, you are free to do so. You have not even to change something in the kernel-image because everything is ready to test. Exchange the dummy ethernet driver with the real one from the or1ksim project.
Re: jor1k: OR1000 Javascript Emulator Running Linux
#70Earlier quoted context omitted.
Curious to know more about the toolchain bit. Have you messed around with getting it to work with OpenEmbedded or Poky? Also please do feel free to contact me out of band (info in profile). I'd like to implement ethernet support, but if you're halfway through I'd hate to duplicate your effort.
The toolchain (uCluibc development) I am using is explained here http://opencores.org/or1k/OpenRISC_GNU_tool_chain My scripts for the toolchain are published here: https://github.com/s-macke/jor1k-toolchain-builder Unfortunately the scripts are broken but show the overall complexity to build the linux image. The ethernet device in jor1k is a dummy right now but the kernel is already prepared to work with this device.…
I need to look a bit more at how everything is laid together, but my intention is to have eth.js write ethernet frames to a WebSocket, then on the server side read/write frames from/to a TAP device.
As for the demo, there's no reason why you can't just turn off the socket for the static demo. Otherwise, I'm intending to host something on DigitalOcean to prove it works. I'm sure whatever it is it will be very simple so I don't wind up with a huge bandwidth bill, but I'm hoping I can think of something that's clever and easy on the wallet. Maybe I'll make it add all machines to one giant subnet or something... we'll see.