CSC Armbian for RK3318/RK3328 TV box boards


jock
 Share

23 23

Recommended Posts

27 minutes ago, kruzer said:

 @jock thank you very much, it is working  👍 

:thumbup:

Do you have the original firmware link to share? I mentioned in the previous post that, since the kernel is quite recent, maybe the original image has some updated firmwares that may benefit other users and other devices

Link to post
Share on other sites

Donate and support the project!

33 minutes ago, jock said:

Do you have the original firmware link to share? I mentioned in the previous post that, since the kernel is quite recent, maybe the original image has some updated firmwares that may benefit other users and other devices

Sure, it is big image of original 64GB drive, gzipped 2GB, available here tvbox3318-backup.gz

Link to post
Share on other sites

33 minutes ago, Dragao said:

Where did you connect the uart ? 

 

I haven't tried with this box, I was using uart on my previous one, where it was clearly marked (TX, RX and GND):

2021-05-22-002405.thumb.jpg.b67e43b37b8906efac4954c62c1aec43.jpg

there is a similar place on my rk3318 board near the leds, but with no inscriptions and I am not sure if it will work:

2021-05-22-003341.thumb.jpg.927640370f059a219f8f06c628fe80fc.jpg

does your look the same?

 

Link to post
Share on other sites

So, i'm italian too. If you Need something for testing i have a box with rk3318. Mine Is Bqeel R2 plus 4/64, It Is working well, only HDMI doesnt work, but i can access with ssh and vnc. 

Let me know 

@nerherd96 on telegram

Link to post
Share on other sites

@Dragao

few days ago was told to provide a bootlog and a uart connection info for help debugger to debug problems.


Your answer is " how can compile by myself........"

You don't ever know what is going on and you want compile some thing new adding problems on problems ?


You said you want help : well .........provide logs from uart

If you haven't or not able to provide one, compiling new kernel WON'T HELP  to boot your board

Link to post
Share on other sites

@kruzer

many many pads are UNDER the heatsink , specially when the heatsink is so big it could hide uart pads. Not a RULE but a good starting point

From your photo I can guess  a " starting uart pads" just before hidden by heatsink.
I thing the arrow is 5volt..... and then starts uart

Link to post
Share on other sites

8 hours ago, kruzer said:

I haven't tried with this box, I was using uart on my previous one, where it was clearly marked (TX, RX and GND):

2021-05-22-002405.thumb.jpg.b67e43b37b8906efac4954c62c1aec43.jpg

there is a similar place on my rk3318 board near the leds, but with no inscriptions and I am not sure if it will work:

2021-05-22-003341.thumb.jpg.927640370f059a219f8f06c628fe80fc.jpg

does your look the same?

 

it looks like the blue pcb

Link to post
Share on other sites

1 hour ago, fabiobassa said:

@Dragao

few days ago was told to provide a bootlog and a uart connection info for help debugger to debug problems.


Your answer is " how can compile by myself........"

You don't ever know what is going on and you want compile some thing new adding problems on problems ?


You said you want help : well .........provide logs from uart

If you haven't or not able to provide one, compiling new kernel WON'T HELP  to boot your board

You are absolutely right.. That is way I am now first going to connect serial..  

