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 (6.2 kernel, Openbox desktop) for general purpose daily PC.
  • PinePhone Pro Explorer Edition, daily driver, rk2aw & U-boot on SPI, Arch/SXMO & Arch/phosh on eMMC
  • PinePhone BraveHeart now v1.2b 3/32Gb, Tow-boot with Arch/SXMO 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 (6.2 kernel, Openbox desktop) for general purpose daily PC.
  • PinePhone Pro Explorer Edition, daily driver, rk2aw & U-boot on SPI, Arch/SXMO & Arch/phosh on eMMC
  • PinePhone BraveHeart now v1.2b 3/32Gb, Tow-boot with Arch/SXMO 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
  irradium (based on crux linux) RockPro64 riscv64, aarch64 mara 7 1,863 11-20-2024, 03:53 PM
Last Post: mara
Exclamation Ethernet regression on Linux Kernel 6.5.4? Deathcrow 3 1,481 09-22-2023, 04:27 AM
Last Post: diederik
  Vanilla mainline Debian 11 (Bullseye) on the RockPro64 Pete Tandy 22 21,253 08-16-2023, 01:34 AM
Last Post: varac
  Installing CH431SER on Ayufan 0.9.14: gitlab-ci-linux-build-159 Thisone 4 2,264 07-14-2023, 04:22 AM
Last Post: hunderteins
  How do I enable Pine touchdisplay as display on Debian? Thisone 0 817 04-23-2023, 11:02 PM
Last Post: Thisone
  Linux laptop does not detect the board when plugged in via USB soupy 1 4,488 04-13-2023, 03:01 AM
Last Post: Reynold Grady
  Is some u-boot required on the SPI for installing debian with the official installer? callegar 1 1,733 10-25-2022, 10:07 AM
Last Post: ratzzupaltuff
  RockPro64 linux console video mode callegar 0 1,129 09-06-2022, 02:32 PM
Last Post: callegar
Brick Maintained Linux booting from eMMC ootoovak 10 9,893 04-30-2022, 03:57 PM
Last Post: TRS-80
  Install Mali 400 Drivers for Debian 11 on RockPro64 MaverickPi 2 2,977 02-19-2022, 06:44 AM
Last Post: sigmaris

Forum Jump:


Users browsing this thread: 2 Guest(s)