This repository has been archived by the owner on Jul 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 127
New Runtime Features #145
Open
RossComputerGuy
wants to merge
23
commits into
runtimejs:master
Choose a base branch
from
unknown repository
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
New Runtime Features #145
Changes from 22 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
f346973
Added Shell API and some WIP Features
RossComputerGuy 9a081ff
Commented SMP init function call
RossComputerGuy 309edf2
Fixes and custom Travis CI badge
RossComputerGuy 3b12b40
Fixes
RossComputerGuy e627548
CPUID
RossComputerGuy 321d10f
Fixes
RossComputerGuy 0f96fdd
Travis CI Update
RossComputerGuy 84b97b1
Travis CI Update
RossComputerGuy e398c8a
Changed version
RossComputerGuy e3e6dec
Fixes
RossComputerGuy 546d075
Getting ready for different architectures
RossComputerGuy 23e7934
Fixes
RossComputerGuy 493a4fc
Fixes
RossComputerGuy acd8732
Changed src layout
RossComputerGuy 341ff72
Fixes
RossComputerGuy 9e36af4
Moved Header Files
RossComputerGuy 8de5cc3
Fixes
RossComputerGuy 16b8f5e
Ready for different architectures
RossComputerGuy c5b9eb5
WIP x86
RossComputerGuy b23d7b0
Added x86
RossComputerGuy d70274e
Added x86
RossComputerGuy b36c97c
Fixes
RossComputerGuy af47475
@piranna changes
RossComputerGuy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,19 +14,10 @@ before_script: | |
script: RUNTIME_BUILD=release scons | ||
after_success: gzip disk/boot/runtime | ||
deploy: | ||
- provider: releases | ||
skip_cleanup: true | ||
api_key: | ||
secure: P+Ei+zxl/jN4Mt+sIm0jfikU0F81yQJEDQgLharThnblm8SILYLZ4jo+vSC7YA5u75wjj6ej3Guxk/Nm0Ajg4C9K7BLVZViZzrRhT8VdxZ8680EOn0A7/abHKA8AT+By8n4sOMhGgbsOLUUHQC+Bo7KLA2S2NGLgHJCKuEatPjg= | ||
file: disk/boot/runtime.gz | ||
on: | ||
tags: true | ||
repo: runtimejs/runtime | ||
- provider: npm | ||
skip_cleanup: true | ||
email: [email protected] | ||
api_key: | ||
secure: Prcon+FjPLo1nh6hdJ1byLAUTMU/vfq3fBLzkxQIyJTVKIeKg9mPVtNoCmvbgxsSVTdS+gPjIoMpt0LgZCUq/cDRJAtOIaAqbm+fVNJBTwgkgwYAG7hCjEprAhUYiqutT+7KhgNZSKUBNJo/w5sWl8xdsSbfHyldGP6XBcocL50= | ||
on: | ||
tags: true | ||
repo: runtimejs/runtime | ||
provider: releases | ||
api_key: | ||
secure: NInTm2I0c/OdzQ4ev3ZK1Z1zmg+VZ/YCdj2UD+aGTz+5IkspwQNuimNZQJSY8T05snDqxOXk/OWKPGOxgRNDKITrGAbxnSG996P1uWg/98btAvmwuSocXOe3OBlsGO+LXOcqK70v4YGF5DPr2bPXqxQLsEA9CiOKHPJ8OEZT/osF7OWpipypapZj4iIsHB3/TR5rrqBJCJivaxGd3MdVP1XTSMOl2k34EFuZgcV+hJm9gY26+oxIPhwkIUhaRUchuke0QgqUnWyiX1yAItJP7RsV0QSM8wVluwNFn1WPAPzI76gIL7wHR7u+7gums8h/XvBHddhatNUzQFcrsKv0o2+6hFPGoarFA9mGwXMFdqdv91iiKt5aqlbbomwnpCuftmcTdPdvmbPkSbkTIAJTYJKxflrAzAreYIJAr2qzqWDkEd4GdH80RKh2HHXO++AS88kTDHAkXw7CA5ZOOndFsa5isxqnnEtBo3Isf8MvlVWwQ4/AqyxWWtm18N8WSu92unMKT2KQ4GkaBmkbH0o664qxiRH1gBw9DedZbLqNqbU15e90HrvR7Xyk3mg5rFdZr/tnHrT1CzLI0i0imTGxC27acUFFaJ4dRaOYNDJ8Z0FM2c4U4Nvv17JxhtaN8zkwDwy2oLGxLoGaSwNLqWgd/U7oxq12fRiEzYmPi6oL0Eo= | ||
file: disk/boot/runtime.gz | ||
skip_cleanup: true | ||
on: | ||
repo: Ross-Computers/runtime | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# runtime.js | ||
|
||
[![Build Status](https://travis-ci.org/runtimejs/runtime.svg?branch=master)](https://travis-ci.org/runtimejs/runtime) [![npm](https://img.shields.io/npm/v/runtimejs.svg)](https://www.npmjs.com/package/runtimejs) [![Gem](https://img.shields.io/badge/freenode-%23runtimejs-blue.svg)](https://freenode.net/) [![Travis](https://img.shields.io/badge/GITTER-JOIN_CHAT_%E2%86%92-1dce73.svg)](https://gitter.im/runtimejs/runtime) | ||
[![Build Status](https://travis-ci.org/Ross-Computers/runtime.svg?branch=master)](https://travis-ci.org/Ross-Computers/runtime) [![npm](https://img.shields.io/npm/v/runtimejs.svg)](https://www.npmjs.com/package/runtimejs) [![Gem](https://img.shields.io/badge/freenode-%23runtimejs-blue.svg)](https://freenode.net/) [![Travis](https://img.shields.io/badge/GITTER-JOIN_CHAT_%E2%86%92-1dce73.svg)](https://gitter.im/runtimejs/runtime) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. |
||
|
||
__runtime.js__ is an open-source library operating system (unikernel) for the cloud that runs JavaScript, can be bundled up with an application and deployed as a lightweight and immutable VM image. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,27 +2,33 @@ import os | |
import sys | ||
import datetime | ||
|
||
arch = os.getenv('ARCH', "x64") | ||
bits = os.getenv('BITS', "64") | ||
arch_alt = os.getenv('ALT_ARCH', "x86_64") | ||
|
||
SetOption('num_jobs', 4) | ||
|
||
build = os.getenv('RUNTIME_BUILD', "debug") | ||
print 'Build', build | ||
print 'Arch',arch | ||
print 'CPU Bits',bits | ||
|
||
config = { | ||
"project_name": "out/runtimejs", | ||
"binary_output_file": "disk/boot/runtime", | ||
"toolchain_bin_path": "", | ||
"fasm_pathname": "fasm", | ||
"link_script": "etc/kernel.ld", | ||
"name_gxx": "x86_64-elf-g++", | ||
"name_gcc": "x86_64-elf-gcc", | ||
"name_as": "x86_64-elf-as", | ||
"name_ld": "x86_64-elf-gcc", | ||
"name_ar": "x86_64-elf-ar", | ||
"name_ranlib": "x86_64-elf-ranlib", | ||
"name_objcopy": "x86_64-elf-objcopy", | ||
"name_gxx": arch_alt+"-elf-g++", | ||
"name_gcc": arch_alt+"-elf-gcc", | ||
"name_as": arch_alt+"-elf-as", | ||
"name_ld": arch_alt+"-elf-gcc", | ||
"name_ar": arch_alt+"-elf-ar", | ||
"name_ranlib": arch_alt+"-elf-ranlib", | ||
"name_objcopy": arch_alt+"-elf-objcopy", | ||
"flags_common": { | ||
"shared": set([ | ||
'-m64', | ||
'-m'+bits, | ||
'-ffreestanding', | ||
'-nostdlib', | ||
'-mno-red-zone', | ||
|
@@ -38,7 +44,12 @@ config = { | |
'-Wno-unused-parameter', | ||
'-fdiagnostics-color', | ||
'-D__runtime_js__', | ||
'-DRUNTIMEJS_PLATFORM_X64', | ||
'-DRT_INC_ADDR_SPACE=\<kernel/arch/'+arch+'/address-space-'+arch+'.h\>', | ||
'-DRT_INC_CPU=\<kernel/arch/'+arch+'/cpu-'+arch+'.h\>', | ||
'-DRT_INC_IO=\<kernel/arch/'+arch+'/io-'+arch+'.h\>', | ||
'-DRT_INC_IRQ=\<kernel/arch/'+arch+'/irqs-'+arch+'.h\>', | ||
'-DRT_INC_PLATFORM=\<kernel/arch/'+arch+'/platform-'+arch+'.h\>', | ||
'-DRUNTIMEJS_PLATFORM_X'+bits, | ||
]), | ||
"release": set([ | ||
]), | ||
|
@@ -55,8 +66,8 @@ config = { | |
'-U__STRICT_ANSI__', | ||
'-DENABLE_DEBUGGER_SUPPORT', | ||
'-DENABLE_DISASSEMBLER', | ||
'-DV8_HOST_ARCH_X64', | ||
'-DV8_TARGET_ARCH_X64', | ||
'-DV8_HOST_ARCH_X'+bits, | ||
'-DV8_TARGET_ARCH_X'+bits, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
# '-DV8_DEPRECATION_WARNINGS', | ||
# '-DV8_IMMINENT_DEPRECATION_WARNINGS', | ||
# '-DVERIFY_HEAP', | ||
|
@@ -85,32 +96,52 @@ config = { | |
}, | ||
"flags_link": set([ | ||
'-nostdlib', | ||
'-nodefaultlibs', | ||
# '-Map etc/map.txt', | ||
'-nodefaultlibs' | ||
]), | ||
"locations": { | ||
"cc": [ | ||
'src', | ||
'src/arch', | ||
'src/kernel', | ||
'src/kernel/x64', | ||
'src/kernel/arch', | ||
'src/kernel/arch/'+arch, | ||
'src/kernel/boot', | ||
'src/kernel/sys', | ||
'src/kernel/sys/fs', | ||
'src/kernel/sys/hw', | ||
'src/kernel/sys/io', | ||
'src/kernel/sys/memory', | ||
'src/kernel/sys/thread', | ||
'src/kernel/sys/v8', | ||
'src/kernel/utils', | ||
'src/kernel/profiler', | ||
'src/common', | ||
'test/cc', | ||
], | ||
"asm": [ | ||
'src', | ||
'src/kernel/x64', | ||
'src/kernel/arch', | ||
'src/kernel/arch/'+arch, | ||
'src/kernel/boot', | ||
'src/kernel/sys', | ||
'src/kernel/sys/fs', | ||
'src/kernel/sys/hw', | ||
'src/kernel/sys/io', | ||
'src/kernel/sys/memory', | ||
'src/kernel/sys/thread', | ||
'src/kernel/sys/v8', | ||
'src/kernel/utils', | ||
'src/'+arch | ||
], | ||
"js": [ | ||
'src/kernel/Js', | ||
'src/kernel/js', | ||
], | ||
}, | ||
"includes": [ | ||
'deps/musl/src/internal', | ||
'deps/musl/include', | ||
'deps/musl/arch/x86_64', | ||
'deps/musl/arch/x86_64/bits', | ||
'deps/musl/arch/'+arch_alt, | ||
'deps/musl/arch/'+arch_alt+'/bits', | ||
'deps/libcxx/include', | ||
'deps/v8/include', | ||
'deps/v8', | ||
|
@@ -120,6 +151,8 @@ config = { | |
'deps/miniz', | ||
'deps/libsodium/src/libsodium/include', | ||
'deps/json11', | ||
'src/Includes', | ||
'src/Includes/kernel', | ||
'src', | ||
'test', | ||
], | ||
|
@@ -178,6 +211,9 @@ def EnvironmentCreate(build): | |
AR = ar, | ||
AS = _as, | ||
RANLIB = ranlib, | ||
ARCH = arch, | ||
ALT_ARCH = arch_alt, | ||
BITS = bits, | ||
CXXFLAGS = " ".join(flags_gxx), | ||
CFLAGS = " ".join(flags_gcc), | ||
LINK = ld, | ||
|
@@ -186,7 +222,7 @@ def EnvironmentCreate(build): | |
LINKCOMSTR = 'Link $TARGET', | ||
RANLIBCOMSTR = 'Index $TARGET', | ||
ARCOMSTR = 'Archive $TARGET', | ||
ENV = {'PATH': os.environ['PATH']}, | ||
ENV = {'PATH': os.environ['PATH'],'ARCH': arch,'ALT_ARCH':arch_alt,'BITS':bits}, | ||
) | ||
|
||
env.Append( | ||
|
@@ -216,6 +252,9 @@ def BuildProject(env_base): | |
env.Replace(CPPPATH = config["includes"]) | ||
env.Replace(LIBS = config["libs"]) | ||
env.Replace(LIBPATH = ['deps']) | ||
env.Replace(ARCH = arch) | ||
env.Replace(ALT_ARCH = arch_alt) | ||
env.Replace(BITS = bits) | ||
|
||
version_header = env.Command('src/kernel/version-autogenerated.h', 'package.json', | ||
'node scripts/update-versions.js') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want your changes to be merged mainstream instead of create your own fork, you should left the repo references as they were before.