Looking for the connection on the board (as there is no indication where it is... 

Link to post
Share on other sites

so this is my board. 

Yellow line is where heatsink was placed.

 

Red arrow are GND (they are in contact with the shielding of the USB ports )

 

So I am giving this a go. 

Is there anyway of knowing which speed I need to setup? 

I have read about 112500 but also 1500000 

 

Maybe it is writing somewhere? 

The board is currently running Android 10

 

 

IMG_4033.jpeg

Link to post
Share on other sites

Hi @nerdherd96 , welcome to the forum :thumbup:

 

HDMI issue is just a news, it is rare but sometimes happens that a box has an incompatibility of some kind. I think @Dragao has the same issue you have, but he didn't report he try to access via ssh AFAIK so can't be sure.

 

Usually it is related to some internal timing calculations done in the kernel to accomodate HDMI signals of the various devices, something that works on a setup may not work on another.

Are you trying the box with an HDMI monitor or an HDMI television? If you have the chance, change the cable with another one of another quality or test the box on another TV/monitor and see if you solve the issue. In the meantime I could take a look if there are some patches, especially done by LibreELEC guys, that may bring better HDMI compatibility.

 

Do those tests if you can and want, maybe later we can hangout on telegram!

Link to post
Share on other sites

I spoke to soon.. 

It seem I can connect to the box via ssh... Need to find the default login thou

 

Ok , so when it boots (I can't see) it will ask for password for root.. So ssh to the box is kinda useless as there is no account configured :) 

but it does response to an ssh connection :) 

 

Serial loggin is needed badly :P

 

 

Link to post
Share on other sites

ok, so a small success..

 

I managed to find the serial port. 

but... when I boot from the flashed image (ubuntu desktop version from first post) I don't see anything... 

 

When I boot from the multitool (SD) I do see logging (have attached it maybe it can help)

When booting with Multitool I had set the baudrate to 112500 maybe I need a different baudrate when booting from the flashed image?

 

 

Multitool_log.txt

Link to post
Share on other sites

28 minutes ago, Dragao said:

When I boot from the multitool (SD) I do see logging (have attached it maybe it can help)

When booting with Multitool I had set the baudrate to 112500 maybe I need a different baudrate when booting from the flashed image?

I read somewhere that default baudrate for rockchip is 1500000,

i assume you used 115200 instead of 112500

did you try with hdmi disconnected?

Link to post
Share on other sites

4 minutes ago, kruzer said:

I read somewhere that default baudrate for rockchip is 15000000,

i assume you used 115200 instead of 112500

did you try with hdmi disconnected?

Yes I made a typo there 115200 was the speed.

 

And with (or without) hdmi connected I have the same results.. 

I have flashed an SD and I do get a little bit of output (having a baudrate of 115200) 

 

With a baudrate of 15000000 I get nearly nothing, a few dots thats all

 

 

session.txt

Link to post
Share on other sites

3 minutes ago, Dragao said:

I have flashed an SD and I do get a little bit of output (having a baudrate of 115200) 

On my box running focal desktop, cat /proc/cmdline shows 1500000:

root=UUID=de2057ff-2fc6-418c-b583-7a1e2dbe8219 rootwait rootfstype=ext4 console=ttyS2,1500000 console=tty1 consoleblank=0 loglevel=1 ubootpart=d25de264-01 usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u   cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1

 

Link to post
Share on other sites

@Dragao

my little 2 cents thought : I "SUPPOSE" your uart is just in the middle between processor and ddr on left ( and I guessed was under heatsink and I also told you) and you have connected in a total different place close to display , that was accessible even before remove heatsink...

:blink:

Link to post
Share on other sites

13 hours ago, fabiobassa said:

@Dragao

my little 2 cents thought : I "SUPPOSE" your uart is just in the middle between processor and ddr on left ( and I guessed was under heatsink and I also told you) and you have connected in a total different place close to display , that was accessible even before remove heatsink...

:blink:

Well In my last pic upload you can clearly see which points I have used. 

 

The 4 points under the heatsink gives me nothing.. I tried any combination and got no output. Of course it could be that I am working with the wrong baudrate. 

 

Link to post
Share on other sites

4 hours ago, Dragao said:

I tried any combination and got no output. Of course it could be that I am working with the wrong baudrate. 

 

Firstly - to receive the messages from the board you need only 2 wires:

  • Ground of Serial port on PC -------> Ground of TV Box
  • RX (input) pin of Serial port -------> TX (output) pin of TV Box

You don't need to send the data from PC to the TV Box (at this moment).

 

I think it is clear how to connect the ground wire.

Then unclear point is only - where to connect RX pin of Serial port.

But there is only few pads and try to all in combination of  two baud-rates (115200 and 1500000) should not take much time...

 

Note: Just be sure that you are probing the RECEIVING pin. I have this adapter and surprisingly the pin labels are misleading... RX is the transmitting pin. RX means that this pin should be connected to the RX pin on the other side...
Similar for TX - it is a receiving pin.

 

 

 

USB-naar-TTL-UART-Serial1)-1000x1000.jpg

Link to post
Share on other sites

Hello again, last thing I would like to solve is the infrared remote...

I read this post and I have a question - is the current kernel compiled with this setting:
 

CONFIG_ROCKCHIP_REMOTECTL=y
CONFIG_ROCKCHIP_REMOTECTL_PWM=y

 

I cannot find these in the kernel config file even commented-out.

Other point - seems I need the dtbo with remotectl-pwm.

This was in the Android DTB:

   pwm@ff1b0030 {
      #pwm-cells = <0x03>;
      clock-names = "pwm\0pclk";
      clocks = <0x02 0x3c 0x02 0xd6>;
      compatible = "rockchip,remotectl-pwm";
      handle_cpu_id = <0x01>;
      interrupts = <0x00 0x32 0x04>;
      phandle = <0xae>;
      pinctrl-0 = <0x46>;
      pinctrl-names = "default";
      reg = <0x00 0xff1b0030 0x00 0x10>;
      remote_pwm_id = <0x03>;
      remote_support_psci = <0x01>;
      status = "okay";

      ir_key1 {
         rockchip,key_table = <0xf2 0xe8 0xba 0x9e 0xf4 0x67 0xf1 0x6c 0xef 0x69 0xee 0x6a 0xbd 0x66 0xea 0x73 0xe3 0x72 0xe2 0xd9 0xb2 0x74 0x4d 0x74 0xbc 0x71 0xec 0x8b 0xbf 0x190 0xe0 0x191 0xe1 0x192 0xe9 0xb7 0xe6 0xf8 0xe8 0xb9 0xe7 0xba 0xf0 0x184 0xbe 0x175>;
         rockchip,usercode = <0x4040>;
      };

      ... few more ir_keys ...
        
};

 

