Hi Nico,

I was able to get my ramdisk booting, the main problem in my view was
the RPATH was being set for runtime compiling and i believe the system
was looking for the RPATH not RPATH+ /lib + /usr/lib in the search
path when it was booting.

So what i changed was not to create RPATH but adding rpath-link which
looks where the library's are during link time not runtime like RPATH.

Well happy that is working and here is my path for wapper.sh which is
located in target/toolchain/files.


--- wrapper.sh.org      2010-03-23 23:11:21.000000000 -0400
+++ wrapper.sh  2010-03-23 23:12:00.000000000 -0400
@@ -57,12 +57,12 @@

 case $TOOLCHAIN_PLATFORM in
    gnu|glibc|eglibc)
-       GCC_SYSROOT_FLAGS="--sysroot=$TOOLCHAIN_SYSROOT
-Wl,-rpath=$TOOLCHAIN_SYSROOT/lib:$TOOLCHAIN_SYSROOT/usr/lib"
-       
LD_SYSROOT_FLAGS="-rpath=$TOOLCHAIN_SYSROOT/lib:$TOOLCHAIN_SYSROOT/usr/lib"
+       GCC_SYSROOT_FLAGS="--sysroot=$TOOLCHAIN_SYSROOT
-Wl,-rpath-link=$TOOLCHAIN_SYSROOT/lib:$TOOLCHAIN_SYSROOT/usr/lib"
+       
LD_SYSROOT_FLAGS="-rpath-link=$TOOLCHAIN_SYSROOT/lib:$TOOLCHAIN_SYSROOT/usr/lib"
        ;;
    uclibc)
-       GCC_SYSROOT_FLAGS="--sysroot=$TOOLCHAIN_SYSROOT
-Wl,-rpath=$TOOLCHAIN_SYSROOT/lib:$TOOLCHAIN_SYSROOT/usr/lib"
-       
LD_SYSROOT_FLAGS="-rpath=$TOOLCHAIN_SYSROOT/lib:$TOOLCHAIN_SYSROOT/usr/lib"
+       GCC_SYSROOT_FLAGS="--sysroot=$TOOLCHAIN_SYSROOT
-Wl,-rpath-link=$TOOLCHAIN_SYSROOT/lib:$TOOLCHAIN_SYSROOT/usr/lib"
+       
LD_SYSROOT_FLAGS="-rpath-link=$TOOLCHAIN_SYSROOT/lib:$TOOLCHAIN_SYSROOT/usr/lib"
        ;;
    *)
        GCC_SYSROOT_FLAGS=""



Regards,
Pawel

On Mon, Mar 22, 2010 at 3:33 PM, Nico <n...@openwrt.org> wrote:
> Hi Pawel,
>
> Did you check that all libraries required to boot the system are present ?
>
> When using an external toolchain, you have to tell the build system
> where the base libraries (libc, libgcc, libpthread...) are to be found,
> check your ".config" file. You can also check in
> "build_dir/target-*/root-*" that all files have been properly installed
> before the ramdisk image was generated.
>
> Let us know what's going on...
>
> Cheers,
> --
> -{Nico}
>
>
> Pawel Pastuszak wrote:
>> I would have to say that my address are setup correctly why would move
>> the toolchain out of the my build would change the Ramdisk?
>>
>> This is the follow steps i took to see what was wrong
>>
>> Note: External Toolchain is the openwrt toolchain moved outside.
>>
>> 1) Using External Toolchain, make kernel and ramdisk fail to boot ram disk
>>
>> 2) Using Internal Toolchain to build kernel and external ramdisk fail to boot
>>
>> 3) Using Internal Toolchain to build kernel and internal toolchain
>> ramdisk , boots fine.
>>
>>
>> So what would cause /etc/preinit to to boot? maybe busybox is being
>> compiled wrong?
>>
>>
>>
>>
>> On Mon, Mar 22, 2010 at 5:00 AM, Florian Fainelli <flor...@openwrt.org> 
>> wrote:
>>
>>> On Monday 22 March 2010 01:54:28 Pawel Pastuszak wrote:
>>>
>>>> Thanks for pointing me to the thread after reading the thread about
>>>> "Compiling outside of buildroot" I was able to make and image.
>>>>
>>>> But now the problem that i am having is that the image is not booting
>>>> the ramdisk which is an ext2 its compile about /etc/preinit fail but
>>>> when i uses my older ramdisk image very thing is good. Any Ideas?
>>>>
>>> Check that your kernel has support for initrd and ext2 filesystem, that 
>>> should
>>> do it. Also check that you correctly set the initrd start address and size.
>>>
>>>
>>>> On Mon, Mar 15, 2010 at 5:05 AM, Bas Mevissen <ab...@basmevissen.nl> wrote:
>>>>
>>>>> On Sat, 2010-03-13 at 22:22 -0500, Pawel Pastuszak wrote:
>>>>>
>>>>>> Hi All,
>>>>>>
>>>>>> I am trying to split the toolchain out of my main openwrt build, after
>>>>>> generating the toolchain i moved it to a new location from
>>>>>> staging_dir/toolchain-powerpc_gcc-4.3.3_glibc-2.7 and set up and new
>>>>>> build that points to the toolchain.
>>>>>>
>>>>>> I am using Revision: 20023.
>>>>>>
>>>>>> Is there any think that I am missing?
>>>>>>
>>>>>>
>>>>>> powerpc-openwrt-linux-gnu-gcc -Os -pipe -funit-at-a-time -mcpu=405
>>>>>> -msoft-float -Wall -Wunused -I./include/linux/include/ -Iinclude/
>>>>>> -DARPTABLES_VERSION=\"0.0.3-3\"  -o arptables arptables-standalone.o
>>>>>> arptables.o libarptc/libarptc.o extensions/arpt_standard.o
>>>>>> extensions/arpt_mangle.o
>>>>>> /development/external_toolchain_test/usr/bin/../lib/gcc/powerpc-openwrt-
>>>>>> linux-gnu/4.3.3/../../../../powerpc-openwrt-linux-gnu/bin/ld: cannot find
>>>>>> -lgcc_s
>>>>>> collect2: ld returned 1 exit status
>>>>>> make[4]: *** [arptables] Error 1
>>>>>> make[4]: Leaving directory
>>>>>> `/development/openwrt/build_dir/target-powerpc-openwrt-linux-gnu/arptabl
>>>>>> es-v0.0.3-3' make[3]: ***
>>>>>> [/development/openwrt/build_dir/target-powerpc-openwrt-linux-gnu/arptabl
>>>>>> es-v0.0.3-3/.built] Error 2
>>>>>> make[3]: Leaving directory `/development/openwrt/package/arptables'
>>>>>> make[2]: *** [package/arptables/compile] Error 2
>>>>>> make[2]: Leaving directory `/development/openwrt'
>>>>>>
>>>>> Looks like a relocation problem. In general, gcc has a hard coded
>>>>> absolute path to some libraries. Solution is to compile the cross
>>>>> compiler for your new destination path or fix the binary.
>>>>>
>>>>> This has been discussed quite recently here in the "Compiling outside of
>>>>> buildroot" thread.
>>>>>
>>>>> Bas.
>>>>>
>>>>>
>>>>>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to