Re: [Detaolb-devel] [Qemu-devel] ANN: DetaolB v0.4 is released

2007-07-11 Thread Christian MICHON

On 7/11/07, Blue Swirl [EMAIL PROTECTED] wrote:

 It's entirely possibly that qemu and real sparc hardware are behaving
 differently, but I'm not seeing this bus error under qemu.  (I haven't got
 real sparc hardware, so I can only debug against qemu...)

Right. Debugging the problem I found out that in Qemu, 64-bit loads
and stores to unaligned addresses do not trigger any traps as they
should. I'll commit a fix soon. The problem is in uClibc ldso, there
is this kind of store.

Running the program on qemu-sparc reveals another problem, probably
because of these definitions in ldso/ldso/sparc/dl-sysdep.h:
/* 4096 bytes alignment */
/* ...but 8192 is required for mmap() on sparc64 kernel */
#define PAGE_ALIGN 0xe000
#define ADDR_ALIGN 0x1fff
#define OFFS_ALIGN 0x7fffe000

On Sparc32 the correct page alignment is still 4096. Because of these
definitions, some code apparently tries to clear a 8k page, but only
4k of memory is mapped.



I just managed a compilation of bash-3.2 using ncurses-5.6 and
uClibc-0.9.29 inside a qemu-system-sparc (native compilation,
no cross compilation).

ldd ./bash points naturally to libdl.so.0, libc.so.0, ld-uClibc.so.0

./bash
Segmentation fault

I do not have gdb compiled yet... I'll check soon with busybox
ash, since I recompiled uClibc with the sched_affinity patch.

--
Christian
--
http://detaolb.sourceforge.net/, a linux distribution for Qemu




Re: [Detaolb-devel] [Qemu-devel] ANN: DetaolB v0.4 is released

2007-07-11 Thread Christian MICHON

On 7/11/07, Christian MICHON [EMAIL PROTECTED] wrote:

I just managed a compilation of bash-3.2 using ncurses-5.6 and
uClibc-0.9.29 inside a qemu-system-sparc (native compilation,
no cross compilation).

ldd ./bash points naturally to libdl.so.0, libc.so.0, ld-uClibc.so.0

./bash
Segmentation fault

I do not have gdb compiled yet... I'll check soon with busybox
ash, since I recompiled uClibc with the sched_affinity patch.



busybox-1.6.0 does segfault here too. I had to remove taskset
as apparently the sched_affinity patch did not fix the linking
step.

is there a repository of sparc/uclibc patches somewhere ?
Blue mentionned he'll have a fix for uclibc ldso. I'll try it using
this dev environment as soon as it'll be out.

--
Christian
--
http://detaolb.sourceforge.net/, a linux distribution for Qemu




Re: [Detaolb-devel] [Qemu-devel] ANN: DetaolB v0.4 is released

2007-07-11 Thread Rob Landley
On Wednesday 11 July 2007 9:34:17 am Christian MICHON wrote:
 I just managed a compilation of bash-3.2 using ncurses-5.6 and
 uClibc-0.9.29 inside a qemu-system-sparc (native compilation,
 no cross compilation).

 ldd ./bash points naturally to libdl.so.0, libc.so.0, ld-uClibc.so.0

 ./bash
 Segmentation fault

When you get that kind of segmentation fault, see if hello world segfaults 
too.  (In general, when building with a new toolchain, new C library, new 
kernel, new root filesystem packaging method, or a new system in general, if 
anything goes wrong back up a few steps and make sure hello world works 
before trying to debug anything fancier.)

 I do not have gdb compiled yet... I'll check soon with busybox
 ash, since I recompiled uClibc with the sched_affinity patch.

Rob
-- 
One of my most productive days was throwing away 1000 lines of code.
  - Ken Thompson.




Re: [Detaolb-devel] [Qemu-devel] ANN: DetaolB v0.4 is released

2007-07-11 Thread Christian MICHON

On 7/11/07, Rob Landley [EMAIL PROTECTED] wrote:

When you get that kind of segmentation fault, see if hello world segfaults
too.  (In general, when building with a new toolchain, new C library, new
kernel, new root filesystem packaging method, or a new system in general, if
anything goes wrong back up a few steps and make sure hello world works
before trying to debug anything fancier.)


I was not clear then. I've binutils already compiled versus uClibc for sparc,
and it works. Some of those binaries from binutils are bigger than the
expected size of final uclibc dynamic busybox.

of course, as soon as I got uclibc compiled, hello world comes first to
my mind, and it was working.

--
Christian
--
http://detaolb.sourceforge.net/, a linux distribution for Qemu




Re: [Detaolb-devel] [Qemu-devel] ANN: DetaolB v0.4 is released

2007-07-11 Thread Christian MICHON

On 7/11/07, Rob Landley [EMAIL PROTECTED] wrote:

I look forward to a fix.  It would be nice to add sparc to the actually
works list. :)


that's 2 persons looking forward to it. ;-)

today's results:
- uclibc ok (minus the segfaults coming from it)
- conf from busybox segfaults
- bash segfaults
- busybox segfaults
- gcc does not build without bash (I'll replace with ash tomorrow)
- binutils ok
- ncurses ok (I need to look at uclibc' conf now)
- make ok
- bzip2 ok
- coreutils ok
- findutils ok

Blue swirl, please note that the porting of DetaolB to sparc32 will
take more time than scheduled, once the segfault issues are
covered. I'd like to spend some time testing firmware and cross
compilation :)

--
Christian
--
http://detaolb.sourceforge.net/, a linux distribution for Qemu