I found also this (but not sure if it is related):
 

   pwmir {
      pwmir-pin {
         phandle = <0x46>;
         rockchip,pins = <0x02 0x02 0x01 0x7e>;
      };
   };


and in __symbols__

   pwmir_pin = "/pinctrl/pwmir/pwmir-pin";

 

Link to post
Share on other sites

So I am one step further.. 

 

It turns out it was a problem on my mac.. No program (even cli) could handle the 1500000 baud rate.. 

I switch to a linux machine and I was able to read the console perfectly.. 

 

Need to google :) to export the output to file so I can share.. 

and I am using the RX from the 3 dots Which are not under the heatsink! the 4 dots under the heatsink gives me nothing. (tested both baudrates) 

 

As the one which I am using now is giving me constant updates I feel pretty sure I have the correct one. 

 

Now I also need to find out why my Multitool is not booting... (maybe damaged SD card.)

 

Link to post
Share on other sites

32 minutes ago, Dragao said:

I switch to a linux machine and I was able to read the console perfectly.. 

cool ;-)

So you can connect TX too, and you should be able to go through initial armbian config, set password and made it also available to ssh connection.

Link to post
Share on other sites

Just now, kruzer said:

cool ;-)

So you can connect TX too, and you should be able to go through initial armbian config, set password and made it also available to ssh connection.

well yes, one would think that... 

Having a really hard time running multitool at the moment.. but will let you know if I have any updates...

 

 

Link to post
Share on other sites

On 4/16/2021 at 12:30 PM, jock said:

The current work is in early stages, it may or may not work for you; if and when it will be considered mature enough, it will be hopefully merged into Armbian master, but in the meantime it lives on my personal fork on github -> here <-

I am struggling with this, and can't build. Steps to reproduce:

git clone --depth=1 -b rk3318 https://github.com/paolosabatino/armbian-build.git rk3318
cd rk3318
./compile.sh  BOARD=rk3318-box BRANCH=current BUILD_MINIMAL=yes BUILD_DESKTOP=no KERNEL_ONLY=yes KERNEL_CONFIGURE=no

and after a few minutes, it gives compiler error:

drivers/spi/spi-rockchip.c: In function ‘rockchip_spi_probe’:
drivers/spi/spi-rockchip.c:756:16: error: ‘rockchip_spi_setup’ undeclared (first use in this function); did you mean ‘rockchip_spi_set_cs’?
  ctlr->setup = rockchip_spi_setup;
                ^~~~~~~~~~~~~~~~~~
                rockchip_spi_set_cs
drivers/spi/spi-rockchip.c:756:16: note: each undeclared identifier is reported only once for each function it appears in
drivers/spi/spi-rockchip.c:757:18: error: ‘rockchip_spi_cleanup’ undeclared (first use in this function); did you mean ‘rockchip_spi_can_dma’?
  ctlr->cleanup = rockchip_spi_cleanup;
                  ^~~~~~~~~~~~~~~~~~~~
                  rockchip_spi_can_dma

Do I need any packages/sources installed? Te rk322x-box Armbian version is building on the same machine without issues.

Link to post
Share on other sites

ok so I have now successfully flash the Ubuntu focal desktop to the box.. 

 

HDMI is not working. 

Ethernet is (rest not tested) 

 

It did take quite some time before the kernel was started.. 

 

but I could complete the setup via console and I can access the box via ssh now. 

 

Second boot was a bit quicker. 

 

So as I am now in a helping state :) what can I do to help? :)

Link to post
Share on other sites

42 minutes ago, Dragao said:

So as I am now in a helping state :) what can I do to help? :)

run armbian diagnostic with:

 

sudo armbianmonitor -u

and send the generated link, maybe someone clever would be able to find out what is wrong with your hdmi settings

Link to post
Share on other sites

@kruzer it looks like a patch is not applied or sort of. You can take a look into output/debug/patching.log if all the patches are applied correctly, but tomorrow I will take a look myself if the github repo is correctly aligned, can't remember if I have some fixes not yet uploaded in my local repository.

Link to post
Share on other sites

  • jock changed the title to CSC Armbian for RK3318/RK3328 TV box boards
 Share

23 23