HOW TO - install linux on emmc without etcher or USB adapter
#1
Thought I would log a confirmation it is perfectly possible to setup a new ROCKPro64 with linux without:

1) etcher (or the Pine utility) - there is no aarch64 version of etcher which is kinda limiting for those of us already using arm systems for our daily driver!
2) I didn't order the Pine emmc/USB adapter to save money and reduce the order value/import tax hit.

The steps are pretty simple: yeah they rely on dd heavily and most of the time it works fine for me.

1) Download your image of choice, I went with bionic-minimal-rockpro64-0.7.9-1067-arm64.img.xz
2) Unzip the image,
Code:
$unxz bionic-minimal-rockpro64-0.7.9-1067-arm64.img.xz
3) Get an sdcard (pref 2GB or 4GB, see step 6 below) in your pc. Check where it is and dd the image to it. Mine was /dev/sda so
Code:
$sudo dd if=bionic-minimal-rockpro64-0.7.9-1067-arm64.img of=/dev/sda bs=4M
4) I find my 'bad dd flashes' can usually be sorted at this stage by removing and reinserting the sdcard and running fsck on the dos and linux partitions. Any problems (apart from not removed cleanly bit on dos partition) then repeat step 3 above.
5) Insert (blank/new) emmc in ROCKPro64, and sdcard, and boot. Should come up fine on the sdcard. And resize the / partition automatically.
6) As per Bullet64 instructions here, copy the image from the sdcard to the emmc. Make sure you have a small sdcard to keep the elapsed time of this step under control. And it must be smaller than the emmc else you will be in trouble.
Code:
$sudo dd if=/dev/mmcblk0 of=/dev/mmcblk1 bs=4M
7) Reboot and manually resize the / partition

Code:
rock64@rockpro64:/usr/local/sbin$ sudo ./resize_rootfs.sh


Should be done. Enjoy
  • 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
#2
(07-28-2018, 02:12 AM)dukla2000 Wrote: Thought I would log a confirmation it is perfectly possible to setup a new ROCKPro64 with linux without:

1) etcher (or the Pine utility) - there is no aarch64 version of etcher which is kinda limiting for those of us already using arm systems for our daily driver!
2) I didn't order the Pine emmc/USB adapter to save money and reduce the order value/import tax hit.

The steps are pretty simple: yeah they rely on dd heavily and most of the time it works fine for me.

1) Download your image of choice, I went with bionic-minimal-rockpro64-0.7.9-1067-arm64.img.xz
2) Unzip the image,
Code:
$unxz bionic-minimal-rockpro64-0.7.9-1067-arm64.img.xz
3) Get an sdcard (pref 2GB or 4GB, see step 6 below) in your pc. Check where it is and dd the image to it. Mine was /dev/sda so
Code:
$sudo dd if=bionic-minimal-rockpro64-0.7.9-1067-arm64.img of=/dev/sda bs=4M
4) I find my 'bad dd flashes' can usually be sorted at this stage by removing and reinserting the sdcard and running fsck on the dos and linux partitions. Any problems (apart from not removed cleanly bit on dos partition) then repeat step 3 above.
5) Insert (blank/new) emmc in ROCKPro64, and sdcard, and boot. Should come up fine on the sdcard. And resize the / partition automatically.
6) As per Bullet64 instructions here, copy the image from the sdcard to the emmc. Make sure you have a small sdcard to keep the elapsed time of this step under control. And it must be smaller than the emmc else you will be in trouble.
Code:
$sudo dd if=/dev/mmcblk0 of=/dev/mmcblk1 bs=4M
7) Reboot and manually resize the / partition

Code:
rock64@rockpro64:/usr/local/sbin$ sudo ./resize_rootfs.sh


Should be done. Enjoy

Thanks for linking to my forum.

I miss this
Code:
bs=4M

I will add this. Thank for the hint.
Sorry for any mistakes. English is not my native language

1. Quartz64 Model B, 4GB RAM

2. Quartz64 Model A, 4GB RAM

3. RockPro64 v2.1

https://linux-nerds.org/
#3
TOP TIP: For those of us stupid enough to corrupt the emmc just enough so it loads a kernel but wont load the rootfs!!
(e.g. install a 4.18 kernel Blush )

The 2 pin jumper next to the emmc module (unlabelled - and between emmc & SPI chip) seems to control whether the emmc is used for booting.

With a good SDcard in to boot and the "corrupt" emmc obviously a standard boot loads the kernel from the emmc and then failed to load the rootfs.

However, by jumpering the 2 pins, powering on, and removing the jumper AFTER the green power LED came on AND BEFORE the white sytem LED came on I got a complete boot from the SDcard and also a kernel initialisation of the emmc card so I could see it as a device  (and repeat my step 6 above).

PS - this obviously worked for me but comes with no warranty other than if you break it you own both parts!
  • 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
#4
Well, or just boot linux, remove jumper and run `rockpro64_reset_emmc.sh` to boot-up emmc.
Homepage: https://ayufan.eu

Releases:
Rock/Pro 64/Pinebook Pro: LinuxChromium OS
So/Pine A64/Pinebook: LinuxAndroid 6.0Android 7.1

Buy me a Beer
#5
(07-31-2018, 04:55 AM)ayufan Wrote: Well, or just boot linux, remove jumper and run `rockpro64_reset_emmc.sh` to boot-up emmc.
That is interesting, what does
echo fe330000.sdhci > /sys/bus/platform/drivers/sdhci-arasan/<un>bind
actually do?

In my case everything in dmesg seemed fine till 4s then

Code:
[    4.165757] hid-generic 0003:248A:8566.0002: input: USB HID v1.11 Mouse [Telink Wireless Receiver] on usb-fe3a0000.usb-1/input1
[   64.503086] mmc1: cqhci: timeout for tag 6
[   64.503731] mmc1: cqhci: ============ CQHCI REGISTER DUMP ===========
[   64.504662] mmc1: cqhci: Caps:      0x00000000 | Version:  0x00000510
[   64.505588] mmc1: cqhci: Config:    0x00000000 | Control:  0x00000000
[   64.506512] mmc1: cqhci: Int stat:  0x00000000 | Int enab: 0x00000000
[   64.507438] mmc1: cqhci: Int sig:   0x00000000 | Int Coal: 0x00000000
[   64.508362] mmc1: cqhci: TDL base:  0x00000000 | TDL up32: 0x00000000
[   64.509286] mmc1: cqhci: Doorbell:  0x00000000 | TCN:      0x00000000
[   64.510210] mmc1: cqhci: Dev queue: 0x00000000 | Dev Pend: 0x00000000
[   64.511134] mmc1: cqhci: Task clr:  0x00000000 | SSC1:     0x00011000
[   64.512058] mmc1: cqhci: SSC2:      0x00000000 | DCMD rsp: 0x00000000
[   64.512980] mmc1: cqhci: RED mask:  0xfdf9a080 | TERRI:    0x00000000
[   64.513904] mmc1: cqhci: Resp idx:  0x00000000 | Resp arg: 0x00000000
[   64.514826] mmc1: sdhci: ============ SDHCI REGISTER DUMP ===========
[   64.515751] mmc1: sdhci: Sys addr:  0x00000000 | Version:  0x00001002
[   64.516675] mmc1: sdhci: Blk size:  0x00007200 | Blk cnt:  0x00000000
[   64.517599] mmc1: sdhci: Argument:  0x00010000 | Trn mode: 0x00000010
[   64.518522] mmc1: sdhci: Present:   0x1fff0000 | Host ctl: 0x00000034
[   64.519447] mmc1: sdhci: Power:     0x0000000b | Blk gap:  0x00000080
[   64.520370] mmc1: sdhci: Wake-up:   0x00000000 | Clock:    0x00000007
[   64.521294] mmc1: sdhci: Timeout:   0x0000000e | Int stat: 0x00000000
[   64.522218] mmc1: sdhci: Int enab:  0x02ff4000 | Sig enab: 0x02ff4000
[   64.523143] mmc1: sdhci: AC12 err:  0x00000000 | Slot int: 0x00000000
[   64.524066] mmc1: sdhci: Caps:      0x44edc880 | Caps_1:   0x800020f7
[   64.524990] mmc1: sdhci: Cmd:       0x00000d1a | Max curr: 0x00000000
[   64.525913] mmc1: sdhci: Resp[0]:   0x00000900 | Resp[1]:  0x64201697
[   64.526836] mmc1: sdhci: Resp[2]:   0x4e436172 | Resp[3]:  0x00880103
[   64.527759] mmc1: sdhci: Host ctl2: 0x00000083
[   64.528406] mmc1: sdhci: ADMA Err:  0x00000000 | ADMA Ptr: 0x7f11c208
[   64.529326] mmc1: sdhci: ============================================
[   64.530325] mmc1: running CQE recovery
which more or less repeated every 60s. I had tried to install Linux kernel 4.18.0-rc5-1052-ayufan-gd1b8f36378ff on top of 0.7.9 bionic minimal and obviously got it wrong. But as the 4.18 kernel had a problem recognising the emmc I could not do a dpkg -r.
  • 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


Possibly Related Threads…
Thread Author Replies Views Last Post
Video How to Install Google PlayStore NightCrawler504 2 5,221 04-08-2020, 02:20 PM
Last Post: pino88
  load root on NVMe and /boot on eMMC Vikk42 4 8,485 07-18-2019, 12:42 PM
Last Post: stuartiannaylor
Video Video and Guide to install Android to emmc no emmc to usb adapter NightCrawler504 0 3,310 04-21-2019, 07:19 PM
Last Post: NightCrawler504
Thumbs Up Tutorial[ Seagate Disks ]: Install Seagate OpenSeaChest Utilities tuxd3v 41 74,275 04-08-2019, 10:10 AM
Last Post: Neo2018

Forum Jump:


Users browsing this thread: 1 Guest(s)