It looks like you have a bad binary. Either your compiling for the wrong 
architecture or your toolset is using improper instructions.

FrancoisM wrote:
> Ok I could chroot successfuly.
>
> [1]+  Segmentation fault      chroot /filesys /sbin/init
>
> The result is the same as when I init ed with the run.sh script.
>
> Any suggestion?
>
> On Dec 11, 7:26 pm, Manav Gautama <[EMAIL PROTECTED]> wrote:
>   
>> On Thu, 2008-12-11 at 02:23 -0800, FrancoisM wrote:
>>     
>>> Oh .... did I miss something?
>>>       
>>> [EMAIL PROTECTED]:/filesys# chroot& /filesys /sbin/init
>>>       
>> chroot /filesys /sbin/init &
>>
>>     
>>> [2] 993
>>> -bash: /filesys: is a directory
>>> [1]   Exit 1                  chroot
>>> chroot: too few arguments
>>> Try `chroot --help' for more information.
>>>       
>>> There is no problem with the architecture ( CPU: ARM926EJ-S [41069265]
>>> revision 5 (ARMv5TEJ) ).
>>> Seems like dmesg displays the same lines as when you boot the kernel,
>>> but in my case when I directly boot on the Android file system,
>>> nothing is displayed... init always crashes and if I try to boot
>>> without the init=/init defined then I get a kernel panic.
>>>       
>>> How may I check the loader?
>>>       
>>> Thanks for your fast replies and advices. I really appreciate
>>>       
>>> Francois Minaud
>>>       
>>> On Dec 11, 6:45 pm, Sean McNeil <[EMAIL PROTECTED]> wrote:
>>>       
>>>> You could try to kick android off in the background by appending an "&"
>>>> to the chroot command. Then you could check for messages with dmesg.
>>>> Sounds like you may be having linker issues. The compiler should be OK,
>>>> but I suspect you aren't compiling for the right architecture. Was this
>>>> an s3c2410? armv4t? You won't get very far if you compile with the
>>>> default armv5te architecture for that chip.
>>>>         
>>>> FrancoisM wrote:
>>>>         
>>>>> Very interesting reading. As I read this I think it's a bit risky to
>>>>> have 2 filesystems coexisting. (and even after chrooting it wouldn't
>>>>> init).
>>>>> So I tried to boot only on the Android filesystem, but it won't boot,
>>>>> hanging after :
>>>>>           
>>>>> FS: Mounted root (nfs
>>>>> filesystem).
>>>>> VFS: Mounted root (nfs
>>>>> filesystem).
>>>>> <6>Freeing init memory:
>>>>> 124K
>>>>> Freeing init memory: 124K
>>>>>           
>>>>> This is why I wanted to mix my davinci fs which I can boot on and the
>>>>> Android filesystem.
>>>>>           
>>>>> Any way to see what's going down there as the console doesn't display
>>>>> any error message, debugging looks impossible.
>>>>>           
>>>>> Some possibles issues : i used arm-crosstool-linux-gnueabi toolchain
>>>>> to build the Android source code and compile the kernel for my board,
>>>>> gcc version is 4.1.0 (got some warnings during kernel compilation).
>>>>>           
>>>>> Francois Minaud
>>>>>           
>>>>> On Dec 11, 5:58 pm, Sean McNeil <[EMAIL PROTECTED]> wrote:
>>>>>           
>>>>>> Android uses a completely different linker/loader. You cannot run
>>>>>> Android directly from your davinci filesystem. Very important shared
>>>>>> libraries will not be in the correct place on the filesystem. Just
>>>>>> changing env variables is not good enough. In this setup, you are going
>>>>>> to have to use chroot:
>>>>>>             
>>>>>> chroot /filesystem /init (or /sbin/init for me)
>>>>>>             
>>>>>> Read up on chroot. It essentially will make /filesystem the / directory
>>>>>> for whatever command you invoke.
>>>>>>             
>>>>>> FrancoisM wrote:
>>>>>>             
>>>>>>> Thanks for your reply. I am not sure I got what you mean.
>>>>>>>               
>>>>>>> I have a basic davinci filesystem in which i pasted the Android
>>>>>>> filesystem ( davinci filesystem is / and Android fs is in /
>>>>>>> filesystem/ ). I did that because if i directly boot the board with
>>>>>>> the Android filesystem, I don't come up with anything but the
>>>>>>> lowmem_shrink() display messages.
>>>>>>>               
>>>>>>> Is the missing libraries result from a linker problem? I am pretty
>>>>>>> much a beginner and feel lost. Some more clues would be welcome.
>>>>>>>               
>>>>>>> Thanks a lot,
>>>>>>> Francois Minaud
>>>>>>>               
>>>>>>> I tried the changes you suggested but pretty akwardly I guess as I
>>>>>>> come up with the same strace result.
>>>>>>>               
>>>>>>> On Dec 11, 5:08 pm, Sean McNeil <[EMAIL PROTECTED]> wrote:
>>>>>>>               
>>>>>>>> I don't think it is going to work that way. You have a different
>>>>>>>> linker/loader and all that which has to be in specific directories from
>>>>>>>> root. I think you'll have to do a chroot. That is what I do:
>>>>>>>>                 
>>>>>>>> chroot /root /sbin/init
>>>>>>>>                 
>>>>>>>> (I've moved init to the more appropriate /sbin directory).
>>>>>>>>                 
>>>>>>>> Either that, or you'll have to mount your nfs as /.
>>>>>>>>                 
>>>>>>>> FrancoisM wrote:
>>>>>>>>                 
>>>>>>>>> Alright, I got some progress.
>>>>>>>>> My previous error comes from my ... "wild" patching. Later I did it
>>>>>>>>> again smoothly using Meld which is a software I recommend to all of
>>>>>>>>> you guys.
>>>>>>>>>                   
>>>>>>>>> So I got a kernel which boots and is supposed to work with my Android
>>>>>>>>> filesystem, I work with NFS.
>>>>>>>>>                   
>>>>>>>>> I could boot with a basic filesystem (I don't init Android on boot)
>>>>>>>>> and when I try to launch "init" here is what I get :
>>>>>>>>>                   
>>>>>>>>> my run.sh is :
>>>>>>>>> #!/bin/sh
>>>>>>>>> chmod 777 /filesys/data
>>>>>>>>> /init
>>>>>>>>>                   
>>>>>>>>> export PATH=sbin:/filesys/system/sbin:/filesys/system/bin:/filesys/
>>>>>>>>> system/xbin
>>>>>>>>> export LD_LIBRARY_PATH=/filesys/system/lib
>>>>>>>>> export ANDROID_BOOTLOGO=1
>>>>>>>>> export ANDROID_ROOT=/filesys/system
>>>>>>>>> export ANDROID_ASSETS=/filesys/system/app
>>>>>>>>> export ANDROID_DATA=/filesys/data
>>>>>>>>> #export EXTERNAL_STORAGE /sdcard
>>>>>>>>> export BOOTCLASSPATH=/filesys/system/framework/core.jar:/filesys/
>>>>>>>>> system/framework/ext.jar:/filesys/system/framework/framework.jar:/
>>>>>>>>> filesys/framework/android.policy.jar:/filesys/framework/services.jar
>>>>>>>>>                   
>>>>>>>>> the strace is :
>>>>>>>>>                   
>>>>>>>>> [EMAIL PROTECTED]:/filesys# strace -ff -F  -s 200    ./run.sh
>>>>>>>>> execve("./run.sh", ["./run.sh"], [/* 14 vars */]) = 0
>>>>>>>>> uname({sys="Linux", node="davinci-francois", ...}) = 0
>>>>>>>>> brk(0)                                  = 0xab000
>>>>>>>>> access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or
>>>>>>>>> directory)
>>>>>>>>> open("/etc/ld.so.cache", O_RDONLY)      = -1 ENOENT (No such file or
>>>>>>>>> directory)
>>>>>>>>> open("/lib/tls/v5l/fast-mult/half/libncurses.so.5", O_RDONLY) = -1
>>>>>>>>> ENOENT (No such file or directory)
>>>>>>>>> stat64("/lib/tls/v5l/fast-mult/half", 0xbeb6d1a8) = -1 ENOENT (No such
>>>>>>>>> file or directory)
>>>>>>>>> open("/lib/tls/v5l/fast-mult/libncurses.so.5", O_RDONLY) = -1 ENOENT
>>>>>>>>> (No such file or directory)
>>>>>>>>> stat64("/lib/tls/v5l/fast-mult", 0xbeb6d1a8) = -1 ENOENT (No such file
>>>>>>>>> or directory)
>>>>>>>>> open("/lib/tls/v5l/half/libncurses.so.5", O_RDONLY) = -1 ENOENT (No
>>>>>>>>> such file or directory)
>>>>>>>>> stat64("/lib/tls/v5l/half", 0xbeb6d1a8) = -1 ENOENT (No such file or
>>>>>>>>> directory)
>>>>>>>>> open("/lib/tls/v5l/libncurses.so.5", O_RDONLY) = -1 ENOENT (No such
>>>>>>>>> file or directory)
>>>>>>>>> stat64("/lib/tls/v5l", 0xbeb6d1a8)      = -1 ENOENT (No such file or
>>>>>>>>> directory)
>>>>>>>>> open("/lib/tls/fast-mult/half/libncurses.so.5", O_RDONLY) = -1 ENOENT
>>>>>>>>> (No such file or directory)
>>>>>>>>> stat64("/lib/tls/fast-mult/half", 0xbeb6d1a8) = -1 ENOENT (No such
>>>>>>>>> file or directory)
>>>>>>>>> open("/lib/tls/fast-mult/libncurses.so.5", O_RDONLY) = -1 ENOENT (No
>>>>>>>>> such file or directory)
>>>>>>>>> stat64("/lib/tls/fast-mult", 0xbeb6d1a8) = -1 ENOENT (No such file or
>>>>>>>>> directory)
>>>>>>>>> open("/lib/tls/half/libncurses.so.5", O_RDONLY) = -1 ENOENT (No such
>>>>>>>>> file or directory)
>>>>>>>>> stat64("/lib/tls/half", 0xbeb6d1a8)     = -1 ENOENT (No such file or
>>>>>>>>> directory)
>>>>>>>>> open("/lib/tls/libncurses.so.5", O_RDONLY) = -1 ENOENT (No such file
>>>>>>>>> or directory)
>>>>>>>>> stat64("/lib/tls", {st_mode=S_IFDIR|0755,
>>>>>>>>> st_size=17592186044416, ...}) = 0
>>>>>>>>> open("/lib/v5l/fast-mult/half/libncurses.so.5", O_RDONLY) = -1 ENOENT
>>>>>>>>> (No such file or directory)
>>>>>>>>> stat64("/lib/v5l/fast-mult/half", 0xbeb6d1a8) = -1 ENOENT (No such
>>>>>>>>> file or directory)
>>>>>>>>> open("/lib/v5l/fast-mult/libncurses.so.5", O_RDONLY) = -1 ENOENT (No
>>>>>>>>> such file or directory)
>>>>>>>>> stat64("/lib/v5l/fast-mult", 0xbeb6d1a8) = -1 ENOENT (No such file or
>>>>>>>>> directory)
>>>>>>>>> open("/lib/v5l/half/libncurses.so.5", O_RDONLY) = -1 ENOENT (No such
>>>>>>>>> file or directory)
>>>>>>>>> stat64("/lib/v5l/half", 0xbeb6d1a8)     = -1 ENOENT (No such file or
>>>>>>>>> directory)
>>>>>>>>> open("/lib/v5l/libncurses.so.5", O_RDONLY) = -1 ENOENT (No such file
>>>>>>>>> or directory)
>>>>>>>>> stat64("/lib/v5l", 0xbeb6d1a8)          = -1 ENOENT (No such file or
>>>>>>>>> directory)
>>>>>>>>> open("/lib/fast-mult/half/libncurses.so.5", O_RDONLY) = -1 ENOENT (No
>>>>>>>>> such file or directory)
>>>>>>>>> stat64("/lib/fast-mult/half", 0xbeb6d1a8) = -1 ENOENT (No such file or
>>>>>>>>> directory)
>>>>>>>>> open("/lib/fast-mult/libncurses.so.5", O_RDONLY) = -1 ENOENT (No such
>>>>>>>>> file or directory)
>>>>>>>>> stat64("/lib/fast-mult", 0xbeb6d1a8)    = -1 ENOENT (No such file or
>>>>>>>>> directory)
>>>>>>>>> open("/lib/half/libncurses.so.5", O_RDONLY) = -1 ENOENT (No such file
>>>>>>>>> or directory)
>>>>>>>>> stat64("/lib/half", 0xbeb6d1a8)         = -1 ENOENT (No such file or
>>>>>>>>> directory)
>>>>>>>>> open("/lib/libncurses.so.5", O_RDONLY)  = 3
>>>>>>>>> read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0
>>>>>>>>> (\0\1\0\0\0\30\335\0\0004\0\0\0(\22\4\0\2\0\0\0044\0 \0\5\0
>>>>>>>>> (\0\34\0\33\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200l\3\0\200l
>>>>>>>>> \3\0\5\0\0\0\0\200\0\0\1\0\0\0\0p\3\02
>>>>>>>>> fstat64(3, {st_mode=S_IFREG|0744, st_size=17592186044416, ...}) = 0
>>>>>>>>> lseek(3, 224268, SEEK_SET)              = 224268
>>>>>>>>> read(3, "\24\0\0\0T\0\0\0\25\0\0\0MontaVista Software
>>>>>>>>> \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\06
>>>>>>>>> mmap2(NULL, 292240, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
>>>>>>>>> 0) = 0x40020000
>>>>>>>>>                   
>> ...
>>
>> read more ยป
>>     
> >
>   


--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [EMAIL PROTECTED]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to