EBC Exercise 08 Installing/Updating U-boot

From eLinux.org
Jump to: navigation, search

thumb‎ Embedded Linux Class by Mark A. Yoder


Go to https://forum.beagleboard.org/t/debian-11-x-bullseye-monthly-snapshots/31280#update-u-boot-6 for current updating instructions.

The rest is out of date....


Updating u-boot

Here's a quick way to update u-boot and the MLO boot loader. These are from https://beagleboard.slack.com/archives/G0SBRGHQA/p1617913114125900

bone$ sudo apt update
bone$ sudo apt install bb-u-boot-am335x-evm
bone$ cd /opt/u-boot/bb-u-boot-am335x-evm/
bone$ sudo ./install.sh
bone$ sudo reboot

DAS U-boot

These instructions came from Robert C Nelson's eewiki.net.

download

While we're at it, let's get the boot loader we'll be using. It takes some 40 seconds.

host$ cd ~/BeagleBoard
host$ git clone git://git.denx.de/u-boot.git
host$ cd u-boot/
host$ git checkout v2013.07 -b tmp

U-Boot Patches

host$ wget https://raw.github.com/eewiki/u-boot-patches/master/v2013.07/0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch
host$ patch -p1 < 0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch

compile

Now configure and build. The first time takes some 1.5 minutes. After that it's only 5 seconds or so.

host$ source ~/crossCompileEnv.sh 
host$ make distclean
host$ make am335x_evm_config
host$ make

install

host$ scp u-boot.img root@beagle:.
bone$ mkdir /media/BONE
bone$ mount /dev/mmcblk0p1 /media/BONE
bone$ cd /media/BONE
bone$ mv u-boot.img u-boot.img.orig  # Save the working u-boot
bone$ cp ~/u-boot.img u-boot.img.new
bone$ cp u-boot.img.new u-boot.img

Once installed you are ready for u-boot work.

Recovering

If your Beagle fails to boot, follow the EBC_Exercise_22_Recovering instructions to recover.




thumb‎ Embedded Linux Class by Mark A. Yoder