Jump to content

CSC Armbian for RK3318/RK3328 TV box boards


jock

Recommended Posts

1 hour ago, Aapo Tahkola said:

I have openwrt box setup so that it redirects all outgoing DNS to my Pi-hole instance, and since I have wireguard on my phone, I get zero advertisement even on google apps.

why do you need openwrt? surely just setting your DNS to your pi-hole/adguard 'filter' gives you the same result?

Link to comment
Share on other sites

8 hours ago, Energokom said:

How to find out which SDIO bus wi-fi is connected to (HK6334Q)?

Mostly trial and error; if the board is well known and someone already discovered it or if you have the original dtb you can look there

Link to comment
Share on other sites

Happy New Year!

More DTB Shenanigans ahead for the new year

maybe perhaps the tv out can work after all... (Maybe?)

For The Next Task , I'll Upload DTB files from my archive on gdrive

there is a crap ton of weird features that armbian is missing the ball on...

But With That, I'm Gonna Be Testing rk3318 noble nightly builds

i might tweak the dtb to not even use the internal emmc (due to bad solder job on 33x8 TV-BOX Hardware 3308/3318/3328

what is the best tool to dump dtb and such into a human readable file?

 

winners-use-drugs-v0-e80wu2np2xxb1.png

Link to comment
Share on other sites

First I want to say BIG thanks to @jock for his hard work! I am runing Armbian_23.11.1_Rk3318-box_jammy_current_6.1.63_xfce_desktop.img on a T9 box with RK3318, even The Bluetooth is working! I want to say thanks to @paradigman for his post here https://forum.armbian.com/topic/26978-csc-armbian-for-rk3318rk3328-tv-box-boards/?do=findComment&comment=135469 , finally i succeeded to see something on my 7segment display and even if it is upside down i am very happy!

What i did is extacted kernel from Android, then extract DTB from it, than decompile to DTS and find that:

Spoiler

    fd655_dev {
        compatible = "rockchip,fd655_dev";
        status = "okay";
        clk_pin = <0x9a 0x13 0x00>;
        dat_pin = <0x9a 0x16 0x00>;
    };

Than i correct the DTS from @paradigman like this:

Spoiler

/dts-v1/;
/plugin/;
/ {
   fragment@0 {
      target-path = "/";
      __overlay__ {
         openvfd {
            compatible = "open,vfd";
            dev_name = "openvfd";
            openvfd_gpio_clk = <&gpio2 0x13 0x00>;
            openvfd_gpio_dat = <&gpio2 0x16 0x00>;
            openvfd_chars = [00 04 03 02 01];
            openvfd_dot_bits = [00 01 03 02 04 05 06];
            openvfd_display_type = [06 00 00 00];
            status = "okay";
         };
      };
   };
};

Than installed the kernel headers from armbian-config and follow the steps from @paradigman

 

Now the question is: can i rotate the display and can i lit the WiFi and Network indicators and how? And also i will love the "Play" symbol to blink with heartbeat after booting by adding to "/etc/rc.local"  something like:

echo heartbeat > /sys/class/leds/working/trigger

 

20240119_002636.jpg

MyT9_dtc_out.dts

Link to comment
Share on other sites

RK3318 board (x88 pro 10)

Kernel: 6.6.2-edge-rockchip64

Ubuntu Jammy 22.04.3 LTS

 

Vidoe hardware acceleration working.

 

Clock and leds working using the OpenVFD service

 

image.thumb.png.1755da63e43a622fd70e88000201b17a.png

 

See details here if interested:

 

 

Edited by haven
Link to comment
Share on other sites

On 1/18/2024 at 11:53 PM, suser said:

First I want to say BIG thanks to @jock for his hard work!

You're welcome

 

On 1/18/2024 at 11:53 PM, suser said:

And also i will love the "Play" symbol to blink with heartbeat after booting by adding to "/etc/rc.local"  something like:

This is actually not possible with the openvfd driver because it is not wired to the kernel led framework but is a totally custom module that just exposes the hardware to userspace.

Link to comment
Share on other sites

Yes, somewhere back you had told that you want to rewrite it and make it compatible and put it to the kernel and now when i dig in it i understand very well what exactly you have mean. So I will left the thing as is for now, just will find the right config because now, only me and few "enlightened ones" can read the time correctly from this wonderful clock :) , showing 09:27 at the example.

 

VideoCapture_20240120-015236.jpg

Edited by suser
Link to comment
Share on other sites

Thanks @Alex ThreeD , already done it, that was the easy part, but in the moment when I start openvfd.service and LED display is OK i get armbian-led-state.service fail. Tried few different ways, but could not succeed to made a working LED without failed armbian-led-state.service, so i left it failed...

Spoiler

root@rk3318-box:~# sudo systemctl list-units --failed
  UNIT                                         LOAD         ACTIVE       SUB          DESCRIPTION

____________________________________________________________________________________________
● armbian-led-state.service      loaded       failed        failed        Armbian leds state
 

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.
1 loaded units listed.
 

 

Edited by suser
Link to comment
Share on other sites

@suser how were you able to get your t9 to boot armbian? on mine I'm only able to boot the multitool; when i try to boot armbian nothing shows up, neither on the screen nor on the network; and when i try to boot the multitool again i need to repress the button. I tried to connect to the console with an arduino uno with the microcontroller in reset and a logic level shifter, but regardless of what os i loaded i just got jibberish back at all of the baud rates. Also could you check if the board in the photos is like yours? just to make sure it's not another box with the same shell:

back.jpg

front.jpg

Link to comment
Share on other sites

Read those manuals:

Thanks Jock and paolosabatino!

You have to erase eMMC with multitool to be able to boot Armbian images from SD, then when you have preferable image, you can burn it to eMMC again with multitool. So before all you should make a backup of eMMC again with multitool. Even better try to find original android image for your box before erase eMMC. Extract DTB is also recommended.

Good luck!

 

PS, never opened this T9, as usually I open them only if I need to find test point with the oscilloscope, which mean: "things gone wrong"

 

Edited by suser
Link to comment
Share on other sites

hey, i tried following this and the tutorial mentioned in this to flash it to my x88 pro 10 but i just cant get it to boot
i tried building an image and i tried using prebuilt images but it just doesnt want to boot basically what i did:
erase emmc
flash img to emmc
(no signal)
restore emmc from backup

rinse and repeat for like 5 different images

Link to comment
Share on other sites

@suser I tried to erase the emmc but murphy's law bit me; if you want to read it the whole thing is written at the end of the post; but tldr i cooked the emmc and needed to cut its lines to allow the box to boot again; but i am still only able to boot the multitool and not armbian; essentially what i am asking is: does armbian need a bootloader on the emmc for it to boot or is it supposed to just start if the emmc is empty or not detected?

 

 

Spoiler

while i was formatting the emmc the power went out and the corrupted data left on the emmc didnt allow the box to boot. then i saw two pins close together on the other side of the pcb where the emmc is; while trying to short those i shorted one of the capacitor for the emmc power and blew it off the board. at the end as a last attempt i cut all of the lines of the emmc and atleast it started booting again; after that i tried writing the original rom on an sdcard using dd... and typed the wrong drive; fromatting the main hard drive of the pc; after recovering the files i reintalled the os. today is the first day i was able to reuse the pc.

 

Link to comment
Share on other sites

@shellless USB as GND source sound legit. Just to double check that you are correctly wired UART - have you tried to swap RX/TX?

I have a board that looks exactly the same as yours:

GND is a last drill hole on a board corner (probably there is nothing to afraid of soldering), then board's TX, board's RX, and VCC (next to the IR receiver). Baudrate 1500000.

Also, be aware that sometimes board does not fully reset with board's RX pin connected to PC (it seems some components still powered up by RX pin). So I have to temporary disconnect RX pin.

 

AFAIK Armbian does not need bootloader on emmc. So emmc could be cleared, masked or unsoldered.

Edited by Alex ThreeD
Link to comment
Share on other sites

1 hour ago, shellless said:

@Alex ThreeD the reason why there is no ground is that i used a usb cable to get the ground since i was afraid of ripping components up while soldering the wire to the ground pin on the serial interface; so i dont think that was the problem

Ground must be connected on both the edge (the USB serial and the board), otherwise you can't get proper communication.

That is essential and you can easily electrically break things when you don't connect the shared ground. Ground first, always!

 

For the other problem about emmc erase: if you did erase from multitool and you can run multitool but not armbian from sdcard there could be two main reasons:

 

  • your armbian image is a bit old and has the 667Mhz ddrbin; recent images have a slower but more compatible ddrbin
  • your emmc is faulty and accepts but really does not execute erase/write commands (ie: you erase it, but the contents still remains)
Link to comment
Share on other sites

Hello, everyone,
I've been reading the thread a bit because I wanted to increase the speed of DDR memories to 667mhz. I saw that they are currently set at 333mhz for a compatibility issue.
I found the bin in the "rkbin" archive but I don't know now how I can make the change. Could you give me some suggestions?
Thanks

Link to comment
Share on other sites

On 2/5/2024 at 12:49 AM, pakos96 said:

I found the bin in the "rkbin" archive but I don't know now how I can make the change. Could you give me some suggestions?

 

The ddrbin is "packaged" by the u-boot command mkimage, then some other code (uboot SPL) is appended to the resultant binary.

 

In theory the ddr frequency is set in just a bunch of bytes in the ddrbin, so substituting the ddrbin (or altering the target bytes) on the sdcard/emmc with a bare "dd" command would work. But that requires some math and a hex editor to find the exact position where to put it with dd command AND I don't know if there are some CRC checks that would break the whole thing.

 

I need to investigate a bit about, surely it is a job for a script because manual intervention would be a bit risky.

Link to comment
Share on other sites

4 hours ago, jock said:

 

The ddrbin is "packaged" by the u-boot command mkimage, then some other code (uboot SPL) is appended to the resultant binary.

 

In theory the ddr frequency is set in just a bunch of bytes in the ddrbin, so substituting the ddrbin (or altering the target bytes) on the sdcard/emmc with a bare "dd" command would work. But that requires some math and a hex editor to find the exact position where to put it with dd command AND I don't know if there are some CRC checks that would break the whole thing.

 

I need to investigate a bit about, surely it is a job for a script because manual intervention would be a bit risky.


Ok thank you. let me know if you have any news.

Link to comment
Share on other sites

I could really use some help, i think I hit a wall here I'm beginning to lose my sanity. Sorry, I'm new to this and I'm on Windows so its even harder to follow any guide i see everyone is using Linux. 

  • I have Armbian downloaded (Armbian_22.05.0-trunk_Rk3318-box_jammy_current_5.15.35_xfce_desktop)
  • I've downloaded the MiniLoader file and Multitool 
  • (after hours of troubleshooting and failure to even get my PC to recognize the device plugged in) finally got it to show up on rkdevtool after disabling driver signature enforcement on Windows had no idea that was even a thing.
  • after that everyone it talking in linux code so i tried following another guide but that didn't go well I'm just lost at this point. 

from what i could understand, the goal is to change the bootloader of the device by changing the code in the eMMc? and to do that we have to flash the miniLoader onto the RK3318 chip?  or are we just straight up installing Armbian straight onto the eMMc using rkdevtool? 

 

Again sorry I'm a newbie to all this, at first i thought it'd be a simple plug n install job using some sort of simple bios but 4 days in that's certainly not the case. still trying to figure it out on my own but some help would be greatly appreciated 

 

edit: seems I might've bricked the whole thing altogether I erased something in rkdevtool and now the lights are red no more blue lights, nothing when plugged into my tv. 

 

Have a look at the log I might've shot myself in the foot here not a clue. https://file.io/ZC5I13kUrDZU

RIP.png

Link to comment
Share on other sites

@Dripz Hello!

 

Actually, the regular installation instructions via sdcard never mention Linux: all you need is multitool, an armbian image and a generic tool to write on sdcard.

 

Since you're in maskrom mode (perhaps you erased the internal emmc), and you did not mention what board you have, the first thing you can try is to take a fresh armbian image (see first page, take a nightly build based upon kernel 6.6), burn it on sdcard, plug the sdcard in the box see if it boots.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines