首页 > 解决方案 > beaglebone am355 u-boot switch bootpart by GPIO

问题描述

当 gpio 48 处于不同状态时,我试图从分区 3 启动。

如果我将 am355x_evm.h 更改为

#define MCO_BOOT "if gpio input 48; then setenv bootpart ${mmcdev}:3; fi;"

NANDARGS \
NETARGS \
DFUARGS \
MCO_BOOT \<---- new line
BOOTENV  
#endif

仍然转到 /dev/mmkblk0p1 如果我输入 u-boot 提示

if gpio input 48; then setenv bootpart ${mmcdev}:3; fi
reset

还抱怨 /sbin/init

我做错了什么。谢谢你。

同样的方法在 iMX6 上运行良好,请参见此处的摘录。

"xfile=if load mmc 1:1 0x80008000 bootfact; then setenv mmcrootpart 3; else setenv mmcrootpart 2; fi;\0" \
"fact=if gpio input 120; then setenv mmcrootpart 3 ; else run xfile; fi; printenv mmcrootpart;\0" \

标签: inputgpiou-bootsetenv

解决方案


我想我找到了。我还必须设置 mmcpart。


推荐阅读