PineH64 - Booting from SD Card works well.
But, trying to boot from EMMC and getting this:
U-Boot SPL 2018.03-rc1-armbian (Apr 24 2018 - 21:55:29 +0200)
DRAM: 4096 MiB, 3072 MiB usable
Trying to boot from MMC2
mmc_load_image_raw_sector: mmc block read error
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
So, U-Boot loads something but then SPL is having trouble.
Here is a boot from SD Card, which is fine:
U-Boot SPL 2018.03-rc1-armbian (Apr 29 2018 - 22:12:29 +0200)
DRAM: 4096 MiB, 3072 MiB usable
Trying to boot from MMC1
INFO: PSCI: Powering off cluster 0 core 1
INFO: PSCI: Disabling power to cluster 0 core 1
INFO: PSCI: Powering off cluster 0 core 2
INFO: PSCI: Disabling power to cluster 0 core 2
INFO: PSCI: Powering off cluster 0 core 3
INFO: PSCI: Disabling power to cluster 0 core 3
NOTICE: BL31: v1.4(debug):c591d63
NOTICE: BL31: Built : 20:35:18, Apr 26 2018
INFO: ARM GICv2 driver initialized
INFO: BL31: Platform setup done
INFO: BL31: Initializing runtime services
INFO: BL31: cortex_a53: errata workaround for 835769 was applied
INFO: BL31: cortex_a53: errata workaround for 843419 was applied
INFO: BL31: cortex_a53: errata workaround for 855873 was applied
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x4a000000
INFO: SPSR = 0x3c9
U-Boot 2018.03-rc1-armbian (Apr 29 2018 - 22:12:29 +0200) Allwinner Technology
CPU: Allwinner H6 (SUN50I)
Model: Pine H64
DRAM: 3 GiB
MMC: SUNXI SD/MMC: 0, SUNXI SD/MMC: 1
Loading Environment from FAT... Unable to use mmc 1:1... Failed (-5)
In: serial@5000000
Out: serial@5000000
Err: serial@5000000
Net: No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
3100 bytes read in 207 ms (13.7 KiB/s)
## Executing script at 4fc00000
U-boot loaded from SD
Boot script loaded from mmc
165 bytes read in 166 ms (0 Bytes/s)
11031 bytes read in 359 ms (29.3 KiB/s)
** File not found /boot/dtb/allwinner/overlay/sun50i-h6-fixup.scr **
9230674 bytes read in 1224 ms (7.2 MiB/s)
15811072 bytes read in 1876 ms (8 MiB/s)
## Loading init Ramdisk from Legacy Image at 4fe00000 ...
Image Name: uInitrd
Image Type: AArch64 Linux RAMDisk Image (gzip compressed)
Data Size: 9230610 Bytes = 8.8 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 4fa00000
Booting using the fdt blob at 0x4fa00000
Loading Ramdisk to 49732000, end 49fff912 ... OK
reserving fdt memory region: addr=4fa00000 size=69000
Loading Device Tree to 00000000496c6000, end 0000000049731fff ... OK
Starting kernel ...
Loading, please wait...
starting version 237
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... Scanning for Btrfs filesystems
done.
Begin: Will now check root file system ... fsck from util-linux 2.31.1
[/sbin/fsck.ext4 (1) -- /dev/mmcblk0p1] fsck.ext4 -a -C0 /dev/mmcblk0p1
/dev/mmcblk0p1: recovering journal
/dev/mmcblk0p1: clean, 34409/1711248 files, 337575/7562636 blocks
done.
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
once running, EMMC is visible, partition table looks good to me.
mmcblk1 is EMMC
and mmcblk0 is SD Card
steve@pineh64:~$ sudo fdisk /dev/mmcblk1
Command (m for help): p
Disk /dev/mmcblk1: 14.5 GiB, 15518924800 bytes, 30310400 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: 0xea8d319c
Device Boot Start End Sectors Size Id Type
/dev/mmcblk1p1 8192 2138111 2129920 1G 83 Linux
Command (m for help): q
steve@pineh64:~$ sudo fdisk /dev/mmcblk0
Command (m for help): p
Disk /dev/mmcblk0: 29.1 GiB, 31293702144 bytes, 61120512 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: 0xea8d319c
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 8192 60509279 60501088 28.9G 83 Linux