Booting Linux/Debian from the eMMC
#1
Okay, I've been searching like mad to get my RockPro64 back up and running. I figured out the serial (the jumper to select 3v3 is important). It would work for a little while then not. At least now I have a backup board but I'll put that to good use.  Big Grin

Now I've been searching the site for how to copy over the Debian image (Armbian) to the emmc and then booting from emmc. I ran this:

cat /tmp/Armbian_21.02.1_Rockpro64_buster_current_5.10.12.img.xz | xz -d | dd bs=30M of=/dev/mmcblk2

Fdisk shows:

# fdisk -l /dev/mmcblk2
Disk /dev/mmcblk2: 58.2 GiB, 62537072640 bytes, 122142720 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: 0xcb08aa40

Device                      Boot   Start       End Sectors  Size  Id  Type
/dev/mmcblk2p1      32768 3571711 3538944       1.7G 83 Linux



I attempted to boot (SW4 removed), SD and eMMC installed. Only boots to SD.

Pointers please
thanks
  Reply
#2
remove the eMMC - IMHO Armbian does not support the eMMC despite what is said on their website.

If this indeed enables you to boot from the SDcard, then you need a 4.4 kernel thet will in fact support the eMMC.
  • ROCKPro64 v2.1 2GB, 16Gb eMMC for rootfs, SX8200Pro 512GB NVMe for /home, HDMI video & sound, Bluetooth keyboard & mouse. Started Bionic minimal - now "groovy", Openbox desktop for general purpose daily PC.
  • PinePhone BraveHeart now v1.2b 3/32Gb daily driver, dual boot via p-boot with Mobian on eMMC, Arch/f2fs/Phosh on SDcard
  • PinePhone v1.2a 2G/16Gb that needs USB board replaced
  Reply
#3
(03-02-2021, 08:49 AM)linuxha Wrote: ...
I attempted to boot (SW4 removed), SD and eMMC installed. Only boots to SD.
...

OK - if you are getting Armbian to boot from the SDcard while the eMMC is installed you are doing better than me. What is the output of lsblk and blkid?
  • ROCKPro64 v2.1 2GB, 16Gb eMMC for rootfs, SX8200Pro 512GB NVMe for /home, HDMI video & sound, Bluetooth keyboard & mouse. Started Bionic minimal - now "groovy", Openbox desktop for general purpose daily PC.
  • PinePhone BraveHeart now v1.2b 3/32Gb daily driver, dual boot via p-boot with Mobian on eMMC, Arch/f2fs/Phosh on SDcard
  • PinePhone v1.2a 2G/16Gb that needs USB board replaced
  Reply
#4
(03-02-2021, 11:31 AM)dukla2000 Wrote:
(03-02-2021, 08:49 AM)linuxha Wrote: ...
I attempted to boot (SW4 removed), SD and eMMC installed. Only boots to SD.
...

OK - if you are getting Armbian to boot from the SDcard while the eMMC is installed you are doing better than me. What is the output of lsblk and blkid?

lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda            8:0    0  1.8T  0 disk
├─sda1        8:1    0  1.8T  0 part
└─sda2        8:2    0    4G  0 part
sdb            8:16  0 931.5G  0 disk
└─sdb1        8:17  0 931.5G  0 part
mtdblock0    31:0    0    16M  0 disk
mmcblk1      179:0    0  14.9G  0 disk
└─mmcblk1p1  179:1    0  14.7G  0 part /
mmcblk2      179:32  0  58.2G  0 disk
└─mmcblk2p1  179:33  0  1.7G  0 part /media
mmcblk2boot0 179:64  0    4M  1 disk
mmcblk2boot1 179:96  0    4M  1 disk
zram0        252:0    0  1.9G  0 disk [SWAP]
zram1        252:1    0    50M  0 disk /var/log

