[osv-dev] Re: AWS EC2 ARM instance support?

2019-03-22 Thread Waldek Kozaczuk
I would be interested except I have literally zero experience with ARM 
(except I know how to spell it ;-))

The only ARM machine I have access to is Raspberry PI 3 
(https://www.raspberrypi.org/products/raspberry-pi-3-model-b/). It might be 
fun to get OSv either directly boot on it. I think it might be even 
possible to run Linux with KVM on Raspberry PI. 

Waldek

On Friday, March 22, 2019 at 9:56:10 AM UTC-4, rickp wrote:
>
> On Mon, 2018-12-03 at 10:14 +0200, Nadav Har'El wrote: 
> > 
> > Unfortunately, I haven't heard from anyone in the two groups who 
> > previously contributed the ARM support to OSv, so it's not making any 
> > progress. 
> > If I understand correctly, OSv still builds correctly for ARM (make 
> > arch=aarch64) but although the kernel supposedly worked, it didn't 
> > have disk drivers, so you can only build the example application into 
> > the kernel (i.e., a ramdisk, scripts/build image=... fs=ramfs). 
> > There's definitely no support for anything new which just came out. 
> > But if you're interested to work on it, you are very welcome to adopt 
> > OSv's ARM support. 
>
> I'm also interested in aarch64 support. I can get it to build the 
> release (though it tries to build the disk image using qemu-system-x86 
> which probably isn't going to help) - but it fails to start, hittng 
> entry_invalid in arch/aarch64/entry.S. 
>
> (gdb) bt 
> #0  entry_invalid () at arch/aarch64/entry.S:132 
> #1  0x402c6f8c in debug_early (msg=0x23c5 "", 
> msg@entry=0x404f93a8 "OSv v0.53.0-3-g8cd7d8aa\n") at 
> core/debug.cc:271 
> #2  0x400d6898 in premain () at loader.cc:101 
> #3  0x400c004c in start_elf () at arch/aarch64/boot.S:37 
>
> The debug release fails to build at all, failing like this: 
>
> ... 
>   AS bootfs.S 
>   LINK loader.elf 
> build/debug.aarch64/arch/aarch64/boot.o: In function `start_elf': 
> /home/rickp/src/osv-armtest/arch/aarch64/boot.S:40:(.text+0x50): 
> relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against 
> symbol `__loader_argc' defined in .bss section in 
> build/debug.aarch64/loader.o 
> /home/rickp/src/osv-armtest/arch/aarch64/boot.S:40: warning: One 
> possible cause of this error is that the symbol is being referenced in 
> the indicated code as if it had a larger alignment than was declared 
> where it was defined. 
> make: *** [build/debug.aarch64/loader.elf] Error 1 
> Makefile:1873: recipe for target 'build/debug.aarch64/loader.elf' 
> failed 
> make failed. Exiting from build script 
>
> If anyone else is interesting in making some progress, let me know - 
> it'd be great to get this booting on the new AWS instances (or if you 
> have hardware, that'd be interesting too!) 
>
> Cheers, 
> Rick 
>
>

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[osv-dev] Re: Problems to pass arguments to a JAR in run.yaml

2019-03-22 Thread Waldek Kozaczuk
So I have tested it myself and it looks like capstan (or OSv cannot parse 
properly command line built by capstan) cannot properly handle arguments 
when passes through YAML args list.

It looks like you are using the "java" runtime that capstan advertises 
which aims to make it easier to deploy and run Java apps on OSv by 
automating process of constructing proper java command line and pull extra 
packages. But apparently it has bugs and in general it comes with another 
layer of abstraction which sometimes may make it more difficult to 
troubleshoot the problem.

You can always bypass this layer and use "native" runtime where you have 
full control of how your OSv command like looks. This is BTW how I use 
capstan.

Here is how your meta/run.yaml would look like:
runtime: native
config_set:
  *myconfig1*:
bootcmd: "/java.so -jar /Uni.jar -lsim -nTc 10 -sp 5 -kp ./keystore 
-tf ./config/topology.prop.xml -tIp 127.0.0.1 -d 60 -td ./traces/ -cfg 
./config/config.prop.xml"
config_set_default: *myconfig1*

Also you need to change meta/package.yaml. See this example:
name: java-example
title: Java Example
author: Anonymous
version: "1.0"
require:
#- openjdk8-zulu-full
- openjdk8-zulu-compact3-with-java-beans
- osv.run-java
created: "2018-06-13T18:09:24-04:00"

Please see you can use either full and slimmer version of Open JDK 8 JRE. 
Also please note extra package which needs to be the last one and you can 
download it from 
github 
https://github.com/cloudius-systems/osv/releases/download/v0.51.0/osv.run-java.mpm/yaml
 
and put it under $HOME/.capstan/packages/. Unfortunately the old 
Mikelangelo S3 repo has pretty old (2018) artifacts and I am not sure if 
anybody maintains it. You can always easily create your own S3 OSv packages 
repo if you want. 

I have tested it with my hello world class and Java app received arguments 
correctly:
Sv v0.53.0
eth0: 192.168.122.15
java.so: Starting JVM app using: io/osv/nonisolated/RunNonIsolatedJvmApp
java.so: Setting Java system classloader to NonIsolatingOsvSystemClassLoader
Hello from Java on OSv!
Arg: -lsim
Arg: -nTc
Arg: 10
Arg: -sp
Arg: 5
Arg: -kp
Arg: ./keystore
Arg: -tf
Arg: ./config/topology.prop.xml
Arg: -tIp
Arg: 127.0.0.1
Arg: -d
Arg: 60
Arg: -td
Arg: ./traces/
Arg: -cfg
Arg: ./config/config.prop.xml

I hope this helps,
Waldek

On Wednesday, March 20, 2019 at 2:36:56 AM UTC-4, robertob wrote:
>
> Dear all, 
>
> I have a "run.yaml" to run a JAR file. We need to pass a lot of arguments 
> but something go wrong. This is the snippet of the run.yaml:
>
>  *myconfig1:*
> *  main: /Uni.jar*
> *  args:*
> * - -lsim -nTc 10*
> * - -sp 5*
> * - -kp ./keystore*
> * - -tf ./config/topology.prop.xml*
> * - -tIp 127.0.0.1*
> * - -d 60*
> * - -td ./traces/*
> * - -cfg ./config/config.prop.xml*
>
> When I run the image the message I got is the following:
>
> *"unrecognised option '-nTc'"*
>
> It seems to consider only the first argument and not the others. 
>
> Any advice?
>
> Regards
>
> R
>

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[osv-dev] Re: AWS EC2 ARM instance support?

2019-03-22 Thread Rick Payne
On Mon, 2018-12-03 at 10:14 +0200, Nadav Har'El wrote:
> 
> Unfortunately, I haven't heard from anyone in the two groups who
> previously contributed the ARM support to OSv, so it's not making any
> progress.
> If I understand correctly, OSv still builds correctly for ARM (make
> arch=aarch64) but although the kernel supposedly worked, it didn't
> have disk drivers, so you can only build the example application into
> the kernel (i.e., a ramdisk, scripts/build image=... fs=ramfs).
> There's definitely no support for anything new which just came out.
> But if you're interested to work on it, you are very welcome to adopt
> OSv's ARM support.

I'm also interested in aarch64 support. I can get it to build the
release (though it tries to build the disk image using qemu-system-x86
which probably isn't going to help) - but it fails to start, hittng
entry_invalid in arch/aarch64/entry.S.

(gdb) bt
#0  entry_invalid () at arch/aarch64/entry.S:132
#1  0x402c6f8c in debug_early (msg=0x23c5 "", 
msg@entry=0x404f93a8 "OSv v0.53.0-3-g8cd7d8aa\n") at
core/debug.cc:271
#2  0x400d6898 in premain () at loader.cc:101
#3  0x400c004c in start_elf () at arch/aarch64/boot.S:37

The debug release fails to build at all, failing like this:

...
  AS bootfs.S
  LINK loader.elf
build/debug.aarch64/arch/aarch64/boot.o: In function `start_elf':
/home/rickp/src/osv-armtest/arch/aarch64/boot.S:40:(.text+0x50):
relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against
symbol `__loader_argc' defined in .bss section in
build/debug.aarch64/loader.o
/home/rickp/src/osv-armtest/arch/aarch64/boot.S:40: warning: One
possible cause of this error is that the symbol is being referenced in
the indicated code as if it had a larger alignment than was declared
where it was defined.
make: *** [build/debug.aarch64/loader.elf] Error 1
Makefile:1873: recipe for target 'build/debug.aarch64/loader.elf'
failed
make failed. Exiting from build script

If anyone else is interesting in making some progress, let me know -
it'd be great to get this booting on the new AWS instances (or if you
have hardware, that'd be interesting too!)

Cheers,
Rick

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.