BBB: Trying to build u-boot

Hello everyone,
I’m trying to build only u-boot for the BBB. I followed many tutorials
http://www.jeh-tech.com/linux_bbb_build.html
https://www.twam.info/hardware/beaglebone-black/u-boot-on-beaglebone-black
https://forum.digikey.com/t/debian-getting-started-with-the-beaglebone-black/12967

but the only thing I have itś a uboot message

U-Boot SPL 2022.07-rc6 (Sep 21 2022 - 11:33:02 +020)
Trying to boot from MMC1

is it normal ?
cheers

Hi @remi-boivin use my directions listed here.

it’s the version of u-boot shipping in our images… Files · v2022.04-bbb.io-am335x-am57xx · BeagleBoard.org / u-boot · GitLab

Regards,

Thanks but I’ve already try this one and it’s the same :cry:
maybe it’s okay and I just need to continue

Try again, but this time report what the BeagleBone Black shows when you try to boot…

Regards,

Okay I try

I follow the tutorial and now I’ve something like

U-Boot SPL 2022.04-00037-ge0d31da5 (Sep 21 2022 - 1)
Trying to boot from MMC1


U-Boot 2022.04-00037-ge0d31da5 (Sep 21 2022 - 15:13)

CPU  : AM335X-GP rev 2.1
Model: TI AM335x BeagleBone Black
DRAM:  512 MiB
Reset Source: Power-on reset has occurred.
RTC 32KCLK Source: External.
Core:  150 devices, 14 uclasses, devicetree: separae
WDT:   Started wdt@44e35000 with servicing (60s tim)
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from EXT4... ** No partition ta*
Board: BeagleBone Black
<ethaddr> not set. Validating first E-fuse MAC
BeagleBone Black:
BeagleBone Cape EEPROM: no EEPROM at address: 0x54
BeagleBone Cape EEPROM: no EEPROM at address: 0x55
BeagleBone Cape EEPROM: no EEPROM at address: 0x56
BeagleBone Cape EEPROM: no EEPROM at address: 0x57
Net:   eth2: ethernet@4a100000, eth3: usb_ether
Press SPACE to abort autoboot in 0 seconds
board_name=[A335BNLT] ...
board_rev=[00C0] ...
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
Couldn't find partition 0:2 0x82000000
Can't set block device
Couldn't find partition 0:2 0x82000000
Can't set block device
switch to partitions #0, OK
mmc0 is current device
** No partition table - mmc 0 **
Couldn't find partition mmc 0:1
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
** No partition table - mmc 0 **
Couldn't find partition mmc 0:1
Checking for: /uEnv.txt ...
** No partition table - mmc 0 **
Couldn't find partition mmc 0:1
Checking for: /boot/uEnv.txt ...
** No partition table - mmc 0 **
Couldn't find partition mmc 0:1
** No partition table - mmc 0 **
Couldn't find partition mmc 0:2
** No partition table - mmc 0 **
Couldn't find partition mmc 0:3
** No partition table - mmc 0 **
Couldn't find partition mmc 0:4
** No partition table - mmc 0 **
Couldn't find partition mmc 0:5
** No partition table - mmc 0 **
Couldn't find partition mmc 0:6
** No partition table - mmc 0 **
Couldn't find partition mmc 0:7
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1...
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk mmc@48060000.blk...
Scanning disk mmc@481d8000.blk...
Found 3 disks
No EFI system partition
BootOrder not defined
EFI boot manager: Cannot load any image
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc1(part 0) is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt ...
Checking for: /boot/uEnv.txt ...
gpio: pin 55 (gpio 55) value is 1
2005 bytes read in 2 ms (978.5 KiB/s)
Loaded environment from /boot/uEnv.txt
Checking if uname_r is set in /boot/uEnv.txt...
gpio: pin 56 (gpio 56) value is 1
Running uname_boot ...
loading /boot/vmlinuz-4.19.94-ti-r42 ...
10095592 bytes read in 640 ms (15 MiB/s)
debug: [enable_uboot_overlays=1] ...
debug: [enable_uboot_cape_universal=1] ...
debug: [uboot_base_dtb_univ=am335x-boneblack-uboot-.
uboot_overlays: [uboot_base_dtb=am335x-boneblack-ub.
uboot_overlays: Switching too: dtb=am335x-boneblack.
loading /boot/dtbs/4.19.94-ti-r42/am335x-boneblack-.
162266 bytes read in 15 ms (10.3 MiB/s)
Found 0 extension board(s).
uboot_overlays: [fdt_buffer=0x60000] ...
uboot_overlays: loading /lib/firmware/BB-ADC-00A0.d.
867 bytes read in 18 ms (46.9 KiB/s)
uboot_overlays: loading /lib/firmware/BB-BONE-eMMC1.
1584 bytes read in 18 ms (85.9 KiB/s)
uboot_overlays: loading /lib/firmware/BB-HDMI-TDA99.
4915 bytes read in 9 ms (533.2 KiB/s)
uboot_overlays: loading /lib/firmware/AM335X-PRU-RP.
3801 bytes read in 18 ms (206.1 KiB/s)
loading /boot/initrd.img-4.19.94-ti-r42 ...
6589689 bytes read in 422 ms (14.9 MiB/s)
debug: [console=ttyS0,115200n8 bone_capemgr.uboot_c.
debug: [bootz 0x82000000 0x88080000:648cf9 88000000.
Kernel image @ 0x82000000 [ 0x000000 - 0x9a0be8 ]
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Ramdisk to 8f9b7000, end 8ffffcf9 ... OK
   Loading Device Tree to 8f92b000, end 8f9b6fff ..K

Starting kernel ...

[    0.002170] timer_probe: no matching timers found
[    0.195858] l4_wkup_cm:clk:0010:0: failed to dise
[

but I don´t have any kernel on the SD only on the EMMC. is it normal ?

Okay, from your dump, U-Boot has been successfully built, installed and loaded… So your original issue is now resolved…

So, next… Did you partition the microSD for the rootfs, build and install your chosen kernel? (Or what Rootfs and kernel combination where you planning?)

Regards,

Okay it’s a good news :tada: :tada: :tada:
For the kernel not yet. My first goal it’s to boot with u-boot. It’s why I’m a little bit surprise to boot on the emmc kernel. Can I wipe the emmc and/or choose to boot on the sd card ?

Yeap, you can safely erase the eMMC. The production version of u-boot will search both microSD and eMMC… As you can see, it found the /boot/uEnv.txt trigger file on the eMMC and booted the eMMC as directed…

Regards,

How I can do that please ??

From within u-boot run:

=> mmc dev 1
=> mmc erase 0 100000

That’ll erase enough to make the ext4 un-readable…

Regards,

okay thank you very much but how to do it if uboot boot directly to the kernel ?

Open serial terminal, hold space bar, reset BBB…

Regards,

thank you very much. Sorry for the dummies questions but I’ve a last one
I built the kernel according your tutorial but it’s says:

U-Boot SPL 2022.04 (Sep 20 2022 - 14:54:58 +0200)
Trying to boot from MMC1


U-Boot 2022.04 (Sep 20 2022 - 14:54:58 +0200)

CPU  : AM335X-GP rev 2.1
Model: TI AM335x BeagleBone Black
DRAM:  512 MiB
Core:  150 devices, 14 uclasses, devicetree: separate
WDT:   Started wdt@44e35000 with servicing (60s timeout)
NAND:  0 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from FAT... Unable to use mmc 0:1... 
<ethaddr> not set. Validating first E-fuse MAC
Net:   eth2: ethernet@4a100000, eth3: usb_ether
Hit any key to stop autoboot:  0 
** Invalid partition 2 **
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk mmc@48060000.blk...
Scanning disk mmc@481d8000.blk...
Found 4 disks
No EFI system partition
BootOrder not defined
EFI boot manager: Cannot load any image
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1...
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
BootOrder not defined
EFI boot manager: Cannot load any image
## Error: "bootcmd_nand0" not defined
starting USB...
Bus usb@47401800: Port not available.
USB is stopped. Please issue 'usb start' first.
starting USB...
Bus usb@47401800: Port not available.
link up on port 0, speed 100, full duplex
BOOTP broadcast 1
DHCP client bound to address 192.168.6.127 (308 ms)
*** ERROR: `serverip' not set
Cannot autoload with TFTPGET
missing environment variable: pxeuuid
Retrieving file: pxelinux.cfg/01-3c-e4-b0-06-9d-3e
link up on port 0, speed 100, full duplex
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/C0A8067F
link up on port 0, speed 100, full duplex
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/C0A8067
link up on port 0, speed 100, full duplex
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/C0A806
link up on port 0, speed 100, full duplex
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/C0A80
link up on port 0, speed 100, full duplex
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/C0A8
link up on port 0, speed 100, full duplex
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/C0A
link up on port 0, speed 100, full duplex
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/C0
link up on port 0, speed 100, full duplex
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/C
link up on port 0, speed 100, full duplex
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/default-arm-am33xx-am335x
link up on port 0, speed 100, full duplex
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/default-arm-am33xx
link up on port 0, speed 100, full duplex
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/default-arm
link up on port 0, speed 100, full duplex
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/default
link up on port 0, speed 100, full duplex
*** ERROR: `serverip' not set
Config file not found
starting USB...
Bus usb@47401800: Port not available.
link up on port 0, speed 100, full duplex
BOOTP broadcast 1
DHCP client bound to address 192.168.6.127 (2736 ms)
*** ERROR: `serverip' not set
Cannot autoload with TFTPGET
link up on port 0, speed 100, full duplex
BOOTP broadcast 1
DHCP client bound to address 192.168.6.127 (1009 ms)
*** ERROR: `serverip' not set
Cannot autoload with TFTPGET

I’m not sure why

Based on your log, everything is fine, it’s going thru all the boot options, before dropping to the final dhcp/pxe boot… It looks like you didn’t copy the rootfs, kernel files, and /boot/uEnv.txt…

Regards,

It’s odd, I copy everything. I’ve all linux directories, the vmlinuz-5.4.209-bone65 and the /boot/uEnv.txt. Is it possible the issue come from the fstab ??
I’ve something like that

/dev/sda1 / auto errors=remount-ro 0 1

fstab would come much later in boot, (you’d see the linux load and run…)…

it would be my guess, you never wrote the data to your microSD, instead another device on your system.

Plug your microSD back into your development host, and type:

lsblk

Then we can re-walk you thru the posted directions…

Regards,

It’s give me:

sda         8:0    1  28.8G  0 disk  
└─sda1      8:1    1  28.8G  0 part  /media/remi/rootfs
nvme0n1   259:0    0   1.8T  0 disk  
├─nvme0n1p1
│         259:1    0   512M  0 part  
├─nvme0n1p2
│         259:2    0 345.3G  0 part  
├─nvme0n1p3
│         259:3    0  63.9G  0 part  
│ └─cryptswap
│         253:0    0  63.9G  0 crypt [SWAP]
├─nvme0n1p4
│         259:4    0   500M  0 part  /boot/efi
└─nvme0n1p5
          259:5    0 488.1G  0 part  /

/dev/sda is my micoSD
I double check and I have the files in the microSD

So it auto-mounted at:

/media/remi/rootfs

Everywhere in the directions i list as /media/rootfs/ change to /media/remi/rootfs/ or unmount and remount it in that location.

I bet there’s a new large directory at /media/rootfs/ on your nvme drive…

Regards,

I restart the copy but it’s say the same

U-Boot 2022.04 (Sep 20 2022 - 14:54:58 +0200)

CPU  : AM335X-GP rev 2.1
Model: TI AM335x BeagleBone Black
DRAM:  512 MiB
Core:  150 devices, 14 uclasses, devicetree: separate
WDT:   Started wdt@44e35000 with servicing (60s timeout)
NAND:  0 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from FAT... Unable to use mmc 0:1... 
<ethaddr> not set. Validating first E-fuse MAC
Net:   eth2: ethernet@4a100000, eth3: usb_ether
Hit any key to stop autoboot:  0 
** Invalid partition 2 **
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk mmc@48060000.blk...
Scanning disk mmc@481d8000.blk...
Found 3 disks
No EFI system partition
BootOrder not defined
EFI boot manager: Cannot load any image
switch to partitions #0, OK
mmc1(part 0) is current device
** No partition table - mmc 1 **
Couldn't find partition mmc 1:1
## Error: "bootcmd_nand0" not defined
starting USB...
Bus usb@47401800: Port not available.
USB is stopped. Please issue 'usb start' first.
starting USB...
Bus usb@47401800: Port not available.
link up on port 0, speed 100, full duplex
BOOTP broadcast 1
BOOTP broadcast 2
DHCP client bound to address 192.168.6.127 (804 ms)
*** ERROR: `serverip' not set
Cannot autoload with TFTPGET
missing environment variable: pxeuuid
Retrieving file: pxelinux.cfg/01-3c-e4-b0-06-9d-3e
link up on port 0, speed 100, full duplex
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/C0A8067F
link up on port 0, speed 100, full duplex
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/C0A8067
link up on port 0, speed 100, full duplex
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/C0A806
link up on port 0, speed 100, full duplex
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/C0A80
link up on port 0, speed 100, full duplex
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/C0A8
link up on port 0, speed 100, full duplex
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/C0A
link up on port 0, speed 100, full duplex
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/C0
link up on port 0, speed 100, full duplex
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/C
link up on port 0, speed 100, full duplex
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/default-arm-am33xx-am335x
link up on port 0, speed 100, full duplex
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/default-arm-am33xx
link up on port 0, speed 100, full duplex
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/default-arm
link up on port 0, speed 100, full duplex
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/default
link up on port 0, speed 100, full duplex
*** ERROR: `serverip' not set
Config file not found
starting USB...
Bus usb@47401800: Port not available.
link up on port 0, speed 100, full duplex
BOOTP broadcast 1
DHCP client bound to address 192.168.6.127 (500 ms)
*** ERROR: `serverip' not set
Cannot autoload with TFTPGET
link up on port 0, speed 100, full duplex
BOOTP broadcast 1
DHCP client bound to address 192.168.6.127 (489 ms)
*** ERROR: `serverip' not set
Cannot autoload with TFTPGET