You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

BeagleBone Black自定义编译U-boot启动无输出故障排查求助

Troubleshooting BeagleBone Black SD Card U-boot Boot Failure

Let's break down the possible issues and fixes to get your custom-compiled U-boot running from the SD card—since your eMMC already has a working U-boot, we can narrow down the problem to either SD card preparation, boot configuration, or compilation settings.

1. Double-Check the Boot Dip Switches

First things first: Make sure your BBB is set to boot from SD card. The dip switch bank near the SD card slot should have switches 1 and 2 flipped to the ON position (towards the SD card). This tells the ROM bootloader to prioritize the SD card over the eMMC. It's easy to overlook this, so confirm this first.

2. Verify SD Card Writing Process

Incorrectly writing MLO and u-boot.img is a common culprit. Here's how to ensure you're doing it right:

  • Use the correct device path for your SD card (e.g., /dev/sdb, not a partition like /dev/sdb1). Using a partition will write the files to the wrong location.
  • Use these exact dd commands to place the files in the proper offsets:
    sudo dd if=MLO of=/dev/sdb bs=512 count=1 seek=1
    sudo dd if=u-boot.img of=/dev/sdb bs=512 count=2 seek=128
    
  • After writing, run sudo sync to flush all cached data to the SD card—don't yank the card out early, this can corrupt the boot files.
  • You can verify the writes by checking the SD card's raw sectors with hexdump /dev/sdb | head -20—you should see the MLO header in the first few sectors after the MBR.

3. Validate U-boot Compilation Configuration

Your custom build might be missing critical BBB-specific settings:

  • Ensure you used the correct defconfig before compiling:
    make am335x_boneblack_defconfig
    
  • Confirm your crosstool-NG toolchain targets the right architecture (arm-linux-gnueabihf). Specify it explicitly during compilation:
    make CROSS_COMPILE=arm-linux-gnueabihf- -j$(nproc)
    
  • Compare the size of your compiled MLO and u-boot.img to official pre-built versions. If yours are drastically smaller or larger, you likely have a misconfiguration (e.g., missing drivers, wrong platform settings).

4. Rule Out SD Card Compatibility Issues

Not all SD cards play nice with BBB's bootloader:

  • Try a smaller SD card (8GB or 16GB, Class 10). High-capacity cards (64GB+) sometimes use incompatible partition schemes or have slower boot sectors.
  • Wipe the SD card's boot area before re-writing:
    sudo dd if=/dev/zero of=/dev/sdb bs=1M count=10
    
    This clears any leftover boot data that might interfere with your new U-boot files.

5. Force SD Card Boot with the User Button

If the dip switches are set but the BBB still boots from eMMC, force it to prioritize SD card:

  • Hold down the USER/BOOT button (the small button near the Ethernet port) while applying power to the BBB. Keep holding it until you see activity on the serial console (or for ~5 seconds). This overrides the boot order and forces the ROM loader to check the SD card first.

6. Debug with Serial Console Output

The most effective way to pinpoint the issue is to connect a TTL-to-USB adapter to the BBB's serial pins (UART0: TX=P9.26, RX=P9.24, GND=P9.1). Set your terminal emulator to 115200 baud, 8 data bits, no parity, 1 stop bit (8N1).

  • The serial output will show exactly what's happening: Did the ROM loader detect the SD card? Did it successfully load MLO? Did it fail to load u-boot.img? This log will give you the exact error message to troubleshoot further.

内容的提问来源于stack exchange,提问作者Ricky Nguyen Anh Giau

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 09:13:19