Thanks for the info regarding SOC.sh. I was able to create an SD card using the suggested SOC.sh and it appears to have created a valid SD card.
However, I think something is not quite right with the filesystem/partitions.
fdisk -l shows for the SD card:
Disk /dev/mmcblk0: 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: 0x4add9aa9
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 8192 31116287 31108096 14.9G 83 Linux
I am trying to reduce the size of the image and running into difficulties. I first tried using Win32 Disk Imager to create an img file from the SD Card (which seemed to work) and then use gparted to reduce the size of the partition. This resulted in an error as soon as I click on Apply.
Next I tried reducing the file size directly on the SD card:
root@beaglebone:~# **resize2fs /dev/mmcblk0 4G**
resize2fs 1.44.5 (15-Dec-2018)
resize2fs: **Bad magic number in super-block while trying to open /dev/mmcblk0**
Couldn't find valid filesystem superblock.
Running e2fsck results in:
root@beaglebone:~# **sudo e2fsck /dev/mmcblk0**
e2fsck 1.44.5 (15-Dec-2018)
ext2fs_open2: **Bad magic number in super-block**
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/mmcblk0
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193
or
e2fsck -b 32768
Found a dos partition table in /dev/mmcblk0
Noticed that the instructions I followed for copying the u-boot files were:
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
and the SOC.sh has
dd_spl_uboot_count= 2
dd_uboot_count= 4
Would that make any difference?
Or maybe I am missing something else since I manually created the filesystem?