[Cbe-oss-dev] camera to run on a Fedora Core 6 on PS3?

Daichi Furusaka furusaka at fixstars.com
Mon Jun 4 18:12:51 EST 2007


Hi KingLJ

I figure out the reason why gspca is not built properly.
The reason is so simple.  Makefile'rule is incorrect.

This makefile is assumed that kernel objects are built on 32bit.
But ps3linux kernel is built on powerpc64.  So the appropriate compiler
option (-m64) is needed.

Please edit Makefile as follows:

----
@@ -41,7 +41,7 @@
 MODULE_INSTALLDIR2 = /lib/modules/$(KERNEL_VERSION)/kernel/drivers/media/video/

 default:
-       $(MAKE) -C $(KERNELDIR) SUBDIRS=$(PWD) CC=$(CC) modules
+       $(MAKE) -C $(KERNELDIR) SUBDIRS=$(PWD) modules

 install:
        mkdir -p $(MODULE_INSTALLDIR)
----

It will resolve your problem.

----
Daichi
Fixstars Corporation

On Fri, 25 May 2007 11:57:14 +0800 (CST)
KINGLJ <kinglj1023 at yahoo.com.cn> wrote:

> I'm trying to adapt camera to run on a Fedora Core 6 installation on a
>
> Playstation 3:
>
> # uname -a
>
> Linux localhost.localdomain 2.6.16 #1 SMP Wed Nov 8 07:25:31 JST 2006 ppc64
>
> ppc64 ppc64 GNU/Linux
>
> #yum install kernel-devel.ppc64
>
> But the kernel-devel.ppc64 is 2.6.18-1.2798.fc6, not 2.6.16
>
> I downloaded the drive gspcav1-20070508 from http://mxhaard.free.fr/
>
> root at localhost gspcav1-20070508]# make
> make -C /lib/modules/`uname -r`/build SUBDIRS=/root/Desktop/gspcav1-20070508 CC=cc
> modules
> make[1]: Entering directory `/usr/src/kernels/2.6.18-1.2798.fc6-ppc64'
>   CC [M]  /root/Desktop/gspcav1-20070508/gspca_core.o
> In file included from include/asm/paca.h:21,
>                  from include/asm/spinlock.h:23,
>                  from include/linux/spinlock.h:86,
>                  from include/linux/capability.h:45,
>                  from include/linux/sched.h:44,
>                  from include/linux/module.h:9,
>                  from /root/Desktop/gspcav1-20070508/gspca_core.c:39:
> include/asm/mmu.h: In function 。ョhpte_encode_r。ッ:
> include/asm/mmu.h:212: warning: integer constant is too large for 。ョunsigned long
> 。ッ type
> include/asm/mmu.h: In function 。ョhpt_hash。ッ:
> include/asm/mmu.h:227: warning: integer constant is too large for 。ョunsigned long
> 。ッ type
> include/asm/mmu.h: In function 。ョvsid_scramble。ッ:
> include/asm/mmu.h:393: warning: right shift count >= width of type
> include/asm/mmu.h:393: warning: left shift count >= width of type
> include/asm/mmu.h:394: warning: right shift count >= width of type
> include/asm/mmu.h:394: warning: left shift count >= width of type
> include/asm/mmu.h: In function 。ョget_kernel_vsid。ッ:
> include/asm/mmu.h:401: error: 。ョSID_SHIFT。ッ undeclared (first use in this
> function)
> include/asm/mmu.h:401: error: (Each undeclared identifier is reported only once
> include/asm/mmu.h:401: error: for each function it appears in.)
> include/asm/mmu.h: In function 。ョget_vsid。ッ:
> include/asm/mmu.h:408: error: 。ョSID_SHIFT。ッ undeclared (first use in this
> function)
> In file included from include/asm/spinlock.h:25,
>                  from include/linux/spinlock.h:86,
>                  from include/linux/capability.h:45,
>                  from include/linux/sched.h:44,
>                  from include/linux/module.h:9,
>                  from /root/Desktop/gspcav1-20070508/gspca_core.c:39:
> include/asm/iseries/hv_call.h: In function 。ョHvCall_setVirtualDecr。ッ:
> include/asm/iseries/hv_call.h:85: warning: integer constant is too large for
> 。ョunsigned long。ッ type
> include/asm/iseries/hv_call.h: In function 。ョHvCall_yieldProcessor。ッ:
> include/asm/iseries/hv_call.h:90: warning: integer constant is too large for
> 。ョunsigned long。ッ type
> include/asm/iseries/hv_call.h: In function 。ョHvCall_setEnabledInterrupts。ッ:
> include/asm/iseries/hv_call.h:95: warning: integer constant is too large for
> 。ョunsigned long。ッ type
> include/asm/iseries/hv_call.h: In function 。ョHvCall_setLogBufferFormatAndCodepage
> 。ッ:
> include/asm/iseries/hv_call.h:101: warning: integer constant is too large for
> 。ョunsigned long。ッ type
> include/asm/iseries/hv_call.h: In function 。ョHvCall_sendIPI。ッ:
> include/asm/iseries/hv_call.h:108: warning: integer constant is too large for
> 。ョunsigned long。ッ type
> In file included from /root/Desktop/gspcav1-20070508/gspca_core.c:42:
> include/linux/fs.h: At top level:
> include/linux/fs.h:779: warning: 。ョstruct flock64。ッ declared inside parameter
> list
> include/linux/fs.h:779: warning: its scope is only this definition or declaration,
> which is probably not what you want
> include/linux/fs.h:781: warning: 。ョstruct flock64。ッ declared inside parameter
> list
> In file included from include/linux/mm.h:39,
>                  from /root/Desktop/gspcav1-20070508/gspca_core.c:46:
> include/asm/pgtable.h:42:50: warning: "SID_SHIFT" is not defined
> include/asm/pgtable.h:43:2: error: #error TASK_SIZE_USER64 exceeds user VSID
> range
> In file included from include/linux/mm.h:39,
>                  from /root/Desktop/gspcav1-20070508/gspca_core.c:46:
> include/asm/pgtable.h: In function 。ョpfn_pte。ッ:
> include/asm/pgtable.h:175: warning: left shift count >= width of type
> include/asm/pgtable.h: In function 。ョfind_linux_pte。ッ:
> include/asm/pgtable.h:512: warning: right shift count >= width of type
> In file included from include/asm/pgtable.h:524,
>                  from include/linux/mm.h:39,
>                  from /root/Desktop/gspcav1-20070508/gspca_core.c:46:
> include/asm-generic/pgtable.h: In function 。ョpud_none_or_clear_bad。ッ:
> include/asm-generic/pgtable.h:216: warning: integer constant is too large for
> 。ョunsigned long。ッ type
> include/asm-generic/pgtable.h:216: warning: comparison is always false due to
> limited range of data type
> include/asm-generic/pgtable.h: In function 。ョpmd_none_or_clear_bad。ッ:
> include/asm-generic/pgtable.h:227: warning: integer constant is too large for
> 。ョunsigned long。ッ type
> include/asm-generic/pgtable.h:227: warning: comparison is always false due to
> limited range of data type
> In file included from /root/Desktop/gspcav1-20070508/gspca_core.c:46:
> include/linux/mm.h:462:2: error: #error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH >
> ;
> FLAGS_RESERVED
> In file included from /root/Desktop/gspcav1-20070508/gspca_core.c:46:
> include/linux/mm.h: In function 。ョlowmem_page_address。ッ:
> include/linux/mm.h:535: warning: integer constant is too large for 。ョunsigned long
> 。ッ type
> include/linux/mm.h:535: warning: cast to pointer from integer of different size
> In file included from include/linux/pagemap.h:12,
>                  from /root/Desktop/gspcav1-20070508/gspca_core.c:51:
> include/asm/uaccess.h: In function 。ョcopy_from_user。ッ:
> include/asm/uaccess.h:314: warning: integer constant is too large for 。ョunsigned
> long。ッ type
> include/asm/uaccess.h:314: warning: integer constant is too large for 。ョunsigned
> long。ッ type
> include/asm/uaccess.h:315: warning: integer constant is too large for 。ョunsigned
> long。ッ type
> include/asm/uaccess.h:315: warning: integer constant is too large for 。ョunsigned
> long。ッ type
> include/asm/uaccess.h: In function 。ョcopy_to_user。ッ:
> include/asm/uaccess.h:329: warning: integer constant is too large for 。ョunsigned
> long。ッ type
> include/asm/uaccess.h:329: warning: integer constant is too large for 。ョunsigned
> long。ッ type
> include/asm/uaccess.h:330: warning: integer constant is too large for 。ョunsigned
> long。ッ type
> include/asm/uaccess.h:330: warning: integer constant is too large for 。ョunsigned
> long。ッ type
> include/asm/uaccess.h: In function 。ョclear_user。ッ:
> include/asm/uaccess.h:424: warning: integer constant is too large for 。ョunsigned
> long。ッ type
> include/asm/uaccess.h:424: warning: integer constant is too large for 。ョunsigned
> long。ッ type
> include/asm/uaccess.h:425: warning: integer constant is too large for 。ョunsigned
> long。ッ type
> include/asm/uaccess.h:425: warning: integer constant is too large for 。ョunsigned
> long。ッ type
> In file included from /root/Desktop/gspcav1-20070508/gspca_core.c:51:
> include/linux/pagemap.h: In function 。ョfault_in_pages_writeable。ッ:
> include/linux/pagemap.h:203: warning: integer constant is too large for 。ョunsigned
> long。ッ type
> include/linux/pagemap.h:203: warning: comparison is always false due to limited
> range of data type
> include/linux/pagemap.h:213: warning: integer constant is too large for 。ョunsigned
> long。ッ type
> include/linux/pagemap.h:213: warning: comparison is always false due to limited
> range of data type
> include/linux/pagemap.h: In function 。ョfault_in_pages_readable。ッ:
> include/linux/pagemap.h:223: warning: integer constant is too large for 。ョunsigned
> long。ッ type
> include/linux/pagemap.h:223: warning: comparison is always false due to limited
> range of data type
> include/linux/pagemap.h:229: warning: integer constant is too large for 。ョunsigned
> long。ッ type
> include/linux/pagemap.h:229: warning: comparison is always false due to limited
> range of data type
> In file included from /root/Desktop/gspcav1-20070508/gspca_core.c:53:
> include/asm/io.h: In function 。ョvirt_to_phys。ッ:
> include/asm/io.h:232: warning: integer constant is too large for 。ョunsigned long。ッ
> type
> include/asm/io.h: In function 。ョphys_to_virt。ッ:
> include/asm/io.h:249: warning: integer constant is too large for 。ョunsigned long。ッ
> type
> include/asm/io.h:249: warning: cast to pointer from integer of different size
> /root/Desktop/gspcav1-20070508/gspca_core.c: In function 。ョkvirt_to_pa。ッ:
> /root/Desktop/gspcav1-20070508/gspca_core.c:836: warning: integer constant is too
> large for 。ョunsigned long。ッ type
> make[2]: *** [/root/Desktop/gspcav1-20070508/gspca_core.o] Error 1
> make[1]: *** [_module_/root/Desktop/gspcav1-20070508] Error 2
> make[1]: Leaving directory `/usr/src/kernels/2.6.18-1.2798.fc6-ppc64'
> make: *** [default] Error 2
>
>
> Can anybody give me any hints what might be done to correct these compiling
> problems?
>
>
>
> ---------------------------------
>  Mp3キ霑qヒム-ミツク霾ネク雕゜ヒルマツ








More information about the cbe-oss-dev mailing list