Ok, here's what seemed to work for me! I am still trying this out btw on the rockpro64 btw I am hoping it can be adapted for the pinebook pro.
First of all, you need the following:
* An already existing debian install on microsd for the rockpro64 - needed because the debian installer itself can't actually mount ext4 partitions manually.
* A blank microsd (to write the debian installer onto)
* An emmc chip(!) . I'm using a 16GB emmc as that was all that was left the larger sizes have all sold out.
* An emmc to USB adapter
The first thing to do is to use another linux pc to fdisk the emmc. Put the emmc chip onto its usb adapter and do the following:
Code:
$ su -
$ dmesg (find out what the emmc on usb adapter is called, let's say for example /dev/sdg)
$ fdisk /dev/sdX (e.g. /dev/sdg)
Then create a new partition with the first sector of the partition starting at 32768 (important!). The last sector can be anything for example up to the end of the emmc. Write this and then exit fdisk.
Remove the emmc to usb from the PC and then grab your blank microsd card. Insert it into the pc (a usb to sd/microsd card adapter should work fine).
Next write the debian installer from
here choosing the files firmware.rockpro64-rk3399.img.gz and partition.img.gz; then (remaining as root);
Code:
$ dmesg ( find out what the microsd card is called, let's say /dev/sdg)
$ zcat firmware.rockpro64-rk3399.img.gz partition.img.gz > out.img
$ dd < out.img > /dev/sdX (e.g. /dev/sdg)
$ sync
Put the jumper onto the rockpro64 and insert the microsd card with the debian installer on it into the rockpro64. Plug the emmc to usb into the rockpro64.
When in the installer when you get to partition disks, choose "manual" then look for the emmc device; in my case it turned out to be "SCSI1 (sda) 15.8 GB Generic storage device".
Then choose #1 primary then "Use as:do not use" change to ext4. Change mount point none to "/"; then turn the bootable flag on. Write this by choosing "done setting up the partition". Finish writing the changes ("finish partitioning"). If it says you haven't selected any swap space choose no - don't go back to partitioning menu. Then say yes to write changes. Then carry on with normal install.
Unfortunatly at this point (and so I found out) the debian installer although it can seemingly write to ext4 partitions it dosen't seem to have any way to manually mount ext4 (I did try this and it did not work). Instead (and this is where the other micro sd card is needed) boot up an already existing debian install off microsd for the rockpro64; with the emmc to usb still connected do:
Code:
$ mkdir /tmp/0
$ mount /dev/sda1 /tmp/0
$ mount -o bind /dev /tmp/0/dev
$ chroot /tmp/0
And then when you're in the chroot;
Code:
$ apt update
$ apt install u-boot-menu u-boot-rockchip
$ cd /usr/lib/u-boot/rockpro64-rk3399
$ cp * / (ugly but it works)
$ u-boot-update
$ u-boot-install-rockchip /dev/sda
$ sync
(It appears my earlier idea of thinking that I needed to set something like a partition name isn't needed after all).
Next exit the root, shut down the rockpro64 and power off. Disconnect power then transfer the emmc onto the rockpro64 itself. Make sure the jumper isn't on and the microsd socket is empty; power on and (hopefully) it'll boot debian off the emmc.
It'll need a different firmware file for sure but hopefully this will work for the pinebook pro.
Hope I haven't forgotten anything!
Update:
I now also have this working on the pinebook pro! Here are some rough notes:
**WARNING** Not guaranteed to work! There's the possibility I've forgotten a step here btw, not sure!
- You need the files firmware.pinebook-pro-rk3399.img.gz and partition.img.gz - zcat them together as above then dd.
- You'll need 2 micro sd cards - one for an actual debian install and one for the installer.
- a USB to ethernet adapter (makes things easier).
First use the microsd card that you used dd on. Install debian onto that same microsd card (the one with the installer on). It does actually work -- in the installer choose manual partitioning and choose "MMC/SD card"; mine showed up as "MMC/SD card #2 (mmcblk1) 8GB SD". Don't use the 62.5 GB MMC/SD card (that is the internal emmc!).
Make the partition on the microsd card itself (leave the partition that is already on it alone) there should be some space. Create the new partition, set the mount point to /, format type ext4 and bootable to on. Write that and install as normal to the microsd.
Once the install is complete boot off the microsd card. Then install u-boot-menu and u-boot-rockchip.
Then
Code:
$ cd /usr/lib/u-boot/pinebook-pro-rk3399
$ cp * /
$ u-boot-update
$ u-boot-install-rockchip /dev/mmcblk2
Then use fdisk and delete (on /dev/mmcblk2) any partitions on the internal emmc. Create an ext4 partition but start it at 32768 as above.
Now use the other microsd card and install the debian installer again (on another linux pc). But this time install to the partition you made on the emmc. Make it bootable and ext4 but do not change it in any other way. Install as normal.
Once complete, remove the microsd then power cycle the pinebook pro. Hopefully it should start up and boot ok. If it won't boot off the emmc, try booting off the first micro sd card again the one with debian installed (with debian installed now onto the internal emmc, mmcblk2) and try installing u-boot again (above).
I forget if I had to do this a second time!
Unknown: Unless it is just my pinebook pro sometimes I found when booting I got lots of grey or white vertical lines and no text. This seems to require powering down, waiting for a few seconds and then powering back on again to fix.
ljones