Install Debian Buster img on BPI-R64 emmc

Hi Everyone,

First of all, I would like to say that i’m completely novice in the installation methods for the BananaPi-R64 board, therefore, i tested nearly anything I understanded here, but nothing seemed to work.

so I would like to kno if there is a step by step possible installation guide from scratch (with every step)

I managed to install Opewrt on the emmc, but since Iwould like to use it as a reverse proxy, I think debian image is more interresting. I also managed ton boot on debian buster with the “2020-05-02-debian-10-buster-lite-preview-bpi-r64-5.4-sd-emmc.img” image, but i dont seem able to write it on the emmc, (i don’t have the mmc package installed and i’m not able to connect to the internet.)

so i don’t know what image to write on the sd card in order to start writing on emmc, i d’ont know if it’s possible to write the image on the emmc and just reboot (that didn’t work for me) i’m quite lost, if someone could help me, I would be very gratefull. and if you don’t have time fo that, thanks anyway for reading me.

Maestrie

For emmc you have to set partition config to 0x48 (can be done with uboot or mmc-utils) and burn emmc-preloader to boot0 block. Then it depends on image if it boots from emmc

https://www.fw-web.de/dokuwiki/doku.php?id=en:bpi-r64:storage#emmc

The image needs to be burned to the user-partition (/dev/mmcblk0)

Thanks for your reply, but trying to execute the lines in the link you gave me : ls /dev/mmcblk* gives : /dev/mmcblk0 /dev/mmcblk0p1 /dev/mmcblk0p4 /dev/mmcblk1 /dev/mmcblk0boot0 /dev/mmcblk0p2 /dev/mmcblk0p5 /dev/mmcblk1p1 /dev/mmcblk0boot1 /dev/mmcblk0p3 /dev/mmcblk0rpmb /dev/mmcblk1p2

don’t know if this is an issue, but lets continue : i’m not able to add the route line, i’ve got that answer :
Error: Nexthop has invalid gateway.

that also means that i’m not able to get any internet connection…

trying the line further (for boot0-block) doesn’t gives me any result either… it has been one week that i’m trying, and that’s frustrating not to manage to make it work.

edit: I had a thought, “why don’t i use the USB port to put a USB key with the files in it?” i did that, and it appears that after folowing the emmc storage parts, after rebooting i have a “unrecognised file system”… dit i miss something?

You have to adjust gateway to your own nexthop (your router in same subnet).do not forget setting dns-server in /etc/resolv.conf.

For unrecognized filesystem i guess you have exfat or ntfs on your usbstick as vfat and ext driver should be already loaded

Without the commands you exactly use and the errors resulting we/i cannot help you

You have to change my commands to mmcblk0* early vendor images had swapped sd/emmc like for bpi-r2. So flash preloader to /dev/mmcblk0boot0 and the image itself to /dev/mmcblk0

If i find some time i try to create a basic buster-image with new ATF, have recently solved booting fit from emmc :slight_smile: so basicly main part is done

So,

first of all, i write with win32diskImager the debian buster image (r64_buster_sd_mt7531.img) on a sd card, boot on it with the BPI-R64, from there i folowed the instructions for emmc preparation il the link you gave. ( root@bpi-r64:~# ls /dev/mmcblk*
root@bpi-r64:~# ip addr add 10.0.0.101/24 dev eth0 root@bpi-r64:~# ip route add default via 10.0.0.1 root@bpi-r64:~# echo “nameserver 10.0.0.1”>/etc/resolv.conf

from here, since I cannot download any file (the gateway is correct, and i’m not on another subnet)

i copied the image (the same image i wrote on the sdcard) in a USB key (it’s Exfat), with the preloader here are the two file’s name :

  • preloader_evb7622_64_foremmc.bin
  • 2020-05-02-debian-10-buster-lite-preview-bpi-r64-5.4-sd-emmc

root@bpi-r64:~# echo 0 > /sys/block/mmcblk0boot0/force_ro root@bpi-r64:~# dd if=preloader_evb7622_64_foremmc.bin of=/dev/mmcblk0boot0

after that, i launch the mmc commands : mmc extcsd read /dev/mmcblk0 | grep ‘PARTITION_CONFIG’ returns Boot configuration bytes [PARTITION_CONFIG: 0x48] (so looks good)

and after that, i supose its finished, so i reboot the board, removing the sdcard, and switching the little switch to boot on the emmc memory.

is there something i’m doing wrong?

It looks like you use my image…there you have to set eth0 only up and assign ip to lanX-port. Exfat is not supported. Try fat32/vfat.

You flashed preloader,but i don’t see you flash image itself

indeed, that’s right, but i don’t know at what moment to do it, and as for the image i am using, well, it makes 7.4 gb, son i’m not able to put it on a fat32 format file system, i will try to install a ubuntu vm to format the usb key in vfat

Mhm,fat will not hold files larger than 4gb. How large is your sdcard? The image should use only 8gb, so you can add an additional partition with ext4 to store the image-file

My SD card is big enough, but i prefer to modify my key if that’s not a problem, i formated it, and i pasted in the img file

You need a filesystem supporting files larger than 4Gbyte (so no vfat) and supported by kernel. I don’t know if ntfs is supported…but ext4 is and exfat not.

thats good news, i format it in ext4, and not vfat, what is the following actions i have to do, how do i write the img on the emmc?

well, looks like i made it!

thanks a lot for your help !

now i just have to find the way to get network working ^^

See here…basicly the same: [R2] Need help creating a working router configuration