grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] auto-generate libgcc.h


From: rubisher
Subject: Re: [PATCH] auto-generate libgcc.h
Date: Fri, 23 Oct 2009 16:19:54 +0000
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090701)

Hello Vladimir,

Vladimir 'phcoder' Serbinenko wrote:
rubisher wrote:
Vladimir 'phcoder' Serbinenko wrote:
Robert Millan wrote:
This should be a much cleaner option than maintaining libgcc.h by
hand.  Only
tested on sparc, but it should also cast out the build problems on
powerpc.

1) Doesn't work in cross-compiler environment. You confused CC and
TARGET_CC
Tbh, when I look in the libgcc.h, excepted the header, it was empty.
It seems that the forked sh doesn't known anything about CC, so I tried:
+    CC=$(TARGET_CC) /bin/sh $< > $@ || (rm -f $@; exit 1)

2) Symbols don't get included into symlist.c so it's unlikely to work.
Well, finaly it doesn't help a lot, the dpkg-build... still failed at
the same place:

_restgpr_29_x in boot is not defined

Just note that it's not any more _restgpr_31_x(), I presume just
because nm list it first?

If _restgpr_31_x is really GOT table and building system pulls it from
some library it will create bugs (all kind of bugs you can imagine
caused by bad linking)

Well I just figure out that all pb I met was due to the fact of -Os 
optimization.
I also discover that it's quiet easy thanks to 'TARGET_CFLAGS=-O0 CLFAGS=-O0 ../configure' to rebuild all the project with those other optimization and I was quiet happy to see the grub kernel image booting anyway.
Unfortunately the basic image dpkg build only contains fat & part_msdos,
(# /usr/bin/grub-mkelfimage --directory=/usr/lib/grub/powerpc-ieee1275 --output=/boot/grub/grub fat part_msdos); and so failed to boot my linux kernel (it first fall back in rescue mode and when I reach the grub prompt it didn't find any disk).

I also presume that's because it lacks of modules to find those scsi disk?
And I also read <http://grub.enbug.org/TestingOnPowerPC> and rebuild an grub image with all modules which make sadely panic the ofs:
/usr/bin/grub-mkelfimage -nv --directory=/usr/lib/grub/powerpc-ieee1275 -o 
/boot/grub/grubof.modules *.mod
(note the -n option also recommended for pseries)

DEFAULT CATCH!, exception-handler=fff00300
at   %SRR0: 0000000000c3c25c   %SRR1: 800000000000b002
Call History
------------
@  - c3c1f0
close-package  - c58060
(poplocals)  - c3a758
(init-program)  - c7e298
boot  - c7ec7c
evaluate  - c4a638
invalid pointer - d83655
invalid pointer - f
invalid pointer - f
catch  - c38fe8
bt-task-boot-on-this  - d140d8
(poplocals)  - c3a758
catch  - c38fe8
execute-device-method  - c58bcc
(poplocals)  - c3a758
(select-boot-seq)  - c59ba4

Client's Fix Pt Regs:
 00 00100000000001f4 ffffffffffffffff 00000000deadbeef fffffffffffffffc
 04 0000000000000000 0000000000000000 0000000000000000 0000000000000001
 08 0000000000001000 0000030002001000 0000000000000003 0000000000007000
 0c 0000000022800000 0000000000c17100 0000000000c18000 000000000009c4b0
 10 0000000000db8c20 0000000000db8939 0000000000c57d80 0000000000c58060
 14 0000000000000000 ffffffffffffffff 0000000000000000 0000000000000000
 18 0000000000c13000 0000000000c38000 0000000000c14d40 0000000000c16ec0
 1c 0000000000c20000 0000000000c3fdf0 0000000000c11ea0 0000000000c10fa8
Special Regs:
    %IV: 00000300     %CR: 84800000    %XER: 20000008  %DSISR: 08000000
  %SRR0: 0000000000c3c25c   %SRR1: 800000000000b002
    %LR: 0000000000c3c1f0    %CTR: 0000000000000000
   %DAR: ffffffffffffffff
Virtual PID = 0
 ofdbg

As I just started with grub2 2 weeks ago, I would still need your advise:
is this last problem came because modules should be compiled with -Os or much more because some module are not compatible with the ofs I have?

Thanks again for all,
    J.

I'll test on imac g3 today
3) Even if it works it would result in a largely bloated kernel.img due
to unused libgcc routines


Well, whatever src tree (svn 2641, 2642, dpkg 1.9-beta3, 1.9-beta4)
which I reach to all build with gcc-4.3, it always failed to boot:

Welcome to GRUB!

the symbol `__lshrdi3' not found
Aborted. Press any key to exit.

As I am newbe to grub2 (and have few programming knowledge), can you
advise me if it's a well known issue?

Thanks for all effort,
    J.


_______________________________________________
Grub-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/grub-devel








reply via email to

[Prev in Thread] Current Thread [Next in Thread]