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. Arch (5.16 kernel, Openbox desktop) for general purpose daily PC.
  • PinePhone Pro Explorer Edittion, Tow-boot on SPI, Arch/phosh on eMMC
  • PinePhone BraveHeart now v1.2b 3/32Gb, daily driver: Tow-boot with Arch/Phosh on eMMC
  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. Arch (5.16 kernel, Openbox desktop) for general purpose daily PC.
  • PinePhone Pro Explorer Edittion, Tow-boot on SPI, Arch/phosh on eMMC
  • PinePhone BraveHeart now v1.2b 3/32Gb, daily driver: Tow-boot with Arch/Phosh on eMMC
  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
Brick Maintained Linux booting from eMMC ootoovak 10 2,574 04-30-2022, 03:57 PM
Last Post: TRS-80
  Install Mali 400 Drivers for Debian 11 on RockPro64 MaverickPi 2 507 02-19-2022, 06:44 AM
Last Post: sigmaris
  A Rant About Pine, Other Distros, & Still Trying to Get Fedora Booting From eMMC. whitecat23 8 1,646 01-31-2022, 04:05 PM
Last Post: TRS-80
  Debian image configured for USB-C OTG? djonathan 2 716 01-06-2022, 03:09 AM
Last Post: susy1075
  How I Got Fedora Linux to Boot From eMMC (or microSD, for that matter) whitecat23 4 899 01-03-2022, 10:32 AM
Last Post: whitecat23
  New user: Booting from emmc spropine 1 421 12-17-2021, 09:37 AM
Last Post: spropine
Bug Unreliable display in Armbian and Debian ksattic 3 1,197 11-17-2021, 05:42 AM
Last Post: PakoSt
  Debian Bullseye & RockPro64: No tty consoles? Pete Tandy 9 2,740 11-08-2021, 02:33 PM
Last Post: TRS-80
  Vanilla mainline Debian 11 (Bullseye) on the RockPro64 Pete Tandy 21 5,982 11-06-2021, 06:42 AM
Last Post: Pete Tandy
  HBA Card working on Aufan's builds but not in debian, armbian or dietpi charsi 1 648 10-29-2021, 11:15 AM
Last Post: TRS-80

Forum Jump:


Users browsing this thread: 1 Guest(s)