fabiobassa

  • Posts

    235
  • Joined

  • Last visited

Reputation Activity

  1. Like
    fabiobassa reacted to jock in CSC Armbian for RK3318/RK3328 TV box boards   
    Ahhh ok, we got the right explanation.
    Now the message is properly gone from dmesg.
     
    The problem is this: the box always boots from eMMC because there is a valid bootloader there. The bootloader is in reality composed of many parts executed one after another.
    The station-m1 bootloader contains a thing that is called ATF (Arm Trusted Firmware). This piece of software is like a protected sandbox, something that runs outside the kernel or, if you prefer, above the kernel. It can whatever do it wants, can even stop the linux kernel. In fact it controls some very low level things, like system reset, core initialization, standby/resume, and so on...
     
    It also controls the RAM frequency scaling, so memory can switch from 300 Mhz up to 800 Mhz and more.
     
    Now there are two "flavours": the proprietary rockchip ATF (compiled by rockchip with their own customizations) and the public one provided by ARM.
    The proprietary ATF is fully-fledged, but actually we don't really know what is inside: it's a blob provided by rockchip.
    The public opensource ATF has just basic features, but we know it is harmless.
     
    When I say harmless I want to stress out the fact that the ATF can peek his nose everywhere in the system, in fact it is widely used to implement DRM (Digital Rights Management) and HDCP (HDMI Copy Protection) features in tv boxes, to prevent piracy and restrict user rights in some form.
     
    A proof of some harmful behaviour (not yet fully understood) is the fact that if I run rk3318 boards with proprietary ATF, the system crashes when cpu frequency is > 1.1Ghz. 1.1Ghz is the advertised speed for the rk3318 chip.
    When I run the opensource ATF, rk3318 boards runs happy at 1.3 Ghz or even above.
     
    Now this behaviour is a bit suspect: I don't want to state that the rockchip ATF is crashing the system on purpose to limit the frequency speed of the chip, but if we consider the final effect, it is so.
     
    All this long explanation is to say that maybe the bootloader installed in the eMMC may cause headaches of some sort. I don't know if there are limiting behaviours on rk3328 too, but as we are used to say in Italy, the wolf loses the hair but does not lose the vice (ie: what they do once, they can do again)
     
    It would be wise to clean the eMMC bootloader. If you're not afraid to lose the eMMC installation, you could erase the eMMC with blkdiscard.
    If you don't want to lose it, you may make a backup of the first megabyte of the eMMC on the sdcard, zero-fill the first megabyte of the eMMC, and finally reboot.
    Otherwise leave it as-is and just and see what happens with led-conf3 overlay again.
     
  2. Like
    fabiobassa reacted to jock in CSC Armbian for RK3318/RK3328 TV box boards   
    @MX10.AC2N @curse That's true, the only way to update currently is to start from scratch and the reason is exactly the one hiphotesis by @curse is right: since the whole thing is not yet into mainline armbian, upgrading via apt is not possible. Even worse: upgrading via apt will install official armbian packages, and it would just break the installation because it would remove the existing dtbs.
     
    I'm going to add the .deb packages in the first page along the pristine images for manual upgrade, in the hope it will not break existing installations
  3. Like
    fabiobassa reacted to jock in CSC Armbian for RK3318/RK3328 TV box boards   
    @MX10.AC2N Great, happy that we're very close to the solution
    To get 1.3Ghz, just add rk3318-box-cpu-hs overlay.
    If I read the dtb correctly, also the wifi is attached to the extra sdio bus on your board, so you'd better add rk3318-box-wlan-ext overlay too!
     
    Reboot and you should get these two other things.
     
    BTW: you can also use rk3318-config to do all the necessary overlay configuration with the comfy menu interface. Just need to manually edit armbianEnv.txt before rebooting and set rk3318-box-led-conf3 in place of any other led-conf (there must be only one led-conf overlay). In the next update I will add the led-conf3 to rk3318-config so coming people with boxes like yours will find the recipe ready-made
  4. Like
    fabiobassa reacted to jock in CSC Armbian for RK3318/RK3328 TV box boards   
    Look at the post edit I made a little after, clarifies why the thing can't work on our tv boxes.
     
    I learned things are and there on the internet, could not find a proper guide.
    Anyway google reports this forum thread, which is a good starting point:
     
    Yeah, undervolting is cool, but results vary a lot depending on the cpu sample.
    GPU can be tweaked too. RAM can't be tweaked for three reasons:
    the dmc (dram memory controller) node in the dtb is disabled the dmc driver in the kernel is a bit broken the piece of code that does the dram frequency scaling is not present The dram frequency is fixed by a thing which is called ddrbin, and it is the very first thing that boots (even before u-boot).
    It is fixed to 330 Mhz currently, but probably I will push it to a higher yet safe value.
     
    You need to put together an idbloader, which is composed of ddrbin + u-boot SPL.
    You can inspect armbian sources for that, but if you're not an expert in compiling u-boot, I would rather suggest you to stay away from that to avoid lose mental sanity.
     
  5. Like
    fabiobassa reacted to tommy in CSC Armbian for RK322X TV Boxes   
    I tested in terminal mode ,'$ sudo systemctl set-default multi-user" which has really good performance. Your cutting edge armbian can achieve PSX full 60fps speed in retroarch (however, in legacy, I use wrong parameter which seriously impact performance) and snes9x framerate improved. I really surprise it is faster than legacy in my case. Really great.
  6. Like
    fabiobassa got a reaction from tommy in CSC Armbian for RK322X TV Boxes   
    @tommy
     
    Thanks a lot for you images
  7. Like
    fabiobassa reacted to tommy in CSC Armbian for RK322X TV Boxes   
    I am interest your new cutting edge armbian image. Could you provide me your links? Thank you in advance.
     
     
     
    Lakka image files for rk322x
     
    rk3228a-mxq4kpro <- I tested this image
    https://mega.nz/file/dJgDXIbB#7yOLyHmuptrP_8aswOCxKdk2aEffOQDUnH-9lIAg8jw
     
    rk3229-a95xr1
    https://mega.nz/file/hIwFHCrZ#nWeLsKnBCXcCwtsDp8_MklgYsqEF5r0N-a3iVQUeLXI
     
    Any images has dtb in first fat partion. You may edit extlinux/extlinux.conf to correct device. It has samba service that can upload game roms but in my case wifi driver not work, only LAN work for my tv box.
     
     
  8. Like
    fabiobassa got a reaction from tommy in CSC Armbian for RK322X TV Boxes   
    @tommy

    post scriptum.. I usually dont like or play games but i have had 29 giga of arcade games  that run on amlogin 905 . it is aarch64 and our little box is armhf 32 bit but i guess games are no-arch so if you go further on the process of emulation please share your experience
     
  9. Like
    fabiobassa got a reaction from tommy in CSC Armbian for RK322X TV Boxes   
    @tommy
    Even if the main purpose of this 3ad is " general" speaking of the process to bring pure linux on 322x boxes, without going deep in user space apps, people as you, with programming skills, are always welcome to discuss and apport ideas to the project.

    I am more the " hardware man", @jock is the " code man" , but what is now clear, even to me, is that doesn't matter the mali version, the bottle neck is the necessity to copy the result of gpu elaboration into x11 windows server. This is where the whole process slows up.

    This is true for videos and jock ( but other people too ) is actively searching a solution , a work around but now mostly efforts are on mainline kernel

    Example given : if you do init3, unload all mali libraries, insmod all gbm libraries you will have FULL gpu power and you can run even lot of frames per seconds, but the you loose the x11 features. If you control games by game pad or keyboard this could be not such a big problem , once you stop the game you unload gbm go back on mali and startx. Android uses the gbm way so good hardware acceleration and poor desktop experience. On armbian we experiment the opposite .
    But this switch  isn't convenient for normal use.
    @jock could explain this 1.000.000 times better than  I did, but the core of problem is exactly what i wrote

     
  10. Like
    fabiobassa reacted to tommy in CSC Armbian for RK322X TV Boxes   
    Thanks fabiobassa and jock for your help.
     
     
     
     
     
    I use legacy kernel 4.4.194
    ~$ cat /proc/version Linux version 4.4.194-rk322x (root@nott-xubuntu) (gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)) ) #2 SMP Sat Oct 2 12:44:11 +07 2021  
     
    I try a dirty hack by change soft link of /usr/lib/arm-linux-gnueabihf/libMali.so from X11 version "libmali-utgard-400-r7p0-r0p0-x11-gbm.so" to "libmali-utgard-400-r7p0-r0p0-gbm.so" for retroarch call library and set default login terminal by "$ sudo systemctl set-default multi-user". I set display resolution to 720x480 for reduce processing load.  The result is acceptable to snes (use snes9x2010) level.
     
    I am an amature in Linux build system and C programing. I will try to learn to compile armbian avoiding X11 version but I not sure my knowledge and skill is enough. I have seen someone edit EmuElec(LibreElect with Retroarch interface) to could be run rk322x. I try to edit Emuelect source that almost done but dependencies are very fraustrated. Full Linux system like this armbian project is the best.
  11. Like
    fabiobassa reacted to MX10.AC2N in CSC Armbian for RK3318/RK3328 TV box boards   
    Hi all,
    And first THANKS @jock for all that ..
    I have an MX10 TvBox first generations MXQ-RK3328-D4_A VER: 1.0 DATE: 20170713 registered on the SOC with 32G Emmc and 4G RAM DDR3
    I have been running Armbian on it for a while now first from an RK3328-TVBOX image from @balbes, then I booted from an M1 station image, currently I have station-M1 running on my Emmc, and here I come across this thread ..
    So I test from an SD card the image Armbian_21.11.0-trunk_Rk3318-box_bullseye_current_5.10.68_minimal.img
    It starts but I don't have an HDMI signal, I was able to connect in SSH and do the update, the upgrade, install armbian-config, install full firmware, install desktop .. I use rk3328-evb.dtb
    Copy the diagnostic : http://ix.io/3Bsu
     
    I will continue with the installation and above all try to find the signal on my HDMI output.
    Thanks again...
  12. Like
    fabiobassa reacted to jock in CSC Armbian for RK322X TV Boxes   
    @dotbg Some boxes with rk3566/rk3568 are sold with 8GB (gigabytes) of RAM. That chip is capable to address such amount of ram, yet you have to trust the chinese manufacturers and vendors that they really put 8Gb of RAM in the box
     
    rk322x instead is not able to go above 2GB (gigabytes). Everything beyond on a rk322x is surely fake.
  13. Like
    fabiobassa reacted to RaptorSDS in CSC Armbian for RK322X TV Boxes   
    more like 8 Gbit or ram =1Gbyte ram ; or they have ram and rom swap or like some box its only  fake advertise
     
    please show the link to example
     
  14. Like
    fabiobassa got a reaction from tommy in CSC Armbian for RK322X TV Boxes   
    @gianlucaf

    uhmmmmm     .... how can i drive my car? uhmmm what car have you ? fuel, diesel, electric , horse power ..
    if you don't give more infos, actually our crystal ball is broken. Which wifi chip if ? ssv6051, spe... 8023cs ??
    And last thing, if it is working under armbian-config and not in user-space programs ( docker) try to ask in docker forums ;-)

    @tommy
    there is a lot of interest in retro gaming and graphics use of those box but if you have read the whole 3ad (  and I'm not sure you did.. )  you should also have read that gpu hardware acceleration is in some way conflicting with x11 server and this is the reason why it runs smoothly on android or libreelec that were compiled with good performance on graphics but not so well on linux desktop. You can try to mixt up things among armbian and libreelec that uses wayland instead of xorg, but this is on yourself
    And NO at the actual state of progress there is few possibilities that the things will go better on 322x

    @dotbg
     

    pardon I didn't understand ! What you mean ? That your box is claiming have mega mega mega tons or gigatons of ram and you see only one or two ?

     
  15. Like
    fabiobassa 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
  16. Like
    fabiobassa reacted to SteeMan in Trying to learn more about u-boot for amlogic devices.   
    @Sameer9793  The TV Box environment for amlogic and rockchip is very different.  In these forums there are two threads that cover a lot of the rockchip varients (https://forum.armbian.com/topic/12656-csc-armbian-for-rk322x-tv-boxes and https://forum.armbian.com/topic/17597-csc-armbian-for-rk3318rk3328-tv-box-boards)
    @jock and @fabiobassa are the two experts in that area in the forum.
  17. Like
    fabiobassa got a reaction from ArkhanLK in CSC Armbian for RK322X TV Boxes   
    and this assemption is soooo far away from the truth that you can imagine. Imagine those big factory that assemblies boxes, one factory.. many reseller !
    And in a certain moment a employee says " hey boss.. we finished ddr 3 ram and we have only ddr 2 now"
    And the boss answers " doesn't matter take the ddr 2 put in washing machine, erase old name and put on chip the right ddr  3 name and assembly 1000 other fuc**ng box!!  "
    This taht could sems just a lie or a joke I believe happenns very most often than we can even imagine
    Do you know how many box i have ABSOLUTELY  egual in name, brand shape, even names of chips inside.. and the uart log tells me the REAL SITUATION?

    Plenty !!! And me and @jock bumping head in the wall because one box working and the other NO ?!!!!

    So only solution is nice uart log or short the emmc/nand pins so you are sure you booting in maskrom and program a generic android even older that puts vesry piece in the right place of internal memory so you can start form scratch again
    Those box are quite unbrickable, and NO multitool and other tools offered with great generosity from jock cannot " destroy" boxes
     
  18. Like
    fabiobassa got a reaction from jock in CSC Armbian for RK322X TV Boxes   
    and this assemption is soooo far away from the truth that you can imagine. Imagine those big factory that assemblies boxes, one factory.. many reseller !
    And in a certain moment a employee says " hey boss.. we finished ddr 3 ram and we have only ddr 2 now"
    And the boss answers " doesn't matter take the ddr 2 put in washing machine, erase old name and put on chip the right ddr  3 name and assembly 1000 other fuc**ng box!!  "
    This taht could sems just a lie or a joke I believe happenns very most often than we can even imagine
    Do you know how many box i have ABSOLUTELY  egual in name, brand shape, even names of chips inside.. and the uart log tells me the REAL SITUATION?

    Plenty !!! And me and @jock bumping head in the wall because one box working and the other NO ?!!!!

    So only solution is nice uart log or short the emmc/nand pins so you are sure you booting in maskrom and program a generic android even older that puts vesry piece in the right place of internal memory so you can start form scratch again
    Those box are quite unbrickable, and NO multitool and other tools offered with great generosity from jock cannot " destroy" boxes
     
  19. Like
    fabiobassa reacted to Willy Moto 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? 

     



  20. Like
    fabiobassa got a reaction from Willy Moto 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
    fabiobassa got a reaction from Willy Moto 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
    fabiobassa 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
    fabiobassa got a reaction from Willy Moto 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 !!!
  24. Like
    fabiobassa got a reaction from RetroFan90 in CSC Armbian for RK3318/RK3328 TV box boards   
    @AlwinLub

    well done !!
  25. Like
    fabiobassa got a reaction from RetroFan90 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 !!!