bpi-sinovoip / bpi-r2-bsp Goto Github PK
View Code? Open in Web Editor NEWSupports Banana Pi BPI-R2 (MT7623N) (Kernel 4.4)
Supports Banana Pi BPI-R2 (MT7623N) (Kernel 4.4)
Hello,
Is there a size limit for my SD card to work with Banana Pi?
Sincerely,
because of codec it should be i2s...i2c 0 and 1 should be on GPIO, right?
Connect 4G module and RJ45 with R2 board,I used pppd to dial up R2 successfully,Logs are following:
But after I plugged out RJ45 from my R2 board,I failed to download speedtest-cli tool,and ping www.baidu.com failed, Logs are following:
added that to mt7623.dtsi
uart0: serial@11002000 {
compatible = "mediatek,mt7623-uart",
"mediatek,mt6577-uart";
reg = <0 0x11002000 0 0x400>;
interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_UART0_SEL>,
<&pericfg CLK_PERI_UART0>;
clock-names = "baud", "bus";
status = "disabled";
};
uart1: serial@11003000 {
compatible = "mediatek,mt7623-uart",
"mediatek,mt6577-uart";
reg = <0 0x11003000 0 0x400>;
interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_UART1_SEL>,
<&pericfg CLK_PERI_UART1>;
clock-names = "baud", "bus";
status = "disabled";
};
and that to mt7623n-bpi-r2.dts
&uart0 {
status = "okay";
};
&uart1 {
status = "okay";
};
following devices are detected during boot (pins by schematics):
pin 8/10 = uart1 (tx/rx) = 11003000 = ttyS2
pin 11/13 = uart0 (tx/rx) = 11002000 = ttyS1
now i'm connected an arduino (sends keepalives and sending back "AT-Strings" it receives (tested with RPI)) to uart1 and trying to access:
#!/bin/bash
DEV=/dev/ttyS2
while read line; do
echo "["$(date "+%Y-%m-%d %H:%M:%S")"] received: "$line
done < <(cat $DEV)
i can see the keepalives, but when i try to send data:
echo "AT" >/dev/ttyS2
nothing happens (arduino send AT back if it receives it), so BPI-R2 does not send it
serial on arduino is configured with
Serial.begin(9600);
on BPI-R2:
stty -F /dev/ttyS2 -a
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S;
susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke
the arduino-code i use:
simpleserial.ino.txt
The MIPI driver in Kernel 4.4.70 is not working fine
I am getting the following on Debian 9.1 32 bit :-
...
LD u-boot
OBJCOPY u-boot.srec
OBJCOPY u-boot.bin
/bin/sh: 1: ./mkimage: Exec format error
Makefile:814: recipe for target 'u-boot-mtk.bin' failed
make[1]: *** [u-boot-mtk.bin] Error 2
make[1]: Leaving directory '/home/aaron/BPI-R2-bsp/u-boot-mt'
Makefile:40: recipe for target 'u-boot' failed
make: *** [u-boot] Error 2
Build success!
And the following on Ubuntu 16.04.3 32 bit :-
LD u-boot
OBJCOPY u-boot.srec
OBJCOPY u-boot.bin
./mkimage: 1: ./mkimage: Syntax error: "(" unexpected
Makefile:814: recipe for target 'u-boot-mtk.bin' failed
make[1]: *** [u-boot-mtk.bin] Error 2
make[1]: Leaving directory '/home/aaron/GitHub/BPI-R2-bsp/u-boot-mt'
Makefile:40: recipe for target 'u-boot' failed
make: *** [u-boot] Error 2
Build success!
I just give a plain compilation and getting the below error.
scripts/Makefile.build:258: recipe for target 'drivers/pinctrl/mediatek/pinctrl-mtk-common.o' failed
make[4]: *** [drivers/pinctrl/mediatek/pinctrl-mtk-common.o] Error 1
scripts/Makefile.build:403: recipe for target 'drivers/pinctrl/mediatek' failed
make[3]: *** [drivers/pinctrl/mediatek] Error 2
scripts/Makefile.build:403: recipe for target 'drivers/pinctrl' failed
make[2]: *** [drivers/pinctrl] Error 2
make[2]: *** Waiting for unfinished jobs....
here i've found patch that seems to implementing vlan-control (for 7530, maybe 7623 used by bpi-r2 is similar):
https://github.com/openwrt/openwrt/blob/master/target/linux/mediatek/patches-4.4/0101-net-mediatek-add-gsw-mt7530-driver.patch
I'm trying to install wireguard on the Banana PI R2 running Ubuntu 16.04, latest image.
However, on the installation, I'm getting an error that reads:
dpkg: warning: version '*-*' has bad syntax: version number does not start with digit
It is likely that 4.4.70-BPI-R2-Kernel belongs to a chroot's host
Module build for the currently running kernel was skipped since the kernel source for this kernel does not seem to be installed.
There is an workaround, not Banana PI related, here: openzfs/zfs#1260
However, as the kernels are not provided by default repositories, I can't install this generic kernel.
Any help on this is appreciate. Thanks
i tried to add to add another bootmenu-entry via uEnv.txt:
kernel_4.14=uImage_4.14.33
kernel_4.9=uImage_4.9.92
boot49=mmc init; fatload mmc 0:1 ${loadaddr} ${bpi}/${board}/${service}/${kernel_4.9}; bootm
boot414=mmc init; fatload mmc 0:1 ${loadaddr} ${bpi}/${board}/${service}/${kernel_4.14}; bootm
bootmenu_7=8. Boot kernel 4.9.=run boot49
bootmenu_8=9. Boot kernel 4.14.=run boot414
i know i can modify existing kernel=-param to set another name for the uImage…this works, but the corresponding menuentry boot10 goes through some variables and also loads the env after selecting the entry.
the bootentry and my variables seems not to be loaded before displaying the menu…how can i change this?
i also tried with patches from @JackZeng, but it seems that uEnv.txt from sd.card is not load before menu is displayed
also the following commands on uboot-console did not load it:
mmc init
run loadbootenv
BPI-IoT> run loadbootenv
reading bananapi/bpi-r2/linux/uEnv.txt
1146 bytes read in 10 ms (111.3 KiB/s)
printenv => does not show my vars
bootmenu => does not display the menuentries
Hello,
I'm not the big kernel developer, but I saw in
https://github.com/torvalds/linux/blob/master/drivers/net/ethernet/mediatek/mtk_eth_soc.c
the following code:
static int __init mtk_init(struct net_device *dev)
{
struct mtk_mac *mac = netdev_priv(dev);
struct mtk_eth *eth = mac->hw;
const char *mac_addr;
mac_addr = of_get_mac_address(mac->of_node);
if (mac_addr)
ether_addr_copy(dev->dev_addr, mac_addr);
/* If the mac address is invalid, use random mac address */
if (!is_valid_ether_addr(dev->dev_addr)) {
eth_hw_addr_random(dev);
dev_err(eth->dev, "generated random MAC address %pM\n",
dev->dev_addr);
}
return mtk_phy_connect(dev);
}
and I wonder, the function ether_addr_copy wants to copy the content from dev->dev_addr to mac_addr. Is this the plan? I have the feeling, that the parameters should be changed?
Kind regards, Andreas
hi
i've tried using otg-port with this kernel, but i only get this
[ 6.414494] usb_phy_generic.0.auto supply vcc not found, using dummy regulato
r
[ 6.421967] musb probe
[ 6.424465] musb probe reg: 0xe3758000 ,0xe375a000 , irq: 42
[ 6.443552] musb core probe done base 0xe375a000
[ 7.554552] 1a1c0000.usb supply vbus not found, using dummy regulator
can you please verify iddig-gpio and vbus? maybe you can help me getting it working in my 5.4-otg tree
https://github.com/frank-w/BPI-R2-4.14/blob/5.4-otg/arch/arm/boot/dts/mt7623.dtsi#L1224
regards Frank
root@bpi-iot-ros-ai:~# echo "dir 12 1" >/sys/devices/platform/1000b000.pinctrl/mt_gpio
root@bpi-iot-ros-ai:~# echo "out 12 1">/sys/devices/platform/1000b000.pinctrl/mt_gpio
root@bpi-iot-ros-ai:~# cat /sys/devices/platform/1000b000.pinctrl/mt_gpio
gpio base is 233, total num is 279
PIN: [MODE] [DIR] [DOUT] [DIN] [PULL_EN] [PULL_SEL] [IES] [SMT] [DRIVE] ( [R1] [R0] )
...
12: 1 0 1 1-1-1-1-1 0
...
dir will not be written
I testd, and with a switch on board, I can boot uboot from internal emmc and external sd card ( cold start-up ).
It would be nice that it load/save environment in external sd card when it boot from external media. For example, u-boot can detect the status of the boot switch on board to do that.
I don't know its a kernel issue,but commands powerdown,shutdown -P now and init 0 do only halt. Board stays on (green led is lighting)
tried including some kernel-options but currently without luck
build.sh.txt
build.sh.diff.txt
can you enable pull-requests for me?
added return-code-check to other options and build-logging
edit: logging disables return-code :(
U-Boot partition size is 0x80000, but preloader copy only 300000 (0x0493e0).
So modern U-Boot (2019-07) can't be used with additional options.
Displayed correct:
[PART]partition name UBOOT
[PART]partition start block 0x200
[PART]partition size 0x80000
[PART]partition blks 0x400
Please change preloaders copy size to whole part size (0x80000).
Based on V1.1.1 release, both PWM4 and PWM4 are NOT working.
Based on V1.1.1 release, the HDMI audio is not working,
Fix (using 155 which has same as 154 => Specialix RIO serial card):
frank-w/BPI-Router-Linux@984d46e
see free major numbers:
http://elixir.free-electrons.com/linux/latest/source/Documentation/admin-guide/devices.txt
Please release the source code for the preloader binary included with this package.
Filename of the compiled file: "BPI-R2-bsp/mt-pack/mtk/bpi-r2/bin/preloader_iotg7623Np1_emmc.bin"
Hi,
I wanted to change a little bit the configuration of the kernel so that i can use a camera with my BPI-R2.
My setup is particular since i use a grabber (the Magewell USB Capture HDMI Gen 2) and a camera plugged in hdmi to this grabber. Finally the camera should be seen as an usb camera device.
The setup is working on my ubuntu 16.04 (kernel 4.13.0-39-generic), i use uvc and v4l and i can display the camera flux using qv4l2 for example.
I tried to configure the kernel so that i have the same modules i use on my desktop version. To do so i had to configure MEDIA_CAMERA_SUPPORT = y, MEDIA_USB_SUPPORT = y and USB_VIDEO_CLASS = m.
The list of module i need :
Module Size Used by
snd_usb_audio 196608 1
snd_usbmidi_lib 32768 1 snd_usb_audio
uvcvideo 90112 0
videobuf2_vmalloc 16384 1 uvcvideo
videobuf2_memops 16384 1 videobuf2_vmalloc
videobuf2_v4l2 24576 1 uvcvideo
videobuf2_core 40960 2 uvcvideo,videobuf2_v4l2
videodev 176128 3 uvcvideo,videobuf2_core,videobuf2_v4l2
media 40960 2 uvcvideo,videodev
The two module i'm missing are media.ko and videodev.ko but when i set MEDIA_SUPPORT = m , i got the following error at the compilation (see attached file). I don't understand this error because i found the definition of the functions marked as undefined references in linux-mt/include/media/cec.h.
I don't know if i'm missing dependencies or if it's a bug because i'm pretty new to that stuff, a little help would be appreciated.
If you need futher information don't hesitate.
Vivien LAURE
On R2 board, there is an onboard WIFI module MT6625, but right now the driver for it is not available.
...
"mkimage" command not found - U-Boot images will not be built
arch/arm/boot/Makefile:92: die Regel für Ziel „arch/arm/boot/uImage“ scheiterte
make[2]: *** [arch/arm/boot/uImage] Fehler 1
arch/arm/Makefile:329: die Regel für Ziel „uImage“ scheiterte
make[1]: *** [uImage] Fehler 2
make[1]: Verzeichnis „/home/frank/bpi-r2/BPI-R2-bsp/linux-mt“ wird verlassen
Makefile:50: die Regel für Ziel „kernel“ scheiterte
make: *** [kernel] Fehler 2
Build success!
build.sh:
echo -e "\033[31m Build success!\033[0m"
without check for return-codes
I copied data from SD card into eMMC. It works fine, but only if SD card inserted (I removing SD card while board still in u-boot).
Maybe I need to copy u-boot separately?
Will support CPU frequency governor by default
Sometimes, we get lots of below log, and HDMI isn't working.
[ 781.067379] mediatek-cec 10012000.cec: no cec phys addr found
[ 781.067402] mediatek-drm-hdmi 14015000.hdmi: get cec physical address fail
[ 781.067411] mediatek-drm-hdmi 14015000.hdmi: Get physical address fail
[ 788.510611] mediatek-cec 10012000.cec: no cec phys addr found
[ 788.510632] mediatek-drm-hdmi 14015000.hdmi: get cec physical address fail
[ 788.510641] mediatek-drm-hdmi 14015000.hdmi: Get physical address fail
It would be nice to get PCI and SATA support in u-boot.
After reseting this board under Ubuntu OS many times, might encounter this issue
[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] = 19
[PLFM] md_type[1] = 0
[PLFM] boot reason: 4
[PLFM] boot mode: 0
[PLFM] META COM0: 0
[PLFM] <0xFFB7CC10>: 0x0
[PLFM] boot time: 2029ms
[PLFM] DDR reserve mode: enable = 0, success = 0
[BLDR] jump to 0x81E00000
[BLDR] <0x81E00000>=0xEA00000F
[BLDR] <0x81E00004>=0xE59FF014
U-Boot (Aug 01 2017 - 09:59:52)
================== Iverson debug. ===========================
g_nr_bank = 1.
g_total_rank_size = 0x80000000
DRAM: 2 GiB
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.