Fix setup_libstdcxx() in scripts/loader.py

Fix the following breakage caused by commit c98b928 ("Explicitly use python
version number") when starting GDB:

  Traceback (most recent call last):
    File "/home/penberg/osv/scripts/loader.py", line 833, in <module>
      setup_libstdcxx()
    File "/home/penberg/osv/scripts/loader.py", line 496, in setup_libstdcxx

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
xen: do not start xen interrupt threads in non-xen guests

If we do, we'll have extra xen threads running around for no reason in the !xen
case. is_xen() should already work here since the initializers are run after
cpuid discovery, which is when the information for is_xen is filled up.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
mmu: default value for slop parameter of linear_map()

slop made page size by default because this is the most frequent case

Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
acpi: mapping of long tables fixed

Due to incorrect mapping logic ACPI tables longer than PAGE_SIZE
mapped partially and to wrong base address. As a result system crashed
on ACPI tables checksum verification.

Found when running on EC2 HVM instances, the problematic table was:
ACPI: DSDT 0xfc002c40 0321F (v02    Xen      HVM 00000000 INTL 20090220)

Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
build/release: unify OSv version string for builds and releases

Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
ec2: release script for Amazon EC2 service

The script supports 3 modes of operation:
  - public release (default) for official releases
  - private release - for internal testing
  - development instance - for development

Public release means AMI created public (visible to everyone) and replicated
over all existing Amazon regions.

Private release means AMI created private (visible to releaser's account only) and
not replicated over regions.

Development instance means no AMI created, script stops after instance creation.

The script's help screen (--help command line parameter) provides detailed information
about script interface, dependencies and configurations required.

It's interesting to note that each public release made by this script costs about 20 USD
mainly because of AMI replication over Amazon regions

Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
OSv module support

The idea of the patch is basically described in prevoius post:

https://groups.google.com/d/msg/osv-dev/RL2S3AL9TNE/l4XZJo3-lI0J

Whis this patch, you will be able to install OSv apps into disk image on
"make all" stage.

These apps does not require to exist in OSv repository, you can install
apps which is on any git repository or svn repository, or on local
directory.

You'll need to write a config file to add apps, format of the file is
JSON.

Here's a sample of the file:
{
   "modules":[
      {
	 "name":"osv-mruby",
         "type":"git",
         "path":"https://github.com/syuu1228/osv-mruby.git",
         "branch":"master"
      }
   ]
}

If you add "module" on config file, make all calls script/module.py.

This scripts perform "git clone" to fetch repository to $(out)/module,
and invoke "make module" on each module.

"make module" should outputs bootfs.manifest/usr.manifest on module
directory, the script merge bootfs.manifest.skel/usr.manifest.skel and
module local manifests to single file
$(out)/bootfs.manifest/$(out)/usr.manifest.

Here's app Makefile example:

  https://github.com/syuu1228/osv-mruby/blob/master/Makefile

It have "module" target, and the target builds all binaries and
generates *.manifest.

Signed-off-by: Takuya ASADA <syuu@dokukino.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>