nokirunner

Members
  • Content Count

    69
  • Joined

  • Last visited

Reputation Activity

  1. Like
    nokirunner reacted to fabiobassa in CSC Armbian for RK322X TV Boxes   
    @nokirunner

    this was exactly the same question when I approached to linux study on those devices:

    well . thanks to study and many people that explained to me now I know that linux IS NOT android and the opposite is also true, and YES they violate the GPL but if you are able to go in China to yell on this, well buy a ticket for me too.
    In case of wifi they don't violate any since is proprietary driver and nowhere is written that they must open the code to every one

    the desktop subsystem is perfect on Android with all jingles and bells, now you take the SAME kernel they use, the same modules and libraries they have in rootfs  and NO!!!  it doesn't work at the same manner under linux,  and since we must adapt something to linux phylosophy and we HAVEN'T documentation sometimes at all, sometimes half-half , I truly believe that is quite  a  miracle we have a true linux platform on those devices

    sadly to admit it but this is the truth
  2. Like
    nokirunner reacted to jock in CSC Armbian for RK322X TV Boxes   
    Updated mainline images with kernel 5.8.9
     
    Finally the mainline kernel has been pushed further and it looks very promising.
    Link to the new images are in the first page.
     
    PS: trying the Ubuntu Focal image, I'm happy Firefox is performing decently, but had to blacklist lima module to get good 2D desktop experience and (of course) disable window compositing.
  3. Like
    nokirunner got a reaction from Yeoj Henrie Sayadi in CSC Armbian for RK322X TV Boxes   
    I tried this on my rk232x based device and i suspect it doesn't work.
    If I put "modesetting" as driver then it recognizes  rockchip and vdpau-rockchip, but with the method described by you I don't get the same result, it tells me that the driver rockchip is not found and starts the same through modesetting ... I suspect that for the rk322x it does not work ... and I also suspect that it is for this reason that glamoregl even if it seems to start does not work as 2d acceleration ... this driver dri is not optimized  at all (or partially brocken) for rk322x  at least the 5.6 kernel, maybe the latest versions like the upcoming kernel 5.9 already contain these fixes.

    edit :
    in fact there seems to be no trace of rk3228 registers.

    https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/rockchip/rockchip_vop_reg.h
    (Visual Output Processor) is the Display Controller for the Rockchip series of SoCs which transfers the image data from a video memory buffer to an external LCD interface
    look only other rockchip socs :

    edit2: better investingating
    maybe 14 june 2020 is added a basic hdmi support for rk3228 ... (is valid also for rk3229 ?)
    https://github.com/torvalds/linux/commit/53ffa1ee8de2cdfb0fcbef798486ba9c7f9316fd#diff-0f18fb301f41340ce62f8d1b44e1247e

    evidenced code here:
     
  4. Like
    nokirunner reacted to usual user in CSC Armbian for RK322X TV Boxes   
    Out of curiosity I built the armsoc driver for my rk3399. I can confirm your observation of the faster display output. Of course, there is no 3D acceleration because the driver has no way to delegate 3D requests to the 3D render node. The armada driver (you want the unstable-devel branch) I use for my imx6 has such an ability and surpasses the rk3399 with modesetting despite the lower specification for now.
    IMHO armsoc is a dead end until it gets a similar ability. And using glamor with its unnecessary scanout indirection via 3d is also a bad idea. We are all in the same boot, no xorg driver to glue all IPs in an efficient manner together available.
    xorg-rockchip-modesetting.logxorg-rockchip-armsoc.logxorg-imx-armada.log
  5. Like
    nokirunner got a reaction from fabiobassa in CSC Armbian for RK322X TV Boxes   
    LOL  I didn't associate, stupid me, I'm distracted.
     
     

    i will try, but i don't know if i will succeed, the last time i compiled a kernel, those rare times i did it was over ten years ago
  6. Like
    nokirunner got a reaction from Yeoj Henrie Sayadi in CSC Armbian for RK322X TV Boxes   
    @jock here I am again, I have some interesting information that I discovered doing experiments.
    if you remember, some time ago I did some experiments with xorg and acceleration media files on legacy kernels
    I had "found" that xorg worked with both the "modesetting" and "armsoc" driver but found that armsoc was definitely much slower than modesetting
    https://forum.armbian.com/topic/12656-csc-armbian-for-rk322x-tv-boxes/?do=findComment&comment=104900
     

    so I wanted to experiment with the 5.6 kernel as well....
    here's what i found:
    on legacy kernel, I found that armsoc and libmali (specifically libmali-rk-utgard-400-r7p0-x11_1.7-1_armhf.deb) conflict, in fact uninstalling this library, and starting xorg with armsoc driver, x11 goes fast. obviously, however, the functionality of opengles is lost. but it does not matter. I wanted to check.
    I found relevant information that could also be functional on kernel 5.6.
    investigating I saw that an armsoc driver was available on the apt repositories, I tried to install it but nothing, x11 did not start.
    So i tried to install xserver-xorg-video-armsoc_1.4-2_armhf.deb of the legacy kernel media pack and it works! x11 starts .. well partially, we lost the window manager, the background and the desktop icons (all black) but we see that the acceleration is active and all there !, so I tried to mix the LIMA drivers with armsoc and it seems to work, or at least glxinfo tells me that the opengl mali 400 acceleration is present.
    Section "ServerFlags" Option "AutoAddGPU" "off" EndSection Section "Device" Identifier "armsoc" Driver "armsoc" EndSection Section "OutputClass" Identifier "Lima" MatchDriver "armsoc" Driver "modesetting" Option "PrimaryGPU" "true" EndSection

    now it is evident that the armsoc driver does not work because I assume it is compiled for the legacy kernel
    I also searched the net to understand why this driver works, and the one in the repository doesn't.
    and that's because this version is compatible with rockchip soc!

    https://github.com/paolosabatino/xf86-video-armsoc
     

    Now I assume that by compiling these armsoc drivers for kernel 5.6 there is a good chance it will work correctly, and can be mixed with the LIMA 3D driver.

    my limitation from trying at the moment, is that I don't know how to compile these, I've never done a cross compilation, and don't know (currently) how to do it. And I don't even know how to create installable .deb files from a build (my other current limitation)
  7. Like
    nokirunner reacted to jock in CSC Armbian for RK322X TV Boxes   
    Good news, expecially for @nokirunner and @DaviMesquita
     
    Finally we managed to make the ssv6x5x driver work on the ssv6256p chipset and it turns out the it is also working pretty well. I removed most of the logging messages it was spamming on the dmesg log, now it is much more silent and it is ok this way. Teaming with @fabiobassa we optimized performances quite a bit, so expect ~60 Mbit/s at least on optimal setups. It works on both 2.4Ghz and 5Ghz bands.
     
    The driver will be included in the armbian images soon, but in the meantime anyone can test it.
    Download ssv6x5x.koand put it into /lib/modules/$(uname -r)/kernel/drivers/net/wireless Download ssv6x5x-wifi.cfgand put it into /lib/firmware Download ssv6x5x-sw.bin and put it into /lib/firmware Run depmod -a Add blacklist ssv6051 in /etc/modprobe.d/blacklist-rk322x-box.conf (ssv6051 and ssv6x5x kernel modules clashes, we need to blacklist ssv6051 for the other to work) Reboot!  
    Any testing report is appreciated!
     
  8. Like
    nokirunner got a reaction from Reddwarf in CSC Armbian for RK322X TV Boxes   
    I believe it will be possible only if some acute wizard manages to take the source code and update and fix it. there are some sources of the drivers of these wifi chips on github, here is same example:

    https://github.com/khadas/android_hardware_wifi_icomm_drivers_ssv6xxx
     

    https://github.com/trustfarm/orangepi-zero-tfarm/tree/0a9ce3984366d54d4fdefb9abbdcf9b899d924e6/OrangePi-Kernel/linux-3.4/drivers/net/wireless/ssv6xxx
  9. Like
    nokirunner reacted to jock in CSC Armbian for RK322X TV Boxes   
    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!
     
    Following the recent thread on LibreElec forum about an unofficial image for rk3229 devices, I would like to make public the work made by me and @fabiobassa about bringing rk322x support to armbian.
    The project is now in -> mainline Armbian <- and the development fork will be available on github -> here <-
    Most of the love has been poured into supporting and bringing up the legacy rockchip 4.4 kernel, but in the near future the goal is to fully support the mainline kernel.
     
    What works:
    Should boot and work flawlessy on all boards with RK3228a, RK3228b and RK3229, with either DDR2 and DDR3 memories. RK3228a boards may have some issues on mainline kernel although; stick to legacy kernel for RK3228a. Mainline u-boot OPTEE provided as Trusted Execution Environment All 4 cores are working Ethernet Serial UART (configured at 115200 bps, not 1.5Mbps!) Thermals and frequency scaling OTG USB 2.0 port (also as boot device!) EHCI/OHCI USB 2.0 ports MMC subsystem (including eMMC, SD and sdio devices) Hardware video acceleration (fully supported via RKMPP on legacy kernel, partial support via hantro kernel driver on mainline) NAND is available only on legacy (but not as boot device due to mailine u-boot missing the rockchip NAND driver) Various WIFI over SDIO are supported (SSV6051P, SSV6256P, ESP8089, Realtek chips, etc...), but ssv6x5x drivers are available only on legacy kernel Full GPU acceleration on legacy kernel, mainline kernel has lima driver compiled in but X11 is very slow - you are still free to compile and install mali kernel driver on mainline yourself. U-boot boot order priority: first the sdcard, then the USB OTG port and eventually the internal eMMC; you can install u-boot (and the whole system) in the internal eMMC and u-boot will always check for images on external sdcard/USB first.  
    Unbrick:
    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 eMMC clock pin on the PCB. Here there is the procedure, but you can also google around if you get stuck on a faulty bootloader, the technique is pretty simple and requires a simple screwdriver.
     
    Multimedia:
    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:
    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 CSC/TVB/EOL boards and select "rk322x-box" from the list.
     
    Stable images:
    Stable images and installation instructions are provided in the Armbian RK322x-box download page: https://www.armbian.com/rk322x-tv-box/
     
    Development images:
    Development testing images can be downloaded from the following list (last update 13-09-2020):
     
    Armbian 20.08.0 - Ubuntu Focal Minimal - Legacy kernel 4.4.194 Armbian 20.08.0 - Debian Buster Minimal - Legacy kernel 4.4.194 Armbian 20.08.0 - Ubuntu Focal Desktop - Legacy kernel 4.4.194  
    Armbian 20.11.0 - Debian Buster Minimal - Mainline kernel 5.8.9 Armbian 20.11.0 - Ubuntu Focal Desktop - Mainline kernel 5.8.9  
    Multitool:
    Multitool - A minimal image for TV Box maintenance  

    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 FAT 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 sudo rk322x-config and select your board characteristics to enable leds, wifi chips, high-speed eMMC, etc... 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 eMMC, the box may not boot anymore forcing you to follow the unbrick section at the top of this post.
     
    Quick installation instructions on NAND:
    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 legacy kernel image in images folder of the SD card FAT 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 Armbian image via steP-nand" from the menu, then select the destination device (usually rknand0) 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 sudo rk322x-config and select your board characteristics to enable leds, wifi chips, etc... Run armbian-config to configure timezone, locales and other personal options Congratulations, Armbian is now installed!  
    Alternative: you can install the bootloader in NAND and let it boot from SD Card or USB:
    Download a copy of the Multitool and burn it on an SD card; 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; RECOMMENDED: make a backup of the existing firmware with "Backup flash" menu option; Choose "Install Jump Start for Armbian" menu option: the Jump Start uses the internal NAND to boot from external SD Card or external USB Stick; Follow the general instructions to boot from SD Card below, skip the first erase eMMC step.  
    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 eMMC; 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 sudo rk322x-config and select your board characteristics to enable leds, wifi chips, high-speed eMMC or NAND, etc... Run armbian-config to configure timezone, locales and other personal options, or also to transfer the SD Card installation to internal eMMC; Congratulations, Armbian is running from SD Card!  
    A note about boot device order:
    With Armbian also comes mainline U-boot. If you install Armbian or just the bootloader in the eMMC or the Jump Start on internal NAND, the bootloader will look for valid bootable images in this order:
    External SD Card External USB Stick in OTG Port Internal eMMC  
    Alternative backup, restore and erase flash for EXPERTS:
    These backup, restore and erase flash procedures are for experts only. They are kept here mostly for reference, since the Multitool is perfectly able to do same from a very comfy interface and is the suggested way to do maintenance.
     
    Backup:
    Obtain a copy of rkdeveloptool: a compiled binary is available in the official rockchip-linux rkbin github repository. If you prefer, you can compile it yourself from the sources available at official rockchip repository Unplug the power cord from the tv box Plug an end of an USB Male-to-male cable into the OTG port (normally it is the lone USB port on the same side of the Ethernet, HDMI, analog AV connectors) Plug the other end of the USB Male-to-male cable into an USB port of your computer If everyting went well, using lsusb you should see a device with ID 2207:320b change directory and move into rkbin/tools directory, run ./rkdeveloptool rfi then take note of the FLASH SIZE megabytes (my eMMC is 8Gb, rkdeveloptool reports 7393 megabytes) run ./rkdeveloptool rl 0x0 $((FLASH_SIZE * 2048)) backup.data (change FLASH_SIZE with the value you obtained the step before) once done, the internal eMMC is backed up to backup.data file  
    Restore: first we have to restore the original bootloader, then restore the original firmware.
    Running rkdeveloptool with these switches will accomplish both the jobs:
    ./rkdeveloptool db rk322x_loader.bin Downloading bootloader succeeded. ./rkdeveloptool ul rk322x_loader.bin Upgrading loader succeeded. ./rkdeveloptool wl 0x0 backup.data Write LBA from file (100%) Download here: rk322x_loader.bin
     
    Erase the eMMC: clearing the internal eMMC memory makes the SoC look for external SD Card as boot option. If there isn't any suitable SD Card, the SoC enters maskrom mode, which can then be used for full eMMC/NAND access using rkdeveloptool.
    Obtain a copy of rkdeveloptool: a compiled binary is available in the official rockchip-linux rkbin github repository. If you prefer, you can compile it yourself from the sources available at official rockchip repository Unplug the power cord from the board Plug an end of an USB Male-to-male cable into the OTG port (normally it is the lone USB port on the same side of the Ethernet, HDMI, analog AV connectors) Plug the other end of the USB Male-to-male cable into an USB port of your computer If everyting went well, using lsusb you should see a device with ID 2207:320b run ./rkdeveloptool ef and wait a few seconds once done, the internal eMMC is erased and the device will boot from the sdcard from now on  
    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 rk322x into armbian would not have begun without his support! Justin Swartz, for his work and research to bring mainline linux on rk3229 (repository here) @knaerzche for his great contribution to libreelec support and mainline patches
  10. Like
    nokirunner reacted to jock in CSC Armbian for RK322X TV Boxes   
    Hi @nokirunner, did you see the post about the media framework?
     
     
  11. Like
    nokirunner reacted to jock in CSC Armbian for RK322X TV Boxes   
    Update!
     
    All images have been updated to latest Armbian 20.08 with latest updates.
    Mainline kernel bumped to 5.6.16, chrony package is now fixed.
    Multitool also has been updated.
     
    Enjoy!
  12. Like
    nokirunner got a reaction from Alex83 in CSC Armbian for RK322X TV Boxes   
    we hope that we will have more luck with the opensource gpu drivers in the near future ... everything will have to go through a mesa-opengl acceleration, including video ... va-api or samething
     
  13. Like
    nokirunner reacted to fabiobassa in CSC Armbian for RK322X TV Boxes   
    @nokirunner
    could be a good starting point study this document, for your experiments

    if on internal storage you have a idbloader it will search then uboot on sd card.
    If you flash the wrong idbloader into internal storage , boot no more occurs and you have to short pins 

    http://opensource.rock-chips.com/wiki_Boot_option
  14. Like
    nokirunner reacted to borekon in What is the difference between Armbian and Debian Linux   
    Sorry for bumping this old threat, but it's the best so far i've found googling around
  15. Like
    nokirunner reacted to Igor in What is the difference between Armbian and Debian Linux   
    I am not sure if this is what you want to know, but:

    - Debian.org or Ubuntu.com officially does not support any of those boards/boxes,
    - Armbian userspace has many small but vital performance or security adjustments,
    - Armbian fancy some kernel development and a lot of its maintaining. Debian relies on upstream sources for ARM hardware which can be years behind and/or lack of many functions,
    - Armbian userspace is lean, clean but 100% Debian (or Ubuntu) compatible
    - many stock Debian bugs are fixed on the way, "better than original :)"
    - a build system is a central part of this whole ecosystem. You can DIY. Debian much harder.
    - dedicated support forums per boards/boxes
    - plug and play vs. complicated install scenarios on Stock Debian
    - unified development scenarios and user experience vs. mess of different setup instructions scattered all around
     
    I must have forgotten many other important points