Jump to content
IGNORED

Bootable in-browser javascript linux


Bubba69

Recommended Posts

http://bellard.org/jslinux/

 

apparently it translates x86 on the fly into javascript:

 

/proc # cat cpuinfo                                                             
processor       : 0                                                             
vendor_id       : GenuineIntel                                                  
cpu family      : 5                                                             
model           : 4                                                             
model name      : Pentium MMX                                                   
stepping        : 3                                                             
cache size      : 0 KB                                                          
fdiv_bug        : no                                                            
hlt_bug         : no                                                            
f00f_bug        : yes                                                           
coma_bug        : no                                                            
fpu             : no                                                            
fpu_exception   : no                                                            
cpuid level     : 1                                                             
wp              : yes                                                           
flags           :                                                               
bogomips        : 20.21                                                         
clflush size    : 32          

Link to comment
Share on other sites

there is a working c compiler included. try 'cat hello.c' and follow the instructions for compiling. then 'chmod +x hello && ./hello' to run the little hello world program. There is no networking though. Most basic c programs should work.

Link to comment
Share on other sites

This PC emulator is written in Javascript. The emulated hardware consists in:

 

a 32 bit x86 compatible CPU

a 8259 Programmble Interrupt Controller

a 8254 Programmble Interrupt Timer

a 16450 UART.

 

he's basically emulating a 486 in javascript, it's super impressive. we're probably not more than a few years from someone creating a full emulation of windows 3.1, with running applications. per-tab virtual machines... the browser is the cloud.

Link to comment
Share on other sites

This is amazing. I really didn't think this was possible. Mad skills.

 

Too bad it doesn't have a network interface and base-devel/build-essential. Would love to push it a little and install some software.

Link to comment
Share on other sites

Since linux is already available for so many processors, wouldn't it be easier to emulate something a little simpler than x86 just to get linux running? Unless the entire purpose of this project was to emulate 486, which it probably was now that I think about. But I mean, wouldn't ARM or POWER versions of linux, for example, be easier to translate? I'm not too keen on instruction sets nor javascript....

Link to comment
Share on other sites

While ARM might has a reduced instruction set that could simplify it a bit. ARM and Linux are having a bit of a difficult time.

 

ARM processors are generally found in embedded applications; your phone, network router, video camera, and more are quite likely to be running Linux on ARM. Supporting ARM on Linux brings some challenges which are much less of a problem on desktop and server-oriented systems. ARM is not so much an architecture as a family of architectures with lots of little quirks; the size of the kernel’s ARM-specific code - nearly three times the size of the x86-specific code - reflects that. ARM also has traditionally suffered from the “embedded problem”: every vendor does its own work and, likely as not, never gets around to contributing its code upstream. That has resulted in a lot of fragmented and duplicated code.

Source: http://linux-foundation.org/weblogs/lwf/2011/05/14/whats-up-with-arm/

 

So I'm not sure it would be easier. x86 has gotten pretty standard and well-known by now.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.