so, i have booted from sdcard successfully via the user button. now i want to copy over the sdcard content to emmc by doing:
/opt/Bela/bela_flash_emmc.sh
this appears to work for some time, but then i get (see log):
the final messages get repeated over and over again until i CTRL-C them.
is my sdcard broken and it cannot find those sectors? or is there anything else i can try?
root@bela:~# /opt/Bela/bela_flash_emmc.sh
+ 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
+ sfdisk /dev/mmcblk1
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.
/dev/mmcblk1p2: Created a new partition 2 of type 'Linux' and of size 3.5 GiB.
Partition #2 contains a ext4 signature.
/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.vfat /dev/mmcblk1p1
mkfs.fat 4.1 (2017-01-24)
+ mkfs.ext4 -F /dev/mmcblk1p2
mke2fs 1.43.4 (31-Jan-2017)
/dev/mmcblk1p2 contains a ext4 file system labelled 'BELAROOTFS'
last mounted on /mnt/root on Thu Apr 11 10:31:33 2019
Discarding device blocks: done
Creating filesystem with 916224 4k blocks and 229376 inodes
Filesystem UUID: 03498584-0aa9-4d3e-bb94-95fa8ae4caaa
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
+ dosfslabel /dev/mmcblk1p1 BELABOOT
+ e2label /dev/mmcblk1p2 BELAROOTFS
+ mkdir -p /mnt/emmc_boot
+ mkdir -p /mnt/root
+ mount /dev/mmcblk1p1 /mnt/emmc_boot
+ mount /dev/mmcblk1p2 /mnt/root
+ echo 'copying files, this may take a few minutes...'
copying files, this may take a few minutes...
+ cp /mnt/boot/MLO /mnt/emmc_boot
+ sync
+ cp /mnt/boot/u-boot.img /mnt/emmc_boot
+ sync
+ rsync -r --exclude=/mnt/boot/MLO,/mnt/boot/u-boot.img /mnt/boot/MLO /mnt/boot/bela.version /mnt/boot/drivers /mnt/boot/u-boot.img /mnt/boot/uEnv.txt /mnt/emmc_boot
+ cp -a /opt/Bela/uEnv-emmc.txt /mnt/emmc_boot/uEnv.txt
+ cp -a /bin/ /boot/ /dev/ /etc/ /home/ /lib/ /opt/ /root/ /sbin/ /srv/ /usr/ /var/ /mnt/root
cp: error reading '/usr/src/linux-headers-4.4.113-ti-xenomai-r149/include/linux/parport.h': Input/output error
cp: error reading '/usr/src/linux-headers-4.4.113-ti-xenomai-r149/include/linux/ntb.h': Input/output error
+ final_check
+ '[' 0 -eq 0 ']'
+ sleep 0.5
+ echo default-on
+ echo default-on
+ echo default-on
+ sleep 0.5
+ echo none
+ echo none
+ echo none
+ sleep 0.5
+ echo default-on
+ echo default-on
+ echo default-on
+ sleep 0.5
+ echo none
+ echo none
+ echo none