Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orion/E userland #8

Open
vmlemon opened this issue Oct 15, 2019 · 7 comments
Open

Orion/E userland #8

vmlemon opened this issue Oct 15, 2019 · 7 comments

Comments

@vmlemon
Copy link
Owner

vmlemon commented Oct 15, 2019

The current Enryo userland used to build, fine, on x86-64 (and, probably still does), but doesn't seem to compile on PowerPC, and contains a different set of components, and functionality, which works to an extent, but is quite hacky, and broken.

This issue proposes to port the Orion userland, as an interim measure, to create the Orion/E (for "Enryo", and "(Community) Enhancements") product, until we can fix up Orion's converged kernel, to properly work on x86, again.

@vmlemon
Copy link
Owner Author

vmlemon commented Oct 16, 2019

Moved the old user directory, to user.enryo, and did a straight, recursive copy of the latest Orion version (vmlemon/Orion@2581bce).

@vmlemon
Copy link
Owner Author

vmlemon commented Oct 16, 2019

On PowerPC, we get this, when trying to do a make clean, and make, for the first time:

[fedora@fedora28 user]$ make clean
(cd . && /bin/sh ./config.status --recheck)
running CONFIG_SHELL=/bin/sh /bin/sh ./configure --no-create --no-recursion
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... yes
checking whether ln -s works... yes
checking for gawk... gawk
checking location of libgcc.a... /usr/lib/gcc/ppc64-redhat-linux/8
checking location of stdarg.h... /usr/lib/gcc/ppc64-redhat-linux/8/include
checking kernel build directory... $(top_builddir)
configure: creating ./config.status
===> Rebuilding config.mk
config.status: creating config.mk
config.status: error: cannot find input file: `config.h.in'
make: *** [Mk/l4.build.mk:78: config.mk] Error 1
[fedora@fedora28 user]$ make clean
===> Rebuilding Makefile
config.status: creating Makefile
config.status: error: cannot find input file: `config.h.in'
make: *** [Mk/l4.build.mk:70: Makefile] Error 1
[fedora@fedora28 user]$ autoreconf 
aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'
[fedora@fedora28 user]$ ls
apps            config.h.in  config.mk.in   configure.in  include     lib          Mk         README.HG     util
autom4te.cache  config.log   config.status  contrib       INSTALL     Makefile     PPC64conf  serv
config.h        config.mk    configure      DoLogBig      install-sh  Makefile.in  PPC64make  ULBuild1.txt
[fedora@fedora28 user]$ make clean
make[1]: Entering directory '/home/fedora/pistachio/user/lib'
===> Rebuilding Makefile
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
make[2]: Entering directory '/home/fedora/pistachio/user/lib/l4'
===> Rebuilding ./Makefile
config.status: creating ./Makefile
config.status: creating config.h
config.status: config.h is unchanged
rm -f *~ \#* libl4.a  debug.o powerpc64.o   .depend
make[2]: Leaving directory '/home/fedora/pistachio/user/lib/l4'
make[2]: Entering directory '/home/fedora/pistachio/user/lib/io'
===> Rebuilding ./Makefile
config.status: creating ./Makefile
config.status: creating config.h
config.status: config.h is unchanged
===> Making dependencies in .
===> Rebuilding ./Makefile
config.status: creating ./Makefile
config.status: creating config.h
config.status: config.h is unchanged
rm -f *~ \#* libio.a  get_hex.o print.o powerpc64.o   .depend
make[2]: Leaving directory '/home/fedora/pistachio/user/lib/io'
rm -f *.a
make[1]: Leaving directory '/home/fedora/pistachio/user/lib'
make[1]: Entering directory '/home/fedora/pistachio/user/serv'
===> Rebuilding Makefile
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
make[2]: Entering directory '/home/fedora/pistachio/user/serv/sigma0'
===> Rebuilding ./Makefile
config.status: creating ./Makefile
config.status: creating config.h
config.status: config.h is unchanged
===> Making dependencies in .
===> Rebuilding ./Makefile
config.status: creating ./Makefile
config.status: creating config.h
config.status: config.h is unchanged
rm -f *~ \#* sigma0 crt0-powerpc64.o sigma0.o sigma0_mem.o region.o   .depend
make[2]: Leaving directory '/home/fedora/pistachio/user/serv/sigma0'
make[1]: Leaving directory '/home/fedora/pistachio/user/serv'
make[1]: Entering directory '/home/fedora/pistachio/user/apps'
===> Rebuilding Makefile
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
make[2]: Entering directory '/home/fedora/pistachio/user/apps/bench'
===> Rebuilding ./Makefile
config.status: creating ./Makefile
config.status: creating config.h
config.status: config.h is unchanged
make[3]: Entering directory '/home/fedora/pistachio/user/apps/bench/pingpong'
===> Rebuilding ./Makefile
config.status: creating ./Makefile
config.status: creating config.h
config.status: config.h is unchanged
===> Making dependencies in .
===> Rebuilding ./Makefile
config.status: creating ./Makefile
config.status: creating config.h
config.status: config.h is unchanged
rm -f *~ \#* pingpong crt0-powerpc64.o pingpong.o   .depend
make[3]: Leaving directory '/home/fedora/pistachio/user/apps/bench/pingpong'
make[2]: Leaving directory '/home/fedora/pistachio/user/apps/bench'
make[2]: Entering directory '/home/fedora/pistachio/user/apps/grabmem'
===> Rebuilding ./Makefile
config.status: creating ./Makefile
config.status: creating config.h
config.status: config.h is unchanged
===> Making dependencies in .
===> Rebuilding ./Makefile
config.status: creating ./Makefile
config.status: creating config.h
config.status: config.h is unchanged
rm -f *~ \#* grabmem crt0-powerpc64.o grabmem.o   .depend
make[2]: Leaving directory '/home/fedora/pistachio/user/apps/grabmem'
make[2]: Entering directory '/home/fedora/pistachio/user/apps/l4test'
===> Rebuilding ./Makefile
config.status: creating ./Makefile
config.status: creating config.h
config.status: config.h is unchanged
===> Making dependencies in .
===> Rebuilding ./Makefile
config.status: creating ./Makefile
config.status: creating config.h
config.status: config.h is unchanged
rm -f *~ \#* l4test powerpc64/crt0.o main.o assert.o menu.o threads.o string.o ipc.o ipc-string.o ipc-pf.o ipc-smp.o kip.o mem.o sig0.o exreg.o tcontrol.o schedule.o powerpc64/help.o powerpc64/tests.o powerpc64/1275tree.o   .depend
rmdir: failed to remove './powerpc64': Directory not empty
make[2]: *** [Makefile:67: post-clean] Error 1
make[2]: Leaving directory '/home/fedora/pistachio/user/apps/l4test'
make[1]: *** [../Mk/l4.subdir.mk:51: subdirs-clean] Error 2
make[1]: Leaving directory '/home/fedora/pistachio/user/apps'
make: *** [Mk/l4.subdir.mk:51: subdirs-clean] Error 2
[fedora@fedora28 user]$ git add -Af .
[fedora@fedora28 user]$ git commit -am "Try to make clean Orion/E userland"
[master 5ba2edf2] Try to make clean Orion/E userland
 Committer: fedora Cloud User <fedora@fedora28.novalocal>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:

    git config --global --edit

