Cannot see U-Boot# prompt in terminal

Here is my sd-card:

debian@beaglebone:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
mmcblk1 179:0 0 3.6G 0 disk
└─mmcblk1p1 179:1 0 3.6G 0 part /
mmcblk1boot0 179:8 0 2M 1 disk
mmcblk1boot1 179:16 0 2M 1 disk
mmcblk1rpmb 179:24 0 512K 0 disk
mmcblk0 179:32 0 14.9G 0 disk
├─mmcblk0p1 179:33 0 64M 0 part

└─mmcblk0p2 179:34 0 1G 0 part

I executed script without modifs:
debian@beaglebone:/opt/scripts/tools$ sudo ./generate_extlinux.sh
[sudo] password for debian:
debian@beaglebone:/opt/scripts/tools$

But nothing changed on sd-card.
I still see u-boot.img and MLO in /boot.

Shakes head, i haven't tested for the old "dual partition" setup in
years.. I killed it back in 2014 and moved to a single ext4 partition
ever since.

Sorry, it's just never tested..

Regards,

New image is loaded in eMMC. Works fine.
Now I want to explore u-boot (i.e. boot from sd-card with no kernel)

Before I used this format-sdcard.sh script that formats sd-card and creates two partitions FAT32 (boot) and ext4 (rootfs).

Then, after building the u-boot I copied u-boot.img and MLO in the boot partition of sd-card.
The book where this approach is described was written in 2017 and obviously worked well with v2017 branch of u-boot.
With my crosstoolchain I couldn’t build 2017 branch of u-boot.
I succeeded with ‘master’ branch of u-boot (also with another configuration).

But with u-boot.img and MLO originated from ‘master’ branch (then copied to the boot folder on sd-card) the boot process from sd-card couldn’t successfully terminate.
So here is a couple questions (in order to use 'master branch of u-boot):

  • how format sd-card
  • where to copy u-boot.img and MLO (in the root … or in some partition).
    Thanks.

sudo dd if=./u-boot/MLO of=${DISK} count=1 seek=1 bs=128k
sudo dd if=./u-boot/u-boot.img of=${DISK} count=2 seek=1 bs=384k

Parition the media with a 4MB hole:

sudo sfdisk ${DISK} <<-__EOF__
4M,L,*
__EOF__

Format as ext4:

sudo mkfs.ext4 -L rootfs ${DISK}1

then configure /boot/extlinux/extlinux.conf

Regards,

Hi Robert,

Thanks. I’m not sure that I did this properly.
Anyway here is my session with sd-card:

pavel@ALABAMA:~/u-boot2$ sudo dd if=./u-boot/MLO of=${DISK} count=1 seek=1 bs=128k
0+1 records in
0+1 records out
92388 bytes (92 kB, 90 KiB) copied, 0,0268951 s, 3,4 MB/s
pavel@ALABAMA:~/u-boot2$ sudo dd if=./u-boot/u-boot.img of=${DISK} count=2 seek=1 bs=384k
1+1 records in
1+1 records out
474656 bytes (475 kB, 464 KiB) copied, 0,0415703 s, 11,4 MB/s
pavel@ALABAMA:~/u-boot2$ sudo sfdisk ${DISK} <<-EOF

4M,L,*
EOF
Checking that no-one is using this disk right now … FAILED

This disk is currently in use - repartitioning is probably a bad idea.
Umount all file systems, and swapoff all swap partitions on this disk.
Use the --no-reread flag to suppress this check.

sfdisk: Use the --force flag to overrule all checks.
pavel@ALABAMA:~/u-boot2$ sudo sfdisk --force ${DISK} <<-EOF

4M,L,*
EOF
Checking that no-one is using this disk right now … FAILED

This disk is currently in use - repartitioning is probably a bad idea.
Umount all file systems, and swapoff all swap partitions on this disk.
Use the --no-reread flag to suppress this check.

Disk /dev/sda: 14,9 GiB, 15931539456 bytes, 31116288 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x3244345d

Old situation:

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 8192 7372799 7364608 3,5G 83 Linux

Created a new DOS disklabel with disk identifier 0xd45cf218.
/dev/sda1: Created a new partition 1 of type ‘Linux’ and of size 14,9 GiB.
Partition #1 contains a ext4 signature.
/dev/sda2: Done.

New situation:
Disklabel type: dos
Disk identifier: 0xd45cf218

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 8192 31116287 31108096 14,9G 83 Linux

The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Device or resource busy
The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).
Syncing disks.
pavel@ALABAMA:~/u-boot2$ sudo mkfs.ext4 -L rootfs ${DISK}1
mke2fs 1.44.1 (24-Mar-2018)
/dev/sda1 contains a ext4 file system labelled ‘rootfs’
last mounted on /media/pavel/rootfs on Mon Aug 24 10:45:06 2020
Proceed anyway? (y,N) y
/dev/sda1 is mounted; will not make a filesystem here!
pavel@ALABAMA:~/u-boot2$ sudo umount /media/pavel/rootfs
pavel@ALABAMA:~/u-boot2$ sudo sfdisk ${DISK} <<-EOF

4M,L,*
EOF
Checking that no-one is using this disk right now … OK

Disk /dev/sda: 14,9 GiB, 15931539456 bytes, 31116288 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xd45cf218

Old situation:

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 8192 31116287 31108096 14,9G 83 Linux

Created a new DOS disklabel with disk identifier 0xc1d5995c.
/dev/sda1: Created a new partition 1 of type ‘Linux’ and of size 14,9 GiB.
Partition #1 contains a ext4 signature.
/dev/sda2: Done.

New situation:
Disklabel type: dos
Disk identifier: 0xc1d5995c

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 8192 31116287 31108096 14,9G 83 Linux

The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
pavel@ALABAMA:~/u-boot2$ sudo mkfs.ext4 -L rootfs ${DISK}1
mke2fs 1.44.1 (24-Mar-2018)
/dev/sda1 contains a ext4 file system labelled ‘rootfs’
last mounted on /media/pavel/rootfs on Mon Aug 24 10:45:06 2020
Proceed anyway? (y,N) y
Creating filesystem with 3888512 4k blocks and 972944 inodes
Filesystem UUID: 8a3066cb-8fbb-4f02-885b-2305f1332f00
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208

Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: y
done

pavel@ALABAMA:~/u-boot2$

sd-card seems to be formatted.
But I can’t generate extlinux.conf file. There is no /opt/scripts folder after building u-boot.

Sincerely,

Pavel.

Well … I’m not sure I understood your suggestion correctly, but here’s what I did:

  1. I didn’t find generate_extlinux.sh under /opt/scripts/tools/ on BBB, so I created it and edited 16th line
  2. Then I executed generate_extlinux.sh (still on BBB)
  3. Then I changed for Ubuntu, where I copied MLO and u-boot.img in rootfs on sd-card
  4. Then I’ve tried to boot from sd-card.
    Here is what I got:

U-Boot SPL 2019.04-dirty (Aug 13 2020 - 16:16:20 +0200)
Trying to boot from MMC1
Loading Environment from EXT4… ** File not found /boot/uboot.env **

** Unable to read “/boot/uboot.env” from mmc0:1 **

U-Boot 2019.04-dirty (Aug 13 2020 - 16:16:20 +0200)

CPU : AM335X-GP rev 2.1
I2C: ready
DRAM: 512 MiB
No match for driver ‘omap_hsmmc’
No match for driver ‘omap_hsmmc’
Some drivers were not found
Reset Source: Power-on reset has occurred.
RTC 32KCLK Source: External.
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from EXT4… ** File not found /boot/uboot.env **

** Unable to read “/boot/uboot.env” from mmc0:1 **
Board: BeagleBone Black
not set. Validating first E-fuse MAC
BeagleBone Black:
BeagleBone: cape eeprom: i2c_probe: 0x54:
BeagleBone: cape eeprom: i2c_probe: 0x55:
BeagleBone: cape eeprom: i2c_probe: 0x56:
BeagleBone: cape eeprom: i2c_probe: 0x57:
Net: eth0: MII MODE
cpsw, usb_ether
Press SPACE to abort autoboot in 0 seconds
board_name=[A335BNLT] …
board_rev=[000C] …
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
switch to partitions #0, OK
mmc0 is current device
Scanning 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
Checking for: /uEnv.txt …
Checking for: /boot.scr …
Checking for: /boot/boot.scr …
Checking for: /boot/uEnv.txt …
** Invalid partition 2 **
** Invalid partition 3 **
** Invalid partition 4 **
** Invalid partition 5 **
** Invalid partition 6 **
** Invalid partition 7 **
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1…
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
254 bytes read in 14 ms (17.6 KiB/s)
1: Linux 4.19.94-ti-r42
Retrieving file: /boot/vmlinuz-4.19.94-ti-r42
10095592 bytes read in 651 ms (14.8 MiB/s)
append: console=ttyO0,115200n8 root=/dev/mmcblk0 ro rootfstype=ext4 coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet
Retrieving file: /boot/dtbs/4.19.94-ti-r42/am335x-boneblack.dtb
59483 bytes read in 26 ms (2.2 MiB/s)

Flattened Device Tree blob at 88000000

Booting using the fdt blob at 0x88000000
Loading Device Tree to 8ffee000, end 8ffff85a … OK

Starting kernel …

[ 0.000762] timer_probe: no matching timers found
[ 0.114566] l4_wkup_cm:clk:0010:0: failed to disable
[ 0.766013] omap_voltage_late_init: Voltage driver support not added
[ 0.977112] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,0)
[ 0.985608] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.19.94-ti-r42 #1buster
[ 0.992773] Hardware name: Generic AM33XX (Flattened Device Tree)
[ 0.998937] [] (unwind_backtrace) from [] (show_stack+0x20/0x24)
[ 1.006731] [] (show_stack) from [] (dump_stack+0x8c/0xa0)
[ 1.013995] [] (dump_stack) from [] (panic+0x10c/0x278)
[ 1.020997] [] (panic) from [] (mount_block_root+0x270/0x290)
[ 1.028518] [] (mount_block_root) from [] (mount_root+0x12c/0x148)
[ 1.036473] [] (mount_root) from [] (prepare_namespace+0x160/0x1a8)
[ 1.044517] [] (prepare_namespace) from [] (kernel_init_freeable+0x3f8/0x40c)
[ 1.053433] [] (kernel_init_freeable) from [] (kernel_init+0x18/0x128)
[ 1.061739] [] (kernel_init) from [] (ret_from_fork+0x14/0x2c)
[ 1.069341] Exception stack(0xdc149fb0 to 0xdc149ff8)
[ 1.074415] 9fa0: 00000000 00000000 00000000 00000000
[ 1.082630] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.090845] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 1.097509] —[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,0) ]—

And this is repeated when I took out the SD card.
So, my attempt to boot from sd-card corrupted the image in eMMC ?

No nothing is corrupted, you imputed the wrong drive partition:

root=/dev/mmcblk0

While that is the microSD, you didn't specify the partition:

root=/dev/mmcblk0p1
or
root=/dev/mmcblk0p2

FOr the eMMC, it would be:

root=/dev/mmcblk1p1
root=/dev/mmcblk1p2

and so on..

aka, correctly input the drive/partition into
/boot/extlinux/extlinux.conf that you wish to use..

Regards,

Well … extlinux.conf is generated.
But how to use it ?
Should I transfer it on host machine in the folder where u-boot is built and do something there ?
Thanks ?

It's just a file in the Root File System.. Let me guess, it's on the the eMMC?

Just boot a simple console image:

https://elinux.org/Beagleboard:Latest-images-testing#Debian_10_.28Buster.29_Console

Mount the eMMC and update the file..

mkdir disk
sudo mount /dev/mmcblk1p1 ./disk/
sudo nano ./disk/boot/extlinux/extlinux.conf
sudo umount ./disk/

Regards,

Sorry, didn’t understand.
My actual goal is to have sd-card with only two files MLO and u-boot.img in order to explore u-boot commands.
These two files are actually on host Ubuntu machine.
According to your previous message I don’t see how can I get these files on sd-card.
Could you precise, please.

I don't understand either..

6 hours ago you had exactly that, but you didn't properly specify mmc
node name in the extlinux.conf file, so it failed on bootup.

I told you how to fix that, so why can't you fix /boot/extlinux/extlinux.conf ?

Once you fix /boot/extlinux/extlinux.conf so it boots today, you can
go ahead and install what ever version of mainline "u-boot" and it'll
just work..

Regards,

I followed exactly your suggestions until generating extlinux.conf.
I don’t understand why should I mount eMMC if I can access it directly … as you mentioned in one of your previous mails it is generated in /boot/extlinux/extlinux.conf.
I could access it from my host via serial terminal or ssh.
How do I update it?
And then, once extlinux.conf updated, how do I use it ?

By the way, now I can’t do anything because after all these manipulations BBB fails to boot from eMMC::

U-Boot SPL 2019.04-00002-g07d5700e21 (Mar 06 2020 - 11:24:55 -0600)
Trying to boot from MMC2
Loading Environment from EXT4… ** File not found /boot/uboot.env **

** Unable to read “/boot/uboot.env” from mmc0:1 **

U-Boot 2019.04-00002-g07d5700e21 (Mar 06 2020 - 11:24:55 -0600), Build: jenkins-github_Bootloader-Builder-137

CPU : AM335X-GP rev 2.1
I2C: ready
DRAM: 512 MiB
No match for driver ‘omap_hsmmc’
No match for driver ‘omap_hsmmc’
Some drivers were not found
Reset Source: Power-on reset has occurred.
RTC 32KCLK Source: External.
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from EXT4… ** File not found /boot/uboot.env **

** Unable to read “/boot/uboot.env” from mmc0:1 **
Board: BeagleBone Black
not set. Validating first E-fuse MAC
BeagleBone Black:
BeagleBone: cape eeprom: i2c_probe: 0x54:
BeagleBone: cape eeprom: i2c_probe: 0x55:
BeagleBone: cape eeprom: i2c_probe: 0x56:
BeagleBone: cape eeprom: i2c_probe: 0x57:
Net: eth0: MII MODE
cpsw, usb_ether
Press SPACE to abort autoboot in 0 seconds
board_name=[A335BNLT] …
board_rev=[000C] …
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
switch to partitions #0, OK
mmc0 is current device
Scanning 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
Checking for: /uEnv.txt …
Checking for: /boot.scr …
Checking for: /boot/boot.scr …
Checking for: /boot/uEnv.txt …
** Invalid partition 2 **
** Invalid partition 3 **
** Invalid partition 4 **
** Invalid partition 5 **
** Invalid partition 6 **
** Invalid partition 7 **
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1…
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
256 bytes read in 13 ms (18.6 KiB/s)
1: Linux 4.19.94-ti-r42
Retrieving file: /boot/vmlinuz-4.19.94-ti-r42
10095592 bytes read in 648 ms (14.9 MiB/s)
append: console=ttyO0,115200n8 root=/dev/mmcblk0p1 ro rootfstype=ext4 coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet
Retrieving file: /boot/dtbs/4.19.94-ti-r42/am335x-boneblack.dtb
59483 bytes read in 25 ms (2.3 MiB/s)

Flattened Device Tree blob at 88000000

Booting using the fdt blob at 0x88000000
Loading Device Tree to 8ffee000, end 8ffff85a … OK

Starting kernel …

[ 0.000762] timer_probe: no matching timers found
[ 0.115116] l4_wkup_cm:clk:0010:0: failed to disable
[ 0.770031] omap_voltage_late_init: Voltage driver support not added
[ 1.004670] Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
[ 1.018930] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.19.94-ti-r42 #1buster
[ 1.026095] Hardware name: Generic AM33XX (Flattened Device Tree)
[ 1.032263] [] (unwind_backtrace) from [] (show_stack+0x20/0x24)
[ 1.040057] [] (show_stack) from [] (dump_stack+0x8c/0xa0)
[ 1.047321] [] (dump_stack) from [] (panic+0x10c/0x278)
[ 1.054322] [] (panic) from [] (kernel_init+0x120/0x128)
[ 1.061407] [] (kernel_init) from [] (ret_from_fork+0x14/0x2c)
[ 1.069008] Exception stack(0xdc149fb0 to 0xdc149ff8)
[ 1.074084] 9fa0: 00000000 00000000 00000000 00000000
[ 1.082299] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.090514] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 1.097180] —[ end Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance. ]—

U-Boot SPL 2019.04-00002-g07d5700e21 (Mar 06 2020 - 11:24:55 -0600)
Trying to boot from MMC2
Loading Environment from EXT4… Card did not respond to voltage select!

U-Boot 2019.04-00002-g07d5700e21 (Mar 06 2020 - 11:24:55 -0600), Build: jenkins-github_Bootloader-Builder-137

CPU : AM335X-GP rev 2.1
I2C: ready
DRAM: 512 MiB
No match for driver ‘omap_hsmmc’
No match for driver ‘omap_hsmmc’
Some drivers were not found
Reset Source: Power-on reset has occurred.
RTC 32KCLK Source: External.
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from EXT4… Card did not respond to voltage select!
Board: BeagleBone Black
not set. Validating first E-fuse MAC
BeagleBone Black:
BeagleBone: cape eeprom: i2c_probe: 0x54:
BeagleBone: cape eeprom: i2c_probe: 0x55:
BeagleBone: cape eeprom: i2c_probe: 0x56:
BeagleBone: cape eeprom: i2c_probe: 0x57:
Net: eth0: MII MODE
cpsw, usb_ether
Press SPACE to abort autoboot in 0 seconds
board_name=[A335BNLT] …
board_rev=[000C] …
Card did not respond to voltage select!
Card did not respond to voltage select!
Card did not respond to voltage select!
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
Card did not respond to voltage select!
Card did not respond to voltage select!
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1…
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
256 bytes read in 13 ms (18.6 KiB/s)
1: Linux 4.19.94-ti-r42
Retrieving file: /boot/vmlinuz-4.19.94-ti-r42
10095592 bytes read in 648 ms (14.9 MiB/s)
append: console=ttyO0,115200n8 root=/dev/mmcblk0p1 ro rootfstype=ext4 coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet
Retrieving file: /boot/dtbs/4.19.94-ti-r42/am335x-boneblack.dtb
59483 bytes read in 26 ms (2.2 MiB/s)

Flattened Device Tree blob at 88000000

Booting using the fdt blob at 0x88000000
Loading Device Tree to 8ffee000, end 8ffff85a … OK

Starting kernel …

[ 0.000767] timer_probe: no matching timers found
[ 0.115091] l4_wkup_cm:clk:0010:0: failed to disable
[ 0.769770] omap_voltage_late_init: Voltage driver support not added
[ 0.977109] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 0.985429] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.19.94-ti-r42 #1buster
[ 0.992594] Hardware name: Generic AM33XX (Flattened Device Tree)
[ 0.998758] [] (unwind_backtrace) from [] (show_stack+0x20/0x24)
[ 1.006552] [] (show_stack) from [] (dump_stack+0x8c/0xa0)
[ 1.013815] [] (dump_stack) from [] (panic+0x10c/0x278)
[ 1.020818] [] (panic) from [] (mount_block_root+0x1e4/0x290)
[ 1.028339] [] (mount_block_root) from [] (mount_root+0x12c/0x148)
[ 1.036293] [] (mount_root) from [] (prepare_namespace+0x160/0x1a8)
[ 1.044337] [] (prepare_namespace) from [] (kernel_init_freeable+0x3f8/0x40c)
[ 1.053255] [] (kernel_init_freeable) from [] (kernel_init+0x18/0x128)
[ 1.061560] [] (kernel_init) from [] (ret_from_fork+0x14/0x2c)
[ 1.069161] Exception stack(0xdc149fb0 to 0xdc149ff8)
[ 1.074236] 9fa0: 00000000 00000000 00000000 00000000
[ 1.082452] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.090666] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 1.097330] —[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]—

It's the eMMC, use

root=/dev/mmcblk1p1

in extlinux.conf.

Regards,

I suspect someone will point out where my interpretation is faulty
but...

** Unable to read "/boot/uboot.env" from mmc0:1 **

  mmc0 is, I believe, the SD card; I presume the :1 is "partition 1"; at
least mine booted with a standard image on SD card shows as being
/dev/mmcblk0p1. And standard images don't have a uboot.env file.

debian@beaglebone:~$ ls -l /boot
total 20108
-rw-r--r-- 1 root root 162601 Aug 19 13:38 config-4.19.94-ti-r48
drwxr-xr-x 3 root root 4096 Aug 19 17:14 dtbs
-rw-r--r-- 1 root root 6617852 Aug 19 17:20 initrd.img-4.19.94-ti-r48
-rw-r--r-- 1 root root 542 Aug 19 21:34 SOC.sh
-rw-r--r-- 1 root root 3626463 Aug 19 13:38 System.map-4.19.94-ti-r48
drwxr-xr-x 2 root root 4096 Aug 19 17:23 uboot
-rw-r--r-- 1 debian debian 2062 Aug 19 21:34 uEnv.txt
-rwxr-xr-x 1 root root 10158592 Aug 19 13:38 vmlinuz-4.19.94-ti-r48
debian@beaglebone:~$

... so did you create any such uboot.env file and place that on the SD
care?

mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt ...
Checking for: /boot.scr ...
Checking for: /boot/boot.scr ...
Checking for: /boot/uEnv.txt ...

  Do ANY of these files exist on the SD card?

mmc1(part 0) is current device
Scanning mmc 1:1...

  And here it appears it gave up on the SD card and switched to the eMMC

Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
256 bytes read in 13 ms (18.6 KiB/s)
1: Linux 4.19.94-ti-r42
Retrieving file: /boot/vmlinuz-4.19.94-ti-r42
10095592 bytes read in 648 ms (14.9 MiB/s)
append: console=ttyO0,115200n8 root=/dev/mmcblk0p1 ro rootfstype=ext4

... though that line looks, to this neophyte, like... after loading the
core image from eMMC, it is setting up the SD card to be the root file
system.

[ 1.004670] Kernel panic - not syncing: No working init found. Try
passing init= option to kernel. See Linux
Documentation/admin-guide/init.rst for guidance.

  Unfortunately, that page doesn't seem too helpful.

[ 1.097330] ---[ end Kernel panic - not syncing: VFS: Unable to mount
root fs on unknown-block(0,0) ]---

  Now, that message is at
https://www.kernel.org/doc/Documentation/admin-guide/init.rst with this
advice:

"""
1) **Unable to mount root FS**: Set "debug" kernel parameter (in bootloader
   config file or CONFIG_CMDLINE) to get more detailed kernel messages.
"""

Actually I have to start from scratch because as I mentioned before BBB fails to boot from eMMC and the SD card is empty.
Well I will once again regenerate the image in eMMC and once again format the SD card in ext4.
At this critical stage, I had an empty SD card, formatted in ext4 with a single “rootfs” partition.
So the next step (if my understanding is correct) was to create a boot partition on the SD card, where I could then transfer MLO and u-boot.img.
You say I should edit exlinux.conf.
Ok i will do it as you suggest
And then?
What should I do with this exlinux.conf in order to create a boot partition on the SD card.
BTW execution of generate_extlinux.sh (which creates exlinux.conf on eMMC) corrupts eMMC: after execution of generate_extlinux.sh eMMC becomes “unbootable”.

Hi Dennis,

Please see my remarks below

I suspect someone will point out where my interpretation is faulty
but…

** Unable to read “/boot/uboot.env” from mmc0:1 **

mmc0 is, I believe, the SD card; I presume the :1 is “partition 1”; at
least mine booted with a standard image on SD card shows as being
/dev/mmcblk0p1. And standard images don’t have a uboot.env file.

debian@beaglebone:~$ ls -l /boot
total 20108
-rw-r–r-- 1 root root 162601 Aug 19 13:38 config-4.19.94-ti-r48
drwxr-xr-x 3 root root 4096 Aug 19 17:14 dtbs
-rw-r–r-- 1 root root 6617852 Aug 19 17:20 initrd.img-4.19.94-ti-r48
-rw-r–r-- 1 root root 542 Aug 19 21:34 SOC.sh
-rw-r–r-- 1 root root 3626463 Aug 19 13:38 System.map-4.19.94-ti-r48
drwxr-xr-x 2 root root 4096 Aug 19 17:23 uboot
-rw-r–r-- 1 debian debian 2062 Aug 19 21:34 uEnv.txt
-rwxr-xr-x 1 root root 10158592 Aug 19 13:38 vmlinuz-4.19.94-ti-r48
debian@beaglebone:~$

… so did you create any such uboot.env file and place that on the SD
care?

No, sd-card was empty, ext4-fromatted with single partition rootfs.

mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt …
Checking for: /boot.scr …
Checking for: /boot/boot.scr …
Checking for: /boot/uEnv.txt …

Do ANY of these files exist on the SD card?

No, sd-card was empty I prepared it for transferring u-boot files.

I’ve onlly one sd-card, so after regenerating the image in eMMC I plan to use it for u-boot exploring. My comprehension is as follows: at that stage I had to create in some way boot partition in order to transfer there MLO and u-boot.img on host machine.

Actually I have to start from scratch because as I mentioned before BBB fails to boot from eMMC and the SD card is empty.

No you don't, this is your decision. Grab a spare microSD and copy a
console image to it, then you can boot with the spare microSD and fix
the eMMC's extlinux.conf..

Well I will once again regenerate the image in eMMC and once again format the SD card in ext4.
At this critical stage, I had an empty SD card, formatted in ext4 with a single "rootfs" partition.
So the next step (if my understanding is correct) was to create a boot partition on the SD card, where I could then transfer MLO and u-boot.img.
You say I should edit exlinux.conf.
Ok i will do it as you suggest
And then?
What should I do with this exlinux.conf in order to create a boot partition on the SD card.
BTW execution of generate_extlinux.sh (which creates exlinux.conf on eMMC) corrupts eMMC: after execution of generate_extlinux.sh eMMC becomes "unbootable".

It's not unbootable, your using the eMMC, change the
root=/dev/mmcblk0p1 to root=/dev/mmcblk1p1

It's hard-coded to the microSD because I spent about a minute writing
generate_extlinux.sh to show 'how' it could be done..

Regards,

Actually I have to start from scratch because as I mentioned before BBB fails to boot from eMMC and the SD card is empty.

No you don’t, this is your decision. Grab a spare microSD and copy a
console image to it, then you can boot with the spare microSD and fix
the eMMC’s extlinux.conf…

The problem is I have only one sd-card. Once I flash eMMC from it, I begin to use it for other purposes.
But Ok, I’ll buy another one.

Well I will once again regenerate the image in eMMC and once again format the SD card in ext4.
At this critical stage, I had an empty SD card, formatted in ext4 with a single “rootfs” partition.
So the next step (if my understanding is correct) was to create a boot partition on the SD card, where I could then transfer MLO and u-boot.img.
You say I should edit exlinux.conf.
Ok i will do it as you suggest
And then?
What should I do with this exlinux.conf in order to create a boot partition on the SD card.
BTW execution of generate_extlinux.sh (which creates exlinux.conf on eMMC) corrupts eMMC: after execution of generate_extlinux.sh eMMC becomes “unbootable”.

It’s not unbootable, your using the eMMC, change the
root=/dev/mmcblk0p1 to root=/dev/mmcblk1p1

It’s hard-coded to the microSD because I spent about a minute writing
generate_extlinux.sh to show ‘how’ it could be done…

Ok, what next … keeping in mind that ultimate goal is to transfer MLO and u-boot.img to sd-card ?

now fixed.. https://github.com/RobertCNelson/boot-scripts/commit/52f044c01bf91827d771ff786ea39338add2076a

Regards,