RetroFan90

  • Posts

    45
  • Joined

  • Last visited

Reputation Activity

  1. Like
    RetroFan90 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
    RetroFan90 reacted to MX10.AC2N in CSC Armbian for RK3318/RK3328 TV box boards   
    Hi @jock and thank you for these explanations it enlightens my knowledge a little more, suddenly I left the emmc as it is and tried adding overlays, it works I was able to put led-conf3 and cpu-hs without problem here is the copy of dmesg => https://paste.yunohost.org/ewutojutal.md
     
    However I come back to your explanations, you indicate that ATF would be useful for DRM rights, suddenly this attracts my interest because I am looking for a solution to be able to read the amazon prime videos and unfortunately I still have this damn message missing drm rights .. do you know a parade with this problem? I looked a lot on Github, I even tried a few installs but nothing convincing, often the problem is that we are under arm64 (no drm rights under arm64) because with armhf apparently there will be solutions .. Y -will there be a way to build a multiarch arm64 / armhf image or maybe just an armhf image ..? For the moment I am in the idea of using a docker like https://github.com/HenningThiemann/docker-chromium-armhf ..
     
    Thanks again, apparently the problems seem to be solved, I will go back to 1.3GHz.
  3. Like
    RetroFan90 reacted to Tarzanus in CSC Armbian for RK3318/RK3328 TV box boards   
    I tried downloading and running the latest image from SD card. I get kernel panic at boot. Anyone knows how to start it successfully? It's Rockchip based box A95X Z2.

  4. Like
    RetroFan90 reacted to jock in CSC Armbian for RK3318/RK3328 TV box boards   
    Glad to hear everything is back to normal.
    About the Amazon DRM etc... I don't know anything about. I see that libreelec is downloading chrome and extracting the widewine DRM binary to let some plugins work, but I did not ever try Amazon Prime and don't know what are the requirements for that.
    The proprietary ATF may provide a "secure" application of some sort for DRM, but this is a guess. I never digged into what in reality there is. I may guess that "secure" ATF software is tailored with some other userland software which I'm not aware of that may lie in the Android image, but this is all purely guessing
  5. Like
    RetroFan90 reacted to curse in CSC Armbian for RK3318/RK3328 TV box boards   
    While I was in Sweden some month ago, I only had access to an old 1024x768 monitor, connected via an HDMI to DVI adapter. It did NOT work. Multitool, yes, everything else, no.
    I would not recommend to do an apt update && apt upgrade before you have gone through "armbian-config" and frozen firmware and kernel updates, or frozen them by other means.
  6. Like
    RetroFan90 reacted to jock in CSC Armbian for RK3318/RK3328 TV box boards   
    @MX10.AC2N Discard u-boot package, it is not needed at all, although I don't understand why it complains...
  7. Like
    RetroFan90 reacted to MX10.AC2N in CSC Armbian for RK3318/RK3328 TV box boards   
    ju@rk3328-mx10-TvBox:~/Téléchargements/deb_upgrade$ sudo apt --fix-broken install Lecture des listes de paquets... Fait Construction de l'arbre des dépendances... Fait Lecture des informations d'état... Fait Correction des dépendances... Fait Les paquets supplémentaires suivants seront installés : bison flex libsigsegv2 libssl-dev m4 Paquets suggérés : bison-doc flex-doc libssl-doc m4-doc Paquets recommandés : libfl-dev Les NOUVEAUX paquets suivants seront installés : bison flex libsigsegv2 libssl-dev m4 0 mis à jour, 5 nouvellement installés, 0 à enlever et 3 non mis à jour. 1 partiellement installés ou enlevés. Il est nécessaire de prendre 3 442 ko dans les archives. Après cette opération, 12,5 Mo d'espace disque supplémentaires seront utilisés. Souhaitez-vous continuer ? [O/n] o Réception de :1 http://deb.debian.org/debian bullseye/main arm64 libsigsegv2 arm64 2.13-1 [34,7 kB] Réception de :2 http://deb.debian.org/debian bullseye/main arm64 m4 arm64 1.4.18-5 [199 kB] Réception de :3 http://deb.debian.org/debian bullseye/main arm64 bison arm64 2:3.7.5+dfsg-1 [1 084 kB] Réception de :4 http://deb.debian.org/debian bullseye/main arm64 flex arm64 2.6.4-8 [431 kB] Réception de :5 http://deb.debian.org/debian bullseye/main arm64 libssl-dev arm64 1.1.1k-1+deb11u1 [1 693 kB] 3 442 ko réceptionnés en 1s (3 536 ko/s) Sélection du paquet libsigsegv2:arm64 précédemment désélectionné. (Lecture de la base de données... 173316 fichiers et répertoires déjà installés.) Préparation du dépaquetage de .../libsigsegv2_2.13-1_arm64.deb ... Dépaquetage de libsigsegv2:arm64 (2.13-1) ... Sélection du paquet m4 précédemment désélectionné. Préparation du dépaquetage de .../archives/m4_1.4.18-5_arm64.deb ... Dépaquetage de m4 (1.4.18-5) ... Sélection du paquet bison précédemment désélectionné. Préparation du dépaquetage de .../bison_2%3a3.7.5+dfsg-1_arm64.deb ... Dépaquetage de bison (2:3.7.5+dfsg-1) ... Sélection du paquet flex précédemment désélectionné. Préparation du dépaquetage de .../flex_2.6.4-8_arm64.deb ... Dépaquetage de flex (2.6.4-8) ... Sélection du paquet libssl-dev:arm64 précédemment désélectionné. Préparation du dépaquetage de .../libssl-dev_1.1.1k-1+deb11u1_arm64.deb ... Dépaquetage de libssl-dev:arm64 (1.1.1k-1+deb11u1) ... Paramétrage de libsigsegv2:arm64 (2.13-1) ... Paramétrage de libssl-dev:arm64 (1.1.1k-1+deb11u1) ... Paramétrage de m4 (1.4.18-5) ... Paramétrage de bison (2:3.7.5+dfsg-1) ... update-alternatives: utilisation de « /usr/bin/bison.yacc » pour fournir « /usr/bin/yacc » (yacc) en mode automatique Paramétrage de flex (2.6.4-8) ... Paramétrage de linux-headers-edge-rockchip64 (21.11.0-trunk) ... Compiling headers - please wait ... Traitement des actions différées (« triggers ») pour libc-bin (2.31-13+deb11u2) ... Traitement des actions différées (« triggers ») pour man-db (2.9.4-2) ... Traitement des actions différées (« triggers ») pour doc-base (0.11.1) ... Traitement de 1 fichier de documentation ajouté… ju@rk3328-mx10-TvBox:~/Téléchargements/deb_upgrade$ sudo dpkg -i *.deb (Lecture de la base de données... 173818 fichiers et répertoires déjà installés.) Préparation du dépaquetage de linux-dtb-edge-rockchip64_21.11.0-trunk_arm64.deb ... Dépaquetage de linux-dtb-edge-rockchip64 (21.11.0-trunk) sur (21.11.0-trunk) ... Préparation du dépaquetage de linux-headers-edge-rockchip64_21.11.0-trunk_arm64.deb ... Dépaquetage de linux-headers-edge-rockchip64 (21.11.0-trunk) sur (21.11.0-trunk) ... Préparation du dépaquetage de linux-image-edge-rockchip64_21.11.0-trunk_arm64.deb ... ls: impossible d'accéder à '/var/lib/initramfs-tools': Aucun fichier ou dossier de ce type Dépaquetage de linux-image-edge-rockchip64 (21.11.0-trunk) sur (21.11.0-trunk) ... dpkg: concernant linux-u-boot-edge-rk3318-box_21.11.0-trunk_arm64.deb contenant linux-u-boot-rk3318-box-edge : linux-u-boot-rk3318-box-current entre en conflit avec armbian-u-boot linux-u-boot-rk3318-box-edge fournit armbian-u-boot et doit être installé. dpkg: erreur de traitement de l'archive linux-u-boot-edge-rk3318-box_21.11.0-trunk_arm64.deb (--install) : paquets en conflit - linux-u-boot-rk3318-box-edge non installé Paramétrage de linux-dtb-edge-rockchip64 (21.11.0-trunk) ... Paramétrage de linux-headers-edge-rockchip64 (21.11.0-trunk) ... Compiling headers - please wait ... Paramétrage de linux-image-edge-rockchip64 (21.11.0-trunk) ... update-initramfs: Generating /boot/initrd.img-5.14.13-rockchip64 update-initramfs: Converting to u-boot format Des erreurs ont été rencontrées pendant l'exécution : linux-u-boot-edge-rk3318-box_21.11.0-trunk_arm64.deb ju@rk3328-mx10-TvBox:~/Téléchargements/deb_upgrade$  
  8. Like
    RetroFan90 reacted to jock in CSC Armbian for RK3318/RK3328 TV box boards   
    Uhmm... it seems that the headers package is not installed in the images I shipped before.
    Well, I think I can remove the offending packages from the web directory
     
    However it's ok just to install linux-image and linux-dtb packages: those are the important ones.
    headers are needed if there is the need to compile kernel modules.
     
    edit: I changed the installation command with apt, so it will resolve automatically dependencies without complaining...
  9. Like
    RetroFan90 reacted to MX10.AC2N in CSC Armbian for RK3318/RK3328 TV box boards   
    @jock I try upgrade via deb. There is some errors => https://paste.yunohost.org/dirafakuve.erl
  10. Like
    RetroFan90 reacted to jock in CSC Armbian for RK3318/RK3328 TV box boards   
    Good idea, the packages to hold are exactly those ones (plus the headers package).
    I will double check and add a clarification in the first page, thanks!
  11. Like
    RetroFan90 reacted to Gausus in CSC Armbian for RK3318/RK3328 TV box boards   
    I have used sudo apt-mark hold <linux-package-name>  , on kernel .
     
    sudo apt-mark hold linux-image-current-rockchip64
    sudo apt-mark hold linux-dtb-current-rockchip64
    sudo apt-mark hold linux-u-boot-current-rk3318-box
     
    I then can run apt update and apt upgrade not updating kernel.
     
    To remove mark hold use : sudo apt-mark unhold <linux-package-name>
    Can y make a list of packages not to upgrade / overwrite ?
     
  12. Like
    RetroFan90 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
  13. Like
    RetroFan90 reacted to jock in CSC Armbian for RK3318/RK3328 TV box boards   
    Oops, I'm sorry something didn't went well
  14. Like
    RetroFan90 reacted to MX10.AC2N in CSC Armbian for RK3318/RK3328 TV box boards   
    No worries, I'm only in the testing phase so nothing important ..
    Too bad it didn't work ..
    Hoping that my feedback can help,
    Thank you again for everything you do .. Great @jock
  15. Like
    RetroFan90 reacted to MX10.AC2N in CSC Armbian for RK3318/RK3328 TV box boards   
    Hi all,
    So I continue my feedback on a TvBox MX10 with rk3328 I tried adding overlays to have 1.4GHz and 1.5GHz but none will have allowed to use these max values in armbian-config via CPU governor (I still have 1.3GHz as the max value). Pity..
    Another thing I always try via armbian-config the docker install, it did not finish correctly and I had to be able to install docker use the method described in https://alexbacher.fr/unixlinux/installer-docker-debian/
    I tried to install docker-chromium-armhf in order to be able to have chromium with DRM rights (amazon, netflix, ...) because no DRM lib in ARM64 ..
    https://github.com/HenningThiemann/docker-chromium-armhf
    So I was able to start Chromium-armhf but unfortunately once I arrived in my Amazon primevideo account, streaming is not allowed due to lack of DRM rights
    I also attempted the construction of https://github.com/gort818/qtwebflix it works but again and again this problem of DRM lib .. If someone has found a solution I am well interested..
    @jockI see you updated but, do we have to reflash ?
    Have a nice day..
  16. Like
    RetroFan90 reacted to jock in CSC Armbian for RK3318/RK3328 TV box boards   
    Update!
     
    Images on first page have been updated to kernel 5.14.13
     
  17. Like
    RetroFan90 reacted to Gausus in CSC Armbian for RK3318/RK3328 TV box boards   
    Thank you for your response.
     
    Dont know what y did ,  I was unable to create DTB.
     
    dtc -I dts -O dtb -f rk3318-box_1.5Ghz_SDCARD_v1a_ST_sdhr104.dts -o rk3318-box_1.5Ghz_SDCARD_v1a_ST_sdhr104.dtb Error: rk3318-box_1.5Ghz_SDCARD_v1a_ST_sdhr104.dts:2894.3-2895.1 syntax error FATAL ERROR: Unable to parse input tree  
    I download my rk3318-box_1.3Ghz_SDCARD_v2_ST_sdhr104.dts file , looks like the same error. Will fix dts file.
     
    rk3318-box_1.3Ghz_SDCARD_v2_ST_sdhr104.dts  fixed.
    Is it possible to delete post , can't find a way to do it.
     
     
  18. Like
    RetroFan90 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.
     
  19. Like
    RetroFan90 reacted to Gausus in CSC Armbian for RK3318/RK3328 TV box boards   
    DTB SDCARD mode up to 104 MB/s
     
    Have tried to squeeze some more performance out of my H96 max + RK3328.
     
    SDCARD speed runs at sd high-speed mode / max 24MB/s R∕W on rk3318-box.dtb
    Its possible to get higher speed from sd-card
     

     
    # Org DTB sudo cat /sys/kernel/debug/mmc0/ios clock: 50000000 Hz actual clock: 50000000 Hz vdd: 21 (3.3 ~ 3.4 V) bus mode: 2 (push-pull) chip select: 0 (dont care) power mode: 2 (on) bus width: 2 (4 bits) timing spec: 2 (sd high-speed) signal voltage: 0 (3.30 V) driver type: 0 (driver type B)  
    Have modified the dtb to support up to hr104 (104 MB/s)
    rk3318 image will not boot , but Armbian_21.11.0-trunk_Station-m1_hirsute_edge_5.14.11_xfce_desktop.img are booting using this modified DTB  DTS

     
    # Mod DTB Station m1 image sudo cat /sys/kernel/debug/mmc0/ios clock: 150000000 Hz actual clock: 150000000 Hz vdd: 21 (3.3 ~ 3.4 V) bus mode: 2 (push-pull) chip select: 0 (dont care) power mode: 2 (on) bus width: 2 (4 bits) timing spec: 6 (sd uhs SDR104) signal voltage: 1 (1.80 V) driver type: 0 (driver type B)  
    Using gnome-disks performance tool , i get 70+ read 40+ write speed.  about 2-3X performance boost on sdcard.
     
    If y like to test this DTB disable all overlays in /boot/extlinux/extlinux.conf
     
    Have tried to enable modules  in rk3318 image to boot.
    APPEND root= xxx yyy ....   ADD to end    mmc_block sdhci tifm_sd
     
    Dont know if kernel need a patch to boot from sdacrd when sd-uhs-XX modes enabled.
     
    SOME links about sdcard mode i DTB
    https://android.googlesource.com/kernel/msm/+/android-wear-5.1.1_r0.6/Documentation/devicetree/bindings/mmc/mmc.txt
    https://patchwork.kernel.org/project/linux-arm-kernel/patch/87imkryz5t.fsf@vany.ca/
    https://tinkerboarding.co.uk/forum/archive/index.php/thread-310.html
     
    Changed i  rk3318-box.dtb

     
    mmc@ff500000 { compatible = "rockchip,rk3328-dw-mshc\0rockchip,rk3288-dw-mshc"; reg = <0x00 0xff500000 0x00 0x4000>; interrupts = <0x00 0x0c 0x04>; clocks = <0x02 0x13d 0x02 0x21 0x02 0x4a 0x02 0x4e>; clock-names = "biu\0ciu\0ciu-drive\0ciu-sample"; fifo-depth = <0x100>; max-frequency = <0x8f0d180>; resets = <0x02 0x6d>; reset-names = "reset"; status = "okay"; bus-width = <0x04>; cap-mmc-highspeed; cap-sd-highspeed; disable-wp; pinctrl-names = "default"; pinctrl-0 = <0x49 0x4a 0x4b 0x4c>; sd-uhs-sdr12; <-------------------------- sd-uhs-sdr25; <-------------------------- sd-uhs-sdr50; <-------------------------- sd-uhs-sdr104; <-------------------------- vmmc-supply = <0x4d>; vqmmc-supply = <0xd4>; <-------------------------- DISABLED phandle = d4 spdif-2 could not find l free phandle to use card-detect-delay = <0x320>; // Diff / Disabled // phandle = <0x9a>; // card-detect-delay = <0x320>; // cd-gpios = <0x48 0x05 0x01>; // no-sdio; // supports-sd; }; sdmmc-regulator { compatible = "regulator-fixed"; gpio = <0x6b 0x1e 0x01>; pinctrl-names = "default"; pinctrl-0 = <0x6c>; regulator-name = "vcc_sd"; regulator-always-on; regulator-boot-on; regulator-min-microvolt = <0x325aa0>; regulator-max-microvolt = <0x325aa0>; vin-supply = <0x1e>; phandle = <0x4d>; }; // ADD high speed sdcard 1,8v mode sdmmcio-regulator { compatible = "regulator-gpio"; gpios = <0x68 0x00 0x00>; states = <0x1b7740 0x01 0x325aa0 0x00>; regulator-name = "vcc_sdio"; regulator-type = "voltage"; regulator-min-microvolt = <0x1b7740>; regulator-max-microvolt = <0x325aa0>; regulator-always-on; // vin-supply = <0x2b>; vin-supply = <0x6e>; phandle = <0xd4>; }; // spdif-2 { // // spdifm2-tx { // rockchip,pins = <0x00 0x02 0x02 0x5f>; // phandle = <0xd4>; // }; // };  
  20. Like
    RetroFan90 reacted to jock in CSC Armbian for RK3318/RK3328 TV box boards   
    Uhm, I see that you have and old full-hd monitor. It should not be an issue, but apparently it is.
    From the hints about your experiences (working on Android, working on multitool, not working with armbian), I guess you installed armbian with mainline kernel: there are some tweaks in the mainline kernel that alter the HDMI timings, thus they may be better with some monitors and worse with others. In your case it may be that your monitor does not like those timings.
    You may give a chance to the legacy kernel image, you can just put in on sdcard, plug the sdcard and boot: the box should automatically boot from sdcard, so you can easily test if HDMI is properly working with legacy kernel at least.
  21. Like
    RetroFan90 reacted to Matteo Venturi in CSC Armbian for RK3318/RK3328 TV box boards   
    Great, thank you very much!
  22. Like
    RetroFan90 reacted to jock in CSC Armbian for RK3318/RK3328 TV box boards   
    Read the instructions!! rk3318-config to configure it for 1.3 ghz !!
  23. Like
    RetroFan90 reacted to MX10.AC2N in CSC Armbian for RK3318/RK3328 TV box boards   
    OK no worries I have already read the 15 pages of this thread ...
    Now the problem is that when I run rk3318-config at the end it requires a reboot and there starts the bug, my box bug during the boot process .. only solution I found, delete all the overlays line which a was added in the armbianEnv.txt (luckily I can connect my SD card to my computer) ..
  24. Like
    RetroFan90 reacted to jock in CSC Armbian for RK3318/RK3328 TV box boards   
    The cpu-hs overlay is responsible for the 1.3ghz clock. If it is causing you issues, then the cpu is not really happy running with that frequency
  25. Like
    RetroFan90 reacted to MX10.AC2N in CSC Armbian for RK3318/RK3328 TV box boards   
    It's strange I never had any problem using the 1.3GHz processor with the other armbian images. The Station-M1 system installed on Emmc works at 1.3GHz without any particular problem.
    When I had put rk3328-evb.dtb in armbianEnv.txt I had found the max value at 1.3 GHz and the system started up without worries (but no hdmi signal).
    In any case for the moment the system is stable, I left it running all night without any problems (but at 1GHz) .. I will continue ..
    Something a little off topic:
    Any idea why lightdm crashes startup when lxdm is running fine ..?
    Thank you again for the job, great ..!