-
Notifications
You must be signed in to change notification settings - Fork 3
Fixing Bad U Boot Environment Variables
Tonight I typed a bad uname_r for my Beaglebone Black’s /boot/uEnv.txt parameters, and it took me a long while to figure out how to fix it. These steps seem like ridiculous overkill, so there’s probably an easier way, but I’m writing these down so I don’t forget.
-
Boot the BBB, stop in U-Boot.
=> printenv bootcmd bootcmd=setenv umsmedia 0; gpio set 53; run findfdt; setenv mmcdev 0; setenv bootpart 0:1; run mmcboot;gpio clear 56; gpio clear 55; gpio clear 54; setenv mmcdev 1; setenv bootpart 1:1; run mmcboot;run failumsboot; => setenv umsmedia 0; gpio set 53; run findfdt; setenv mmcdev 0; setenv bootpart 0:1; run mmcboot;gpio clear 56; gpio clear 55; gpio clear 54; setenv mmcdev 1; setenv bootpart 1:1; run mmcboot ...bunch of stuff... Running uname_boot ... ** Invalid partition 2 ** ** Invalid partition 3 ** ** Invalid partition 4 ** ** Invalid partition 5 ** ** Invalid partition 6 ** ** Invalid partition 7 ** => printenv ...bunch of stuff... uname_r=4.1.4-ti-r15 ... => set uname_r 4.1.6-ti-r16 // or whatever you need it to be => set mmcpart 1 // Might be something different in your case => setenv bootpart ${mmcdev}:${mmcpart}; => setenv mmcroot /dev/mmcblk${mmcdev}p${mmcpart} ro => run uname_boot