Ma Tianfu

  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Ma Tianfu's Achievements

  1. Not related to armbian distribution, just curious. I googled but had no luck to find an answer. For Allwinner SoCs, there is FEL boot tool to download bootloader, kernel and initramfs to ram and to boot the system directly, without writing those stuff onto flash storage and performing a reset; I wonder whether there is a tool to achieve the same function for rockchip SoCs? or we could modify the usbplug and rkdeveloptool to implement the function? or there are any limitations to prevent it? any comments or advices?
  2. Thank you all. Now I understand that we could do it, if we choose the debian-based version. Also, our company have signed the contract with Rockchip and officially licensed their binaries in uboot and kernel. So there is no problem for distributing all boot loaders and kernels. Armbian has some userspace customizations, If we use them and modify them, we must open source the modification with the same GPL license. For support, we will adopt an image-based system upgrade for average users, who won't log into the system and stay happy with our http service and mobile apps. We will have a test suite and do regression test for each kernel/rootfs image upgrade. For power users, the image-based upgrade may be switched off and they can log into the system, do whatever they want to do. ---- Then, the last question, if we ship the product with armbian pre-installed, or if we allow users to install armbian by themselves. Could we advertise our product to power users with something like 'powered by armbian' or 'compatible with armbian'? Of course *armbian* with be clearly described as the trademark of armbian foundation (
  3. We have a home nas device based on Rockchip platform. Ubuntu base requires a license for commercial product. I wonder if we could use armbian as rootfs?
  4. The chip is targetted on smart speaker market, according to rockchip guys. They have a SDK based on v4.4 kernel and build root, with a lot of voice/audio processing packages. Probably 32 bit system recommended. I don't know whether zram could help a little on memory constraint or doesn't help at all. I will give it a try when I have a board. Both rk3308 and its G variant have similar cores/performance to Allwinner A64/R18, but they are cheaper and easier (built-in ddr2 or 16 bit ddr2/ddr3) with have better driver support. I think both of them have great potential on IoT market, though they officially position them as processors for speaker.
  5. I wonder how much ram is consumed by kernel, system services and tmpfs on a typical armbian system? Rockchip rk3308G has 64MB ram packaged in cpu. A dirty cheap 4 layer board could have a cpu, a few discrete power chips, a mmc card slot, and a wifi/bt module, with a bunch of low speed io and two usb 2.0 port, one host and one otg. The cpu is quad core cortex A35, powerful and power efficient, compared to Pi Zero W or BBB. Does that sound interesting for an iot node? Or it is too crippled to do anything useful? I hope python or node.js could run on such a board, but for node, the memory usage should be very careful. Any suggestions?
  6. I tried building the mainline kernel (ayufan) for NanoPC T4. My aim is to bring up bluetooth. No quite familiar with device tree, just googling and reading the kernel doc, and now I had some luck. According to this post ( in 96boards forum, in recent kernel, there is a serial bus support for bcm blutooth. ---- firmware. I used firmware from the repo mentioned in the post: according to hci_bcm.c code, this file should be renamed to BCM4356A2.hcd and placed at /lib/firmware/brcm directory. ---- kernel config First, serial bus should be enabled in kernel config, located at Device Drivers > Character devices > Serial device bus > Serial device TTY port controller. Second, in Networking support > Bluetooth subsystem support > Bluetooth device drivers, enabled Broadcom protocol support. This option won't appear if serial bus is not enabled, aka, a dependency. Meanwhile, The UART (H4) protocol support will be enabled automatically. ----- device tree file in "arch/arm64/boot/dts/rockchip/rk3399-nanopi4-common.dtsi", there are two blocks named as "wireless-bluetooth", one containing full configuration of all gpios, clocks, and compatibles. The other contains only uart0_gpios pullup/pulldown configration (I guess). I removed the first block and left the second one intact. Don't know if the second block should be removed or updated. then the uart0 block is modified to: 341 &uart0 { 342 pinctrl-names = "default"; 343 pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>; 344 status = "okay"; 345 346 bluetooth { 347 compatible = "brcm,bcm43438-bt"; 348 max-speed = <1500000>; 349 clocks = <&rk808 1>; 350 clock-names = "ext_clock"; 351 shutdown-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; /* GPIO0_B1, originally BT,reset_gpio */ 352 device-wakeup-gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>; /* GPIO2_D2 */ 353 host-wakeup-gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>; /* GPIO0_A4 */ 354 }; 355 }; Rebuild and install the kernel and dtb package. The bluetooth now works as expected. $ dmesg | grep Bluetooth [ 6.695813] Bluetooth: Core ver 2.22 [ 6.696184] Bluetooth: HCI device and connection manager initialized [ 6.696196] Bluetooth: HCI socket layer initialized [ 6.696203] Bluetooth: L2CAP socket layer initialized [ 6.696311] Bluetooth: SCO socket layer initialized [ 6.741105] Bluetooth: HCI UART driver ver 2.3 [ 6.741112] Bluetooth: HCI UART protocol H4 registered [ 6.741327] Bluetooth: HCI UART protocol Broadcom registered [ 6.957330] Bluetooth: hci0: BCM: chip id 101 [ 6.957644] Bluetooth: hci0: BCM: features 0x2f [ 6.961779] Bluetooth: hci0: BCM4354A2 [ 6.961788] Bluetooth: hci0: BCM4356A2 (001.003.015) build 0000 [ 7.965063] Bluetooth: hci0: BCM4356A2 (001.003.015) build 0266 $ hciconfig hci0: Type: Primary Bus: UART BD Address: CC:4B:73:1D:99:4F ACL MTU: 1021:8 SCO MTU: 64:1 UP RUNNING RX bytes:3584 acl:0 sco:0 events:410 errors:0 TX bytes:63761 acl:0 sco:0 commands:410 errors:0 Hopefully somebody will find this info helpful. Also, not sure if the device tree modification is correct. Especially how to deal with the remaining "wireless-bluetooth" block. which looks like: 888 wireless-bluetooth { 889 uart0_gpios: uart0-gpios { 890 rockchip,pins = <2 19 RK_FUNC_GPIO &pcfg_pull_none>; 891 }; 892 }; Shoudl I remove them out of the dtsi file? Or renaming/modifying the block to something correct? Any advice will be appreciated.
  7. Thank you very much. I will try to rebuild the kernel tomorrow. One more question. I am not familiar with wifi/bt combo device. In schematic, there are usually some gpios used to as WIFI_REG_ON, BT_REG_ON (Or BT_RESET), HOST_WAKE_BT, BT_WAKE_HOST, etc. Are those gpios controlled by wifi or bluetooth driver? or they are controlled by userspace program via linux GPIO?
  8. On Orange Pi Lite 2, using bionic nightly with 4.18.17-sunxi64 kernel. dmessage shows everthing ok for AP6255 ``` [ 15.705964] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 15.711588] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 15.908540] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6 [ 16.139476] Bluetooth: Core ver 2.22 [ 16.139548] NET: Registered protocol family 31 [ 16.139551] Bluetooth: HCI device and connection manager initialized [ 16.139570] Bluetooth: HCI socket layer initialized [ 16.139576] Bluetooth: L2CAP socket layer initialized [ 16.139617] Bluetooth: SCO socket layer initialized [ 16.327571] Bluetooth: Generic Bluetooth SDIO driver ver 0.1 [ 16.486332] EXT4-fs (zram0): mounted filesystem without journal. Opts: discard [ 18.496780] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6 [ 18.633959] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Feb 27 2018 03:15:32 version 7.45.154 (r684107 CY) FWID 01-4fbe0b04 [ 27.682340] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready [ 27.707595] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready [ 28.374744] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready [ 548.562865] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready [ 1188.296553] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 1188.296559] Bluetooth: BNEP filters: protocol multicast [ 1188.296571] Bluetooth: BNEP socket layer initialized ``` After installing bluez, hci0 shows up. ``` ma@orangepilite2:~$ hciconfig hci0: Type: Primary Bus: SDIO BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0 DOWN RX bytes:0 acl:0 sco:0 events:0 errors:0 TX bytes:0 acl:0 sco:0 commands:0 errors:0 ``` However it cannot be brought up. ``` ma@orangepilite2:~$ sudo hciconfig hci0 up Can't init device hci0: Input/output error (5) ``` can anybody shed some light? Is it a problem of bsp or I missed something important.
  9. Do you mean that the kernel and rootfs are located on USB drive and uboot (in spi flash) can load the kernel directly? Two questions: 1. is the kernel located in a separate GPT partition? or is it placed on a ext4 file system, such as /boot directory as most desktop or server distros do? 2. is usb hub supported? or the usb drive must be connected to the usb port directly? And where is the guide from ayunfan as mentioned above?
  10. I phoned the rockchip engineer who is responsible for kernel usb stack. He said they had tested usb mass storage mode, which gave a promising result: over 200Mbytes speed cound be achieved. I will test it myself in next few days when I have time.
  11. TI has an old document: I don't know if linux kernel driver has changed recently. I have followed the procedure several years ago on beaglebone black. TI also has also published an extensive benchmarking results for almost all its linux enabled arm cpus. In this page, the performance of peripheral mode USB is not good. For example, CDC performance of their flagship Sitara processor (multi-core cortex A15) is merely around 250Mbits/s, far less than the theoretical 5Gbps USB 3.0 bandwidth. I guess it is due to the MUSB IP used on TI's arm chip. Perhaps it has too few FIFO/buffers in hardware.
  12. I am considering to buy a RK3399 dev board and use USB 3.0 peripheral mode to transfer data to/from another host PC. It may be used as USB CDC/Eth or RNDIS device, or a MTP device. We hope the transfer rate could be well over 1Gbps, the higher, the better. So has anybody ever benchmarked RK3399 USB in peripheral mode? Such as the highest iperf transfer rate in CDC/Eth or RNDIS mode?