Jump to content
IGNORED

Bootable in-browser javascript linux


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
https://forum.watmm.com/topic/66228-bootable-in-browser-javascript-linux/
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.

  Quote
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.

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.

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....

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.

 

  Quote
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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   1 Member

×
×