After doing this, you may fix the identity used for this commit with:

    git commit --amend --reset-author

 7 files changed, 4913 insertions(+), 55 deletions(-)
 create mode 100644 user/autom4te.cache/output.1
 create mode 100644 user/autom4te.cache/traces.1
 create mode 100644 user/config.h.in
 delete mode 100644 user/lib/l4/.depend
[fedora@fedora28 user]$ ls
apps            config.h.in  config.mk.in   configure.in  include     lib          Mk         README.HG     util
autom4te.cache  config.log   config.status  contrib       INSTALL     Makefile     PPC64conf  serv
config.h        config.mk    configure      DoLogBig      install-sh  Makefile.in  PPC64make  ULBuild1.txt
[fedora@fedora28 user]$ make
make[1]: Entering directory '/home/fedora/pistachio/user/lib'
===> Rebuilding Makefile
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
make[2]: Entering directory '/home/fedora/pistachio/user/lib/l4'
===> Rebuilding ./Makefile
config.status: creating ./Makefile
config.status: creating config.h
config.status: config.h is unchanged
===> Making dependencies in .
===> Rebuilding ./Makefile
config.status: creating ./Makefile
config.status: creating config.h
config.status: config.h is unchanged
make[2]: *** No rule to make target 'l4/powerpc64/tracebuffer.h', needed by 'debug.o'.  Stop.
make[2]: Leaving directory '/home/fedora/pistachio/user/lib/l4'
make[1]: *** [../Mk/l4.subdir.mk:41: subdirs-all] Error 2
make[1]: Leaving directory '/home/fedora/pistachio/user/lib'
make: *** [Mk/l4.subdir.mk:41: subdirs-all] Error 2
[fedora@fedora28 user]$ 

@vmlemon
Copy link
Owner Author

vmlemon commented Oct 16, 2019

It seems that we didn't have all of the userland, since we pulled it from an older Orion master, so I've synced-it-up, in the last commit.

@vmlemon
Copy link
Owner Author

vmlemon commented Oct 16, 2019

