Live data from Hacker News

Boot a linux kernel right inside your browser.

bellard.org

121–130 of 255 posts

Re: Boot a linux kernel right inside your browser.

#121
post #110
post #86

Anyone know why he used 2.6.20 ? I tried compiling a 2.6.38.6, but it doesn't boot. It's stopped at "Starting Linux" and CPU stays at 100% all the time.

compiling 2.6.38.6 ?

If you wanna know what I did:

  #from a 2.6.38.6 vanilla tree
  wget http://bellard.org/jslinux/config_linux-2.6.20 -O .config
  yes "" | make oldconfig
  # small edit in drivers/tty/serial/8250.c to copy Bellard's patch (http://bellard.org/jslinux/patch_linux-2.6.20)
  make vmlinux
  cp arch/x86/boot/vmlinux.bin /path/to/copy/of/jslinux/hosted/with/a/simple/httpd/
Edit: I just tried again with a 2.6.20.21 kernel using more or less the procedure showed above: it works! So it must be something with more recent kernels (scheduler ? dynticks ? merging of i386 and x86_68 arch in x86 ? something else ?) that is not emulated by jslinux.

Re: Boot a linux kernel right inside your browser.

#122
post #50
post #46

ERROR: your browser is too old to run JS/Linux. You should use a recent browser such as Firefox 4.x or Google Chrome. No, it isn't. Stop using user-agent matching and start using JavaScript feature detection instead.

It does. It tests for ArrayBuffer support, outputting that message if the necessary constructors aren't found. What browser are you using that you expect to be supported? (Safari doesn't have support for ArrayBuffer, but a recent WebKit nightly does, and this runs in that).

I get that error with Opera 11.10

Re: Boot a linux kernel right inside your browser.

#123
post #24

I'm utterly dumbfounded. Not only does it boot, it's got emacs, and a compiler. Welcome to JS/Linux ~ # emacs test.c ~ # cat test.c void main(void) { printf("Hello World!\n"); } ~ # tcc test.c -o hello ~ # ./hello Hello World! [Edit: just realized that there is already a 'hello.c' in the directory that shows just this with better diction.]

and VIM !

Re: Boot a linux kernel right inside your browser.

#127
This is demonstrative of the advantages of the new low-level APIs being added to JavaScript to work efficiently with binary data.

Fabrice uses this to implement an x86 interpreter -- it could not be done efficiently without typed arrays. However, it is still slow -- imagine what kind of advances could be made if a common bytecode was established that would be JIT'd by the JavaScript VM, and could be output directly by the emulator.

This is why so many people want to see the browser execution environment offer more complete, low-level APIs instead of high-level APIs locked to HTML/CSS and legacy browser technology. Efficiently supporting high-performance, high-complexity systems such as an x86 emulator (or a video game, or custom font rendering, or even an application framework) absolutely require efficient low-level APIs.

Re: Boot a linux kernel right inside your browser.

#129

This is demonstrative of the advantages of the new low-level APIs being added to JavaScript to work efficiently with binary data. Fabrice uses this to implement an x86 interpreter -- it could not be done efficiently without typed arrays. However, it is still slow -- imagine what kind of advances could be made if a common bytecode was established that would be JIT'd by the JavaScript VM, and could be output directly b…

Can you explain the steps necessary to combine a JS x86 interpreter with a binary Linux disk image into a running VM?

The part I don't understand is, what environment does the Kernel need to think is there, and how is that done in JS?

Re: Boot a linux kernel right inside your browser.

#130
post #44

Earlier quoted context omitted.

Don't forget that he discovered the fastest known algorithm for computing an arbitrary digit of pi. If you ever are tempted to get egotistical, just think of this guy. If you are prone to low self esteem, avoid reading about him.

No more excuses, I'm going to finish those damn projects I have on the backburner... Seriously, who does Bellard work for? He seems to leave virtually no trace (other than awesome software) on the Internet. I googled the shit out of him tonite...

"He seems to leave virtually no trace (other than awesome software) on the Internet."

Probably because he spends his time writing awesome software.

Post reply on HN