Jump to content

Ben N Voutour

Members
  • Posts

    60
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Ben N Voutour 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.
  2. Like
    Ben N Voutour 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.
  3. Like
    Ben N Voutour reacted to fabiobassa in CSC Armbian for RK3318/RK3328 TV box boards   
    @AlwinLub

    well done !!
  4. Like
    Ben N Voutour reacted to AlwinLub in CSC Armbian for RK3318/RK3328 TV box boards   
    After doing a fresh install and only installing Kivy, it recognizes the OpenGL renderer as 'llvmpipe', so no hardware acceleration. But as soon as i install Xorg, it correctly sets 'Mali450' as renderer, but the screen goes black with only a cursor showing. I'm personally getting the feeling that Kivy does not play nice with this version of Mesa (20.3.5).
  5. Like
    Ben N Voutour reacted to usual user in CSC Armbian for RK3318/RK3328 TV box boards   
    Then why not start, @jock has announced new versions and the links on the first page are already up?
  6. Like
    Ben N Voutour 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
    Ben N Voutour reacted to fabiobassa in CSC Armbian for RK3318/RK3328 TV box boards   
    @RetroFan90
    you are welcome to test every single image jock is assemblying bit I don't think this is the right approach to this CCS case community study on rk3318 and generally on every tvbox and every soc born to do other things in their life ( TVBOX !!!!)

    Just reporting " this doesn't work" or " this is lagged" or can you test cpu at 1.3 or 1,8 Ghz is overhealming problem of those @jock ( and me, but I am more the hardware man..) is already informed
    Until the whole X system isn't mature , every single piece is on place, every right library is in the right directory I think that we can enjoy the steps every day we are doing together, and what Jock did is so big step that mostly of ourselves can't believe !

    At the actual state of the art there is none or few chanches that every thing will work out of the box. Study first the whole picture and then go deep in particular features

    But the road is signed !!!
  8. Like
    Ben N Voutour 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!
  9. Like
    Ben N Voutour reacted to pakos96 in CSC Armbian for RK3318/RK3328 TV box boards   
    Hi,
    thanks for your reply. Sorry but I can only reply to the topic once a day. I've installed the minimal version and it's ok. No problem so far. I sent the links in the previous message in the hope that you can find something useful. I hope so
    I don't want to get the idea that I complained that it was "lagging" but it was just to be able to provide more information about my tv box and help in some way with the development.
    These are the double-sided photos of the card (if it can help):


    I am currently using the limited 1.1GHz version (although in reality the max speed is 1.01GHz), I have installed pi-hole and unbound and have not noticed any problems at the moment.
    Thanks again!
  10. Like
    Ben N Voutour reacted to jock in CSC Armbian for RK3318/RK3328 TV box boards   
    @pakos96 Ookay, got it! Glad to hear everything is fine
    Thanks for the photos, they are always useful to inspect the board!
  11. Like
    Ben N Voutour reacted to jock in CSC Armbian for RK3318/RK3328 TV box boards   
    ­DISCLAIMER (PLEASE READ): everything you can find in this thread (binaries, texts, code snippets, etc...) are provided AS-IS and are not part of official Armbian project. For this reason not people from Armbian project nor myself are responsible for misuse or loss of functionality of hardware.

    Please don't ask about support or assistance in other non-community forums nor in the official Armbian github repository, instead post your questions in this thread, in the TV Boxes forum section (hardware related) or in the Peer-to-peer support section (general linux/software related).

    Thank you!
     
    This thread is to give stable and mature long-term range support to rk3318/rk3328 found in many tv boxes in Armbian project as Community Supported Configuration (CSC).
    The current work is mainlined into Armbian project, but your mileage may vary; most recent developments live on my personal fork on github -> here <-
     
    Important notes: is just a personal opinion, but apparently widely supported, that rk3318 chip is not an official rockchip part. They probably are scrap rk3328 parts which have not passed conformance tests but are sold anyway to tv boxes manufacturers. They don’t reach the same operating frequency of the rk3328, have much higher leakage currents (and thus higher temperatures) and often the boards they are installed on are low quality with low quality components, in fact a very very common issue is the eMMC failure due to bad parts and bad soldering. So said, I personally suggest not to buy any rk3318 tv box, but instead find a properly supported SBC (Single Board Computer) if you need a reliable product. In the unfortunate case you already have such product, this thread may help you have some fun with them.
     
    What works:
        • Works on RK3318 and RK3328 TV boxes with DDR3 memories
        • Mainline u-boot
        • Mainline ATF provided as Trusted Execution Environment
        • All 4 cores are working
        • Ethernet
        • Serial UART (configured at stock 1.5Mbps)
        • Thermals and frequency scaling
        • OTG USB 2.0 port (also as boot device!)
        • EHCI/OHCI USB 2.0 ports and XHCI USB 3.0 ports
        • MMC subsystem (including , SD and sdio devices)
        • Hardware video acceleration (fully supported via RKMPP on legacy kernel, support via hantro and rkvdec kernel driver on mainline)
        • Various WIFI over SDIO are supported
        • Full acceleration on legacy kernel and mainline kernel
        • U-boot boot order priority: first the sdcard, then the USB OTG port and eventually the internal ; you can install u-boot (and the whole system) in the internal and u-boot will always check for images on external sdcard/USB first.
     
    Unbrick:
    Technically, rockchip devices cannot be bricked. If the internal flash does not contain a bootable system, they will always boot from the sdcard. If, for a reason, the bootable system on the internal flash is corrupted or is unable to boot correctly, you can always force the maskrom mode shorting the clock pin on the PCB. The procedure is explained here for rk322x, but for rk3318/28 is the same.

    In most of the rk3318/28 boards, shorting the clock pin is difficult or impossible because eMMC are BGA chips with no exposed pins. Pay double attention when burning something on the internal flash memory and always test first the image booting from the sdcard to be sure it works before burning anything in internal flash.
     
    This is a list of posts where forum users have been able to spot the eMMC clock pin to trigger the maskrom mode:
    H96 Max+ (board signature: RK3318_V1.4) by @Gausus X88 PRO 10 (board signature: X88_PRO_B) by @mathgaming Ninkbox N1 Max RK3318 by @enigmasphinx  
     
    Partecipation and debugging:
    If you want to partecipate or need help debugging issues, do not hesitate to share your experience with the installation procedure of the boxes.
    In case of issues and missed support, provide as many as possible of these things is very useful to try and bring support for an unsupported board:
     
    some photos of both sides of the board. Details of the eMMC, DDR and Wifi chips are very useful! upload the device tree binary (dtb) of your device. We can understand a lot of things of the hardware from that small piece of data; and alternative is a link to the original firmware (you can do a full backup with the Multitool); dmesg and other logs (use armbianmonitor -u that automatically collects and uploads the logs online) attach a serial converter to the device and provide the output of the serial port;  
    Multimedia:
    Mainline kernel: 3D acceleration is provided by Lima driver and is already enabled. Hardware video decoding: https://forum.armbian.com/topic/19258-testing-hardware-video-decoding-rockchip-allwinner/ Legacy kernel: If you need multimedia features, like OpenGL/OpenGL ES acceleration, hardware accelerated Kodi, ffmpeg and mpv you can take a look to this post  
    Installation (via SD card):
    Building:
    You can build your own image follow the common steps to build armbian for other tv boxes devices: when you are in the moment to choose the target board, switch to /TVB/ boards and select "rk3318-box" from the list.
       
    Prebuilt images:
    Archived images - built by Armbian servers and GPG-signed: https://imola.armbian.com/dl/rk3318-box/archive/ Nightly stables - built from trunk by Armbian servers and GPG-signed: https://github.com/armbian/community Stables provided by me (unsigned): https://users.armbian.com/jock/rk3318/  
    Multitool:
    Multitool - A small but powerful image for RK3318/RK3328 TV Box maintenance. Download it from here  
    Quick installation instructions on eMMC:
    Build or download your preferred Armbian image and a copy of the Multitool; Burn the Multitool on an SD card; once done, place the Armbian image in images folder of the SD card NTFS partition; Plug the SD card in the TV box and plug in the power cord. After some seconds the blue led starts blinking and the Multitool appears; OPTIONAL: you can do a backup of the existing firmware with "Backup flash" menu option; Choose "Burn image to flash" from the menu, then select the destination device (usually mmcblk2) and the image to burn; Wait for the process to complete, then choose "Shutdown" from main menu; Unplug the power cord and the SD card, then replug the power cord; Wait for 10 seconds, then the led should start blinking and HDMI will turn on. The first time the boot process will take a couple of minutes or more because the filesystem is going to be resized, so be patient and wait for the login prompt. On first boot you will be asked for entering a password for root user of your choice and the name and password for a regular user Run rk3318-config to configure the board specific options Run armbian-config to configure timezone, locales and other personal options Congratulations, Armbian is now installed!  
    Despite the procedure above is simple and reliable, I always recommend to first test that your device boots Armbian images from SD Card.
    Due to the really large hardware variety, there is the rare chance that the images proposed here may not boot. If a bad image is burned in , the box may not boot anymore forcing you to follow the unbrick section at the top of this post.
     
    Quick installation instructions to boot from SD Card:
    If you are already running Armbian from eMMC, skip to the next step. Instead if you are running the original firmware you need to first erase the internal flash; to do so download the Multitool, burn it on an SD Card, plug the SD Card and power the TV Box. Use "Backup flash" if you want to do a backup of the existing firmware, then choose "Erase flash" menu option. Build or download your preferred Armbian image; Uncompress and burn the Armbian image on the SD Card; Plug the SD Card in the TV Box and power it on; Wait for 10 seconds, then the led should start blinking and HDMI will turn on. The first time the boot process will take a couple of minutes or more because the filesystem is going to be resized, so be patient and wait for the login prompt; On first boot you will be asked for entering a password for root user of your choice and the name and password for a regular user Run rk3318-config to configure the board specific options Run armbian-config to configure timezone, locales and other personal options, or also to transfer the SD Card installation to internal ; Congratulations, Armbian is running from SD Card!  
    Tutorial - How to install Armbian on your TV Box (by @awawa) :
    https://www.hyperhdr.eu/2022/01/tv-box-mania-i-part-x88-pro-10.html
    A note about boot device order:
    With Armbian also comes mainline U-boot. If you install Armbian, the bootloader will look for valid bootable images in this order:
    External SD Card External USB Stick in OTG Port Internal  
    The Multitool does not boot / How to burn image directly on eMMC:
     
    Some boards have the sdcard attached to an auxiliary (called also sdmmc_ext or external) controller which is not the common one.
    Forum findings declare that those boards are not able to boot from sdcard with stock firmware and they neither do in maskrom mode: the stock firmware always boots even if you put the multitool on sdcard.
     
    In such case, burning images directly on eMMC is the only way to have a working Armbian installation.
    You can follow these instructions by @fabiobassa to burn images directly on eMMC:
     
    https://forum.armbian.com/topic/17597-csc-armbian-for-rk3318rk3328-tv-box-boards/?do=findComment&comment=130453
     
    Notes and special hardware:
    Script to change DDR memory frequency here Wireless chip AP2734, SP2734, HY2734C and similars: they are clones of AmPAK AP6334 which is combo wifi + bluetooth of broadcom BCM4334/B0 chips. You may need a special nvram file, instructions by @paradigman are here  
    Critics, suggestions and contributions are welcome!
     
    Credits:
    @fabiobassa for his ideas, inspiration, great generosity in giving the boards for development and testing. The project of bringing rk3318 into armbian would not have begun without his support! @hexdump for his precious support in early testing, ideas and suggestions
    @MX10.AC2Nfor his patience in testing mxq-rk3328-d4 board support
    All the rockhip64 maintainers at Armbian project who have done and do most of the work to support the platform
     
     
  12. Like
    Ben N Voutour reacted to usual user in CSC Armbian for RK3318/RK3328 TV box boards   
    I don't know what requirements Kivy places on the graphics stack, but since Panfrost achieves OpenGL ES 3.1 conformance on Mali-G52, it certainly makes sense to read this to understand what to expect from a lima-driven GPU. I still remember very well times when my GPU only reached almost 2.0 and the performance was quite moderate. With now 3.1 it's a big difference for daily desktop use, although my GPU isn't yet declared fully compliant. But since this is bleeding edge development, at least the current mesa mainline release is required in any case. If not even the main branch to use just implemented extentions. Kernel driver wise everything necessary should already be available and therefor mesa is where you are looking for GPU support improvements.
  13. Like
    Ben N Voutour reacted to pakos96 in CSC Armbian for RK3318/RK3328 TV box boards   
    Hi,
    thank you for your work! I've tried the latest image with mainline kernel Ubuntu Hirsute on my android box bought on Amazon Italy called "Bqeel TV Box R2 PLUS 4GB +64GB CPU RK3318" (https://www.amazon.it/gp/product/B07VXMTD78).
    I installed the image on the eMMC and tried a bit to see how the performance was. It starts up correctly but it lags enough. I have created with "armbianmonitor -u" a log that maybe can help you.
    This is the specification: RK3318, 4GB RAM, 64GB ROM, WIFI AP6330.
    This is the link of the log: ix.io/3zSk (verbosity 7)
    This is the link for download the original Android ROM: https://mega.nz/file/AYlDhA7L#y7vW7S3arW995X_m5c8URa3UGVTzxm0KDrC1-aNplGw.
     
    Unfortunately I don't know how to use the soldering iron and I don't have the skills to connect a serial cable.
    Hope it can help you somehow. 
    Cheers
  14. Like
    Ben N Voutour reacted to jock in CSC Armbian for RK3318/RK3328 TV box boards   
    Nope, it looks like there is nothing really interesting. Maybe it's just the mesa Lima driver which is just too old.
    I sorted out the display problems, but then other issues regarding the i2s bus with kernel 5.14 came up.
    I think I can build a couple of fresh images with the 5.10 kernel which is good enough for now.
  15. Like
    Ben N Voutour reacted to AlwinLub in CSC Armbian for RK3318/RK3328 TV box boards   
    Thanks for the correction. I've generated a new log, http://ix.io/3zQZ
     
    Edit; I also got my Xorg log here, but i didn't see anything interesting.
     
  16. Like
    Ben N Voutour reacted to AlwinLub in CSC Armbian for RK3318/RK3328 TV box boards   
    If you need someone for testing, let me know. I'm happy to test it out.
  17. Like
    Ben N Voutour 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).
  18. Like
    Ben N Voutour reacted to AlwinLub in CSC Armbian for RK3318/RK3328 TV box boards   
    I've got my armbianmonitor -u log here, if it helps; http://ix.io/3zGJ. Thanks for the quick reply as always.
     
  19. Like
    Ben N Voutour reacted to jock in CSC Armbian for RK3318/RK3328 TV box boards   
    Hmm, actually I built an newer image with kernel 5.14 and hirsute and the Lima driver is not playing nice at all.
    I tried both the stock mesa coming with Hirsute and latest development mesa and both of them cause the login screen to appear just as you describe: black screen and the cursor.
    Lima driver is somehow complaining with these lines in dmesg:
    [ 39.136659] [drm:lima_sched_timedout_job [lima]] *ERROR* lima job timeout [ 39.136801] lima ff300000.gpu: fail to save task state from Xorg pid 1654: error task list is full [ 39.136818] lima ff300000.gpu: gp task error int_state=0 status=a so I got to investigate this issue too...
     
    edit: uff... ok it seems that the issue is due to the missing operating points in the device tree. I always fall into every time there is a new kernel
  20. Like
    Ben N Voutour reacted to Wester_Minsk in CSC Armbian for RK3318/RK3328 TV box boards   
    Logs complete
    Android.log Armbian eMMC.log Armbian sdcard.log
  21. Like
    Ben N Voutour 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!
  22. Like
    Ben N Voutour reacted to jock in CSC Armbian for RK3318/RK3328 TV box boards   
    Nope, not yet, I'm a bit busy with rk3288 at the moment, but here you go: ddrbin_v1.16.bin
  23. Like
    Ben N Voutour reacted to hexdump in CSC Armbian for RK3318/RK3328 TV box boards   
    @jock - do you have this extracted ddrbin somewhere in your repos already? i was not able to find it yet ...
  24. Like
    Ben N Voutour reacted to Wester_Minsk in CSC Armbian for RK3318/RK3328 TV box boards   
    https://disk.yandex.by/d/RYIADV5cMwpOmA





  25. Like
    Ben N Voutour reacted to jock in CSC Armbian for RK3318/RK3328 TV box boards   
    @Wester_Minskthanks for the firmware and photos. I had a quick look into the device tree and it looked quite standard to me: no particular hardware like Power Management ICs or other significant differences from regular tv boxes.
    I will take a deeper look and check other compatibility things soon!
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines