Giter Site home page Giter Site logo

rumpctrl's People

Contributors

anttikantee avatar fltt avatar justincormack avatar northox avatar srenatus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rumpctrl's Issues

allow host syscalls in emul.c

We want to be able to call host syscalls directly, not via rumpuser_* always.

Easiest to do by linking a bit later on in the sequence, after renaming I think.

environment

It is really convenient if the commands run with the host environment, but not sure that the current way of mapping all env calls to emul_ calls which uses host is the right way.

Want to init with a copy of/pointer to the host env instead.

Use for testing

Once portability is resolved, an in tree netbsd build would be nice, so we can use rumprun for tests. Looking through the tests that use rump (around 90), most of them could be simply replaced by shell scripts that use rumprun, which would also test the userspace tools as well as the syscalls which are currently tested.

In the short term, adding significantly to the rumprun tests and then running rumprun on netbsd head on an increasing range of architectures would be a good start - it is pretty quick writing tests for rumprun.

support CC=clang

Running buildnb.sh fails when it reaches the stage where binaries are supposed to be built:

#   compile  cat/cat.o
/home/pooka/tmp/rumprun-posix/rumptools/bin/x86_64--netbsd-clang -O2 -g -fPIC -std=gnu99 -D__NetBSD__   -std=gnu99 -Werror    -I/home/pooka/tmp/rumprun-posix/rumptools/compat/include -D__NetBSD__ -Ulinux -U__linux -U__linux__ -U__gnu_linux__ --sysroot=/home/pooka/tmp/rumprun-posix/rumptools/dest  -c    /home/pooka/tmp/rumprun-posix/rumpsrc/bin/cat/cat.c
: ctfconvert -g -L VERSION cat.o
#      link  cat/cat.ro
/home/pooka/tmp/rumprun-posix/rumptools/bin/x86_64--netbsd-clang  -nostdlib -r -Wl,-dc -o cat.ro cat.o
clang: warning: argument unused during compilation: '-r'
/usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 00000000004001c0
cat.o: In function `main':
/home/pooka/tmp/rumprun-posix/rumpsrc/bin/cat/cat.c:80: undefined reference to `setprogname'
/home/pooka/tmp/rumprun-posix/rumpsrc/bin/cat/cat.c:81: undefined reference to `__setlocale50'
/home/pooka/tmp/rumprun-posix/rumpsrc/bin/cat/cat.c:110: undefined reference to `__sF'
...

Compiler error while compiling fsck_ext2fs on FreeBSD

I just learned about the rump kernels and wanted to experiment a bit. I am using FreeBSD 10.2 and the build process fails while compiling fsck_ext2fs:

$ ./builnb.sh
... snip ...
( cd src-netbsd/sbin/fsck_ext2fs && /home/viktor/src/rumpctrl/rumptools/rumpmake obj && /home/viktor/src/rumpctrl/rumptools/rumpmake LDFLAGS=-Wl,-r LIBCRT0= BUILDRUMP_CFLAGS="-fPIC -std=gnu99 -D__NetBSD__ " fsck_ext2fs.ro )
#    objdir  /usr/home/viktor/src/rumpctrl/rumpobj/sbin/fsck_ext2fs
#   compile  fsck_ext2fs/dir.o
/usr/home/viktor/src/rumpctrl/rumptools/bin/x86_64--netbsd-clang -O2 -g -fPIC -std=gnu99 -D__NetBSD__    -std=gnu99    -Werror -Wno-error=tautological-pointer-compare   -D__NetBSD__ -U__FreeBSD__ --sysroot=/usr/home/viktor/src/rumpctrl/rumptools/dest  -I/usr/home/viktor/src/rumpctrl/src-netbsd/sbin/fsck  -c    /usr/home/viktor/src/rumpctrl/src-netbsd/sbin/fsck_ext2fs/dir.c
error: unknown warning option '-Werror=tautological-pointer-compare'; did you
      mean '-Werror=tautological-compare'? [-Werror,-Wunknown-warning-option]

*** Failed target:  dir.o
*** Failed command: /usr/home/viktor/src/rumpctrl/rumptools/bin/x86_64--netbsd-clang -O2 -g -fPIC -std=gnu99 -D__NetBSD__ -std=gnu99 -Werror -Wno-error=tautological-pointer-compare -D__NetBSD__ -U__FreeBSD__ --sysroot=/usr/home/viktor/src/rumpctrl/rumptools/dest -I/usr/home/viktor/src/rumpctrl/src-netbsd/sbin/fsck -c /usr/home/viktor/src/rumpctrl/src-netbsd/sbin/fsck_ext2fs/dir.c
*** Error code 1

Stop.
nbmake[1]: stopped in /usr/home/viktor/src/rumpctrl/src-netbsd/sbin/fsck_ext2fs
Makefile:133: recipe for target 'rumpobj/sbin/fsck_ext2fs/fsck_ext2fs.ro' failed
gmake: *** [rumpobj/sbin/fsck_ext2fs/fsck_ext2fs.ro] Error 1

Following the compiler's advice and changing the tautological-pointer-compare option to tautological-compare in the src-netbsd/sbin/fsck_ext2fs/Makefile line:

CWARNFLAGS.clang+= -Wno-error=tautological-pointer-compare

fixes the issue and the build completes successfully.

Makefile doesn't work with NetBSD 7.1 make

./buildnb.sh

[...]
#   install  /home/yarwelp/rumpctrl/rumptools/dest/usr/lib/pkgconfig/libssl.pc
/home/yarwelp/rumpctrl/rumptools/bin/x86_64--netbsd-install -U -c -p -r  -o root  -g wheel  -m 444   libssl.pc /home/yarwelp/rumpctrl/rumptools/dest/usr/lib/pkgconfig/libssl.pc
make: "/home/yarwelp/rumpctrl/Makefile" line 67: Missing dependency operator
make: "/home/yarwelp/rumpctrl/Makefile" line 71: Need an operator
make: "/home/yarwelp/rumpctrl/Makefile" line 118: Need an operator
make: "/home/yarwelp/rumpctrl/Makefile" line 132: Need an operator
make: "/home/yarwelp/rumpctrl/Makefile" line 133: Need an operator
make: Fatal errors encountered -- cannot continue
make: stopped in /home/yarwelp/rumpctrl

support FreeBSD

Some issues resolved in recent days, some more problems still.

Makefile doesn't work with FreeBSD 11.1 make

./buildnb.sh

[...]
#   install  /usr/home/yarwelp/rc/rumptools/dest/usr/lib/pkgconfig/libssl.pc
/usr/home/yarwelp/rc/rumptools/bin/x86_64--netbsd-install -U -c -p -r  -o root  -g wheel  -m 444   libssl.pc /usr/home/yarwelp/rc/rumptools/dest/usr/lib/pkgconfig/libssl.pc
make: "/usr/home/yarwelp/rc/Makefile" line 67: Missing dependency operator
make: "/usr/home/yarwelp/rc/Makefile" line 71: Need an operator
make: "/usr/home/yarwelp/rc/Makefile" line 118: Need an operator
make: "/usr/home/yarwelp/rc/Makefile" line 132: Need an operator
make: "/usr/home/yarwelp/rc/Makefile" line 133: Need an operator
make: Fatal errors encountered -- cannot continue
make: stopped in /usr/home/yarwelp/rc

notes on compiling ifconfig

Tried to compile ifconfig as a better test but there are some missing symbols - we are only linking libc.

needs -lutil -lprop

RTLD_DEEPBIND

To fix this I think we ned to rename all symbols in the NetBSD libs, using objcopy to prefix them (except the ones we externally link).

If we did this we could in theory make dynamic netbsd libc etc and link these to application as there would be no namespace conflicts.

errno issue

We are using the same errno for host and netbsd, which means that it seems to get cleared rather more often than is helpful. We should probably create a new errno for the netbsd stack instead of sharing it.

VincentS

Hey,

I tried to increase the number of available File Descriptors in Rumprun with sysctl without
success. It seems that I have to use ulimit for increasing them. Is this tool useable in Rumprun / can be pulled from the NetBSD source?

portability

The libc patches only fix some issues on x86 architecture, and trivially need fixing for other architectures. However there are other issues.

Ideally want to get the size of the patches smaller. There should not really be any patches out side libc (some removed), and the libc ones need to be turned into a form that can be upstreamed.

/usr/bin/ld: -r and -pie may not be used together

Hi,

Rumpctl fails to build on Debian Stretch:

rumpctrl$ ./buildnb.sh
[CUT] 
./rump/bin/rump-cc  -O2 -g -Wall -o bin/cat rumpobj/bin/cat/cat.ro
/usr/bin/ld: -r and -pie may not be used together
collect2: error: ld returned 1 exit status
Makefile:133: recipe for target 'bin/cat' failed

gcc version 6.2.1 20161124 (Debian 6.2.1-5)
GNU ld (GNU Binutils for Debian) 2.27.51.20161201

libpthread

We could do with a libpthread so you can run threaded programs.

@anttikantee said "I think you need a wrapper for pthread_create(), something like getpid + newlwp and something on the exit side too."

shared libraries

If we renamed public symbols in the netbsd libs eg to __rumprun__name then we could load (host) shared libraries of NetBSD symbols, which we could construct from (pic) .a files.

We would have to rename all U symbols in the user code that are not rump syscalls or emul calls to this prefix.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.