uboot移植過程出現的錯誤

來源:互聯網
上載者:User

錯誤一:

main.c:51:error:inline function 'show_boot_progress' cannot be decleared weak

make[1]:***[main.0]錯誤1

make[1]:正在離開目錄'/home/sns/linux2.6.32/icetek-v3/u-boot-orig/common'

make:***[common/libcommon.a]錯誤2

解決方案:去掉show_boot_progress 前面的inline即可

錯誤二:

board.c:127: error: inline function 'coloured_LED_init' cannot be declared weak
board.c:129: error: inline function 'red_LED_on' cannot be declared weak
board.c:131: error: inline function 'red_LED_off' cannot be declared weak
board.c:133: error: inline function 'green_LED_on' cannot be declared weak
board.c:135: error: inline function 'green_LED_off' cannot be declared weak
board.c:137: error: inline function 'yellow_LED_on' cannot be declared weak
board.c:139: error: inline function 'yellow_LED_off' cannot be declared weak
board.c:141: error: inline function 'blue_LED_on' cannot be declared weak
board.c:143: error: inline function 'blue_LED_off' cannot be declared weak
make[1]: *** [board.o] 錯誤 1
make[1]: Leaving directory `/root/workspace/u-boot-2009.08/lib_arm'
make: *** [lib_arm/libarm.a] 錯誤 2

解決方案:

開啟lib_arm/board.c,定位到127行開始,將其注釋掉:

void inline __coloured_LED_init (void) {}
//void inline coloured_LED_init (void) __attribute__((weak, alias("__coloured_LED_init")));
這裡注釋掉了'coloured_LED_init' 的部分,自己做時對照注釋掉後面幾個帶__attribute__的部分即可

 

錯誤三:cpu/arm920t/start.o: In function `start_code':
/root/workspace/u-boot-2009.08/cpu/arm920t/start.S:117: undefined reference to `coloured_LED_init'

/root/workspace/u-boot-2009.08/cpu/arm920t/start.S:118: undefined reference to `red_LED_on'
make: *** [u-boot] 錯誤 1

解決方案:

開啟cpu/arm920t/start.S,搜尋“coloured_LED_init”定位到117行,找到如下代碼:

     bl coloured_LED_init
            bl red_LED_on

這兩行是AT91RM9200DK開發板的LED初始化,注釋掉即可。

有了mkfs.ubifs,就可以製作UBIFS鏡像了,具體步驟如下:

1. 使用mkfs.ubifs命令將某個檔案夾製作為UBIFS鏡像,具體命令為:

 

  1. mkfs.ubifs -r/tmp/rootfs-m 2048 -e 126976-c 992 -o ubifs.img

以上命令的含義為將/tmp/rootfs檔案夾製作為UBIFS檔案系統鏡像,輸出的鏡像名為ubifs.img,-m參數指定了最小的I/O操作的大小,也就是NAND FLASH一個page的大小,-e參數指定了邏輯擦除快的大小,-c指定了最大的邏輯塊號。

通過此命令製作的出的UBIFS檔案系統鏡像可在u-boot下使用ubi write命令燒寫到NAND FLASH上。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.