2017-08-04 141 views
0

我正在爲yocto-project創建BBB.B的圖像。我克隆了項目git clone -b pyro git://git.yoctoproject.org/poky,然後啓動了構建過程。用bitbake core-image-sato烤制它,並獲得帶有文件的構建目錄。Beaglebone Black無法啓動yocto-image

我在SD卡上創建了2個分區,其中64M用於root,其餘用於啓動(15 + GB)。 複製MLO and u-boot-beaglebone.imgroot partition

未啓動根分區上的core-image-sato-beaglebone.tar.bz2,然後在啓動分區下複製zImage-beaglebone.bin, zImage-am335x-bone.dtb, zImage-am335x-boneblack.dtb

當我試圖啓動BBB發現u-boot預計uEnv.txt並卡住那裏。 yocto build目錄沒有任何uEnv.txt,那麼如何編寫自己的uEnv.txt?這是u-boot提示符。 Hit any key to stop autoboot: 0 gpio: pin 53 (gpio 53) value is 1 mmc0 is current device micro SD card found mmc0 is current device gpio: pin 54 (gpio 54) value is 1 SD/MMC found on device 0 reading uEnv.txt ** Unable to read file uEnv.txt ** gpio: pin 55 (gpio 55) value is 1 ** File not found /boot/uImage ** U-Boot# 我加uEnv​​.txt在根分區與文本 mmcdev=0 mmcpart=1 bootpart=0:1 這一次的u-boot嘗試從/boot目錄讀取一個uImage,但我有zImage什麼衝突呢?我應該如何解決它?

SD/MMC found on device 0 reading uEnv.txt 32 bytes read in 4 ms (7.8 KiB/s) Loaded environment from uEnv.txt Importing environment from mmc ... gpio: pin 55 (gpio 55) value is 1 reading /boot/uImage ** Unable to read file /boot/uImage ** U-Boot#

+0

https://unix.stackexchange.com/questions/122526/how-to-convert-a-zimage -into-uimage-for-boot-with-u-boot – h0ch5tr4355

+0

@ h0ch5tr4355所以你的意思是說它必須在uImage中轉換zImage並且u-Boot不能加載zImages? 那麼'zImage-am335x-boneblack.dtb,zImage-am335x-bone.dtb,zImage-beaglebone.bin'還需要轉換它們嗎? – user7345878

+0

我遵循上面鏈接中提到的步驟。這次U-BOOT進去一個無限循環,同時讀取的uImage'數據中止 PC:[<9f376478>] LR:<9f35a494>] SP:9f238060 IP:9f238090 FP:00000da1 R10:00000080 R9:00000200 R8:9f238f40 R7 :00000000 R6:00564a00 R5:00000020 R4:48060100 R3:00000000 R2:56190527個R1:R0 00000da2:00000001 標誌:在模式SVC_32 NZCV的IRQ關閉使得FIQ復位CPU ... 復位...... ' – user7345878

回答

1

看來的U-boot是不是能夠找到uEnv.txt文件。嘗試這些配置。您可能需要根據您的環境修改一些配置。

sudo vim uEnv.txt

kernel_file=zImage 
bootdir=/boot 
mmcdev=0 
mmcpart=2 
loadzimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootdir}/${kernel_file} 
loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdtaddr} ${bootdir}/${fdtfile} 
console=ttyO0,115200n8 
mmcroot=/dev/mmcblk0p2 ro 
mmcrootfstype=ext4 rootwait fixrtc 
mmcargs=setenv bootargs console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs} 
uenvcmd=run loadzimage; run loadfdt; run mmcargs; bootz ${loadaddr} - ${fdtaddr} 

複製的zImage和DTB啓動分區:

sudo cp -v /<path_to_kernel>/arch/arm/boot/zImage <path_to_boot>/boot/ 
sudo cp -v /<path_to_kernel>/arch/arm/boot/dts/am335x-boneblack.dtb <path_to_boot>/boot/ 
+0

沒有運氣我從uEnv.txt獲得了這個'Loaded environment 從mmc導入環境... 運行uenvcmd ... 讀的/ boot/zImage的 **無法讀取文件的/ boot/zImage的** 閱讀/boot/am335x-boneblack.dtb **無法讀取文件/boot/am335x-boneblack.dtb ** 糟糕的Linux ARM zImage魔術! gpio:引腳55(gpio 55)的值爲1 **文件未找到/ boot/uImage ** U-Boot# ' – user7345878

+0

檢查您的zImage是否存在於/ boot/zImage或不在...如果zImage所在的路徑不是/ boot,然後使用zImage路徑更新uEnv.txt中的「bootdir」變量。 –

+0

它在/ boot目錄下。請參閱啓動分區我有'MLO,uEnv.txt和u-boot.img',並在/ boot目錄下的根分區我有'am335x-boneblack.dtb,am335x-bone.dtb和zImage' – user7345878

相關問題