Seth

  • Content Count

    15
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Seth reacted to jock in CSC Armbian for RK322X TV Boxes   
    Hello, I investigated quite a bit the u-boot issue, but it is not an immediately solvable issue, so it has to wait for the time being.
    About the leds, they can be controlled using the sysfs interface available in /sys/class/leds.
     
    In particular, you can do cat /sys/class/leds/working/trigger that will tell you a list of acceptable options, and use echo value > /sys/class/leds/working/trigger (change value with something you got from the list) to change the led behaviour.
  2. Like
    Seth reacted to jock in CSC Armbian for RK322X TV Boxes   
    @Seth Here it is the device tree overlay: rk322x-led-conf3.dtbo
     
    Put the file in /boot/dtb/overlays directory and then enable it editing in /boot/armbianEnv.txt (just replace the existing led-conf1 with led-conf3), and then reboot.
     
    By default the other led is configured to blink during eMMC access, but you can change the behaviour following the instructions of the previous post: https://forum.armbian.com/topic/12656-csc-armbian-for-rk322x-tv-boxes/?do=findComment&comment=119748
     
    About the walkthrough, well I converted the device tree filesystem structure into dts with:
    dtc -I fs -O dts device-tree-copy -o device-tree.dts then looked into device-tree.dts to find out the gpio-leds compatible string, and there you will find this section:
    power-led { status = "disabled"; compatible = "gpio-leds"; red { gpios = <0x75 0x08 0x00>; default-state = "off"; }; green { gpios = <0xa9 0x15 0x00>; default-state = "on"; }; };  
    The "green" led is attached to the GPIO bank whose phandle is 0xa9 (following the phandle it will be GPIO bank #3), and the pin is 0x15 (21 in decimal, or RK_PC5 as rockchip constant from source code) - this is the default led which is attached this way on all the boxes no matter the manufacturer.
    The "red" led is attached to GPIO bank #0 and the pin is 0x8 (RK_PB0 as rockchip constant).
     
    This commit contains the changes to add the device tree overlay led-conf3 to armbian.
     
  3. Like
    Seth reacted to jock in CSC Armbian for RK322X TV Boxes   
    Hello @Seth, I inspected your device tree and it looks like you have a led which is connected to a GPIO pin which is different from the two existing configurations. I can arrange a device tree overlay if you're interested in getting support for the second led too.
  4. Like
    Seth got a reaction from fabiobassa in CSC Armbian for RK322X TV Boxes   
    @fabiobassa
    well, i'm gonna tinker with it a bit more and post any progress. i put files there for others to use as reference just in case they encounter same problems as mine. cheers.
     
     
     
  5. Like
    Seth got a reaction from jock in CSC Armbian for RK322X TV Boxes   
    @dale
    congrats for successful setup!
     
    Anyway, i got a hold of the device tree copy from android as well as dmesg.
    I figured, i'm gonna follow @hexdump's instructions. hope it all works out fine.
    device-tree-copy.tar.gz dmesg_android.txt
  6. Like
    Seth reacted to fabiobassa in CSC Armbian for RK322X TV Boxes   
    @dale
    Glad everything is working . Later personally will investigate vwhy multitool doesn t work as expected 
    And don't forget help good reputation of authors with a simple like, thanks !
     
    @Seth
    What exactly do you want to achieve now?
    Maybe I missed something
     
     
     
     
     
  7. Like
    Seth reacted to jock in CSC Armbian for RK322X TV Boxes   
    @Seth I will take a look to the dtb, expecially for the led configuration (maybe yours is a special one)
     
    @dale Congrats, finally you made it! Need to understand why the multitool is not booting although, on my box it boots fine from USB. May I ask what happens exactly when you power on the box with the USB stick into?
    The system hangs and you see a black screen? The led is blinking or is steady on/off? Do armbian boots instead like no USB stick is in the port at all?
    edit: about the temps, yes they are a bit weird. Some chips reports rather high temperatures, I have a board with rk3229 that is idling at 82°C and easily reaches 90°C, but never had any lock-up and the heatspreader is just regularly warm.
  8. Like
    Seth got a reaction from dale in CSC Armbian for RK322X TV Boxes   
    @dale
    congrats for successful setup!
     
    Anyway, i got a hold of the device tree copy from android as well as dmesg.
    I figured, i'm gonna follow @hexdump's instructions. hope it all works out fine.
    device-tree-copy.tar.gz dmesg_android.txt
  9. Like
    Seth got a reaction from fabiobassa in CSC Armbian for RK322X TV Boxes   
    @hexdump
    thanks. i managed to get device tree from android box. nice guide.
     
    @jock
    i got the dmesg, will upload tomorrow, i need some sleep.
     
    @fabiobassa
    box is working fine as headless super router at the moment, running soho dhcp, dns server/cache, squid transparent proxy/cache. will slowly try to improve it as i learn more about these little things. i remember, i used to install debian/pfsense on old p3 and p4 boards just to get a reliable mega router/firewall and run squid and squidguard on em. now i can do that at the fraction of the size and power consumption. Just when i thought those boxes couldn't get any wierder.
     
    I found an s9012.ko in /lib/modules folder btw.
  10. Like
    Seth reacted to fabiobassa in CSC Armbian for RK322X TV Boxes   
    @Seth

    no worries, feel free to ask as many info as we are able to explain
    Consider that dtb isn't related only to rockchip so studying, understanding them will help ALSO with rockchip but not only with them ( also with allwinner, amlogic )
    The kernels @jock compiled ( both legacy and main) are already optimized for having all out of the box in MOST cases but of course new devilish boxes can appear on market
    I am sure your box will work

     
  11. Like
    Seth reacted to jock in CSC Armbian for RK322X TV Boxes   
    ap6210 is a package of two broadcom chips, don't know exactly which ones but dmesg will give some hints about the firmware and nvram you need.
    The wlan driver is brcmfmac and is both in legacy and mainline kernel and works fine so far.
     
  12. Like
    Seth reacted to fabiobassa in CSC Armbian for RK322X TV Boxes   
    @Seth

    what do you mean extract config from original firmware?
    behaviour of led are defined in the dtb PLUS kernel : example I have my two leds one is just heartbeat and the other is emmc ( or cpu0 ) activity just because it remembers me a spinning hard drive. This is my PERSONAL approach in the dtb just an example
     
    gpio-leds { compatible = "gpio-leds"; pinctrl-names = "default"; pinctrl-0 = <0x75>; blue { gpios = <0x3f 0x7 0x1>; label = "blue"; linux,default-trigger = "timer"; default-state = "off"; }; red { gpios = <0x6e 0x15 0x1>; label = "red"; linux,default-trigger = "cpu0"; default-state = "off"; };
    Regarding hdmi it should work out of the box

    as @hexdump said the original dtb would be great help
  13. Like
    Seth reacted to hexdump in CSC Armbian for RK322X TV Boxes   
    @Seth - it might be good to get the dtb from the box - in case no other way works, this approach so far worked for nearly every android tv box for me: https://github.com/hexdump0815/u-boot-misc/tree/master/misc.h616-legacy/android-device-tree-copy
     
    good luck - hexdump
  14. Like
    Seth reacted to jock in CSC Armbian for RK322X TV Boxes   
    @Seth
    Found some discussion about a similar wifi chip that uses the 9082xs kernel module. Some people modified an existing kernel module from realtek to make it compatible. Discussion is here: https://forum.libreelec.tv/thread/5457-s905x-unknown-wlan-chip/
     
    About HDMI, it should work perfectly fine. At least it works perfectly fine on most boards.
  15. Like
    Seth reacted to jock in CSC Armbian for RK322X TV Boxes   
    @Seth thanks for the brief reporting!
    It looks to me it is everything ok. I only miss the reason why the legacy image with kernel 4.4 does not boot.
    If the led is blinking it means the kernel is running, on first boot it may require some time to give you the prompt because it is enlarging the partition to fit the full size of the device.
    The missing boot.env is ok, it's just there because u-boot environment has never been saved, and it is ok that way.
    This one:
     
    Failed to load '/boot/dtb/overlay/-fixup.scr' although is strange. Maybe you turned off the board before it was first completing the partition resize? It happens that if something goes wrong during the boot process, /boot/armbianEnv.txt file gets truncated. (this file contains some important u-boot environment variables used during boot).
    About the wifi, S9012 is not a name I recognize and the photo is not clear enough to say what you have there.
    To get X.org you can either install the packages or use the Ubuntu Focal desktop image.
  16. Like
    Seth reacted to fabiobassa in CSC Armbian for RK322X TV Boxes   
    @Alvaro Fernandez
    bom dia Alvaro, yes forum limitation for new users .
    @jock and me we suspect of a strange ddrbin ( in the idbloader) that isn't compatible 100% with some ddr . Nota all ddrs just few .
    Jock is trying to assemble an image just for you for this RARE case , for your tests, but give him some time, please.

    @Seth

    Thank you so much for reporting the experience, so you used 0xccccccc for flashing idbloader !!!

    Interesting I will do further  investigations. TY

    @edouard_k

    ty for sharing the original firmware, always interesting dig into them.
     
  17. Like
    Seth got a reaction from fabiobassa in CSC Armbian for RK322X TV Boxes   
    @fabiobassa @jock
    For further infos and helping more people would you be so kind to post some screenshots and a more detailled procedure !?
     
    Hi again. so i got the box for about $13.00 online. it was marketed as an MXQ Pro 5G 4G/32G which was totally fake so i opened it and found out that is was just 1G/8G and that it was an RK3228. I tried backing up the firmware with rkdevtool in loader mode and only got about 0x0h to 0x10000h. i tried to write it back and it wouldn't boot anymore. I tried flashing it with armbian and rkdevtool and still no luck then i saw @qiheng's post (thank god he posted pictures) and copied his rkdevtool config and placed the box in maskrom using the pin short method. pinout is here. i just shorted clk to vss/gnd pin. and the flashing worked! Here are the pics of the board, it's marked R28-MXQ-00813, has DDR3 and 8GB flash. I also found the UART pins at the back of the board the 2 pads close to a bunch of capacitors under the cpu, the closest pad to the capacitors is the TX pin and the pad next to it is the RX pin, i just connected the gnd pin to power gnd. Here's the pic, green is tx and white is rx. uboot boots fine but it can't continue booting. i used legacy buster with 4.4 kernel. Orange led is blinking and i got the log below from putty.  Apparently, it can't find boot.env.
     
    Serial baud rate is 115200
    DDR Version V1.10 20190926 In ID:0xFFF 600MHz DDR3 Bus Width=32 Col=11 Bank=8 Row=14 CS=1 Die Bus-Width=16 Size=1024MB mach:4 OUT U-Boot SPL 2020.10-armbian (Dec 12 2020 - 01:47:28 +0100) Trying to boot from MMC2 I/TC: I/TC: Non-secure external DT found I/TC: Switching console to device: /serial@11030000 I/TC: OP-TEE version: 3.10.0-40-ga1d5c81f (gcc version 9.2.1 20191025 (GNU Toolc hain for the A-profile Architecture 9.2-2019.12 (arm-9.10))) #6 Wed Sep 16 21:36 :15 UTC 2020 arm I/TC: Primary CPU initializing M/TC: Not protecting region 1: 0x68400000-0x68600000 I/TC: Primary CPU switching to normal world boot U-Boot 2020.10-armbian (Dec 12 2020 - 01:47:28 +0100) Model: Generic Rockchip rk322x TV Box board DRAM: 992 MiB MMC: dwmmc@30000000: 1, dwmmc@30020000: 0 Loading Environment from EXT4... ** File not found /boot/boot.env ** ** Unable to read "/boot/boot.env" from mmc0:1 ** In: serial@11030000 Out: serial@11030000 Err: serial@11030000 Model: Generic Rockchip rk322x TV Box board Net: eth0: ethernet@30200000 starting USB... Bus usb@30040000: USB DWC2 scanning bus usb@30040000 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found stopping USB.. starting USB... Bus usb@30040000: USB DWC2 scanning bus usb@30040000 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Hit any key to stop autoboot: 0 Card did not respond to voltage select! Device 0: unknown device switch to partitions #0, OK mmc0(part 0) is current device Scanning mmc 0:1... Found U-Boot script /boot/boot.scr 2909 bytes read in 3 ms (946.3 KiB/s) ## Executing script at 60000000 Boot script loaded from mmc 0 214 bytes read in 3 ms (69.3 KiB/s) 5694356 bytes read in 140 ms (38.8 MiB/s) 8771432 bytes read in 206 ms (40.6 MiB/s) 49812 bytes read in 7 ms (6.8 MiB/s) Failed to load '/boot/dtb/overlay/-fixup.scr' ## Loading init Ramdisk from Legacy Image at 64000000 ... Image Name: uInitrd Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 5694292 Bytes = 5.4 MiB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK ## Flattened Device Tree blob at 61f00000 Booting using the fdt blob at 0x61f00000 Loading Ramdisk to 67e91000, end 683ff354 ... OK Loading Device Tree to 67e1c000, end 67e90fff ... OK Starting kernel ... I/TC: Secondary CPU 1 initializing I/TC: Secondary CPU 1 switching to normal world boot I/TC: Secondary CPU 2 initializing I/TC: Secondary CPU 2 switching to normal world boot I/TC: Secondary CPU 3 initializing I/TC: Secondary CPU 3 switching to normal world boot  
    I tried flashing kernel 5.9 minimal buster and i get this:
    DDR Version V1.10 20190926 In ID:0xFFF 600MHz DDR3 Bus Width=32 Col=11 Bank=8 Row=14 CS=1 Die Bus-Width=16 Size=1024MB mach:4 OUT U-Boot SPL 2020.10-armbian (Dec 12 2020 - 01:48:33 +0100) Trying to boot from MMC2 I/TC: I/TC: Non-secure external DT found I/TC: Switching console to device: /serial@11030000 I/TC: OP-TEE version: 3.10.0-40-ga1d5c81f (gcc version 9.2.1 20191025 (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10))) #6 Wed Sep 16 21:36:15 UTC 2020 arm I/TC: Primary CPU initializing M/TC: Not protecting region 1: 0x68400000-0x68600000 I/TC: Primary CPU switching to normal world boot U-Boot 2020.10-armbian (Dec 12 2020 - 01:48:33 +0100) Model: Generic Rockchip rk322x TV Box board DRAM: 992 MiB MMC: dwmmc@30000000: 1, dwmmc@30020000: 0 Loading Environment from EXT4... ** File not found /boot/boot.env ** ** Unable to read "/boot/boot.env" from mmc0:1 ** In: serial@11030000 Out: serial@11030000 Err: serial@11030000 Model: Generic Rockchip rk322x TV Box board Net: eth0: ethernet@30200000 starting USB... Bus usb@30040000: USB DWC2 scanning bus usb@30040000 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found stopping USB.. starting USB... Bus usb@30040000: USB DWC2 scanning bus usb@30040000 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Hit any key to stop autoboot: 0 Card did not respond to voltage select! Device 0: unknown device switch to partitions #0, OK mmc0(part 0) is current device Scanning mmc 0:1... Found U-Boot script /boot/boot.scr 2909 bytes read in 3 ms (946.3 KiB/s) ## Executing script at 60000000 Boot script loaded from mmc 0 243 bytes read in 3 ms (79.1 KiB/s) 6017211 bytes read in 148 ms (38.8 MiB/s) 9681360 bytes read in 226 ms (40.9 MiB/s) 40937 bytes read in 6 ms (6.5 MiB/s) 410 bytes read in 5 ms (80.1 KiB/s) Applying kernel provided DT overlay rk322x-emmc-nand.dtbo 1286 bytes read in 6 ms (209 KiB/s) Applying kernel provided DT overlay rk322x-led-conf1.dtbo 232 bytes read in 6 ms (37.1 KiB/s) Applying kernel provided DT fixup script (rk322x-fixup.scr) ## Executing script at 600f0000 ## Loading init Ramdisk from Legacy Image at 64000000 ... Image Name: uInitrd Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 6017147 Bytes = 5.7 MiB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK ## Flattened Device Tree blob at 61f00000 Booting using the fdt blob at 0x61f00000 Loading Ramdisk to 67e42000, end 683ff07b ... OK Loading Device Tree to 67dcf000, end 67e41fff ... OK Starting kernel ... I/TC: Secondary CPU 1 initializing I/TC: Secondary CPU 1 switching to normal world boot I/TC: Secondary CPU 2 initializing I/TC: Secondary CPU 2 switching to normal world boot I/TC: Secondary CPU 3 initializing I/TC: Secondary CPU 3 switching to normal world boot Armbian 20.11.3 Buster ttyS2 rk322x-box login: iamgroot Password: Last login: Sat Dec 12 10:39:28 UTC 2020 on ttyS2 _ _________ ____ _ _ __| | _|___ /___ \|___ \__ __ | |__ _____ __ | '__| |/ / |_ \ __) | __) \ \/ /____| '_ \ / _ \ \/ / | | | < ___) / __/ / __/ > <_____| |_) | (_) > < |_| |_|\_\____/_____|_____/_/\_\ |_.__/ \___/_/\_\ Welcome to Armbian 20.11.3 Buster with Linux 5.9.14-rk322x No end-user support: community creations System load: 27% Up time: 0 min Memory usage: 5% of 960M IP: CPU temp: 63°C Usage of /: 8% of 7.0G [ 0 security updates available, 17 updates total: apt upgrade ] Last check: 2020-12-12 10:40 iamgroot@rk322x-box:~$ No wifi or x yet but it's a start. serial seems to freeze sometimes, maybe because of my cloned pl2303 usb ttl. maybe i should get a better usb to uart. after repeated reboots, i managed to run rk322x-config successfully. i don't know what the wifi chip, it's marked S9012 and when i searched for it only transistors came up. lol.
  18. Like
    Seth reacted to jock in CSC Armbian for RK322X TV Boxes   
    Glad to hear it worked! Often the serial pins are easy to spot because there are three or four receptacles in a row, sometimes with RX/TX/GND printings, but sometimes they are hidden or not exposed at all.
    PS: why the loader from the first post has to be flashed at oxcccccccc is still a mistery of rkdevtool for windows... Normally you don't need that loader and definitely it does not need to be flashed at oxcccccccc Maybe it is a limitation of the tool for windows, the Armbian image already has everything required to boot properly.
  19. Like
    Seth reacted to jock in CSC Armbian for RK322X TV Boxes   
    Yes, that's true. But beware you need to short the clock just for a little time during startup.
    Also the serial is essential to debug such situations, even because your board is not a well-known one and may have some specifics.
     
    edit: as a test for rkdevtool for windows, you may burn the multitool image and see if works. If the multitool image works this way, the problem is in the Armbian image, otherwise the problem is rkdevltool for windows
     
  20. Like
    Seth reacted to fabiobassa in CSC Armbian for RK322X TV Boxes   
    @Seth

    very very glad to see your board is working, so happy !!!!!

    For further infos and helping more people would you be so kind to post some screenshots and a more detailled procedure !?

    And don't forget a " like" ( the heart symbol)  for  authors to help them in good forum reputation !!!



     
  21. Like
    Seth got a reaction from fabiobassa in CSC Armbian for RK322X TV Boxes   
    weeee! i got it booting. orange light blinks. flashed it in maskrom mode. flashed the loader from first post at 0xcccccccc and armbian image at 0x0. it worked. now i need to hunt for uart rx and tx pins. thanks @jock and @fabiobassa. i just hope i don't break the board while searching for uart pins.