I have a BeagleBone Black, with Debian 8.3, Linux 4.1.15-ti-rt-r43.
EDIT: The system is installed on the internal flash.
I modified the /boot/uEnv.txt to load a different dtb file, apparently with wrong file name, so it doesn't boot into Linux.
So I connected via J1 pins / UART0 -> terminal program on my PC. I see that U-Boot complains about a file not being found, so it won't start Linux, and gives me the U-Boot commands. What was listed after entering "help" didn't look very useful.
Is it possible, and feasible, to repair the uEnv.txt from my serial console with U-Boot commands - which would work... how? Or, what else would the best approach be?
EDIT#2: Finding some useful scraps on this site, which did not exactly tell, but lead in a useful direction: https://www.compulab.co.il/utilite-computer/wiki/index.php/Utilite_U-Boot_User_How-To%27s I found I can actually see uEnv.txt typing in the U-Boot console: "ls mmc 1 boot", the ls command in U-Boot needs the device name + num, and apparently my SDcard is mmc0, the internal flash mmc1, funny order. Alas, U-Boot has no "cat", let alone an editor apparently. Like a kid with a remote controlled arm trying to grab a plush animal for some coins, can't quite grasp my file, and it's so close, argh!
EDIT#3: I saw that I have an old backup file of uEnv.txt on mmc1. There is the U-Boot command "load", to load a file into memory, and "save", to save a file. You have to specify address and size. File size you see from "ls mmc 1 boot" command. Looking at the memory map on page 35 of this slide: https://www.slideshare.net/chrissimmonds/embedded-linux-quick-start-guide, the RAM starts at 0x80000000. Guessing that if only U-Boot is in RAM, where will hopefully be nothing at, say, 384 Mbytes, I tried to load file to 98000000, and save from there, but save returned "unable to write file". Too bad.