Booting & Load Understanding for R2

Hello, I would like to understand how can we make R2 boot from a USB/SDCard. I am asking this to try and built Manjaro Linux with and without Desktop Environment.

  • Do we need a uboot in the media or the SPI have its own uboot which have multi-boot option?
  • Partitions Need in the Media to boot?
  • If Multiple partition then, which files are needed in the Boot partition?

For r2 i have written this here: https://www.fw-web.de/dokuwiki/doku.php?id=en:bpi-r2:storage

For sd you need preloader,uboot and 2 additional bootheaders…partitions are used afterwards…by default 1 fat (which holds kernel and uboot-config) and 1 ext4 as rootfs…you can also create more partitions

1 Like

Well I was just reading the same link as this is there in the dev link. :smiley:Thanks for such s good documentation. I am going through the files, I will do some test runs without the device until it arrives. Also I will have to follow your kernel branches to compile, as I dont think there is any mainline support for R2.

Thanks for your quick response.

for r2 there is mainline support,but some features are not available/working without my modifications such as hdmi,internal wifi,poweroff (maybe in 5.4),…

Btw which dev-link do you mean?

Oh ok, Thats the same with most of the SBC.

The same Link which you provided is there in https://dev.banana-pi.org.cn I found that link there with a special thanks to you.

I tried flashing openwrt image and it made 2 partition in my usb stick boot partition having uEnv and uImage file while root partition having rootfs

But when i flashed ubuntu image it only created a single partition with the above mentioned file.

I will try now images and understand how its built.

How did you flashed ubuntu-image,imho all ubuntu/debian-images create the fat+ext partitions. most Openwrt-images (except lexa2-version) does not create partitions.

Btw.you cannot boot r2 from usb. At least till uboot it needs to be on sd/emmc. Uboot currently does not support usb,so you need to load kernel also from sd/emmc/sata and only rootfs can be on usb

1 Like

I downloaded openwrt from Download wiki page and flashed it on usb using etcher. It created 2 partition.

Ok thanks for the information about usb ill use sd card when the device is with me.

And yes I know the fat for boot n ext4 for rootfs but i was shocked to see ubuntu 9gb image turned into few mbs which only had boot files and nothing in rootfs :frowning:

And the download images are very fragmented online for R2.

Can you guide me to the latest working img’s please.

Thanks

1 Like

My images are on gdrive :slight_smile:

https://drive.google.com/drive/u/0/mobile/folders/1oP7jy1KrrIOifvImo2nQ59wx3_9hHkgk?usp=drive_open

1 Like

Thanks for the link. There the Ubuntu buster img flashed correctly but in boot partition I see the main files inside multiple directories. Is that fine? or those files should be in the root for the boot partition?

Screenshot below

this is right for boot-partition (#1), because uboot looks in this structure

as official images + uboot are using this structure, is used it also for my uboot + images

you should have also root-partition (#2)

I understood the boot Partition now but have a doubt when I was going through this thread so I asked something there.

I’m quite new to this area, and as far as I understand, we can’t boot the R2 directly from a USB drive. We have to boot from the SD card first (which has U-Boot), and then configure it to boot from USB. Is that correct?

Thanks in advance!

Yes the easiest way booting from devices other than mmc and spi on newer socs is to boot uboot from supported device and then use uboot to boot the other device (usb,sata,nvme,…).

1 Like