[BPI-R2 new image] debian 10 buster image with Kernel 4.19.62

And you do not have a ready xx.emmc.img image that can be written down with one dd command ? That would greatly simplify the preparation of emmc memory. And then the root file system can then be written down with a simple copy as cp -ar …

No and it makes more work for me maintaining it

You only need to flash the sd-image and change 2 files…

what files need to be changed?

First one is uEnv.txt on fat-partition (boot),second on ext-partition (root)

All your recommendations do not work.

https://www.fw-web.de/dokuwiki/doku.php?id=en:bpi-r2:ubuntu#installation

dd if=path/to/ubuntu.img of=/dev/mmcblkx and the system does not start from emmc

u-boot not start apparently needed other preloader but

write preloader from here to the emmc boot-device:

  • gunzip -c BPI-R2-EMMC-boot0-DDR1600-0k-0905.img.gz | sudo dd of=/dev/mmcblk1boot0 bs=1024 seek=0

is error gzip: BPI-R2-EMMC-boot0-DDR1600-0k-0905.img.gz: not in gzip format

in u-boot is missing command emmc pconf 0x48

New uboot handle mmc partconf over this (have it also on my wiki):

mmc partconf 0 1 1 0

Does boot0 exist? Filename correct (i wonder about the gzip-error)? Preloader/partconfig is the probable cause if no boot on emmc happens.at least you should see preloaders output

where to look

yes right. the downloaded file does not even unpack Linux

    [PART] blksz: 512B
[PART] [0x0000000000000000-0x000000000003FFFF] "PRELOADER" (512 blocks) 
[PART] [0x0000000000000000-0x000000000003FFFF] "MBR" (512 blocks) 
[PART] [0x0000000000040000-0x00000000000BFFFF] "UBOOT" (1024 blocks) 
[PART] [0x00000000000C0000-0x00000000000FFFFF] "CONFIG" (512 blocks) 
[PART] [0x0000000000100000-0x000000000013FFFF] "FACTORY" (512 blocks) 
[PART] [0x0000000000140000-0x000000000213FFFF] "BOOTIMG" (65536 blocks) 
[PART] [0x0000000002140000-0x000000000413FFFF] "RECOVERY" (65536 blocks) 
[PART] [0x0000000004140000-0x000000004413FFFF] "ROOTFS" (2097152 blocks) 
[PART] [0x0000000044140000-0x000001FFC413FFFF] "USER" (-4194304 blocks) 
[platform_vusb_on] PASS
[TOOL] PMIC not dectect usb cable!
[TOOL] <UART> listen  ended, receive size:0!
[TOOL] <UART> wait sync time 150ms->5ms
[TOOL] <UART> receieved data: ()

Device APC domain init setup:

 bootloader load uboot ,the address of uboot is 81E00000 
[PART]partition name UBOOT 
[PART]partition start block 0x200 
[PART]partition size 0x80000 
[PART]partition blks 0x400 
[PART]partition flags 0x0 
[PART]partition name 0x8 
[bean] part->startblk(0x200) bdev->blksz(0x200) part->part_id(8) hdr(0xFFB50000)
[BlkDev.c 101 ]partition block size 0x200 ,blks:0xE90000
[BlkDev.c 101 ]partition block erase size 0x200 

[PART] load "UBOOT" from 0x0000000000050000 (dev) to 0x81E00000 (mem) [SUCCESS]
[PART] load speed: 10462KB/s, 300000 bytes, 28ms
[BT_SD_PG] device info 0x8590 0x8A00 0xCB01 0x102
0:dram_rank_size:80000000
[PLFM] md_type[0] = 0 
[PLFM] md_type[1] = 0 

[PLFM] boot reason: 0
[PLFM] boot mode: 0
[PLFM] META COM0: 0
[PLFM] <0xFFB7CC10>: 0x0
[PLFM] boot time: 2018ms
[PLFM] DDR reserve mode: enable = 0, success = 0

[BLDR] jump to 0x81E00000
[BLDR] <0x81E00000>=0xEA0000B8
[BLDR] <0x81E00004>=0xE59FF014

so at least preloader is loaded…it looks like the preloader size-issue…does not load full uboot and then does not boot

Could you try this: https://github.com/BPI-SINOVOIP/BPI-files/blob/master/SD/100MB/BPI-R2-EMMC-boot0-DDR1600-20190722-0k.img.gz

OK! with this preloader, the system booted

I load mtk_pmic_keys module and install acpid package. But the power button does not work.
There is button support in this kernel 4.19.62-bpi-r2-main ?

and this kernel support uEnv.txt ? he is not in the image

Imho in 4.19 it should work…maybe config in buster is a bit different.

Uenv.txt is for uboot…it allows you to change uboot-environment like differen kernel name,cmdline,…

Hi frank. I’m using the image. Here are some suggestions:

  • Install more packages. like locales, curl(or wget), vi(or vim)
  • For installed locales. configure en_US.UTF-8. And set it as default locale for the system.
    maybe you can add your locales
  • Let /etc/resole.conf empty or default.
  • Use PARTUUID instead LABEL in /etc/fstab. For install to emmc more easy. (use genfstab in arch-install-scripts is a good idea)

Have a nice day :grinning:

Hi,thanks for suggestions,but this should be minimal image…everyone can install what he need and especially wget/curl should not be installed on a routers main os :slight_smile:

Normally partuuid is better,but if you copy to emmc,the chance is high that you mount your sd-partition without knowing it (forget to change)

Resolv.conf is right,because it depends in my local net

Hi Frank, long time no read :slight_smile: but I was very busy throughout the summer to dig out my house because of the wet cellar walls.

These days I installed your image on two M1 Bananas with SSDs. Both work like a charm! You did an extremely fine piece of work!

Cheers,

Thomas

You have used this image for m1?

I guess you build at least own kernel for m1…

:thinking: Today i try to add vlan on interface. It works, sometime.

  1. If i set vlan id in windows. It works.
    I test multiple vlan on same port. Set different vlan id and ip address. Then ping test address. It works fine
    env:
    • 192.168.3.10/24(vlan 1)
    • 10.1.1.1/24(vlan 100)
    • Windows 10 1903 (18362.356)
    • ASIX AX88179 USB3.0 to GE Adapter
  2. If i use a switch support vlan. And set port only receive tag packages. It don’t work. :frowning:
    image
  3. If use same switch in 2 as uplink. downlink devices plug in R2 can send packages. But can not receive packages.
    image

Is that tag lose when system transport tagged package to switch. Or there are default vlan on switch cpu port? :thinking:

edit: my kernel is 4.19.72-main add bond and btrfs support.

imho you need to set upstream-port to trunk (send all vlan or at least the ones you want)…maybe downstream-port also allows only specific vlan

Vlan1 is often used switch internally and should not be used for tagged frames

i have vlan working here (but with kernel 4.14), but this was out-of-the-box so it should work also in 4.19

How did you set vlan on r2? Show your “ip addr”

I use systemd-networkd to create vlan.


I known why it don’t work. The vlan tag maybe not tagged in system or lose in switch.

Here is what i try:

  1. use ip link add link wan wan.100 type vlan id 100 to add vlan interface.
    connect wan to my linux laptop which set eth0.100
  2. try use ping to test connect between to devices. FALLED
  3. try use ipv6 multicast to create layer 3 packages. ping ff02::1%eth0.100. SUCCESS
  4. use tcpdump on my laptop. Catch ipv6 multicast packages.
  5. wireshark show me that no vlan tag in packages from R2.

Here is wireshark’s screenshot(hidden my mac address):

edit: For yesterday problem 3. I known that my switch set default vlan (PVID) is vlan 1. When i set receive All-Package on it. The no tag packages will automatic add tag vlan1. But packages from other devices are with vlan1 tag. So my devices drop it

Pvid-port drops tags from configured main vlan and if in trunk-mode it can give multiple vlans out (1x untagged + X x tagged)

Dear frank-w, Thank you for the image and the whole development work you are doing for the R2 board! Although, I have a question about your buster image: I used Win32DiskImager to flash it on the SD card and booted up the R2. Unfortunately the board went in a reboot loop. I could see the bash login attempt for about one second and then it did a reboot. No one else wrote about this problem here in the forum and maybe it is unique for only my R2. I bought it as second hand from ebay and the previous owner bridged the power button. Thus, it is always switched on. Could it be that your image does a reboot because the power button is still “pressed”?