• Forum
  • Bela booting/connecting from emmc

Hi, I have a Bela kit that will boot from the updated and flashed sd card running 0.3.8f image. It connects to the IDE fine. I can ssh into it at 192.168.7.2.
- I followed the tutorial to flash the emmc.
- I have also run the following command from the sd booted IDE

root@bela ~/Bela# /opt/Bela/bela_bootloader.sh && echo success
emmc contains Bela image
fatfs_boot
success
/root/Bela

However, when I reboot, remove the SD card and try to boot from the emmc image, the board leds flash and then the left most one blinks like it is booted. But it does not connect in my network preferences. I have a macbook pro 2020 running Big Sur 11.6.

Thanks!

it may be that the flashing didn't go well. I'd suggest you boot again from the SD card and run:

/opt/Bela/bela_flash_emmc.sh

and only that (don't run the flash_bootloader one). Ensure it doesn't print any error message and try again booting without SD card.

Thanks for responding! I have tried that a few times. Here is the output from the IDE terminal

root@bela ~/Bela# /opt/Bela/bela_flash_emmc.sh

+ '[' -z '' ']'

+ FLASH_DESTINATION=emmc

+ '[' emmc == emmc ']'

+ DEVICE=/dev/mmcblk1

+ MMCID=1

+ THIS_DEVICE=/dev/mmcblk0

++ mktemp -d /tmp/emmc_boot.XXXXXX

+ MNT_BOOT=/tmp/emmc_boot.ptQfNu

++ mktemp -d /tmp/emmc_root.XXXXXX

+ MNT_ROOT=/tmp/emmc_root.0fPCDV

++ mktemp -d /tmp/boot.XXXXX

+ MNT_THIS_BOOT=/tmp/boot.B9KhP

+ USR1=/sys/class/leds/beaglebone:green:usr1/trigger

+ USR2=/sys/class/leds/beaglebone:green:usr2/trigger

+ USR3=/sys/class/leds/beaglebone:green:usr3/trigger

+ SUCCESS=0

+ trap final_check EXIT

+ make --no-print-directory -C /root/Bela stop

No process to kill

+ echo default-on

+ echo default-on

+ echo default-on

+ grep /dev/mmcblk1p2

+ mount

+ grep -q 'on / '

+ umount -A /dev/mmcblk1p1

umount:

/dev/mmcblk1p1: not mounted

+ true

+ umount -A /dev/mmcblk1p2

umount:

/dev/mmcblk1p2: not mounted

+ true

+ grep /dev/mmcblk1

+ mount

+ sfdisk /dev/mmcblk1

+ echo '

label: dos

label-id: 0x68a0906e

device: /dev/mmcblk1

unit: sectors

/dev/mmcblk1p1 : start= 2048, size= 137953, type=c, bootable

/dev/mmcblk1p2 : start= 141312, type=83

'

Checking that no-one is using this disk right now ... OK

Disk /dev/mmcblk1: 3.6 GiB, 3825205248 bytes, 7471104 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: 0x68a0906e

Old situation:

Device Boot Start End Sectors Size Id Type

/dev/mmcblk1p1 * 2048 140000 137953 67.4M c W95 FAT32 (LBA)

/dev/mmcblk1p2 141312 7471103 7329792 3.5G 83 Linux

>>> Script header accepted.

>>> Script header accepted.

>>> Script header accepted.

>>> Script header accepted.

>>> Created a new DOS disklabel with disk identifier 0x68a0906e.

/dev/mmcblk1p1: Created a new partition 1 of type 'W95 FAT32 (LBA)' and of size 67.4 MiB.

Partition #1 contains a vfat signature.

Partition #2 contains a ext4 signature.

/dev/mmcblk1p2: Created a new partition 2 of type 'Linux' and of size 3.5 GiB.

+ mkfs.vfat /dev/mmcblk1p1

/dev/mmcblk1p3: Done.

New situation:

Device Boot Start End Sectors Size Id Type

/dev/mmcblk1p1 * 2048 140000 137953 67.4M c W95 FAT32 (LBA)

/dev/mmcblk1p2 141312 7471103 7329792 3.5G 83 Linux

The partition table has been altered.

Calling ioctl() to re-read partition table.

Syncing disks.

mkfs.fat 4.1 (2017-01-24)

+ mkfs.ext4 -F /dev/mmcblk1p2

mke2fs 1.43.4 (31-Jan-2017)

Discarding device blocks:

4096/916224

528384/916224

done

Creating filesystem with 916224 4k blocks and 229376 inodes

Filesystem UUID: a0ce3976-52fc-4b97-8871-a480b44d9efb

Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912, 819200, 884736

Allocating group tables: 0/28 done

Writing inode tables: 0/28 done

Creating journal (16384 blocks):

done

Writing superblocks and filesystem accounting information: 0/28



done

+ dosfslabel /dev/mmcblk1p1 BELABOOT

+ e2label /dev/mmcblk1p2 BELAROOTFS

+ mount /dev/mmcblk1p1 /tmp/emmc_boot.ptQfNu

+ mount /dev/mmcblk1p2 /tmp/emmc_root.0fPCDV

+ echo 'copying files, this may take a few minutes...'

+ mount /dev/mmcblk0p1 /tmp/boot.B9KhP

copying files, this may take a few minutes...

+ cp /tmp/boot.B9KhP/MLO /tmp/emmc_boot.ptQfNu

+ sync

+ cp /tmp/boot.B9KhP/u-boot.img /tmp/emmc_boot.ptQfNu

+ sync

+ rsync -r '--exclude=/tmp/boot.B9KhP/MLO,/tmp/boot.B9KhP/u-boot.img,/tmp/boot.B9KhP/FSCK*REC' /tmp/boot.B9KhP/MLO /tmp/boot.B9KhP/bela.version /tmp/boot.B9KhP/drivers /tmp/boot.B9KhP/u-boot.img /tmp/boot.B9KhP/uEnv.txt /tmp/emmc_boot.ptQfNu

+ cat /tmp/boot.B9KhP/uEnv.txt

+ sed 's/^\(\s*mmcid=\).*/\11/'

+ umount /tmp/boot.B9KhP

+ rm -rf /tmp/boot.B9KhP

+ cp -a /bin/ /boot/ /dev/ /etc/ /home/ /lib/ /opt/ /root/ /sbin/ /srv/ /usr/ /var/ /tmp/emmc_root.0fPCDV

yup the last command takes about 10 minutes to execute. While it's running, the lights on the BBB should all be on. When(if) they go back to normal, the process is finished.

Ahhh drp. Thank you!