PINE64
Steps to install latest debian img to upgraded emmc - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111)
+--- Forum: Linux on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=114)
+--- Thread: Steps to install latest debian img to upgraded emmc (/showthread.php?tid=8454)



Steps to install latest debian img to upgraded emmc - xircledev - 11-29-2019

I just installed the 128G module which comes with android 7.1.2 installed on it (not sure why). Anyway, I've been reading through the threads about how the new factory image is available which is great. Here's what happened.

1. booted to the SD but the power light just flashed. Nothing from there.  Huh
2. flipped the onboard switch to disable the eMMC.
3. booted from SD.  Big Grin
4. flipped the onboard switch to enable the eMMC.
5. looked to see if the eMMC was available but no dice.  Confused
6. rebooted and ended up back at step 1.  Angry
7. Reaching out for help  Blush

While I'm writing this, I'm flashing the latest build to a USB to see if I can go that route. If this proves to be successful, what are the steps I need to take to dd the image to the eMMC? I am a noob but not afraid of the command line.

Thanks in advance.


RE: Steps to install latest debian img to upgraded emmc - Arwen - 11-30-2019

When I ordered my Pinebook Pro, I considered recovery too. So I made a separate order for the eMMC USB adapter.

That way, using another computer, I can wipe the eMMC image. Re-install the eMMC in the Pinebook Pro. Then, on boot, the RK3399 will automatically attempt to boot the SPI, fail because it's empty, attempt to boot the eMMC, fail again because it's empty. Last, boot the SD card.

All that said, it may be possible to un-bind the device for the eMMC and re-bind it. In essence, when you flipped the switch, the SoC thought there was no eMMC on the board, so it moved on to the SD card. If you did not flip the switch back fast enough, the OS on the SD card won't detect the eMMC either. So no device driver and no way to write a new image to the eMMC. Catch-22 as they say.

I have rough instructions on how to un-bind and re-bind a device. But, that was for my SD card on an x64 miniature PC. Similar concept.

You could try this;
Code:
echo fe330000.sdhci >/sys/bus/platform/drivers/sdhci-arasan/unbind
echo fe330000.sdhci >/sys/bus/platform/drivers/sdhci-arasan/bind
You can verify that this is the correct driver and path using something like this;

Code:
root@Debian-Desktop:~# readlink /sys/block/mmcblk1
../devices/platform/fe330000.sdhci/mmc_host/mmc1/mmc1:0001/block/mmcblk1
root@Debian-Desktop:~# ls /sys/bus/platform/drivers/sdhci-arasan/
bind  fe330000.sdhci  uevent  unbind

root@Debian-Desktop:~# readlink /sys/block/mmcblk0
../devices/platform/fe320000.dwmmc/mmc_host/mmc0/mmc0:59b4/block/mmcblk0
root@Debian-Desktop:~# ls /sys/bus/platform/drivers/dwmmc_rockchip/              
bind  fe310000.dwmmc  fe320000.dwmmc  uevent  unbind
I take no responsibilty for this procedure. It's un-tested as I have not opened my Pinebook Pro yet. (Nor do I have my second eMMC for my ROCKPro64 to test the concept there.)

Note: The "fe310000.dwmmc" device is likely the SDIO used for WiFi.


RE: Steps to install latest debian img to upgraded emmc - Arglebargle - 12-01-2019

From IRC: you should be able to boot the machine with the eMMC switched off, start U-Boot from an SD card and within 1-2s of starting flip the eMMC switch back on before the kernel starts detecting mmc devices. That should get you booted off the SD card and with the eMMC available for recovery/flashing.

Someone who's actually done this needs to provide further details if it doesn't work, I haven't had to recover from an unbootable eMMC this way. Apparently this method is safe as all the eMMC disable switch does is draw a clock signal low rather than cut power.