[loongson-dev] Re: ioctl(fd, ASHMEM_SET_SIZE, size) failed

2011-12-12 Thread 李晖
hi, zhangfx
thank you for your tips. By implementing a compact_ioctl function, I
have succeed solved this problem(At least not reporting error if not
solved it).

On 12月11日, 下午11时37分, zhangfx  wrote:
> If you are using 64bit kernel,you need to handle the 32 bit ioctl. Ioctl 
> number often related to a type size,while the same type might have different 
> size for 32bit usrrland and 64bit kernal,so we often need compact_ioctl to 
> translate. Lots of samples in drivers.
> 李晖 编写:
> hi,all I am porting android to loongson2f, but when I boot the system, the 
> kernel panic, by adding printf statement, I found that when the android file 
> system init the ashmem failed. The following is the calling path of init 
> program: main ->property_ini t->init_property_area ->init_workspace -> 
> ashmem_create_region ->ioctl(fd, ASHMEM_SET_SIZE, size) the implementation of 
> ashmem_create_region function is in system/core/ libcutils/ashmem-dev.c the 
> default size param of ioctl is 32768, and the linux kernel page size is 16k 
> (16384), so, I change the size param to 16384, but this function failed 
> again. did anyone come across this problem, any idea or information is 
> appreciated! andy -- You received this message because you are subscribed to 
> the Google Groups "loongson-dev" group. To post to this group, send email to 
> loongson-dev@googlegroups.com. To unsubscribe from this group, send email to 
> loongson-dev+unsubscr...@googlegroups.com. For more options, visit this group 
> at http://groups.google.com/group/loongson-dev?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"loongson-dev" group.
To post to this group, send email to loongson-dev@googlegroups.com.
To unsubscribe from this group, send email to 
loongson-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/loongson-dev?hl=en.



[loongson-dev] Re: ioctl(fd, ASHMEM_SET_SIZE, size) failed

2011-12-12 Thread 李晖
currently, I don't have 32bit gcc on hand, can you upload an 32bit
version to the community if convenient, thank you !

On 12月12日, 下午2时51分, Zhen Xin  wrote:
> Android needs the kernel be 32bit.
>
> 在 2011年12月11日 下午11:37,zhangfx  写道:
>
>
>
>
>
>
>
>
>
> > If you are using 64bit kernel,you need to handle the 32 bit ioctl. Ioctl
> > number often related to a type size,while the same type might have different
> > size for 32bit usrrland and 64bit kernal,so we often need compact_ioctl to
> > translate. Lots of samples in drivers.
>
> > 李晖 编写:
>
> > hi,all I am porting android to loongson2f, but when I boot the system, the
> > kernel panic, by adding printf statement, I found that when the android file
> > system init the ashmem failed. The following is the calling path of init
> > program: main ->property_ini t->init_property_area ->init_workspace ->
> > ashmem_create_region ->ioctl(fd, ASHMEM_SET_SIZE, size) the implementation
> > of ashmem_create_region function is in system/core/ libcutils/ashmem-dev.c
> > the default size param of ioctl is 32768, and the linux kernel page size is
> > 16k (16384), so, I change the size param to 16384, but this function failed
> > again. did anyone come across this problem, any idea or information is
> > appreciated! andy -- You received this message because you are subscribed to
> > the Google Groups "loongson-dev" group. To post to this group, send email to
> > loongson-dev@googlegroups.com. To unsubscribe from this group, send email to
> > loongson-dev+unsubscr...@googlegroups.com. For more options, visit this
> > group athttp://groups.google.com/group/loongson-dev?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "loongson-dev" group.
> > To post to this group, send email to loongson-dev@googlegroups.com.
> > To unsubscribe from this group, send email to
> > loongson-dev+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/loongson-dev?hl=en.
>
> --https://fedoraproject.org/wiki/User:Lonestar

-- 
You received this message because you are subscribed to the Google Groups 
"loongson-dev" group.
To post to this group, send email to loongson-dev@googlegroups.com.
To unsubscribe from this group, send email to 
loongson-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/loongson-dev?hl=en.



[loongson-dev] Re: ioctl(fd, ASHMEM_SET_SIZE, size) failed

2011-12-12 Thread 李晖
Currently, the init program runs into the for deadline, but the eth is
down, so init can not communicate with other process, so the for
statement loops some time and the machine reboot!

