export_module 꼭이요!
글쓴이: iimec2 / 작성시간: 수, 2005/08/31 - 1:34오전
void reg_write32(struct isp1762_dev *dev,__u16 reg,__u32 data) { /* Write the 32bit to the register address given to us*/ writel(data,dev->baseaddress+reg); }/*Endof write32 */ __u32 reg_read32(struct isp1762_dev *dev,__u16 reg,__u32 data) { data = readl(dev->baseaddress + reg); return data; }/*End of reg_read32 */ __u16 reg_read16(struct isp1762_dev *dev,__u16 reg,__u16 data) { data = readw(dev->baseaddress+reg); return data; } void reg_write16(struct isp1762_dev *dev,__u16 reg,__u16 data) { writew(data,dev->baseaddress+reg); } __u8 reg_read8(struct isp1762_dev *dev,__u16 reg,__u8 data) { data = readb(dev->baseaddress+reg); return data; } void reg_write8(struct isp1762_dev *dev,__u16 reg,__u8 data) { writeb(data,dev->baseaddress+reg); }/
이런 함수가 있고요..
이 파일에 마지막에
EXPORT_SYMBOL(reg_write16); EXPORT_SYMBOL(reg_read16); EXPORT_SYMBOL(reg_read32); EXPORT_SYMBOL(reg_write32);
EXPORT 하는 부분이 있는데
컴파일 하면
다음과 같은 에러가 나는데 ..어떻게 해야 할까요?
알려주세요!꼭이요!!!!
reg.c: At top level: reg.c:1156: parse error before `this_object_must_be_defined_as_export_objs_in_the_Makefile' reg.c:1156: warning: type defaults to `int' in declaration of `this_object_must_be_defined_as_export_objs_in_the_Makefile' reg.c:1156: warning: data definition has no type or storage class reg.c:1157: parse error before `this_object_must_be_defined_as_export_objs_in_the_Makefile' reg.c:1157: warning: type defaults to `int' in declaration of `this_object_must_be_defined_as_export_objs_in_the_Makefile' reg.c:1157: warning: data definition has no type or storage class reg.c:1158: parse error before `this_object_must_be_defined_as_export_objs_in_the_Makefile' reg.c:1158: warning: type defaults to `int' in declaration of `this_object_must_be_defined_as_export_objs_in_the_Makefile' reg.c:1158: warning: data definition has no type or storage class reg.c:1159: parse error before `this_object_must_be_defined_as_export_objs_in_the_Makefile' reg.c:1159: warning: type defaults to `int' in declaration of `this_object_must_be_defined_as_export_objs_in_the_Makefile' reg.c:1159: warning: data definition has no type or storage class reg.c:1160: parse error before `this_object_must_be_defined_as_export_objs_in_the_Makefile' reg.c:1160: warning: type defaults to `int' in declaration of `this_object_must_be_defined_as_export_objs_in_the_Makefile' reg.c:1160: warning: data definition has no type or storage class reg.c:1161: parse error before `this_object_must_be_defined_as_export_objs_in_the_Makefile' reg.c:1161: warning: type defaults to `int' in declaration of `this_object_must_be_defined_as_export_objs_in_the_Makefile' reg.c:1161: warning: data definition has no type or storage class reg.c:1162: parse error before `this_object_must_be_defined_as_export_objs_in_the_Makefile' reg.c:1162: warning: type defaults to `int' in declaration of `this_object_must_be_defined_as_export_objs_in_the_Makefile' regc:1162: warning: data definition has no type or storage class reg.c:1163: parse error before `this_object_must_be_defined_as_export_objs_in_the_Makefile' reg.c:1163: warning: type defaults to `int' in declaration of `this_object_must_be_defined_as_export_objs_in_the_Makefile' reg.c:1163: warning: data definition has no type or storage class reg.c:1164: parse error before `this_object_must_be_defined_as_export_objs_in_the_Makefile' reg.c:1164: warning: type defaults to `int' in declaration of `this_object_must_be_defined_as_export_objs_in_the_Makefile' reg.c:1164: warning: data definition has no type or storage class reg.c:1165: parse error before `this_object_must_be_defined_as_export_objs_in_the_Makefile' reg.c:1165: warning: type defaults to `int' in declaration of `this_object_must_be_defined_as_export_objs_in_the_Makefile' reg.c:1165: warning: data definition has no type or storage class
Forums:
export-objs 에 추가하세요..
2.4 대의 커널인가요?
Makefile 에서 export-objs 항목에 reg.o 를 추가하세요.
없으면 만들어 주시면 됩니다.
^^:
export-objs 에 reg.o를 하고 싶지만
커널 컴파일 해서 make modules 하면 reg.o가 나오거든요..
그런데 make modules 하면 위에 같은 에러가 나오니까..
어떻게 해야될지..
Makefile 을 보여주세요..
Makefile 을 보여주시면 도움이 될지도 모르겠군요..
이게 make파일입니다.
makefile입니다.
이상하군요..
커널에 포함되지 않는 별도의 Makefile 로 관리하시는 것 같네요.
EXPORT_SYMTAB 이 정의되어 있는데도 위와 같은 에러 메시지가 나오는 건 좀 이상하군요..
뭔가 내부적으로 빠진 부분이 있을수도 있으니
커널에서 사용하는 방식의 Makefile 을 아래와 같이 작성하셔서 컴파일 해보시기 바랍니다.
reg.c 파일이 drivers/misc 밑에 있다고 가정하면 다음과 같이 해보세요.
nn;
네 커널에 포함되지 않은 makefile입니다. 보드에 포팅하려고 하는데
보드에 커널에서 제공하지 않는 드라이버를 사용해야 되기 때문에 이 드라이버를 추가 시켜서 컴파일 해야합니다. 소스는 제공되었구요..makefile또한 위와 같습니다. 처음에는 많은 에러가 있었는데,, 이제는 이것만 해결하면 되는데 잘 안되네요..
댓글 달기