user2195463
user2195463

Reputation: 331

beaglebone am355 u-boot switch bootpart by GPIO

I am trying to boot from partition 3 when gpio 48 is in different state.

If I am changing am355x_evm.h as

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

and

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

Still goes to /dev/mmkblk0p1 If I type in u-boot prompt

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

also complains about /sbin/init

What I am doing wrong. Thank you.

Same approach works fine on iMX6, See excerpt here.

"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" \

Upvotes: 0

Views: 80

Answers (1)

user2195463
user2195463

Reputation: 331

I think I found it. I had to set also mmcpart.

Upvotes: 0

Related Questions