On PowerPC, we can reproduce this error (same as vmlemon/Orion#26), after pulling everything in, and rebuilding the userland:

[fedora@fedora28 user]$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... yes
checking whether ln -s works... yes
checking for gawk... gawk
checking location of libgcc.a... /usr/lib/gcc/ppc64-redhat-linux/8
checking location of stdarg.h... /usr/lib/gcc/ppc64-redhat-linux/8/include
checking kernel build directory... $(top_builddir)
configure: creating ./config.status
config.status: creating config.mk
config.status: creating Makefile
config.status: creating lib/Makefile
config.status: creating lib/l4/Makefile
config.status: creating lib/io/Makefile
config.status: creating serv/Makefile
config.status: creating serv/sigma0/Makefile
config.status: creating apps/Makefile
config.status: creating apps/bench/Makefile
config.status: creating apps/bench/pingpong/Makefile
config.status: creating apps/grabmem/Makefile
config.status: creating apps/l4test/Makefile
config.status: creating util/Makefile
config.status: creating util/kickstart/Makefile
config.status: creating util/grubdisk/Makefile
config.status: creating util/piggybacker/Makefile
config.status: creating util/piggybacker/ofppc/Makefile
config.status: creating util/piggybacker/ofppc64/Makefile
config.status: creating contrib/Makefile
config.status: creating contrib/elf-loader/Makefile
config.status: creating config.h
config.status: config.h is unchanged
[fedora@fedora28 user]$ make
make[1]: Entering directory '/home/fedora/pistachio/user/lib'
make[2]: Entering directory '/home/fedora/pistachio/user/lib/l4'
===> Making dependencies in .
===> debug.cc
gcc -x c++ -I../../include -I../.. -I/usr/lib/gcc/ppc64-redhat-linux/8/include   -nostdinc -fno-stack-protector -g -O2 -msoft-float -mminimal-toc   -fno-stack-protector -lssp -O2 -g -Wall -Wshadow -fno-stack-protector  -Wconversion -fno-exceptions -fno-stack-protector -c debug.cc -o debug.o
In file included from ../../include/l4/kip.h:36,
                 from debug.cc:31:
../../include/l4/powerpc64/syscalls.h: In function ‘L4_Clock_t L4_SystemClock()’:
../../include/l4/powerpc64/syscalls.h:172:12: error: request for member ‘raw’ in ‘r3’, which is of non-class type ‘L4_Word_t’ {aka ‘long unsigned int’}
   "=r" (r3.raw)
            ^~~
../../include/l4/powerpc64/syscalls.h:182:13: error: address of explicit register variable ‘r3’ requested
     return  r3 ;
             ^~
../../include/l4/powerpc64/syscalls.h:182:13: error: could not convert ‘r3’ from ‘L4_Word_t’ {aka ‘long unsigned int’} to ‘L4_Clock_t’
make[2]: *** [../../Mk/l4.build.mk:58: debug.o] Error 1
make[2]: Leaving directory '/home/fedora/pistachio/user/lib/l4'
make[1]: *** [../Mk/l4.subdir.mk:41: subdirs-all] Error 2
make[1]: Leaving directory '/home/fedora/pistachio/user/lib'
make: *** [Mk/l4.subdir.mk:41: subdirs-all] Error 2
[fedora@fedora28 user]$ 

@vmlemon
Copy link
Owner Author

vmlemon commented Oct 16, 2019

We still get:

[fedora@fedora28 user]$ make
make[1]: Entering directory '/home/fedora/pistachio/user/lib'
make[2]: Entering directory '/home/fedora/pistachio/user/lib/l4'
===> Making dependencies in .
===> debug.cc
gcc -x c++ -I../../include -I../.. -I/usr/lib/gcc/ppc64-redhat-linux/8/include   -nostdinc -fno-stack-protector -g -O2 -msoft-float -mminimal-toc   -fno-stack-protector -lssp -O2 -g -Wall -Wshadow -fno-stack-protector  -Wconversion -fno-exceptions -fno-stack-protector -c debug.cc -o debug.o
In file included from ../../include/l4/kip.h:36,
                 from debug.cc:31:
../../include/l4/powerpc64/syscalls.h: In function ‘L4_Clock_t L4_SystemClock()’:
../../include/l4/powerpc64/syscalls.h:178:17: error: address of explicit register variable ‘r3’ requested
     return ( r3 );
                 ^
../../include/l4/powerpc64/syscalls.h:178:17: error: address of explicit register variable ‘r3’ requested
make[2]: *** [../../Mk/l4.build.mk:58: debug.o] Error 1
make[2]: Leaving directory '/home/fedora/pistachio/user/lib/l4'
make[1]: *** [../Mk/l4.subdir.mk:41: subdirs-all] Error 2
make[1]: Leaving directory '/home/fedora/pistachio/user/lib'
make: *** [Mk/l4.subdir.mk:41: subdirs-all] Error 2
[fedora@fedora28 user]$ diff ../user.enryo/include/l4/powerpc64/syscalls.h  include/l4/powerpc64/syscalls.h

The versions are very similar: vmlemon/Orion#26 (comment)

@vmlemon
Copy link
Owner Author

vmlemon commented Oct 16, 2019

After synchronising with the master branch of Orion, all of the Orion userland seems to build, and link without problems, on x86-64.

@vmlemon
Copy link
Owner Author

vmlemon commented Oct 16, 2019

Orion/E doesn't really help with the PowerPC problems, other than diagnosing what's intrinsically broken, in upstream Pistachio, and what's newly-broken, by merging in the NICTA fork, but it does at least get us closer to having some kind of solution to vmlemon/Orion#3...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant