Ubuntu eMMC image

Hi,

I have seen there is an updated version of the ubuntu images released via this thread. I understand these run off the micro SD card, and am trying to flash the image to the eMMC. I noticed in the setup steps as per the install guide that there seems to be specific images with ‘eMMC-flasher’ as part of the name, which I can’t find in the new directory.

Just wondering if this ‘flasher’ image is required specifically to flash the eMMC, or if there is a way to flash the normal images. For reference I am using a BB black industrial.

Cheers

Hi @wood-brandon yes, i stopped doing discreet “flasher” images, it artificially doubles my server hosting size… (and thus “upload”, so things takes 2x…)

this should work… but please let me know if it doesn’t!!! So from the command line…

sudo apt update
sudo apt install bb-beagle-flasher

Then configure for BBB microSD → eMMC:

sudo cp -v /etc/beagle-flasher/beaglebone-black-microsd-to-emmc /etc/default/beagle-flasher

Then 2 modes…

Basic user-mode…

sudo beagle-flasher

bootup “auto” flasher mode…

sudo enable-beagle-flasher

Regards,

1 Like

Adding more details:

sudo beagle-flashe
--------------------------------------------------------------------------------
Version: [1.20220202.0: Implement LED Error conditions...]
--------------------------------------------------------------------------------
cat /etc/default/beagle-flasher:
--------------------------------------------------------------------------------
#debug_over_display=tty0
source=/dev/mmcblk0
destination=/dev/mmcblk1
rfs_partition=single
rfs_rootfs_type=ext4
rfs_rootfs_startmb=4
bootloader=/opt/u-boot/bb-u-boot-am335x-evm/install-mmcblk1.sh
flash_back=beaglebone-black-emmc-to-microsd
--------------------------------------------------------------------------------
INFO: Preparing sysctl
INFO: [sysctl: vm.min_free_kbytes=[2783]
INFO: [sysctl: setting: [sysctl -w vm.min_free_kbytes=16384]
vm.min_free_kbytes = 16384
--------------------------------------------------------------------------------
INFO: [lsblk -i]
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
mmcblk1      179:0    0  3.6G  0 disk 
mmcblk1boot0 179:256  0    4M  1 disk 
mmcblk1boot1 179:512  0    4M  1 disk 
mmcblk0      179:768  0  7.4G  0 disk 
`-mmcblk0p1  179:769  0  7.4G  0 part /
--------------------------------------------------------------------------------
INFO: copying [/dev/mmcblk0] -> [/dev/mmcblk1]
--------------------------------------------------------------------------------
INFO: [source=/dev/mmcblk0] is a valid block device
INFO: [destination=/dev/mmcblk1] is a valid block device
INFO: [/boot/config-5.10.100-ti-r37]
INFO: Generating: [/boot/initrd.img-5.10.100-ti-r37]
update-initramfs: Generating /boot/initrd.img-5.10.100-ti-r37
--------------------------------------------------------------------------------
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk1]
--------------------------------------------------------------------------------
INFO: Erasing: [/dev/mmcblk1]
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk1]
--------------------------------------------------------------------------------
INFO: [dd if=/dev/zero of=/dev/mmcblk1 bs=1M count=108 status=progress]
105906176 bytes (106 MB, 101 MiB) copied, 2 s, 52.7 MB/s
108+0 records in
108+0 records out
113246208 bytes (113 MB, 108 MiB) copied, 9.93355 s, 11.4 MB/s
--------------------------------------------------------------------------------
INFO: [dd if=/dev/mmcblk1 of=/dev/null bs=1M count=108 status=progress]
83886080 bytes (84 MB, 80 MiB) copied, 2 s, 41.5 MB/s
108+0 records in
108+0 records out
113246208 bytes (113 MB, 108 MiB) copied, 2.80586 s, 40.4 MB/s
--------------------------------------------------------------------------------
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk1]
--------------------------------------------------------------------------------
INFO: Erasing: [/dev/mmcblk1] complete
--------------------------------------------------------------------------------
INFO: [/bin/bash /opt/u-boot/bb-u-boot-am335x-evm/install-mmcblk1.sh]
dd if=/opt/u-boot/bb-u-boot-am335x-evm/MLO of=/dev/mmcblk1 count=2 seek=1 bs=128k
0+1 records in
0+1 records out
106468 bytes (106 kB, 104 KiB) copied, 0.0290286 s, 3.7 MB/s
dd if=/opt/u-boot/bb-u-boot-am335x-evm/u-boot-dtb.img of=/dev/mmcblk1 count=4 seek=1 bs=384k
1+1 records in
1+1 records out
670956 bytes (671 kB, 655 KiB) copied, 0.0618956 s, 10.8 MB/s
--------------------------------------------------------------------------------
INFO: Partitioning: /dev/mmcblk1
INFO: /sbin/sfdisk: [sfdisk from util-linux 2.34]
INFO: /sbin/sfdisk: [/sbin/sfdisk --force /dev/mmcblk1]
INFO: /sbin/sfdisk: [4M,,L,*]
--------------------------------------------------------------------------------
Checking that no-one is using this disk right now ... OK

Disk /dev/mmcblk1: 3.58 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

>>> Created a new DOS disklabel with disk identifier 0x74b19d5c.
/dev/mmcblk1p1: Created a new partition 1 of type 'Linux' and of size 3.6 GiB.
/dev/mmcblk1p2: Done.

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

Device         Boot Start     End Sectors  Size Id Type
/dev/mmcblk1p1 *     8192 7471103 7462912  3.6G 83 Linux

The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk1]
--------------------------------------------------------------------------------
INFO: Formatting: /dev/mmcblk1
/sbin/mkfs.ext4  /dev/mmcblk1p1 -L rootfs
mke2fs 1.45.5 (07-Jan-2020)
Discarding device blocks: done                            
Creating filesystem with 932864 4k blocks and 233392 inodes
Filesystem UUID: 6b191326-bfec-419a-b8dd-35b7308c7dab
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736

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

--------------------------------------------------------------------------------
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk1]
--------------------------------------------------------------------------------
INFO: Formatting: /dev/mmcblk1 complete
--------------------------------------------------------------------------------
INFO: Copying: /dev/mmcblk0p1 -> /dev/mmcblk1p1
INFO: [mount /dev/mmcblk1p1 /tmp/rootfs/ -o async,noatime]
INFO: /usr/bin/rsync: [/ -> /tmp/rootfs/]
          1.13G  99%    3.95MB/s    0:04:32 (xfr#22075, to-chk=0/27445)   
--------------------------------------------------------------------------------
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk1]
--------------------------------------------------------------------------------
INFO: Copying: Kernel modules
INFO: /usr/bin/rsync: /lib/modules/5.10.100-ti-r37/ -> /tmp/rootfs/lib/modules/5.10.100-ti-r37/
         63.09M 100%    2.59MB/s    0:00:23 (xfr#2542, to-chk=0/2939)   
--------------------------------------------------------------------------------
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk1]
--------------------------------------------------------------------------------
INFO: Generating: /etc/fstab
INFO: [cat /tmp/rootfs/etc/fstab]
# /etc/fstab: static file system information.
#
/dev/mmcblk1p1  /  ext4  noatime,errors=remount-ro  0  1
debugfs  /sys/kernel/debug  debugfs  mode=755,uid=root,gid=gpio,defaults  0  0
--------------------------------------------------------------------------------
INFO: [cat /tmp/rootfs/boot/uEnv.txt]
#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0

uname_r=5.10.100-ti-r37
#uuid=
#dtb=

###U-Boot Overlays###
###Documentation: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays
###Master Enable
enable_uboot_overlays=1
###
###Overide capes with eeprom
#uboot_overlay_addr0=<file0>.dtbo
#uboot_overlay_addr1=<file1>.dtbo
#uboot_overlay_addr2=<file2>.dtbo
#uboot_overlay_addr3=<file3>.dtbo
###
###Additional custom capes
#uboot_overlay_addr4=<file4>.dtbo
#uboot_overlay_addr5=<file5>.dtbo
#uboot_overlay_addr6=<file6>.dtbo
#uboot_overlay_addr7=<file7>.dtbo
###
###Custom Cape
#dtb_overlay=<file8>.dtbo
###
###Disable auto loading of virtual capes (emmc/video/wireless/adc)
#disable_uboot_overlay_emmc=1
#disable_uboot_overlay_video=1
#disable_uboot_overlay_audio=1
#disable_uboot_overlay_wireless=1
#disable_uboot_overlay_adc=1
###
###Cape Universal Enable
enable_uboot_cape_universal=1
###
###Debug: disable uboot autoload of Cape
#disable_uboot_overlay_addr0=1
#disable_uboot_overlay_addr1=1
#disable_uboot_overlay_addr2=1
#disable_uboot_overlay_addr3=1
###
###U-Boot fdt tweaks... (60000 = 384KB)
#uboot_fdt_buffer=0x60000
###U-Boot Overlays###

console=ttyS0,115200n8
cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet

#In the event of edid real failures, uncomment this next line:
#cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet video=HDMI-A-1:1024x768@60e

#Use an overlayfs on top of a read-only root filesystem:
#cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet overlayroot=tmpfs

##enable Generic eMMC Flasher:
#cmdline=init=/usr/sbin/init-beagle-flasher
--------------------------------------------------------------------------------
INFO: [cp -v /etc/beagle-flasher/beaglebone-black-emmc-to-microsd /tmp/rootfs/etc/default/beagle-flasher]
'/etc/beagle-flasher/beaglebone-black-emmc-to-microsd' -> '/tmp/rootfs/etc/default/beagle-flasher'
--------------------------------------------------------------------------------
INFO: [cat /tmp/rootfs/etc/default/generic-sys-mods]
#This file is sourced by /usb/bin/bb-growpart
ROOT_DRIVE=/dev/mmcblk1
ROOT_PARTITION=1
ARCH_SOC_MODULES=am335x
--------------------------------------------------------------------------------
Copying: /dev/mmcblk0p1 -> /dev/mmcblk1p1 complete
--------------------------------------------------------------------------------
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk1]
--------------------------------------------------------------------------------
INFO: [umount /tmp/rootfs/ || umount -l /tmp/rootfs/ || write_failure]
--------------------------------------------------------------------------------
INFO: Force writeback of eMMC buffers by Syncing: /dev/mmcblk1
INFO: [dd if=/dev/mmcblk1 of=/dev/null count=100000 status=progress]
27902464 bytes (28 MB, 27 MiB) copied, 1 s, 27.9 MB/s
100000+0 records in
100000+0 records out
51200000 bytes (51 MB, 49 MiB) copied, 1.87339 s, 27.3 MB/s
--------------------------------------------------------------------------------
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk1]
--------------------------------------------------------------------------------

eMMC boot looks good…

U-Boot SPL 2021.10-gc2b239f7 (Dec 17 2021 - 16:57:21 +0000)
Trying to boot from MMC2


U-Boot 2021.10-gc2b239f7 (Dec 17 2021 - 16:57:21 +0000)

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.
WDT:   Started with servicing (60s timeout)
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from EXT4... 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
mmc1(part 0) is current device
Scanning mmc 1:1...
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk mmc@48060000.blk...
Disk mmc@48060000.blk not ready
Scanning disk mmc@481d8000.blk...
Found 2 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
Checking for: /uEnv.txt ...
Checking for: /boot/uEnv.txt ...
1713 bytes read in 3 ms (557.6 KiB/s)
Loaded environment from /boot/uEnv.txt
Checking if uname_r is set in /boot/uEnv.txt...
Running uname_boot ...
loading /boot/vmlinuz-5.10.100-ti-r37 ...
10387968 bytes read in 656 ms (15.1 MiB/s)
debug: [enable_uboot_overlays=1] ...
debug: [enable_uboot_cape_universal=1] ...
debug: [uboot_base_dtb_univ=am335x-boneblack-uboot-univ.dtb] ...
uboot_overlays: [uboot_base_dtb=am335x-boneblack-uboot-univ.dtb] ...
uboot_overlays: Switching too: dtb=am335x-boneblack-uboot-univ.dtb ...
loading /boot/dtbs/5.10.100-ti-r37/am335x-boneblack-uboot-univ.dtb ...
215402 bytes read in 17 ms (12.1 MiB/s)
Found 0 extension board(s).
uboot_overlays: [fdt_buffer=0x60000] ...
uboot_overlays: loading /boot/dtbs/5.10.100-ti-r37/overlays/BB-ADC-00A0.dtbo ...
645 bytes read in 4 ms (157.2 KiB/s)
uboot_overlays: loading /boot/dtbs/5.10.100-ti-r37/overlays/BB-BONE-eMMC1-01-00A0.dtbo ...
1605 bytes read in 4 ms (391.6 KiB/s)
uboot_overlays: loading /boot/dtbs/5.10.100-ti-r37/overlays/BB-HDMI-TDA998x-00A0.dtbo ...
5321 bytes read in 4 ms (1.3 MiB/s)
loading /boot/initrd.img-5.10.100-ti-r37 ...
10662513 bytes read in 683 ms (14.9 MiB/s)
debug: [console=ttyS0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet] ...
debug: [bootz 0x82000000 0x88080000:a2b271 88000000] ...
Kernel image @ 0x82000000 [ 0x000000 - 0x9e8200 ]
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Ramdisk to 8f5d4000, end 8ffff271 ... OK
   Loading Device Tree to 8f53b000, end 8f5d3fff ... OK

Starting kernel ...

[    0.146543] l3-aon-clkctrl:0000:0: failed to disable
[    9.100328] debugfs: Directory '49000000.dma' with parent 'dmaengine' already present!
[    9.132443] gpio-of-helper ocp:cape-universal: Failed to get gpio property of 'P8_03'
[    9.132472] gpio-of-helper ocp:cape-universal: Failed to create gpio entry
[    9.620792] omap_voltage_late_init: Voltage driver support not added
rootfs: clean, 30395/233392 files, 343876/932864 blocks

Ubuntu 20.04 LTS ubuntu ttyS0

rcn-ee.net Ubuntu 20.04.4 Console Image 2022-03-02
Support: https://elinux.org/BeagleBoardUbuntu
default username:password is [ubuntu:temppwd]

ubuntu login: [   37.152269] davinci-mcasp 48038000.mcasp: IRQ common not found

ubuntu login: ubuntu
Password: 
Last login: Wed Mar  2 16:06:12 UTC 2022 on ttyS0
ubuntu@ubuntu:~$ 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:256  0    4M  1 disk 
mmcblk1boot1 179:512  0    4M  1 disk 
ubuntu@ubuntu:~$ uname -r
5.10.100-ti-r37

Regards,

2 Likes

Hi @RobertCNelson

This works a treat - thanks for your help and detailed reply.

Cheers

I tried as first “sudo enable-beagle-flasher” and got no output or message. and a help menu (-h) is not available. Then I used the command: “sudo beagle-flasher” and got a lot of output.

While the second command was running, I came to the idea, maybe the first command just set up a switch so that after rebooting the BB-B the flashing to emmc is starting from the bootup process?

I would like to get there some informations with “sudo enable-beagle-flasher”, some output like: “Hey Dude, the copy to emmc flag got set up. Reboot now, and let the BB-B work.”.

Getting no output is always unclear, and not explaining what happened, and what is to do as next.

Please do a pull request against:

and i’ll push it out…

“beagle-flasher” is the main flashing script, the "enable-beagle-flasher’ just sets the systemctl rules a sets things up…

Regards,