前幾天編譯uboot時(shí)遇到一些問題,先記錄一下,linux嵌入式開發(fā)還是蠻意思的,要想玩的溜,就必須掌握最基本的uboot、kernel移植、適配、裁剪。
二 編譯uboot
2.1 解壓uboot源碼以及交叉編譯器到root目錄
cd ~
tar xvf bb-black-debian-u-boot.tar.bz2
tar xf gcc-linaro-arm-linux-gnueabihf-4.8-2014.03_linux.tar.xz
2.2 安裝交叉編譯器
gedit /etc/profile
在最后一行加入環(huán)境變量
export PATH=$PATH:~/gcc-linaro-arm-linux-gnueabihf-4.8-2014.03_linux/bin/
使配置生效
source /etc/profile
2.3 查看版本
arm-linux-gnueabihf-gcc -v
這里會(huì)報(bào)錯(cuò)
bash: /...-gcc: No such file or directory
沒人任何提示信息,讓人摸不著頭腦,搜索這個(gè)問題,發(fā)現(xiàn)是少了庫(kù),于是
apt-get install lib32z1
又報(bào)錯(cuò)了
error while loading shared libraries:
libstdc++.so.6: cannot open shared object file:
No such file or directory
這次報(bào)錯(cuò)倒是有提示信息,這樣就簡(jiǎn)單了,安裝缺少的庫(kù)就可以了
apt-get install libstdc++6
apt-get install lib32stdc++6
2.4 編譯uboot
cd ~
cd u-boot
make ARCH=arm CROSS_COMPILE=${CC} distclean //清理
make ARCH=arm CROSS_COMPILE=${CC} am335x_evm_config //配置
make ARCH=arm CROSS_COMPILE=${CC} //編譯輸
編譯成功
2.5 燒錄測(cè)試
2.5.1 接上串口線
2.5.2 復(fù)制鏡像文件到SD卡,從SD卡啟動(dòng),log如下:
U-Boot 2014.04-rc3 (Aug 17 2022 - 20:55:03)
I2C: ready
DRAM: 512 MiB
NAND: 0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment
Net: ethaddr > not set. Validating first E-fuse MAC
cpsw, usb_ether
Warning: Your board does not use generic board. Please read
doc/README.generic-board and take action. Boards not
upgraded by the late 2014 may break or be removed.
Hit any key to stop autoboot: 0
U-Boot#
U-Boot# version
U-Boot 2014.04-rc3 (Aug 17 2022 - 20:55:03)
arm-linux-gnueabihf-gcc (crosstool-NG linaro-1.13.1-4.8-2014.03 - Linaro GCC 2014.03) 4.8.3 20140303 (prerelease)
GNU ld (crosstool-NG linaro-1.13.1-4.8-2014.03 - Linaro GCC 2014.03) 2.24.0.20140311 Linaro 2014.03
U-Boot#
-
嵌入式系統(tǒng)
+關(guān)注
關(guān)注
41文章
3625瀏覽量
129765 -
Linux系統(tǒng)
+關(guān)注
關(guān)注
4文章
596瀏覽量
27510 -
SD卡
+關(guān)注
關(guān)注
2文章
566瀏覽量
64118 -
Uboot
+關(guān)注
關(guān)注
4文章
125瀏覽量
28351 -
交叉編譯器
+關(guān)注
關(guān)注
0文章
10瀏覽量
7583
發(fā)布評(píng)論請(qǐng)先 登錄
相關(guān)推薦
Ubuntu系統(tǒng)下編譯OpenCV4.8源碼記錄

請(qǐng)教一下uboot下的網(wǎng)卡驅(qū)動(dòng)程序
【LOFT-Q試用】編譯環(huán)境搭建 和 編譯uboot
【Rico Board試用體驗(yàn)】uboot和、內(nèi)核編譯和燒錄
記錄一下arm裸板編程出現(xiàn)的問題
iTOP4412精英版Ubuntu16.04系統(tǒng)編譯uboot
uboot2012配置編譯后USB串口無輸出是怎么回事?
uboot編譯出來不能用該怎么辦?
按照手冊(cè)中uboot編譯方法報(bào)錯(cuò)怎么解決?
簡(jiǎn)單看一下鴻蒙系統(tǒng)中u-boot代碼的編譯步驟流程
簡(jiǎn)單分析一下rk3399-uboot的源碼
用OK_MX6X_C_V1.1開發(fā)板移植一下新的Uboot出錯(cuò)是什么原因
uboot編譯過程詳細(xì)分析
AM335x UBOOT移植編譯命令詳細(xì)概述

評(píng)論