PXE Boot a Beaglebone Black via U-boot

Hi there,

I’m trying to setup a network booting Beaglebone Black Rev. C (4GB eMMC). I have a working network setup, and I’m using PuTTY and a serial com to work with U-Boot. I’ve tried so many guides, all that just seem to fail me and deliver no results. I also can’t seem to find any real resources on PXE booting with U-boot and Beaglebone as a whole. Or I’m seriously missing it somewhere.

I built a custom image for this bone with the image building scripts from https://github.com/beagleboard/image-builder which uses Robert’s https://github.com/RobertCNelson/omap-image-builder

Next I unpack the tar file and used the vmlinuz-4.19.79-ti-r30, initrd.img-4.19.79-ti-r30 and am335x-boneblack.dtb in the pxe file like so:

label kernel-bbb
kernel vmlinuz-4.19.79-ti-r30
devicetree /dtbs/4.19.79-ti-r30/am335x-boneblack-uboot.dtb
initrd initrd.img-4.19.79-ti-r30
append console=ttyO0,115200n8 root=/dev/mmcblk1p1 rw rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 rng_core.default_quality=100

U-boot gets the pxe via the network and when I use pxe boot. The process starts and places everything in the correct RAM address, which I assume it finds in uEnv.txt already in the eMMC (I flashed the eMMC with a different custom image build also using the image-builder scripts).

However, then everything is done, and the kernel needs to starts, nothing. The console just shows “Starting Kernel …” and after a couple of seconds the bone resets and U-boot starts spitting out the default booting info.

=>setenv serverip 192.168.1.11
=> pxe get
missing environment variable: pxeuuid
Retrieving file: pxelinux.cfg/01-78-04-73-7e-8c-74
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.1.11; our IP address is 192.168.1.2
Filename ‘pxelinux.cfg/01-78-04-73-7e-8c-74’.
Load address: 0x80100000
Loading: #
** 52.7 KiB/s**
done
Bytes transferred = 273 (111 hex)
Config file found
=> pxe boot
1: kernel-bbb
Retrieving file: initrd.img-4.19.79-ti-r30
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.1.11; our IP address is 192.168.1.2
Filename ‘initrd.img-4.19.79-ti-r30’.
Load address: 0x88080000
Loading: #################################################################
** #################################################################**
** #################################################################**
** #################################################################**
** #################################################################**
** #################################################################**
** #################################################################**
** #################################################**
** 3.4 MiB/s**
done
Bytes transferred = 7387755 (70ba6b hex)
Retrieving file: vmlinuz-4.19.79-ti-r30
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.1.11; our IP address is 192.168.1.2
Filename ‘vmlinuz-4.19.79-ti-r30’.
Load address: 0x82000000
Loading: #################################################################
** #################################################################**
** #################################################################**
** #################################################################**
** #################################################################**
** #################################################################**
** #################################################################**
** #################################################################**
** #################################################################**
** #################################################################**
** #################################################################**
** #**
** 3.4 MiB/s**
done
Bytes transferred = 10508819 (a05a13 hex)
append: console=ttyO0,115200n8 root=/dev/mmcblk1p1 rw rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 rng_core.default_quality=100
Retrieving file: /dtbs/4.19.79-ti-r30/am335x-boneblack.dtb
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.1.11; our IP address is 192.168.1.2
Filename ‘/dtbs/4.19.79-ti-r30/am335x-boneblack.dtb’.
Load address: 0x88000000
Loading: #####
** 2.5 MiB/s**
done
Bytes transferred = 59507 (e873 hex)
## Flattened Device Tree blob at 88000000
** Booting using the fdt blob at 0x88000000**
** Loading Ramdisk to 8f8f4000, end 8ffffa6b … OK**
** Loading Device Tree to 8f8e2000, end 8f8f3872 … OK**

Starting kernel …

Any help?

Kind regards,
HS Hayman

@HHayman, I’ve never used the u-boot pxe scripts, we are probably missing something.

But every factory image contains a “/nfs-uEnv.txt” file, to do tftd/nfs boot, so if you rename this as “/uEnv.txt” it’ll use the built-in tftpd path of u-boot.

For reference here is the “/nfs-uEnv.txt” example:

##Rename as: uEnv.txt to boot via nfs

##https://www.kernel.org/doc/Documentation/filesystems/nfs/nfsroot.txt

##SERVER: sudo apt-get install tftpd-hpa
##SERVER:
##SERVER: zImage boot:
##SERVER: TFTP_DIRECTORY defined in /etc/default/tftpd-hpa
##SERVER: zImage/*.dtb need to be located here:
##SERVER: TFTP_DIRECTORY/zImage
##SERVER: TFTP_DIRECTORY/dtbs/*.dtb
##SERVER:
##SERVER: uname_r boot:
##SERVER: TFTP_DIRECTORY defined in /etc/default/tftpd-hpa
##SERVER: Change TFTP_DIRECTORY to /NFSEXPORT/boot
##SERVER: TFTP_DIRECTORY/vmlinuz-${uname_r}
##SERVER: TFTP_DIRECTORY/dtbs/${uname_r}/*.dtb

##client_ip needs to be set for u-boot to try booting via nfs

client_ip=192.168.1.101

#u-boot defaults: uncomment and override where needed

#server_ip=192.168.1.100
#gw_ip=192.168.1.1
#netmask=255.255.255.0
#hostname=
#device=eth0
#autoconf=off
#root_dir=/home/userid/targetNFS
#nfs_options=,vers=3
#nfsrootfstype=ext4 rootwait fixrtc

##use uname_r= only if TFTP SERVER is setup for uname_r boot:
#uname_r=

But looking at your log:

append: console=ttyO0,115200n8 root=/dev/mmcblk1p1 rw rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 rng_core.default_quality=100
Retrieving file: /dtbs/4.19.79-ti-r30/am335x-boneblack.dtb
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.1.11; our IP address is 192.168.1.2
Filename ‘/dtbs/4.19.79-ti-r30/am335x-boneblack.dtb’.
Load address: 0x88000000
Loading: #####
** 2.5 MiB/s**
done
Bytes transferred = 59507 (e873 hex)
## Flattened Device Tree blob at 88000000
** Booting using the fdt blob at 0x88000000**
** Loading Ramdisk to 8f8f4000, end 8ffffa6b … OK**
** Loading Device Tree to 8f8e2000, end 8f8f3872 … OK**

Starting kernel …

I’d expect to see “more” kernel noise, as “quiet” is disabled and the console is enabled.

Regards,

Thank you so much so the timely response.

I left out quiet for the purpose of seeing more info on what is happening, but that’s my problem. Nothing is happening. I based my attempt on the PXE boot via U-Boot on the article:
https://wiki.radxa.com/Rockpi4/dev/u-boot/pxe ,

and the arguments for the kernel based om what U-Boot spits out to the serial console as it boots on just a clean power-on and run through. The arguments I provide and what the article uses are little bit different. Not sure if that makes the difference (hoping it’s the Pi vs Black style difference for providing arguments to the kernel).

I’m aware of the nfs-uEnv.txt rename situation. To be honest I’m a little nervous as I’m totally new to the NFS side of things. I was hoping you might know of a way, or if there was a way to simply unpack the output of the image building scripts in a folder(directory) and just tell U-Boot to boot everything from there. But I think that’s wishful thinking. I have a feeling there might need to be some tinkering/tweaking.

Thank you for the NFS reply. I’m going to be attempting it now. My previous try with the nfs/nfsboot (can’t remember exactly) in U-Boot lead to nothing as well.

Will try that now with the nfs-uEnv.txt rename work around now.

Thanks,
HS Hayman