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
>>>>> mprotect(0x40057000, 66960, PROT_NONE)  = 0
>>>>> mmap2(0x40058000, 61440, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
>>>>> MAP_DENYWRITE, 3, 0x30) = 0x40058000
>>>>> mmap2(0x40067000, 1424, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
>>>>> MAP_ANONYMOUS, -1, 0) = 0x40067000
>>>>> close(3)                                = 0
>>>>> open("/lib/tls/libdl.so.2", 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\324\t
>>>>> \0\0004\0\0\0\374\235\0\0\2\0\0\0044\0 \0\10\0(\0)\0&
>>>>> \0\6\0\0\0004\0\0\0004\0\0\0004\0\0\0\0\1\0\0\0\1\0\0\5\0\0\0\4\0\0\0\3\0\0\0\4\23\0\2
>>>>> fstat64(3, {st_mode=S_IFREG|0644, st_size=17592186044416, ...}) = 0
>>>>> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
>>>>> 0) = 0x40017000
>>>>> lseek(3, 4892, SEEK_SET)                = 4892
>>>>> 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, 41104, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
>>>>> 0) = 0x40068000
>>>>> mprotect(0x4006a000, 32912, PROT_NONE)  = 0
>>>>> mmap2(0x40070000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
>>>>> MAP_DENYWRITE, 3, 0) = 0x40070000
>>>>> close(3)                                = 0
>>>>> open("/lib/tls/libc.so.6", 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\0107\1\0004\0\0\0\364fK\0\2\0\0\0044\0 \0\v\0(\0R\0O
>>>>> \0\1\0\0p
>>>>> \274\276\17\0\274\276\17\0\274\276\17\0\20\23\0\0\20\23\0\0\4\0\0\0\4\0\0\0\6\0\0\2
>>>>> fstat64(3, {st_mode=S_IFREG|0755, st_size=17592186044416, ...}) = 0
>>>>> lseek(3, 1039100, SEEK_SET)             = 1039100
>>>>> 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, 1091588, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
>>>>> 3, 0) = 0x40073000
>>>>> mprotect(0x40171000, 51204, PROT_NONE)  = 0
>>>>> mmap2(0x40173000, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
>>>>> MAP_DENYWRITE, 3, 0xf8) = 0x40173000
>>>>> mmap2(0x4017c000, 6148, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
>>>>> MAP_ANONYMOUS, -1, 0) = 0x4017c000
>>>>> close(3)                                = 0
>>>>> mprotect(0x40178000, 8192, PROT_READ)   = 0
>>>>> mprotect(0x40071000, 4096, PROT_READ)   = 0
>>>>> mprotect(0x4001e000, 4096, PROT_READ)   = 0
>>>>> syscall_983045(0x40017d10, 0x2, 0x1, 0x4001f050, 0, 0x4001f050,
>>>>> 0x4001f3c8, 0, 0x4001f0a0, 0x4001f050, 0x4001f000, 0xbeb6d95c, 0,
>>>>> 0xbeb6d840, 0x40002784, 0x400102e4, 0x80000010, 0x40017d10, 0xd0b0, 00
>>>>> rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
>>>>> open("/dev/tty", O_RDWR|O_NONBLOCK|O_LARGEFILE) = 3
>>>>> close(3)                                = 0
>>>>> brk(0)                                  = 0xab000
>>>>> brk(0xac000)                            = 0xac000
>>>>> brk(0xad000)                            = 0xad000
>>>>> getuid32()                              = 0
>>>>> getgid32()                              = 0
>>>>> geteuid32()                
>>>>>           
>> ...
>>
>> read more ยป
>>     
> >
>   


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

Reply via email to