Not able to boot via SD Card in my beaglebone black element14

I have beaglebone black element14 board. My board is booting perfectly fine from eMMC. I want to boot it via SD CARD so downloaded the uboot fron denx site, compiled and generated the MLO and uboot image file.Followed the procedure of portioning the SD CARD into fat32 and ext4 and copied the the MLO and u-boot.img file using the cp command to the fat32 partition.

I followed the prescribed mechanism of pressing the S2 push button before applying the power(I am only using USB for purpose of power and no external power). But after connecting the USB , the boards power LED glows but nothing appears on the console. The console cable is working as when i was booting from eMMC, i used to get debug messages on the console.

I read somewhere that i need to change the MLO file name in the eMMC.I did and now it is neither booting from eMMC nor from the SD card.

Request help please.

I

Forgot to say one thing. Doubting my MLO and uboot image file, i copied the MLO and u-boot.img file from the eMMC into my system and copied it to the SDCARD’s FAT32 boot partition. I did not copy the uEnv.txt file as it is required by the u-boot.img only(i guess). But it still did not work. I was expecting that at least i will get some debug messages from the MLO but the debug console is completely empty.

I find it curious the console is empty. In my experience, if the am335X ROM code can’t find MLO, it fills the console with '‘C’'s every couple of hundred mS.

You can use RAW mode where the ROM code will search sector 0, 256, 512 or 768 for a valid signature. As your MBR goes in sector 0, what happens if you place MLO at sector 256:

dd if=MLO of=/dev/sdb bs=512 seek=256 count=256 conv=notrunc
blockdev --flushbufs /dev/sdb

U-Boot SPL should then try to load u-boot.img from your FAT32 partition.

Mr. Peter ,

I did what you asked. It did print “C” around 10 times. But it is printing it when i give power to the board and do not press any boot button and around 1 min or so it prints a sequence of “C”.

On the contrary when i press the boot button and wait nothing is printing.

Shall i use an external power supply and check rather than relying on USB power(I am not a hardware guy). Do you think it might be the reason?

I flashed the MLO image found in the eMMC chip (that i copied to my laptop before changing its name). Do you think that would have worked? If not can you send me the working MLO and u-boot.img file so i can test with it.

Mr. Peter ,

    I did what you asked. It did print "C" around 10 times. But it is
printing it when i give power to the board and do not press any boot button
and around 1 min or so it prints a sequence of "C".
   On the contrary when i press the boot button and wait nothing is
printing.

Compare what you did with:

https://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-SetupmicroSDcard

    Shall i use an external power supply and check rather than relying on
USB power(I am not a hardware guy). Do you think it might be the reason?

    I flashed the MLO image found in the eMMC chip (that i copied to my
laptop before changing its name). Do you think that would have worked? If
not can you send me the working MLO and u-boot.img file so i can test with
it.

Current BBB production MLO/u-boot.img:

https://rcn-ee.com/repos/bootloader/am335x_evm/MLO-am335x_evm-v2015.10-r12
https://rcn-ee.com/repos/bootloader/am335x_evm/u-boot-am335x_evm-v2015.10-r12.img

Regards,

I downloaded the MLO and u-boot images from the above mentioned sites. But that did not work as well. Following is what i did step by step.

  1. Renamed the MLO-am335x_evm-v2015.10-r12 to MLO

  2. Renamed the u-boot-am335x_evm-v2015.10-r12.img to u-boot.img

  3. Ran the following script( which i downloaded from one of the sites) to partition the SDCARD

I downloaded the MLO and u-boot images from the above mentioned sites. But
that did not work as well. Following is what i did step by step.

1. Renamed the MLO-am335x_evm-v2015.10-r12 to MLO
2. Renamed the u-boot-am335x_evm-v2015.10-r12.img to u-boot.img
3. Ran the following script( which i downloaded from one of the sites) to
partition the SDCARD
-------------------------------------------------------------------------------------------------------------------------------------------------------
#!/bin/bash

#
# Script for formatting SD Card for booting Linux.
#
# Author: David Weber
# Copyright (C) 2011 Avnet Electronics Marketing
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#

function print_msg()
{
  echo ""
  echo
"--------------------------------------------------------------------------------"
  echo " $1"
  echo
"--------------------------------------------------------------------------------"
}

device=/dev/sdb;

# check command arguments
if [ "$#" -lt "1" ]; then
  echo "usage: sudo $0 <disk> [part1 size (MB)] [part2 size (MB)]"
  exit;
fi

if [ ! -b "${device}" ]; then
  print_msg "Error: device ${device} not found"
  exit
fi

# setup some constants
n_heads=255
n_sectors=63

^ That was a bug in x-loader, around 2009, fixed a long time ago..

sector_sz=512

# setup some defaults
part1_MB=120

if [ "$#" -gt "1" ]; then
  part1_MB=$2
fi

part1_n_cyl=`echo ${part1_MB}*1024*1024/${sector_sz}/${n_heads}/${n_sectors}
> bc`
part2_n_cyl=

# if the second partition size is specified, calculate n cylinders for it
if [ "$#" -gt "2" ]; then
  part2_MB=$3
  part2_n_cyl=`echo
${part2_MB}*1024*1024/${sector_sz}/${n_heads}/${n_sectors} | bc`
fi

# setup partition types
dos=0x0C
linux=L

# assign partition types to each partition
part1_type=${dos}
part2_type=${linux}

# assign partition labels to each partition
part1_label=boot
part2_label=root

# unmount any existing device partitions
print_msg "Unmounting any mounted partitions on ${device}"
devlist=`df | grep ${device}`
if [ "$devlist" != "" ]; then
  df | grep ${device} | awk '{print $1}' | xargs umount
fi

mbr_sz=532
mbr_file=sd.mbr.dd

# see man page for sfdisk for more info
print_msg "Clearing MBR (first ${mbr_sz} bytes) of ${device}"
dd of=${device} if=/dev/zero bs=${mbr_sz} count=1

# create partition table
print_msg "Creating partition table on ${device}"

# look for the MBR saved from a previous execution of this script
if [ -f "${mbr_file}" ]; then
  dd of=${device} if=${mbr_file} bs=${mbr_sz} count=1
else
  fdisk ${device} > /dev/null << EOF
w
EOF
  # save off the MBR so we can avoid running fdisk next time this script
runs, because
  # fdisk always produces a warning message
  dd of=${mbr_file} if=${device} bs=${mbr_sz} count=1
fi

# calculate number of cylinders on disk
device_sz=`blockdev --getsize64 ${device}`
n_cylinders=`echo ${device_sz}*1024/${n_heads}/${n_sectors}/${sector_sz} |
bc`

# create the partitions on the disk
print_msg "Creating boot and root partitions on ${device}"
sfdisk -D -H ${n_heads} -S ${n_sectors} -C ${n_cylinders} ${device} << EOF
,${part1_n_cyl},${part1_type},*
,${part2_n_cyl},${part2_type},-
EOF

^ That's broken in sfdisk >= 2.26.x

# insure that the kernel is aware of the new partitions
partprobe ${device}

# format the partitions
print_msg "Formatting (FAT32) boot partition ${device}1"
mkfs.vfat -F 32 -n "${part1_label}" ${device}1

print_msg "Formatting (EXT3) root partition ${device}2"
mkfs.ext3 -L "${part2_label}" ${device}2

# list the partitions to verify success
sfdisk -l ${device}
---------------------------------------------------------------------------------------------------------------------------------------------------------------------

4. Pulled out the SD card USB adaptor and inserted it again.

5. Created the boot and root directories in /media

     #sudo mkdir /media/boot
     #sudo mkdir /media/root

6. Mounted the /dev/sdb1(the fat32 partition) and /dev/sdb2(the root
partition)

    #sudo mount /dev/sdb1 /media/boot
    #sudo mount /dev/sdb2 /media/root

7. Copied the MLO and u-boot.img file to boot mount

    #sudo cp ./MLO /media/boot
    #sudo cp ./u-boot.img /media/boot

8. Unmounted the boot and root partitions

  #sudo umount /media/boot
  #sudo umount /media/root

9. Pulled out the usb adaptor from the PC
10. removed the sdcard from that and inserted in the beaglebone sdcard slot
11. Pressed the boot button and given power
12. NOTHING CAME ON THE CONSOLE
13. pulled out the power and given again without pressing the boot button,
and after around 1 min got sequence of "C" on the console.

I gave you a link for a reason:

https://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-SetupmicroSDcard

Regards,

I followed the above given site instructions but that failed as well.
Steps followed according to https://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-SetupmicroSDcard

I also did all the instruction give at http://www.armhf.com/boards/beaglebone-black/bbb-sd-install/ except i gave the boot partition type as ‘c(W95 FAT32 (LBA)’ rather than 'e(W95 FAT16 (LBA))'

That did not work as well.

Regards,

Madhukar Sah

I have beaglebone black element14 rev C.

Is there any problem in rev C related to booting from SDcard?

Can i conclude that my specific board has got some issue. Shall i proceed for replacement. Can i take it for my confirmation that the above detailed step by step procedure what i have described would work on a working board.

I suggest you contact Element 14 customer support for assistance with your board.

Gerald

Thank gerald. I will contact them.

Regards

Hello everyone,

I have two Beaglebone Black with Rev B6 version from Element 14 and one has this issue. I wasted one week in this issue. Thanks for your post.

for every one has this problem:
you have to give a boot flag to your partition ,you can do this with fdisk command :

fdisk /dev/sda
Command (m for help): m

Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition’s system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)

Command (m for help): a
Partition number (1-5):

Seems an old post.
But I have the same issue with element14 board. Version I have no information on board. EMMC boot is OK, but not Booting form SD card. On pressing S2 it send s CCCC and waits for serial boot.
Any updates? Thank you

Which image are you currently trying to boot on the microSD?

Regards,

1 Like

bone-debian-10.3-iot-armhf-2020-04-06-4gb.img
This one from official site.
Also I tried the method in one udemy course of making two partitions Fat16 and ext3 and copying MLO file into the BOOT partition.
In any case the board sends CCCC only through serial port.

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
mmcblk0      179:24   0 12.5M  0 disk
debian@beaglebone:~$ ^C

This is how I am getting for the 8GB memory card image inserted. (Now booted from eMMC)

try the snapshot:

probably already fix this if it was a u-boot problem… (use etcher.io to flash)

Regards

1 Like

Still not working. I think some issue with my Card or Board. Will try another card and reader. eMMC boots ok. but never boots from SD card. Card is Ok in Desktop and burning app
Thanks for the support.
i saw in internet that some others are also complaining same issue with element14 board