On 12月12日, 下午2时59分, Zhen Xin  wrote:
> Android needs the kernel be 32bit.
>
> 在 2011年12月11日 下午11:37,zhangfx  写道:
>
>
>
>
>
>
>
>
>
> > If you are using 64bit kernel,you need to handle the 32 bit ioctl. Ioctl
> > number often related to a type size,while the same type might have different
> > size for 32bit usrrland and 64bit kernal,so we often need compact_ioctl to
> > translate. Lots of samples in drivers.
>
> > 李晖 编写:
>
> > hi,all I am porting android to loongson2f, but when I boot the system, the
> > kernel panic, by adding printf statement, I found that when the android file
> > system init the ashmem failed. The following is the calling path of init
> > program: main ->property_ini t->init_property_area ->init_workspace ->
> > ashmem_create_region ->ioctl(fd, ASHMEM_SET_SIZE, size) the implementation
> > of ashmem_create_region function is in system/core/ libcutils/ashmem-dev.c
> > the default size param of ioctl is 32768, and the linux kernel page size is
> > 16k (16384), so, I change the size param to 16384, but this function failed
> > again. did anyone come across this problem, any idea or information is
> > appreciated! andy -- You received this message because you are subscribed to
> > the Google Groups "loongson-dev" group. To post to this group, send email to
> > loongson-dev@googlegroups.com. To unsubscribe from this group, send email to
> > loongson-dev+unsubscr...@googlegroups.com. For more options, visit this
> > group athttp://groups.google.com/group/loongson-dev?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "loongson-dev" group.
> > To post to this group, send email to loongson-dev@googlegroups.com.
> > To unsubscribe from this group, send email to
> > loongson-dev+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/loongson-dev?hl=en.
>
> --https://fedoraproject.org/wiki/User:Lonestar

-- 
You received this message because you are subscribed to the Google Groups 
"loongson-dev" group.
To post to this group, send email to loongson-dev@googlegroups.com.
To unsubscribe from this group, send email to 
loongson-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/loongson-dev?hl=en.



Re: [loongson-dev] Re: ioctl(fd, ASHMEM_SET_SIZE, size) failed

2011-12-12 Thread Zhen Xin
The init should then launch the shell and others following the
instructions from /init.rc.

Anyway, that's not a longson-specific issue anymore ^_^ . Fiddle with
your android and be happy ^_^ .

在 2011年12月13日 上午12:30,李晖  写道:
> Currently, the init program runs into the for deadline, but the eth is
> down, so init can not communicate with other process, so the for
> statement loops some time and the machine reboot!
>
> On 12月12日, 下午2时59分, Zhen Xin  wrote:
>> Android needs the kernel be 32bit.
>>
>> 在 2011年12月11日 下午11:37,zhangfx  写道:
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> > If you are using 64bit kernel,you need to handle the 32 bit ioctl. Ioctl
>> > number often related to a type size,while the same type might have 
>> > different
>> > size for 32bit usrrland and 64bit kernal,so we often need compact_ioctl to
>> > translate. Lots of samples in drivers.
>>
>> > 李晖 编写:
>>
>> > hi,all I am porting android to loongson2f, but when I boot the system, the
>> > kernel panic, by adding printf statement, I found that when the android 
>> > file
>> > system init the ashmem failed. The following is the calling path of init
>> > program: main ->property_ini t->init_property_area ->init_workspace ->
>> > ashmem_create_region ->ioctl(fd, ASHMEM_SET_SIZE, size) the implementation
>> > of ashmem_create_region function is in system/core/ libcutils/ashmem-dev.c
>> > the default size param of ioctl is 32768, and the linux kernel page size is
>> > 16k (16384), so, I change the size param to 16384, but this function failed
>> > again. did anyone come across this problem, any idea or information is
>> > appreciated! andy -- You received this message because you are subscribed 
>> > to
>> > the Google Groups "loongson-dev" group. To post to this group, send email 
>> > to
>> > loongson-dev@googlegroups.com. To unsubscribe from this group, send email 
>> > to
>> > loongson-dev+unsubscr...@googlegroups.com. For more options, visit this
>> > group athttp://groups.google.com/group/loongson-dev?hl=en.
>>
>> > --
>> > You received this message because you are subscribed to the Google Groups
>> > "loongson-dev" group.
>> > To post to this group, send email to loongson-dev@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > loongson-dev+unsubscr...@googlegroups.com.
>> > For more options, visit this group at
>> >http://groups.google.com/group/loongson-dev?hl=en.
>>
>> --https://fedoraproject.org/wiki/User:Lonestar
>
> --
> You received this message because you are subscribed to the Google Groups 
> "loongson-dev" group.
> To post to this group, send email to loongson-dev@googlegroups.com.
> To unsubscribe from this group, send email to 
> loongson-dev+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/loongson-dev?hl=en.
>



-- 
https://fedoraproject.org/wiki/User:Lonestar

-- 
You received this message because you are subscribed to the Google Groups 
"loongson-dev" group.
To post to this group, send email to loongson-dev@googlegroups.com.
To unsubscribe from this group, send email to 
loongson-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/loongson-dev?hl=en.