BPI R2 LEDE(openwrt) source code


#22

I guess your device tree (mt7623.dtsi) was wrong. Please check https://patchwork.kernel.org/patch/9958277/

num-lanes = <1>;


#23

I use your submitted patch. Kernel boots fine but hangs at the following point:

`    [    2.008849] mtk-pcie 1a140000.pcie-controller: Port0 link down
                                             
[    2.045118] mtk-pcie 1a140000.pcie-controller: PCI host bridge to bus 0000:00                                      
[    2.052202] pci_bus 0000:00: root bus resource [io  0x0000-0xffff] (bus address [0x1a160000-0x1a16ffff])           
[    2.061626] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]                                         
[    2.068457] pci_bus 0000:00: root bus resource [bus 00-ff]                                                         
[    2.073919] pci 0000:00:00.0: [14c3:0801] type 01 class 0x0d8000                                                   
[    2.079894] pci 0000:00:00.0: ignoring class 0x0d8000 (doesn't match header type 01)                               
[    2.087632] pci 0000:00:00.0: supports D1                                                                          
[    2.091607] pci 0000:00:00.0: PME# supported from D0 D1 D3hot                                                      
[    2.097534] pci 0000:00:01.0: [14c3:0801] type 01 class 0x060400                                                   
[    2.103507] pci 0000:00:01.0: reg 0x14: [mem 0x00000000-0x0000ffff]                                                
[    2.109788] pci 0000:00:01.0: supports D1                                                                          
[    2.113763] pci 0000:00:01.0: PME# supported from D0 D1 D3hot                                                      
[    2.119683] PCI: bus0: Fast back to back transfers disabled                                                        
[    2.125227] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring                            
[    2.133170] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring                            
[    2.394348] mtk_soc_eth 1b100000.ethernet eth0: rx pause enabled, tx pause enabled`

Same problem: does not match pci header type 01 and hangs on “bridge configuration invalid”.


(moore liu) #24

If gary’s image cannot work on your board, i guess it should a board issue. That’s why it still hang at pcie part after apply many patches, thanks.


#25

Garry’s 4.4.70 Kernel works fine and PCIe too. I am wondering that garry’s kernel uses mt2701 for PCIe obn BPI-R2 but the Devicetree for BPI-R2 include mt7623 in Kernel 4.9.44 and then PCIe initialization fails.

Can you explain this fact please?

@garywang: can you upload the mt2701 PCIe devicetree please?


(Paweł Kalemba) #26

@garywang Hi ,i got problem with latest lede i got error

/make_bundle_image.sh /home/pkalemba/bpi-r2_lede/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_32/mtk-bpi-r2-SD.img /home/pkalemba/bpi-r2_lede/staging_dir/target-arm_cortex-a7+neon-vfpv4_mu sl_eabi/image/mtk-bpi-r2-preloader-sd.bin /home/pkalemba/bpi-r2_lede/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/image/mtk-bpi-r2-uboot.bin /home/pkalemba/bpi-r2_lede/build_dir/target-arm_cortex-a7+neo n-vfpv4_musl_eabi/linux-mediatek_32/uImage-mt7623n-bananapi-bpi-r2 /home/pkalemba/bpi-r2_lede/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_32/root.squashfs

  • ‘[’ 5 -eq 5 ‘]’
  • OUTPUT_FILE=/home/pkalemba/bpi-r2_lede/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_32/mtk-bpi-r2-SD.img
  • PRELOADER_FILE=/home/pkalemba/bpi-r2_lede/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/image/mtk-bpi-r2-preloader-sd.bin
  • UBOOT_FILE=/home/pkalemba/bpi-r2_lede/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/image/mtk-bpi-r2-uboot.bin
  • KERNEL_FILE=/home/pkalemba/bpi-r2_lede/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_32/uImage-mt7623n-bananapi-bpi-r2
  • ROOTFS_FILE=/home/pkalemba/bpi-r2_lede/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_32/root.squashfs
  • BS=1024
  • PRELOADER_OFFSET=0
  • UBOOT_OFFSET=320
  • KERNEL_OFFSET=2048
  • ROOTFS_OFFSET=66816
  • dd bs=1024 if=/home/pkalemba/bpi-r2_lede/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/image/mtk-bpi-r2-preloader-sd.bin of=/home/pkalemba/bpi-r2_lede/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eab i/linux-mediatek_32/mtk-bpi-r2-SD.img seek=0
    dd: failed to open ‘/home/pkalemba/bpi-r2_lede/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/image/mtk-bpi-r2-preloader-sd.bin’: No such file or directory

I assume there is a problem wtih uboot-mtk-bpi-r2 package but i cannot get it built.


#27

I have same problem. It just abort before build image of SD card. But the uImage-mt7623n-bananapi-bpi-r2 and root.squashfs has been build in ./build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_32. So you can just use that two file and flush it into your R2 board follow this:

btw. Do you update the feeds after 2018/1/1? Another preblem is libuci-lua (>= 2018-01-01). You need download the Makefile and uci.sh in lesource/package/system/uci at master · lede-project/source · GitHub and replace same file in ./package/system/uci.

Or maybe update code please, garywang. :wink:


BPI-R2 New image : Openwrt/LEDE 2017-09-08
(Paweł Kalemba) #28

Do you update the feeds after 2018/1/1? Another preblem is libuci-lua (>= 2018-01-01). You need download the Makefile and uci.sh in lesource/package/system/uci at master · lede-project/source · GitHub and replace same file in ./package/system/uci.

@BoringCat yes , i just changed by hand package version in Makefile of uci and it works :slight_smile:

I know method with TFTP but i seen that is option to buld SD card ready image so i tried it and it fail.


(gary) #29

Sorry, I’m trying to bundle preloader/uboot/kernel/rootfs as an image, but this feature isn’t done yet, please use the code based on previous commit.

Sorry for this.

Gary


(Holger Glaess) #30

hi i did all the step at the first post but the systen hyng at boot, the last what i see is

on my build system i did:

git clone https://github.com/garywangcn/bpi-r2_lede.git cd bpi-r2_lede

./scripts/feeds update -a ./scripts/feeds install -a

cp …/config ( the attached config from the first post ) ./.config make menuconfig -> exit -> did the save

make after a while the the complie proccess is finished without error then cd build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_32 scp root.squashfs uImage-mt7623n-bananapi-bpi-r2* root@mytftpserver:/tftproot

then on the bpi-r2 the step with the uImage-mt7623n-bananapi-bpi-r2.initramfs ( see below at the quote )

please help

holger


(Paweł Kalemba) #31

@mark05 did you change branch? you need to

git checkout bpi-r2-on-lede-v1

after you clone

@garywang i build the latest version flashed mtk-bpi-r2-SD.img to SD Card and i got error

Rank 0 coarse tune value selection : 31, 31         
Cannot find any pass-window                         
DRAMC calibration takes 398149594 CPU cycles        

[EMI] DRAMC calibration failed                      

[MEM] complex R/W mem test fail :FFFFFFFF           
<ASSERT> memory.c:line 109 0                        
[PLFM] preloader fatal error...

even if i update uboot package to latest commit.


(gary) #32

Hi Pkalemba

Please don’t use the mtk-bpi-r2-SD.img, we are trying to bundle preloader/uboot/kernel/root file system as an image, but it’s not ready. Sorry for this.


(Holger Glaess) #33

hi

i did an fresh clone

but there ist no branch bpi-r2-on-lede-v1

holger


(Frank W.) #34

strange online there is that branch…have you defined any options for git to get only the master branch?

Garys repo has newer code…


(Holger Glaess) #35

hi there are no options set at git , it is a fresh install debian ( devuan ) system just for bpi r2 source code compile

ithe is no .git at all.

in my browser i see the diffrent branch bt i i do the git clone with https i get only the master branch

so [update]

i did an

git branch -a ( got )

  • master remotes/origin/HEAD -> origin/master remotes/origin/bpi-r2-on-lede-v1 remotes/origin/lede-17.01 remotes/origin/master

then

git checkout remotes/origin/bpi-r2-on-lede-v1 git pull https://github.com/garywangcn/bpi-r2_lede.git bpi-r2-on-lede-v1 git checkout bpi-r2-on-lede-v1

i start the make

holger

holger


(Holger Glaess) #36

hi

make fails with

  • ROOTFS_FILE=/home/glaess/bpi-r2_lede/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_32/root.squashfs
  • BS=1024
  • PRELOADER_OFFSET=0
  • UBOOT_OFFSET=320
  • KERNEL_OFFSET=2048
  • ROOTFS_OFFSET=66816
  • dd bs=1024 if=/home/glaess/bpi-r2_lede/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/image/mtk-bpi-r2-preloader-sd.bin of=/home/glaess/bpi-r2_lede/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_32/mtk-bpi-r2-SD.img seek=0 dd: failed to open ‘/home/glaess/bpi-r2_lede/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/image/mtk-bpi-r2-preloader-sd.bin’: No such file or directory Makefile:12: recipe for target ‘install-images’ failed make[5]: *** [install-images] Error 1 make[5]: Leaving directory ‘/home/glaess/bpi-r2_lede/target/linux/mediatek/image’ Makefile:21: recipe for target ‘install’ failed make[4]: *** [install] Error 2 make[4]: Leaving directory ‘/home/glaess/bpi-r2_lede/target/linux/mediatek’ Makefile:13: recipe for target ‘install’ failed make[3]: *** [install] Error 2 make[3]: Leaving directory ‘/home/glaess/bpi-r2_lede/target/linux’ target/Makefile:23: recipe for target ‘target/linux/install’ failed make[2]: *** [target/linux/install] Error 2 make[2]: Leaving directory ‘/home/glaess/bpi-r2_lede’ target/Makefile:19: recipe for target ‘/home/glaess/bpi-r2_lede/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.target_install’ failed make[1]: *** [/home/glaess/bpi-r2_lede/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.target_install] Error 2 make[1]: Leaving directory ‘/home/glaess/bpi-r2_lede’ /home/glaess/bpi-r2_lede/include/toplevel.mk:207: recipe for target ‘world’ failed make: *** [world] Error 2

holger


(Frank W.) #37

as gary said: do not use mtk-bpi-r2-preloader-sd.bin…

you can try to move back with

git checkout commit-id

commit-overview

e.g. using 51b0bac as commit-id


(Holger Glaess) #38

hi thanks for help

please be sorry for my missing knowledge about git .

i have to learn … about git and the bpi-r2

holger


(Holger Glaess) #39

hi

kernel build susccessful an bpi-r2 boots him but i miss the wifi interface.

holger


(Frank W.) #40

Iassume you must start wifi driver with wmt-tools like in debian/ubuntu.


(gary) #41

Please use the latest code, thanks.