Deploying Ubuntu Image From USB SSD - Beagle Bone Black

125 views
Skip to first unread message

Chris Clinton

unread,
Nov 5, 2019, 2:07:44 PM11/5/19
to BeagleBoard
I am attempting to do the following and I am feel like I am close:
Boot Beagle bone Black Rev C from USB SSD drive into build root.
Automatically execute autorun.sh from the USB SSD to apply Ubuntu.img.gz image file.
Reboot the Beagle Bone Black into Ubuntu.
Note: I want the capability to restore the Beagle Bone Black without using a micro SD card.  I am really new to Linux.

Problems:

I can successfully boot from the USB hard drive by executing manually the following commands from the u-boot prompt, but have not successfully automated these commands.  Can I update u-boot to automatically attempt USB boot?
usb start
bootpart=0:1
bootdir=/
fatload usb 0:1 ${loadaddr} /uImage
fatload usb 0:1 ${fdtaddr} /am335x-boneblack.dtb
setenv bootargs console=${console} ${optargs}
bootm ${loadaddr} - ${fdtaddr}
Buildroot is automatically looking for the micro SD card due to the /etc/init.d/S99autorun file.  How do I edit this file?

I downloaded the files for Buildroot through the following link:

BeagleBone Black Extracting eMMC contents

I have read the following articles, but have been unable to put all of the pieces together.

Beaglebone Black Booting From USB

USB hard drive booting


Stuart Longland

unread,
Nov 6, 2019, 5:34:42 PM11/6/19
to Chris Clinton, BeagleBoard
On 5/11/19 1:43 am, Chris Clinton wrote:
> I can successfully boot from the USB hard drive by executing manually the
> following commands from the u-boot prompt, but have not successfully
> automated these commands. Can I update u-boot to automatically attempt USB
> boot?
> usb start
> bootpart=0:1
> bootdir=/
> fatload usb 0:1 ${loadaddr} /uImage
> fatload usb 0:1 ${fdtaddr} /am335x-boneblack.dtb
> setenv bootargs console=${console} ${optargs}
> bootm ${loadaddr} - ${fdtaddr}

Your easiest bet would be to have a small boot-strap MicroSD card that
has U-Boot configured to boot from USB.

U-Boot stores its configuration in environment which can be persisted to
an EEPROM or disk/SD card partition, not sure how the BeagleBoard
instances are set up in this regard.

If you run `printenv` you'll see all the variables that are set.
`setenv` modifies a variable, and `saveenv`, saves the current set of
variables to that non-volatile storage volume.

http://www.denx.de/wiki/view/DULG/UBootEnvVariables documents all the
variables. Many of these you'll see are "scripts" which are executed
with the `run` command.

If the persistent storage is set up, you should be able to configure
U-Boot, then run `saveenv` to store the configuration -- rebooting
should have the board run your commands automatically.

Failing that, you'll need to re-compile U-Boot with the appropriate
default environment settings -- doable, but you risk bricking the board
if something goes wrong.

> Buildroot is automatically looking for the micro SD card due to the
> /etc/init.d/S99autorun file. How do I edit this file?

I'd imagine running `sudo -s` then using `${EDITOR}
/etc/init.d/S99autorun` to modify the file.
--
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
...it's backed up on a tape somewhere.
Reply all
Reply to author
Forward
0 new messages