# blkid
/dev/mmcblk1p1: UUID="14d11106-8b44-404d-997a-7da7ef398a89" TYPE="ext4" PARTUUID="cb08aa40-01"
/dev/mmcblk2p1: UUID="14d11106-8b44-404d-997a-7da7ef398a89" TYPE="ext4" PARTUUID="cb08aa40-01"
/dev/sda1: UUID="138c9642-f94f-47d2-99af-20606e1d1d39" TYPE="ext4" PARTUUID="bd3e785e-01"
/dev/sda2: UUID="a0debd38-3ca9-4529-b45a-c5299f2d8ae7" TYPE="swap" PARTUUID="bd3e785e-02"
/dev/sdb1: UUID="1dd2523f-4bfb-4349-a91b-514b496f909a" TYPE="ext4" PARTUUID="ec316db9-bf76-a04b-b46f-d19cd118342f"
/dev/zram0: UUID="5e7d0395-0460-48a7-9e5e-54d7c256866a" TYPE="swap"
/dev/mmcblk1: PTUUID="cb08aa40" PTTYPE="dos"
/dev/mmcblk2: PTUUID="cb08aa40" PTTYPE="dos"
/dev/zram1: LABEL="log2ram" UUID="4f709af9-d3da-4955-afe0-09ffd0c8f596" TYPE="ext4"

Please ignore sda (SATA) and sdb (USB3). I did try without sdb also.

I did notice this (just noticed it):

MMC: mmc@fe310000: 2, mmc@fe320000: 1, sdhci@fe330000: 0
Loading Environment from SPIFlash... SF: Detected gd25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment
  Reply
#5
Fixed it! I'm thinking the issue was with the SPI flash. Since this RockPro64 was one of the first V2.0 boards I guess it has an old image on it.

First, after booting with the SD card to Linux (SW4 jumper was removed), I then dd'd the same image used on the SD card to the emmc device, in my case /dev/mmcblk2. I then downloaded 

https://github.com/ayufan-rock64/linux-u...95f6152134 (u-boot-flash-spi-rockpro64.img.xz)

to a PC with an SD card reader/writer. When the dd completed, I did a shutdown -h. Removed the SD card, burned the u-boot image (the unzx'd image) to the SD. Put the SD in the RockPro64 and booted it up. This took several minutes. I was then greeted by the intitial boot up of my image (asked to to set a root password and add a new user). I just did an apt update on the RockPro64. I've also removed the SD card as it doesn't show in the df or mount commands. I then rebooted, watched the console (still getting the "bad CRC, using default environment") and I've booted to the rockpro64 login prompt.

I'll now get busy restoring the services I had running previously and do an apt upgrade also, uhm first.  Rolleyes
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question Booting official Debian on RP64 arteeh 4 289 03-31-2021, 10:01 AM
Last Post: kuleszdl
Question My Rockpro64 stopped booting with these error messages please help seaurchin 4 357 02-18-2021, 04:27 PM
Last Post: TRS-80
Question Mainline Debian Buster on RockPro64 ? chrestomanci 36 11,739 02-14-2021, 02:37 PM
Last Post: foresto
  How To Lay Hands on a True 64-bit Debian Install? vandys 4 927 12-01-2020, 06:12 AM
Last Post: as365n4
  RockPro64 eMMC mrfixit to 5.9 rthorntn 1 773 10-27-2020, 07:09 PM
Last Post: rthorntn
Big Grin Feature Complete Debian Desktop Release Mrfixit2001 157 60,525 10-09-2020, 09:29 AM
Last Post: LMM
  Xen EFI with Alpine Linux dom0 sir.lami 0 780 08-26-2020, 12:25 PM
Last Post: sir.lami
  Bringing up a fresh Debian install (or trying) foresto 2 1,422 08-09-2020, 01:57 PM
Last Post: foresto
  Linux Host - QEMU Android Guest? rik-shaw 0 679 07-09-2020, 08:02 PM
Last Post: rik-shaw
  Official Debian release won't boot!?! Faradn 4 2,074 07-06-2020, 09:29 AM
Last Post: Bullet64

Forum Jump:


Users browsing this thread: 1 Guest(s)