[BPI-R2 Pro] Debian Bullseye / Ubuntu 22.04

Hi,

i’ve created 2 basic images (only bootchain + rootfs, no network setup)

uboot 2022.04-bpi
linux 5.18.0-bpi-r2pro-main
(barebox 2022-05 incl. iodomain fix)

user:root, pw:bananapi

example-configuration for wan-port (eth0)

date -s '2022-05-23 21:50:00 CEST'
ip addr add 192.168.0.18/24 dev eth0
ip link set eth0 up
ip route add default via 192.168.0.10
# only do once (resolv.conf is persistent)
cp /etc/resolv.conf{,.bak}
echo "nameserver 192.168.0.10" > /etc/resolv.conf

https://drive.google.com/drive/folders/1pnTxSquZL-7n0xx4Bx1xJl7LqEKfa71Y?usp=sharing

the -basic is without rootfs and can be used as base for own linux distribution (deboostrap + set rootpw)

have included phy and dsa driver for switch which can be switched by using other dtb (default dsa driver) in uboot (extlinux.conf)

1 Like

Hello is this image support emmc? Best Regards

Not out of the box,but you can use it as base,flash atf/uboot after and configure uboot/linux for emmc (pointing to the other mmc device)

I ask for alternatively can we use this image without using maskroom button .

Maskrom needs to be only done once to boot mainline bootchain from sd because emmc contsins broken bootchain from factory

could you explain how can configure uboot/linux for emmc? I wantto develop a image on sd card and transfer it into emmc ?Is it possible? Best Regards

2022-04 from my uboot-repo supports r2pro (in newer versions it is broken). Atf is only binary blob. Seems r2pro had same atf/uboot for emmc,so you can try writing it to emmc (boot0 not needed).

Seems I had already added a check in uboot for emmc/sd

Only need to change fstab in linux to point to emmc instead sd

But i’m unsure if distroboot handles sd/emmc currently. Only made basic tests with emmc as it is tricky booting from sd after emmc is flashed.

Seems bootorder is hardcoded in uboot for distroboot.

Hello could you tell me where is fstab file , what should i change in it after build 2022-04 Is uboot wil place into Image.gz automatically ? Best Regards

Fstab is file in rootfs (in /etc)

Image.gz is linux kernel and has nothing to do with uboot.

Hello I opened fstab file which is under /etc Thgere is only “UNCONFIGURED FSTAB FOR BASE STSYEM” sentence in file please could you tell me what should i write instead of that? Best Regards

Hello I use SD card and when ı ypload this image file to sd card and i reboot bpi r2 pro board it always stay at this point Ekran%20Al%C4%B1nt%C4%B1s22%C4%B1 İ always use maskroom button to pass here .Could you please helpğ me best regards

You have to press maskrom when powering on till you see uboot from sdcard…i thought you were past this point…you have to erase emmc first 10M after booting into linux

I took this command from your wiki dd if=/dev/zero of=/dev/mmcblk1 bs=1M count=10 is this erase emmmc first 10M or another proccess? Best Regards

Yes, make sure mmcblk1 is the emmc (to not erase sd)

ls /dev/mmcblk1*

Should show boot0 and some other

Hello If I erase emmc can use emmc again , can i use maskroom in shortcut wiring?

Of course you can rewrite emmc…and if it is bootable it is used first…booting from sd with maskrom-button again.

Imho this bootorder is not really good…better will be first try sd,then emmc. But this is a soc specific limitation and not fixable with software

Hello i will try it later . I made shortcut on maskroom button and it works now. I have another question about image . I do not understand booting from emmc. After i compile this repo i will get a u-boot.img .

Now i used this image and i want to run it on sd card and emmc. How i take u-boot from your u-boot reposotory and use for your debian 11 image? Best Regards

No, the order changes very easily :slight_smile: As an example, you can see how this is implemented in u-boot Armbian. By the way, there is a patch there that also includes booting from USB (for u-boot-2017 to rk35xx) and you get a very simple launch of any test system from USB.

Hello I see this folders when I opened sd card in disks Screenshot%20from%202022-10-06%2013-05-39 Screenshot%20from%202022-10-06%2013-07-09 ! In the partitions I have a uboot partition. I build this(https://github.com/frank-w/u-boot/tree/2022-04-bpi) repository . There are 3 images in my folder. I think i can upload a uboot image to this place which? I this possible ? If yes , i should use which one of u-boot images Screenshot%20from%202022-10-06%2013-07-37

Best Regards

Hello I tried to upload https://drive.google.com/file/d/1EtYc661zZ7t-e3PPiwdzkdWoHwQxH4KX/view?usp=sharing image via emmc i got

sudo upgrade_tool uf bpi-r2pro.img and sudo upgrade_tool ef bpi-r2pro.img

[sudo] password for banada

Not found config.ini

Program Data in /usr/local/bin

Loading firmware…

Loading firmware failed,err=-4!