Cannot see U-Boot# prompt in terminal

Hello,

After copying MLO and u-boot.img in the boot folder of microSD and then powering BeagleBone Black ((1) press and hold the Boot Switch button, (2) power up the board; (3) release the Boot Switch button after about 5 seconds) I don’t see U-Boot# prompt in terminal.
Instead, I see continuous activity in the terminal.

Any suggestions ?

Thanks,

Pavel.

"continuous activity" can you share what you actually get over serial?

The BootRom on the AM335x is actually more picky than that.. Where
"exactly" is the "boot" folder on the partition in raw terms? Is it
fat? etc..

In the old days, when we used FAT and real files, the FAT partition
must be at the very start of the medium, size really doesn't matter,
we used a partition size of 96MB thru 16MB over the years. Next, after
formatting, it's was always way more reliable to write the "MLO" file
1st, then the "u-boot.img"... Fun ROM bugs..

Today we just leave a 4MB hole and dd the files to a very specific
address on the medium.. It's more reliable, (unless you use a Linux
Virtual machine on top of Windows, then it seems to never be correctly
written..)

sudo dd if=./MLO of=/dev/sdb count=1 seek=1 bs=128k
sudo dd if=./u-boot.img of=/dev/sdb count=2 seek=1 bs=384k

Regards,

Do you have an FTDI 3.3V serial<>USB cable connected to the proper pins
of J1?

  U-boot output doesn't go out on the "native" USB gadget.

I think you can try this when you see message saying “Hit any key to stop autoboot” press any key.
You should see something like => instead of U-Boot# and start working with uboot.

I don’t know whether, this has changed recently. I tried loading images through=> prompt and it worked.

Can anyone let me know what I have done is correct as it worked for me.

Any guidance is appreciated.

Thanks,
Prudhvi

I use this cable:
USB TO TTL SERIAL CABLE

Here is my connection:
my_connection

Hi Robert,

Where “exactly” is the “boot” folder on the partition in raw terms? Is it fat? etc…

There are 2 folders in sdcard root:

  • boot
  • rootfs
    The file system is FAT. Here is lsblk on my host Ubuntu

pavel@ALABAMA:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 97M 1 loop /snap/core/9665
loop1 7:1 0 2,2M 1 loop /snap/gnome-system-monitor/145
loop2 7:2 0 55M 1 loop /snap/core18/1880
loop3 7:3 0 55,3M 1 loop /snap/core18/1885
loop4 7:4 0 96,6M 1 loop /snap/core/9804
loop5 7:5 0 956K 1 loop /snap/gnome-logs/100
loop6 7:6 0 956K 1 loop /snap/gnome-logs/93
loop7 7:7 0 276K 1 loop /snap/gnome-characters/550
loop8 7:8 0 276K 1 loop /snap/gnome-characters/539
loop9 7:9 0 255,6M 1 loop /snap/gnome-3-34-1804/36
loop10 7:10 0 161,4M 1 loop /snap/gnome-3-28-1804/128
loop11 7:11 0 2,4M 1 loop /snap/gnome-calculator/730
loop12 7:12 0 2,2M 1 loop /snap/gnome-system-monitor/148
loop13 7:13 0 2,4M 1 loop /snap/gnome-calculator/748
loop14 7:14 0 140,7M 1 loop /snap/gnome-3-26-1604/98
loop15 7:15 0 255,6M 1 loop /snap/gnome-3-34-1804/33
loop16 7:16 0 54,8M 1 loop /snap/gtk-common-themes/1502
loop17 7:17 0 160,2M 1 loop /snap/gnome-3-28-1804/116
loop18 7:18 0 62,1M 1 loop /snap/gtk-common-themes/1506
loop19 7:19 0 140,7M 1 loop /snap/gnome-3-26-1604/100
sda 8:0 1 14,9G 0 disk
├─sda1 8:1 1 64M 0 part /media/pavel/boot
└─sda2 8:2 1 1G 0 part /media/pavel/rootfs
nvme0n1 259:0 0 238,5G 0 disk
└─nvme0n1p1 259:1 0 238,5G 0 part /
pavel@ALABAMA:~$

Here is fragment of fdisk:
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 133119 131072 64M c W95 FAT32 (LBA)
/dev/sda2 133120 2230271 2097152 1G 83 Linux

To format sdcard I used script from here:
format-sdcard.sh

Thanks,

Sincerely,

Pavel

Hi Prudhvi,

Thanks for suggestion.
Currently I have no keyboard, connected to BagleBone.

Sincerely,

Pavel.

“continuous activity” can you share what you actually get over serial?

I have tried already 3 different repositories of u-boot.
On the 1st one I saw this:

Screenshot from 2020-08-12 16-51-56.png

Okay -- that's all I wanted to confirm.

  I've seen posts by others expecting to be able to capture u-boot output
using one of the UARTs on the P9 header -- or even via the USB connection!

Hi Dennis,

You mean it won’t work ?

Here is extract from
Mastering Embedded Linux Programming, Chris Simmonds

No -- I only wanted to confirm that you were using the debug header,
since the other UARTs are not available until Linux has booted.

  I can't help for the case of not seeing /anything/

  I would probably start with a known booting OS image and confirm the
serial port is configured for that, before trying to debug any custom
u-boot image. For all I know, you might have the Rx and Tx lines backwards,
you might have the wrong baud rate, or transfer size.

Resolved.
But there is another problem: difficult to login. You must press the key several times before the symbol appears. It is therefore difficult to check whether the password has been entered correctly.

That's not normal.. Broken usb adapter?

Regards,

But I just bought it. Could TX and RX alternation damage the USB adapter?
After all, if it was completely interrupted, the communication will not work at all.
Probably “partly” broken. But how to check it ?

IDK, i have that same adafruit adapter, it's came up as CP210x device right?

https://www.adafruit.com/product/954

Make sure you have 3 wires hooked up, GND, TX, and RX..

What kernel (uname -r) is running on your beagle? I can test that locally..

Regards,

Hi Robert,
I don’t know what the problem was, but after rebooting the Ubuntu host machine (and also BBB) it works.

Sincerely,
Pavel.

P.S. the kernel is: 4.14.108-ti-r119

Yesterday serial terminal worked with Linux, booted from eMMC.
I’ve just tried to boot from sd-card with just two files: MLO and u-boot.img.
Here is what I see in terminal:

Retrieving file: pxelinux.cfg/default-arm-am33xx
ethernet@4a100000 Waiting for PHY auto negotiation to complete… TIMEOUT !
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready
Retrieving file: pxelinux.cfg/default-arm
ethernet@4a100000 Waiting for PHY auto negotiation to complete… TIMEOUT !
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready
Retrieving file: pxelinux.cfg/default
ethernet@4a100000 Waiting for PHY auto negotiation to complete… TIMEOUT !
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready
Config file not found
starting USB…
Bus usb@47401800: Port not available.
ethernet@4a100000 Waiting for PHY auto negotiation to complete… TIMEOUT !
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready
ethernet@4a100000 Waiting for PHY auto negotiation to complete… TIMEOUT !
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready
=>

These messages with TIMEOUT continued about 5 min.
And finally some prompt (i.e. symbol ‘=>’) appeared instead of U-Boot# prompt.

For building U-Boot I cloned “master” image from gitlab.denx.de/u-boot/ and used am335x_evm_defconfig for default configuration.

Any suggestions ?

Thanks.

With mainline generate an extlinux.conf file.

There’s a basic script under /opt/scripts/

Sorry on mobile.

Regards,

Hi Robert,

Sorry, I didn’t properly understand your message.
I don’t remember which branch of u-boot I tried yesterday, but today I’ve tried with “master” using am335x_boneblack_vboot_defconfig as default configuration.

Here is what I see in terminal this time:

U-Boot SPL 2020.10-rc2-00162-g2a4484a5c5 (Aug 21 2020 - 14:14:42 +0200)
WDT: Not found!
Trying to boot from MMC1
Loading Environment from FAT… *** Warning - bad CRC, using default environment

Loading Environment from MMC… *** Warning - bad CRC, using default environment

U-Boot 2020.10-rc2-00162-g2a4484a5c5 (Aug 21 2020 - 14:14:42 +0200)

CPU : AM335X-GP rev 2.1
Model: TI AM335x BeagleBone Black
DRAM: 512 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from FAT… *** Warning - bad CRC, using default environment

Loading Environment from MMC… *** Warning - bad CRC, using default environment

not set. Validating first E-fuse MAC
Net: eth2: ethernet@4a100000, eth3: usb_ether
Press SPACE to abort autoboot in 2 seconds
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
Failed to load ‘boot.scr’
Failed to load ‘uEnv.txt’
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1…
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
Failed to load ‘/boot/zImage’
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1…
switch to partitions #0, OK
mmc1(part 0) is current device
SD/MMC found on device 1
** Invalid partition 2 **

Error: “bootcmd_nand0” not defined

starting USB…
Bus usb@47401800: Port not available.
link up on port 0, speed 100, full duplex
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
DHCP client bound to address 10.42.0.39 (3048 ms)
Using ethernet@4a100000 device
TFTP from server 10.42.0.1; our IP address is 10.42.0.39
Filename ‘zImage’.
Load address: 0x82000000
Loading: T T T T T T T T T T T T T T T T T T T T
Retry count exceeded; starting again
missing environment variable: pxeuuid
Retrieving file: pxelinux.cfg/01-94-e3-6d-d4-ae-86
link up on port 0, speed 100, full duplex
Using ethernet@4a100000 device
TFTP from server 10.42.0.1; our IP address is 10.42.0.39
Filename ‘pxelinux.cfg/01-94-e3-6d-d4-ae-86’.
Load address: 0x80100000
Loading: T T T T T T T T T T T T T T T T T T T T
Retry count exceeded; starting again
Retrieving file: pxelinux.cfg/0A2A0027
link up on port 0, speed 100, full duplex
Using ethernet@4a100000 device
TFTP from server 10.42.0.1; our IP address is 10.42.0.39
Filename ‘pxelinux.cfg/0A2A0027’.
Load address: 0x80100000
Loading: T T T T T T T T T T T T T

Sincerely,

Pavel.

No use, the other one..

Just run:

https://github.com/RobertCNelson/boot-scripts/blob/master/tools/generate_extlinux.sh

it's under /opt/scripts/tools/

It default's to microSD, just tweak it for what you need:

https://github.com/RobertCNelson/boot-scripts/blob/master/tools/generate_extlinux.sh#L16

Regards,