Ok, I got full stack compiling for ARM.

pooka@watou:~/rumpkernel/rumpuser-baremetal$ file rk.bin.gdb
rk.bin.gdb: ELF 32-bit LSB  executable, ARM, EABI5 version 1 (SYSV), 
statically linked, not stripped

MD support for PCI is missing.  I can do it, but I'd rather do it when I 
can test it somehow.  So if you can get rumpuser-baremetal to a state 
when it boots in a emulator, it would help greatly in that development. 
  Or if someone else wants to do it, I won't cry over it ...

Hopefully the missing bits are now more obvious (arch/arm, start with 
locore.S and the ldscript)

Instructions follow (but I didn't test them from scratch, so disclaimers 
apply):

Did the following on x64 Ubuntu Linux 14.04.  I didn't run into some of 
the compiler whines mentioned earlier in this thread using the method 
below, so those whines haven't been addressed yet.

* get NetBSD sources: cvs co -d [email protected]:/cvsroot co src
* get repo.rumpkernel.org/src-netbsd, checkout appstack-src
* get repo.rumpkernel.org/buildrump.sh

* in NetBSD src: ./build.sh -m evbarm -O ../obj.evbarm -N0 -j4 -U -u tools
* set CC to obj.evbarm/tooldir..../bin/...gcc (plus AR, NM, OBJCOPY)
* ./buildrump.sh -s ${APPSTACK_SRC} -V MKPIC=no -V RUMP_KERNEL_IS_LIBC=1 
-k -N kernelheaders fullbuild
* edit obj/tooldir/mk.conf and set MKSOFTFLOAT to "yes"
   addresses following, didn't want to spiral down onto FP lossage avenue:
   /tmp/ccIuvFzS.s:33: Error: selected processor does not support ARM 
mode `vmrs r0,fpscr' (+)
* comment out the EABI strong_alias() calls in
   appstack-src/common/lib/libc/arch/arm/string/mem{cpy,set,cmp}.S:
   memcpy, memset8, memclr8, memcmp (see "++" below)
* set BUILDRUMP_SH and APPSTACK_SRC in env
* ./buildme.sh ("make" will fail, see next item)
* make IWANTARM=1 (you can iterate your platform development by running 
just this step)

+) if someone has ideas about how this should really work, please disclose

++) I'm not really sure why these currently work at all the way they do. 
Theoretically, since they're toolchain things, they shouldn't be 
included in the rump kernel at all.  However, I don't want to outright 
remove them  now, since that might break some other platform (e.g. ARM 
in userspace).

longer story: symbols in the rump kernel are usually protected by 
renaming them from e.g. "foo" to "rumpns_foo".  However, we cannot do 
that for symbols which start with __, because those symbols are used by 
the toolchain, and the toolchain usually gets upset if we go renaming 
things from under it.  The problem is that we get two copies of the 
__eabi_membar() stuff -- in a normal NetBSD build libc and the kernel 
isn't linked into the same binary, so they never notice these things.

NOTE: do the step only after you built the rump kernel, since you do 
need those symbols once

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
rumpkernel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rumpkernel-users

Reply via email to