Willy Moto

  • Posts

    20
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Willy Moto reacted to jock in CSC Armbian for RK322X TV Boxes   
    @Willy Moto Yes, your observation is right: load average is broken on legacy kernel. For some reason, it idles with a value of 4.00, where instead mainline kernel correctly idles with a value of 0.00
  2. Like
    Willy Moto reacted to jock in CSC Armbian for RK3318/RK3328 TV box boards   
    The most offending things are:
    1. emmc settings
    2. cpu frequency
     
    eMMC settings are the most dangerous. Leave all the options unchecked in the eMMC panel.
    CPU frequency safe setting is 1.1Ghz (which is the default). Not all chips can reach 1.3Ghz.
     
  3. Like
    Willy Moto reacted to curse in CSC Armbian for RK3318/RK3328 TV box boards   
    @jockSorry for an extremely late reply. I was on vacation in distant lands(visiting my mom in Sweden), and the only monitor I had available to use there was an old 1024x768 monitor which I couldn't get to work with Armbian. The only thing that worked was the Multitool.
    Well, I'm back home in the Canary Islands with the volcanoes now.
    So finally. I can report that the WiFi on my H96Max+ (RK3328) works with the last idea you had
    https://forum.armbian.com/topic/17597-csc-armbian-for-rk3318rk3328-tv-box-boards/?do=findComment&comment=127240
    Thank you for all the help.
  4. Like
    Willy Moto reacted to jock in CSC Armbian for RK3318/RK3328 TV box boards   
    @curse
    I think I spot the issue: from dmesg I see that the brcmfmac driver is using the standard nvram file, but the standard nvram does not work because it is for BCM4334 and not for AP6334.
    This time I propose you to paste this file over /lib/firmware/brcm/brcmfmac4330-sdio.txt, reboot and try again.
     
    If the problem is that one, it is very strange because the driver is supposed to find automatically the right nvram file, it has always worked that way but for some reason this time does not.
  5. Like
    Willy Moto reacted to AlwinLub in CSC Armbian for RK3318/RK3328 TV box boards   
    First things first; i haven't experienced any panics, crashes or other similar bugs. The new image runs smoothly as far as i can tell.
    Seondly; Kivy finally *bleep* works. After compiling 20+ builds with different configurations, throwing the tv off the wall, buying a new tv and starting all over again, i found out that the issue was to do with Mesa not playing nice with the anti-aliasing Kivy applied, which resulted in a black screen. It still runs at 10-15 fps, but i think that's due to this build of Kivy being built with OpenGL instead of OpenGL ES, so i'm currently in the process of building Kivy with GLES support. At least we're making progress and i can't thank you guys enough for thinking this trough with me (or actually 'for me').
     
    So for anyone who happens to come across this post with the same problem, set the 'multisamples' in the 'graphics' config to '0' like this (which may or may not help for you):
     

     
    EDIT: After building Kivy with OpenGL ES support, the whole ui works smoothly at around 30 - 70fps. Have a good weekend!
  6. Like
    Willy Moto reacted to jock in CSC Armbian for RK3318/RK3328 TV box boards   
    @pakos96
    Hello! I guess you are saying that is lagging because desktop is not very reactive. For start, it is wisely suggested in armbian to disable the xfce desktop compositor (Menu -> System -> Window Manager Tweaks).
    Don't expect very fast graphical performance, mali-450 is still a limited GPU. Also, until I don't enable the RAM frequency scaling, the RAM is fixed at 330 MHz (instead of usual 667 or 800 MHz) and this is a huge hit for general graphical performance.
     
    @usual user As far as I see, armbian hirsute should have oibaf repository enabled and so Mesa comes as the latest development release
  7. Like
    Willy Moto reacted to jock in CSC Armbian for RK3318/RK3328 TV box boards   
    Update!
     
    Images with mainline kernel have been updated to Debian Bullseye (minimal) and Ubuntu Hirsute (xfce desktop) with kernel 5.10.68.
    Kernel is the same major version as previous mainline images, but Bullseye and Hirsute should provide significant newer software packages (including new Mesa libraries for those interested in graphics).
  8. Like
    Willy Moto reacted to jock in CSC Armbian for RK3318/RK3328 TV box boards   
    Cool, thanks for reporting!
    My box was also stable for hours with your ddrbin, so I think I will promote it as the new default
  9. Like
    Willy Moto reacted to Wester_Minsk in CSC Armbian for RK3318/RK3328 TV box boards   
    14 hours up time on eMMC, with  Doker +HA + Pihole load. 
    At the beginning there was one freeze, after which I removed the parameter "rk3318-box-emmc-hc200"  from the armbian-config. 
    Then it works stably. 
    This is already much better than it was, the changes are obvious. 
    I will pick up a good sdcard, and start from it to eliminate the eMMC problem and continue testing. 
  10. Like
    Willy Moto got a reaction from fabiobassa in CSC Armbian for RK322X TV Boxes   
    @fabiobassa:
    Here are some photos of my TV box for your inspection.  Though @jock already said it's a NAND memory model.
     
    Do you think it's a good idea if I replace the CPU heatsink with a larger one to increase the cooling effect? 

     



  11. Like
    Willy Moto reacted to jock in CSC Armbian for RK3318/RK3328 TV box boards   
    @Wester_Minsk thanks for the logs.
    I extracted the ddrbin from the backup you posted above and made an image with that. The ddrbin is the thingy that initializes the DDR memory, an initialization with bad timings may be harmful for the system stability, so give a shot to this experimental image (it's a debian bullseye with command line only):
     
    https://users.armbian.com/jock/rk3318/Armbian_21.11.0-trunk_Rk3318-box_bullseye_current_5.10.64_minimal.img.xz
     
    edit: if you try this on sdcard, be sure to erase the eMMC completely first!
  12. Like
    Willy Moto reacted to hexdump in CSC Armbian for RK3318/RK3328 TV box boards   
    @elbuit - if nothing else works, this should usually work to get the device tree from a running android: https://github.com/hexdump0815/u-boot-misc/tree/master/misc.h616-legacy/android-device-tree-copy
     
    best wishes and good luck - hexdump
  13. Like
    Willy Moto reacted to lucky62 in Armbian for TV box rk3318   
    Hello all,
    I would like to have a WIFI/BT working on my X88 Pro 10 box.
    If I understand correctly I need two things:
    Corect DTB file Driver for specific hardware (directly in kernel or compiled as module) Am I right? Any other important point?
     
    I have extracted the DTB from running Android - steps I done:
    start the Android on TV box install and configure the SSH Server App (Dropbear) connect to Android via SSH be root (su - device must be rooted, usually already is) find the boot partition (ls -l /dev/block/by-name/) I found this: lrwxrwxrwx 1 root root 21 1970-01-01 01:00 boot -> /dev/block/mmcblk1p11 dump partition to the file boot.img (dd if=/dev/block/mmcblk1p11 of=boot.img) move the boot.img to the PC install extract-dtb python package (pip install extract-dtb) extract DTB from boot.img (extract-dtb boot.img) install device-tree-compiler (apt-get install device-tree-compiler) decompile DTB to DTS (dtc -I dtb -O dts -o x88_pro_10_rk3318.dts 01_dtbdump_rockchip,rk3328-box-liantong.dtb) Some notes.
    extracted DTB is quite big:
    # extract-dtb boot.img Dumped 00_kernel, start=0 end=19752960 Dumped 01_dtbdump_rockchip,rk3328-box-liantong.dtb, start=19752960 end=33554432 Extracted 1 appended dtbs + kernel to dtb # ls -l dtb/ total 32772 -rw-r--r-- 1 root root 19752960 apr 11 16:07 00_kernel -rw-r--r-- 1 root root 13801472 apr 11 16:07 01_dtbdump_rockchip,rk3328-box-liantong.dtb  
    It was decompiled successfully but some warning reported (not sure if this is important):
     
    # dtc -I dtb -O dts -o x88_pro_10_rk3318.dts 01_dtbdump_rockchip,rk3328-box-liantong.dtb x88_pro_10_rk3318.dts: Warning (unit_address_vs_reg): /usb@ff600000: node has a unit name, but no reg property x88_pro_10_rk3318.dts: Warning (unit_address_vs_reg): /regulators/regulator@0: node has a unit name, but no reg property x88_pro_10_rk3318.dts: Warning (unit_address_vs_reg): /regulators/regulator@1: node has a unit name, but no reg property x88_pro_10_rk3318.dts: Warning (unit_address_format): /reserved-memory/drm-logo@00000000: unit name should not have leading 0s x88_pro_10_rk3318.dts: Warning (simple_bus_reg): /regulators/regulator@0: missing or empty reg/ranges property x88_pro_10_rk3318.dts: Warning (simple_bus_reg): /regulators/regulator@1: missing or empty reg/ranges property x88_pro_10_rk3318.dts: Warning (avoid_unnecessary_addr_size): /syscon@ff100000: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property x88_pro_10_rk3318.dts: Warning (avoid_unnecessary_addr_size): /regulators: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property x88_pro_10_rk3318.dts: Warning (graph_child_address): /hdmi@ff3c0000/ports/port: graph node has single child node 'endpoint@0', #address-cells/#size-cells are not necessary x88_pro_10_rk3318.dts: Warning (graph_child_address): /tve@ff373e00/ports/port: graph node has single child node 'endpoint@0', #address-cells/#size-cells are not necessary  
    Then I compiled it back and tried to use with armian but TV box was not booting.
    I was trying to use also original extracted DTB without decompile/compile with the same result.
     
    What I am doing wrong? Should be DTB compiled on armbian?
    Any changes required in DTS? (This is new area for me... )
     
    Thanks in advance for any help.
  14. Like
    Willy Moto reacted to jock in CSC Armbian for RK3318/RK3328 TV box boards   
    @lucky62 The key mapping is stored in the kernel, and ir-keytable is a tool to test but also store the key mappings in the kernel, It also allows you to retrieve and restore the whole mapping table at once.
    You should use ir-keytable to do the mapping, then retrieve the whole table from the kernel and save it in a file, then restore the table in the kernel on every reboot.
  15. Like
    Willy Moto reacted to lucky62 in CSC Armbian for RK3318/RK3328 TV box boards   
    Thanks for directing me to the right way.
    At first attempt the ir-keytable -t was not working. I was trying to use the different protocols according the LibreElec Infra-Red Remotes page but I was getting the errors:
    # ir-keytable -p nec -t Protocols for device can not be changed Protocols changed to Testing events. Please, press CTRL-C to abort. Then I read few other web pages and looking into /etc/rc_maps.cfg and found, that my IR device is not the first (rc0):
     
    # ir-keytable Found /sys/class/rc/rc1/ (/dev/input/event2) with: Name: gpio_ir_recv Driver: gpio_ir_recv, table: rc-empty LIRC device: /dev/lirc0 Attached BPF protocols: Operation not supported Supported kernel protocols: other lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon Enabled kernel protocols: lirc bus: 25, vendor/product: 0001:0001, version: 0x0100 Repeat delay = 500 ms, repeat period = 125 ms Found /sys/class/rc/rc0/ (/dev/input/event1) with: Name: dw_hdmi Driver: cec, table: rc-cec Supported kernel protocols: cec Enabled kernel protocols: cec bus: 30, vendor/product: 0000:0000, version: 0x0001 Repeat delay = 0 ms, repeat period = 125 ms  
    So I must start the ir-keytable with  -s rc1 parameter then finally got it working:
    # ir-keytable -s rc1 -p nec -t Protocols changed to nec Testing events. Please, press CTRL-C to abort. 3009.632067: lirc protocol(necx): scancode = 0xdf0c 3009.632120: event type EV_MSC(0x04): scancode = 0xdf0c 3009.632120: event type EV_SYN(0x00). 3009.684073: lirc protocol(necx): scancode = 0xdf0c repeat 3009.684129: event type EV_MSC(0x04): scancode = 0xdf0c 3009.684129: event type EV_SYN(0x00). 3009.792069: lirc protocol(necx): scancode = 0xdf0c repeat 3009.792121: event type EV_MSC(0x04): scancode = 0xdf0c 3009.792121: event type EV_SYN(0x00).  
    So last point is to find the correct key mapping and make the settings persistent.
     
  16. Like
    Willy Moto reacted to jock in CSC Armbian for RK3318/RK3328 TV box boards   
    @lucky62
    The legacy rockchip kernel (the Android one) uses a special driver from rockchip to handle the infrared module, but the mainline kernel uses the standard gpio-ir-receiver driver, which is already in the dtb: https://github.com/paolosabatino/armbian-build/blob/0a7db86c08d77e73c3fba97487d66defa36768ce/patch/kernel/archive/rockchip64-5.10/board-tvbox-rk3318.patch#L199
     
    Also the gpio pin of the ir receiver is correcly configured in the armbian dtb, so it should work. I remember I tested on my board and the hardware layer was working.
    Maybe you need instead to configure the remote keymapping. For that use you can ir-keyable utility, in particular, ir-keytable -t should help you test the remote. Usually box remotes use the NEC protocol. In the device tree I can also add a "default" keymapping, but actually I forgot to provide one of that and should recompile the image. Tomorrow I will take a look to this too. In the meantime, if you can report that the remote keystrokes are detected by ir-keytable -t may just confirm that the hardware works.
  17. Like
    Willy Moto reacted to lucky62 in CSC Armbian for RK3318/RK3328 TV box boards   
    Firstly - to receive the messages from the board you need only 2 wires:
    Ground of Serial port on PC -------> Ground of TV Box RX (input) pin of Serial port -------> TX (output) pin of TV Box You don't need to send the data from PC to the TV Box (at this moment).
     
    I think it is clear how to connect the ground wire.
    Then unclear point is only - where to connect RX pin of Serial port.
    But there is only few pads and try to all in combination of  two baud-rates (115200 and 1500000) should not take much time...
     
    Note: Just be sure that you are probing the RECEIVING pin. I have this adapter and surprisingly the pin labels are misleading... RX is the transmitting pin. RX means that this pin should be connected to the RX pin on the other side...
    Similar for TX - it is a receiving pin.
     
     
     

  18. Like
    Willy Moto reacted to lucky62 in CSC Armbian for RK3318/RK3328 TV box boards   
    good news, today I succesfuly compiled the openvfd driver.
    This is my DT Overlay:
    /dts-v1/; /plugin/; / { fragment@0 { target-path = "/"; __overlay__ { openvfd { compatible = "open,vfd"; dev_name = "openvfd"; openvfd_gpio_clk = <&gpio2 0x13 0x00>; openvfd_gpio_dat = <&gpio2 0x16 0x00>; openvfd_gpio_stb = <&gpio2 0x12 0x00>; openvfd_chars = [04 00 01 02 03]; openvfd_dot_bits = [00 01 02 03 04 05 06]; openvfd_display_type = <0x03>; status = "okay"; }; }; }; }; Driver is working without any changes.
     

  19. Like
    Willy Moto reacted to kruzer in CSC Armbian for RK3318/RK3328 TV box boards   
    Ok, I've installed updated image from first post:
    Armbian 21.08 - Ubuntu Focal desktop [xfce] - mainline kernel 5.10.34 - Build date: 2021-05-05 Burned to emmc with multitool, and it works, connected to wifi without issues. Logs from this kernel: http://ix.io/3njG
    After the first reboot it had a problem with starting X (restart loop). Solved it with connecting via ssh, and:
    sudo apt update sudo apt-get install lightdm > ... > Preparing to unpack .../lightdm_1.30.0-0ubuntu4~20.04.1_arm64.deb ... > Unpacking lightdm (1.30.0-0ubuntu4~20.04.1) over (1.30.0-0ubuntu3.1) ... > Setting up lightdm (1.30.0-0ubuntu4~20.04.1) ... > ... I noticed one problem with apt - it is very slow, not while downloading, but later, it takes minutes while "Reading package list ..., Building dependency tree .. " etc.
     
  20. Like
    Willy Moto reacted to fabiobassa in CSC Armbian for RK3318/RK3328 TV box boards   
    Hello all nice people, let me do this post since I repute it very important.
    There is a lot of people actively deploying things on rk 322x and rk 3318, some  media oriented things ( libreelec, kodi ) some desktop and servers applications.
    Now.......it happens that @jock and my self are actively working on those two platforms because I was so lucky in the past to buy for really few bucks ( and i say FEW )  more than 50 different boards reputed faulty, and there were not, just wrong firmware.
    But in this big STOCK of boards mostly were 322x ( 3228 3228a 3229 ) and ONLY ONE was 3318,and again I repeat just ONE 3318
     
    So it happens that quite EVERY  question on 322x we can answer with sufficient level of accurancy, but on 3318 our experience is limited on HK1,  that is a circle box without display.
    Every single help, every single uart log, bootlog any elselog is a mine of infos for us, in particular @jock , but at the same time is really hard provide you a satisfactory answer without debug info, our crystal ball is actually broken

    Help us to help you providing as much infos possible and not just saying " it doesn't boot" because in that way is a hard stuff to solve.

    Thanks

     
  21. Like
    Willy Moto reacted to fabiobassa in CSC Armbian for RK3318/RK3328 TV box boards   
    @Tucano2000

     
    This is a very aggressive way to find the exact  clock-pin of emmc and also very DANGEROUS. Luckly throught 1k resistor the current will be quite low, but the possibility to destroy some cmos part is still HIGH. The only way to be sure that you managing the righ emmc clock point is discovering it  with an OSCILLOSCOPE , as I did the very first time i managed to find on my board, but again unfortunately my board is different from yours !!!!!!!

    And as @jock already said , is needed more debug informations. Without a UART log we are pretty blind and also trying to help you is at the moment hard because lack of infos ( wrong ddrbin ? wrong trust-os?? wrong u-boot??? )
  22. Like
    Willy Moto reacted to AlwinLub in CSC Armbian for RK3318/RK3328 TV box boards   
    A couple of days have passed since my last post, and i must say, congrats @jock on your awesome work.
    The build is running smoothly without any hiccups or other noteworthy bugs. After optimizing my Kivy app a bit more, the whole interface runs at a steady 60-120 fps.
    I'm currently researching hardware accelerated video encoding to make the whole show complete (but, as you may have guessed, i know nothing about).
    I've read about the 'Rockchip-linux' github repositories, but it seems like it's waaay out of my league, but i will try to make the best of it as i continue to learn.
     
    HDMI audio didn't work right out of the box, you'll have to switch the default ALSA output (since the card gets recognized just fine)
    Edit (or create) /etc/asound.conf and insert the following:
    defaults.pcm.card 2 defaults.ctl.card 2  
    Reboot the box (or restart apps using audio output) and voilà. If that does not work, try searching for your 'HDMI' card using 'aplay --list-devices' and replace the number '2' with the one of your desired output.
  23. Like
    Willy Moto reacted to lucky62 in CSC Armbian for RK3318/RK3328 TV box boards   
    Regarding the usage of NodeMCU as a USB-to-Serial adapter - the idea is very simple.
    As board contains the USB-to-Serial chip (CH340 or CP2102 or FTD or whatever..) and this chip is connected to the MCU to RX/TX pins, then it is enough to block the MCU (by the ENABLE/RESET signal or by programming the RX/TX pins as input) and connect RX/TX pins to our serial interface (instead of MCU). Pins are usually on the headers so it is easy to connect. You can also use others boards with USB-to Serial chips like Arduino, STM32 blue-pill, etc..)
    Here is the link from I learn this:
     
  24. Like
    Willy Moto reacted to armar in Armbian for TV box rk3328   
    I remember trying the adb method to get the dts, but my developer options did not have "Internet/wifi debugging" checkbox.
     
    I found a release of the firmware from geekbuying for a A5X Box and used
    https://roc-rk3328-cc.readthedocs.io/en/latest/fw_pack_unpack.html
    to unpack the img into smaller img files from update.img
     
    then used
    https://github.com/PabloCastellano/extract-dtb
    to extract the dtb (try on all the smaller img files created from unpacking update.img)
     
    and then used dtc to decompile.
     
     
  25. Like
    Willy Moto reacted to mb16 in Armbian for TV box rk3328   
    Agree. Getting to the Android .dts took me some time, as many of the proposed procedures did not work for me.
    My workflow:
    Have Android running on the box, developper mode active. In the settings I had a strangely named checkbox like "Internet debugging", switched on Have Android studio installed Could use adb to connect to the box, even without usb, just via lan/wlan adb root worked out of the box, devices like this one seem to be rooted by default? used adb to download the device-tree directory (have android not at hand now, should not be to hard to find) used dtc to convert It took me some time to realize that dtc can handle device-tree directories (-I fs option, see manual)
     
    Starting point for documentation: https://www.kernel.org/doc/Documentation/devicetree/usage-model.txt