Showing posts with label cross compile. Show all posts
Showing posts with label cross compile. Show all posts

Apr 19, 2008

warning: `regparm' attribute directive ignored

交叉編譯rt73usb driver的時候,需要指定kernel source路徑

# cd RT73_Linux_STA_Drv1.0.4.0/Module

# make ARCH=arm CROSS_COMPILE=arm-linux-

\KERNDIR=/home2/fyodor/kernel/linux-2.6.25__from__2.6.24.3/

出現了這個警告

warning: `regparm' attribute directive ignored

網路上查到是說

kernel src directory裡面的 include/asm

他是一個link,應該要指向corss compile目標

(在我這個情況就是asm-arm)

如果沒把asm 指到 asm-arm,就會出現這個warning

http://osdir.com/ml/linux.gps/2006-02/msg00049.html

http://linux.chinaunix.net/bbs/archiver/?tid-916672.html

可是我有正確指過去啊....怎麼還是出現這個warning

Mar 29, 2008

交叉編譯usbutils

先編譯 libusb


這是放在arm-linux上,給usbutils使用的library
(libusb-0.1.12\) $ ./configure --host=arm-linux --build=i686-linux --enable-shared \


--prefix=/usr/local/arm/3.4.1/arm-linux


(libusb-0.1.12\) $ make


(libusb-0.1.12\) # make install


主角usbutils


(usbutils-0.73\) $ CC=arm-linux-gcc ./configure --host=arm-linux --build=i686-linux\


--prefix=/home2/fyodor/FileSystem/rootfs/usr

(usbutils-0.73\)  $ make


錯誤:undefined reference to `rpl_malloc'


修改config.h,把 #define malloc rpl_malloc 註解



(usbutils-0.73\)  # make install


 


動態編譯,所以查看需要的library


$ arm-linux-readelf -d ../sbin/lsusb



Dynamic segment at offset 0xf214 contains 21 entries:
  Tag        Type                         Name/Value
0x00000001 (NEEDED)                     Shared library: [libusb-0.1.so.4]
0x00000001 (NEEDED)                     Shared library: [libc.so.6]
0x0000000c (INIT)                       0x8c94
0x0000000d (FINI)                       0x11230
0x00000004 (HASH)                       0x8128
0x00000005 (STRTAB)                     0x8778
0x00000006 (SYMTAB)                     0x8348
0x0000000a (STRSZ)                      683 (bytes)
0x0000000b (SYMENT)                     16 (bytes)
0x00000015 (DEBUG)                      0x0
0x00000003 (PLTGOT)                     0x1f2f8
0x00000002 (PLTRELSZ)                   376 (bytes)
0x00000014 (PLTREL)                     REL
0x00000017 (JMPREL)                     0x8b1c
0x00000011 (REL)                        0x8aec
0x00000012 (RELSZ)                      48 (bytes)
0x00000013 (RELENT)                     8 (bytes)
0x6ffffffe (VERNEED)                    0x8aac
0x6fffffff (VERNEEDNUM)                 1
0x6ffffff0 (VERSYM)                     0x8a24
0x00000000 (NULL)                       0x0



libc之前就已經包進去了


libusb編譯的時候,prefix在 /usr/local/arm/3.4.1/arm-linux


所以libusb-0.1.so.4會在/usr/local/arm/3.4.1/arm-linux/lib


注意一下,其實libusb-0.1.so.4是一個指向libusb-0.1.so.4.4.4 的soft link


把它複製到rootfs/usr/lib,依樣畫葫蘆做個soft link


接著就是重包rootfs.jffs2


 


 


 


執行的時候還是有問題.............悶