haven
-
Posts
30 -
Joined
-
Last visited
Reputation Activity
-
haven got a reaction from MattWestB in CSC Armbian for RK3318/RK3328 TV box boards
same happened to me, EMMC dead, no way to recover -> only boot from SDCARD
-
haven got a reaction from MattWestB in CSC Armbian for RK3318/RK3328 TV box boards
Still working on HDMI audio, with some updates.
Pulseaudio default sink set correctly.
Fisrt of all the issue appears only on my home TV. Tested with other TV sound seems ok. HDMI port works with other device (my notebook)
kernel 6.6.47-current Armbian v24.8.4 -> no hdmi audio kernel 6.6.2-edge Armbian v23.11.1 -> no hdmi audio kernel 6.8.11-edge Armbian v24.8.4 -> no hdmi audio kernel 6.11.0-edge Armbian v24.8.4 -> no hdmi audio kernel 6.1.63-current Armbian v23.11.1 -> hdmi audio OK still working on ..
-
haven got a reaction from serega404 in Rockchip Rk3318 X88 pro 10 - in progress
Working on CPU frequencies, the armbian image limit max cpu freq to 1.3 GHz.
Neverthless the box has been sold as 1.5Ghz, so I was asking myself why should I lose some calculation power.
After few serching around I found that the box can run stable at 1.4GHz with 1.35V voltage.
Using armbian-config, the dtc can be modifed:
opp-1200000000 { opp-hz = <0x00 0x47868c00>; opp-microvolt = <0x124f80>; clock-latency-ns = <0x9c40>; status = "okay"; }; opp-1296000000 { opp-hz = <0x00 0x4d3f6400>; opp-microvolt = <0x137478>; clock-latency-ns = <0x9c40>; status = "okay"; }; opp-1392000000 { opp-hz = <0x00 0x52f83c00>; opp-microvolt = <0x149970>; clock-latency-ns = <0x9c40>; status = "okay"; };
I also tested 1.5GHz but temperature raise wuickly when stressed (up to 90°C) and started to have some unstable unexpected behaviour, so I stick to 1392 MHz with good results.
-
haven got a reaction from Ben Voutour in CSC Armbian for RK3318/RK3328 TV box boards
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
See details here if interested:
-
haven got a reaction from suser in Rockchip Rk3318 X88 pro 10 - in progress
About OpenVFDService, had to study and understood that led cannot be triggerd without an userspace program with custom made functions.
https://github.com/arthur-liberman/linux_openvfd/blob/master/OpenVFDService.c
So decided to mod directly the OpenVFDService to include POWER, LAN and WIFI led.
My setup is:
POWER always on when the box is running LAN on when lan cable connected
The OpenVFDService source is attached, and hereunder a short explanation of the mod.
// display is controlled by just 7 words 0 -> lan, power, colon, wifi leds on/off 1 -> hour +1 2 -> hour 3 -> minute +1 4 -> minute 5 -> unused = 0 6 -> unused = 0 7 -> unused = 0 memset(wb,0x00, sz); // set all to 0 // byte 0 mapping wb[0] |= 0b01100000; // wifi wb[0] |= 0b00000100; // power wb[0] |= 0b00010000; // colon wb[0] |= 0b00001000; // lan // mod for time and colon wb[0] |= 0b00010000 & (data.colon_on << 4); // colon blink original function wb[1] = char_to_mask(data.time_date.hours/10); // hour+1 wb[2] = char_to_mask(data.time_date.hours%10); // hour wb[3] = char_to_mask(data.time_date.minutes/10); // minutes+1 wb[4] = char_to_mask(data.time_date.minutes%10); // minutes //write to display ret = write(openvfd_fd, wb, sz);
LAN connected was pretty straightforward:
// check ethernet char buf_eth[1]; int fd = open("/sys/class/net/eth0/carrier", O_RDONLY); if (fd < 0) { perror("Open /sys/class/net/eth0/carrier failed.\n"); return; } else{ // read from fd read(fd, buf_eth, 1); close(fd); } // set display LAN led if ( buf_eth[0]=='1' ){ wb[0] |= 0b00001000; // lan }
About Wifi led, my box do not use wifi, so decided to link this function the the IR remote receiver. Led on when a IR signal is received.
// create thread for LIRC dev listening in main ret = pthread_create(&lirc_id, NULL, lirc_thread_handler, &setup); //New thread - listen ot lirc device for IR signal void *lirc_thread_handler(void *arg) { lirc_loop(); pthread_exit(NULL); } // IR read loop and set flag void lirc_loop(){ char buf[8]; //printf("Start lirc wait signal:\n"); while(sync_data.isActive) { //printf("DEBUG new thread created!\n"); if ( !gotIRchar ){ // check lirc dev int fd = open("/dev/lirc0", O_RDONLY); if (fd < 0) { perror("Open /dev/lirc0 failed.\n"); return; } // read from fd read(fd, buf, sizeof(buf)); //printf("DEBUG read complete %i\r",sizeof(buf)); close(fd); if (buf[0] > 0){ //printf("Ir receive: %s\n",buf); gotIRchar = true; // set IR received FLAG } } } } // check flag and set display WIFI led if ( gotIRchar ){ wb[0] |= 0b01100000; // wifi gotIRchar = false; }
OpenVFDService.c
-
haven got a reaction from suser in Rockchip Rk3318 X88 pro 10 - in progress
Updated to kernel 6.6.2-edge-rockchip64
Need to recompile openvfd driver, had to modify openvfd_drv.c.
Patch attached.
patch linux_openvfd/driver/openvfd_drv.c < openvfd_drv.c.patch
openvfd_drv.c.patch
-
haven got a reaction from suser in Rockchip Rk3318 X88 pro 10 - in progress
No way to have kodi acceleration working yet.
In the meanwhile I have been studying the front LCD, which was black [SOLVED]
1. Install OpenVFD
#install kernel headers (skip if already installed) sudo apt-get install linux-headers-`uname -r` # download the sources: git clone https://github.com/arthur-liberman/linux_openvfd # change the directory cd linux_openvfd/driver # edit the Makefile # change the line KERNELDIR = ../../../ # to this: KERNELDIR = /lib/modules/$(shell uname -r)/build # create a symlink to correct System.map in this KERNELDIR - in my case: # /lib/modules/6.1.7-rockchip64/build/System.map -> /boot/System.map-6.1.7-rockchip64 # compile the driver (in openvfd/driver): make -j4 # install module sudo make modules_install # load module modprobe openvfd
2. Install OpenVFDService
cd linux_openvfd make -j4 OpenVFDService sudo cp OpenVFDService /usr/sbin/
3. Update dts using armbian-config
add at the end:
openvfd { compatible = "open,vfd"; dev_name = "openvfd"; status = "okay"; }; reboot and you will find new device-tree in /proc/device-tree/open-vfd
4. Create openvfd.service in /lib/systemd/system/openvfd.service
or download attached file
[Unit] Description=OpenVFD Service ConditionPathExists=/proc/device-tree/openvfd/ [Service] ExecStart=/bin/sh -c '[ `cat /proc/device-tree/openvfd/compatible` = "open,vfd" ] && /sbin/modprobe openvfd; /usr/sbin/OpenVFDService' ExecStop=/bin/kill -TERM $MAINPID ExecStopPost=-/usr/sbin/rmmod openvfd RemainAfterExit=yes [Install] WantedBy=basic.target
create VFD config in /etc/modprobe.d/openvfd.conf
options openvfd vfd_gpio_clk="4,0x13,0" options openvfd vfd_gpio_dat="4,0x16,0" options openvfd vfd_gpio_stb="4,0x12,0" options openvfd vfd_chars="4,0,1,2,3" options openvfd vfd_dot_bits="0,1,3,2,4,5,6" #ID Display type #0x03 A display like on the A95X R2 (or the Abox A1 Max). <-- #.2 Reserved - must be 0. #.3 flags #.4 0 - > FD628 and compatible controllers options openvfd vfd_display_type="0x03,0x00,0x00,0x00"
enable service and start (this will autoload the kernel module openvfd
sudo systemctl enable openvfd sudo systemctl start openvfd
After this the system clock will successfully show up on the front LCD
openvfd.service
-
haven got a reaction from suser in CSC Armbian for RK3318/RK3328 TV box boards
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
See details here if interested:
-
haven reacted to jock in Rockchip Rk3318 X88 pro 10 - in progress
Hello, first of all I would suggest you to avoid DietPI; there have been some circumstances were has been reported that credits were not due to the big work done here by armbian maintainers and taken without proper attribution.
This is sad to say, but until I hear the opposite, I woudl stay away and don't endorse such "distribution".
More about the hardware decoding and rk3318: legacy kernel is now completely deprecated and not suggested to be used at all. It is old and unmaintained code, plus standard linux tools won't work because it contains vendor-specific modules and paths.
You would rather stay stick to a regular armbian image with recent mainline kernel.
You could also advance to edge kernel (at the moment it is 6.6), but it is not necessary.
For the hardware decoding capabilities, I recently made an apt repository for both debian bookworm and ubuntu jammy that may be helpful to you:
That repository provides ffmpeg compiled with the right patches to work with hardware decoding, and the player of choice is mpv which is working pretty fine.
Unfortunately there is a bug for Mali 400/450 in mpv (or mesa) that causes the video to be pink-colored when played in X11 or wayland, but when run from virtual terminal is works fine though.
Also rockchip64 does not have yet the patch to enable hevc, something which I would like to fix soon