Harleyyyu Posted Friday at 04:42 PM Posted Friday at 04:42 PM Hello, I just created this account! I just want to ask if the newer OS / Firmware has VPU + MPP support? I've been trying to build OpenAuto for the RK3229 and the only issue im having is the lack of h264 decoding (i only need h264, but it would be nice to have a full support) I'm using the latest trixie (minimal) with somewhat of a success, except for a laggy video decoding due to again lack of h264. I can't seem to find an older build with a kernel of 4.4.xxx that probably has the full GPU support with VPU + MPP working. 0 Quote
jock Posted Saturday at 12:16 AM Author Posted Saturday at 12:16 AM @Harleyyyu See this thread; hardware video decoding works fine with mainline kernel and does not need vendor MPP. Debian Trixie although has a "broken" mpv that won't work, better stay with Bookworm 1 Quote
Harleyyyu Posted Saturday at 02:11 AM Posted Saturday at 02:11 AM @jock I'll try this, if it works i'll share the result of how OpenAuto Works on the RK3229. I might also release a build specifically for it. Thanks! 0 Quote
Harleyyyu Posted Saturday at 11:45 AM Posted Saturday at 11:45 AM (edited) Okay an update: Thank you @jock for the answer i've been looking for, I've managed to make use of the hardware acceleration (H.264) of my RK3229 on Android Auto (OpenAuto) but it's a complicated process i had to do. - I had to build my own aasdk and openauto from the git repository and test it as it is. running raw Open Auto showed the following issues: for openauto GUI it runs via linuxfb (trying to fix but still can't find a workaround) AndroidAuto stream decode was only running x264 (software decoding) [fixed tho] This has been fixed by doing a custom code for OpenAuto to utilize Kmssink (now works in 720p 30fps, going 60 adds a lot of latency but it's smooth!) Audio Not Working (i think can be fixed by pulse audio or just do direct hardware) [Patched: now uses RTAudio ALSA] Probably more since im only testing Audio Video as of right now. OpenAuto: RK3229 Armbian Github Repository if ever you want to try it! Edited Saturday at 06:34 PM by Harleyyyu 0 Quote
Dangrain Posted Saturday at 10:59 PM Posted Saturday at 10:59 PM Hey friends, I'm back. Well, good news. I got the box to boot from an SD card, specifically the 'Armbian_23.08.0-trunk_Rk322x-box_buster_edge_6.5.5_minimal.img' image, bad news I am not sure how to get it onto the eMCP and this is probably not the way you're supposed to boot armbian. I got the rk322x-box.dtb from the 'LibreELEC-RK322X.arm-11.0-nightly-20240218-d7324fb-rk322x.img' image (used by KanexMarcus in the comment here) and I had to add 'irqpoll' to extraargs in armbianEnv.txt, only after that did it boot. Ethernet works, wireless doesn't, using lsblk doesn't display the internal storage. Not sure what to do now, just figured I'd check in just to tell everyone what's going on and how I got it working. 0 Quote
Harleyyyu Posted Sunday at 02:38 AM Posted Sunday at 02:38 AM (edited) @Dangrain To flash in an eMCP board you can either use the Multiboot image or flash via rkdevtool in linux. eMCP is basically just emmc memory and ram packaged into one chip so the process is almost the same with emmc flash guide and Multiboot flash guide (sd card flash) PS: i have the same type of memory and almost manage to brick it (thankfully i managed to find the eMCP pads to force it to maskrom mode) Edited Sunday at 02:39 AM by Harleyyyu 0 Quote
Harleyyyu Posted Sunday at 02:50 AM Posted Sunday at 02:50 AM (edited) To anyone with and an mxq pro 4k v4.0 that has an eMCP memory module in it, If you ever you manage to soft brick your board to the point the maskrom button behind the AV port doesn't work here's the contact points for forcing it to enter maskrom mode. Note: After soldering to the pad indicated in the photo you can connect it to a 5V pad and do the same process and connect it to pc. Remove the connection once you detect that it entered maskrom mode (you might break the eMCP if you keep supplying 5V to it for a long time) Edited Sunday at 02:52 AM by Harleyyyu 1 Quote
Dangrain Posted Sunday at 11:22 AM Posted Sunday at 11:22 AM @HarleyyyuI don't have that exact model of board, mine's a ZQ01-V1.3 for which the unbricking pins are in a different place (but don't worry I figured it out). The issue I'm facing right now is that my frankenstein'd image is in pieces, pieces from two different OSes and Isn't in a single .img file so I'm not sure how to write it using multitool. Any help sure is appreciated. 0 Quote
jock Posted Sunday at 12:49 PM Author Posted Sunday at 12:49 PM @Dangrain There is a paragraph Partecipation and debugging with the suggested operations to let other people help you in a proper way and perhaps improve support for your board in the mainline armbian codebase. You may want to go your own way, but then helping will be much harder. 0 Quote
Harleyyyu Posted Monday at 11:36 AM Posted Monday at 11:36 AM @Dangrain for you to be able to flash your "frankenstein'd Image" you need to combine those pieces into one, I don't know how you will do that though. Tell me, What's the purpose of your img? like what are you trying to achieve? 0 Quote
Dangrain Posted Monday at 03:37 PM Posted Monday at 03:37 PM @HarleyyyuI just want to have a working OS on the eMCP instead of the SD, I've tried many pre built images already but none have worked even when messing with recommended overlays. Only after I've frankenstein'd It, did it work. That's the purpose. 0 Quote
Harleyyyu Posted Monday at 03:45 PM Posted Monday at 03:45 PM @Dangrain ohhh that makes sense now. If SD boot works, you can just clone the SD card into a raw .img. dd if=/dev/sdX of=working_sd.img bs=4M status=progress (assuming you use linux, ubuntu recommended. Also make sure to check your sdcard path) That image already contains the correct bootloader, partitions, and rootfs. Multitool should be able to flash it to eMCP directly. 0 Quote
Harleyyyu Posted Monday at 03:53 PM Posted Monday at 03:53 PM (edited) @jock your armbian build (Bookworm) plus my modified version of openauto works now, its done by using kmssink for drm overlay plane for video (Added to codebase) and RTAudio patched to use ALSA. Youtube: OpenAuto - RK322x Test run with Hardware Acceleration if you want to try it here's a prebuilt version of it, armhf compiled. Github: OpenAuto RK322x Armbian, openauto-rk322x-v1 i would love to make it run better on our hardware Edited yesterday at 02:09 AM by Harleyyyu 0 Quote
Dangrain Posted Monday at 04:04 PM Posted Monday at 04:04 PM (edited) @HarleyyyuAs I was typing that I tried another last-ditch kind of solution (because truly you shouldn't substitute device trees) and changed the armbianEnv.txt I added 'overlays=led-conf7' to the end of the file and added 'irqpoll' to the extraargs. I'm going to try huddling them all into a single .img and try to flash it to the onboard disk, thanks for your help, and wish me good luck. Edited Monday at 04:23 PM by Dangrain 1 Quote
Dangrain Posted Monday at 10:25 PM Posted Monday at 10:25 PM I'm back to check in again. Well I got all my files in a nice little .img, and it boots! I than burnt multitool onto my SD and tried to burn the .img onto the eMCP, multitool reports it's been burnt properly, after being plugged in again no boot starts. Any Idea what could be up? 0 Quote
Harleyyyu Posted yesterday at 12:36 AM Posted yesterday at 12:36 AM @Dangrain The problem might be from the U-Boot, I'm not sure though. It's hard to debug something that doesn't have logs to read 0 Quote
Harleyyyu Posted yesterday at 07:07 AM Posted yesterday at 07:07 AM (edited) is there any way to increase the gpu memory? as of right now it's just sitting at 16MiB, i want to set it at 128MiB. I tried doing cma=128M but after rebooting the device it kinda softbricked it. It does boot upto the tty screen but i can't login directly using usb keyboard or ssh. Edit: i was dumb, the reason it bricked it self was due to coherent_memory being set to 128M as well, cma is fine. Edited yesterday at 07:20 AM by Harleyyyu 0 Quote
Dangrain Posted yesterday at 09:45 AM Posted yesterday at 09:45 AM @HarleyyyuI'd provide logs If I could get logs but just nothing happens, the screen stays black and no LEDs on the board turn on either. I just followed the instructions from page 1. Any idea how I could attempt to at least diagnose what's up? 0 Quote
Harleyyyu Posted yesterday at 10:15 AM Posted yesterday at 10:15 AM (edited) @Dangrain If there’s no HDMI, no LEDs, and nothing at all after power-on, that usually means the SoC isn’t even loading u-boot from eMCP. In that state there are no logs to collect yet it’s failing before the kernel starts. Since the same image boots from SD, the issue is almost certainly bootloader placement or compatibility on eMCP, not the OS itself. boot using the sd-card first then try directly flashing the U-Boot to the EMCP and see if that makes it boot 🤷 dd if=u-boot.bin of=/dev/mmcblk1 bs=512 seek=64 sync (device/offset may vary by board) Edited yesterday at 10:16 AM by Harleyyyu 0 Quote
Harleyyyu Posted yesterday at 10:22 AM Posted yesterday at 10:22 AM I'm currently trying to build my own kernel for armbian bookworm, using this Github Linux-rockchip: linuxtv-rkdevc-hevc-v2 (6.16-rc1) Goal is to try and make hantro work with native mainline V4L2-Request-API to achieve zero-copy decoding and bypass the legacy Rockchip MPP. i just want to experiment the OS and the VPU it self at this point 2 Quote
fabiobassa Posted yesterday at 11:52 AM Posted yesterday at 11:52 AM @Harleyyyu great , let's follow for project and keep us updated , please 0 Quote
Dangrain Posted 20 hours ago Posted 20 hours ago Success! Thank you so much @Harleyyyu! It now boots perfectly off the eMCP. If anyone wants it I can write a small guide on how to do this, just to make this easier and faster for folks in the future. 1 Quote
Harleyyyu Posted 13 hours ago Posted 13 hours ago @Dangrain Glad to see its working now. please do a guide on it, not only will it help other people it will also help you how to do it again in-case you forgot how to do it haha! 0 Quote
Harleyyyu Posted 12 hours ago Posted 12 hours ago Progress update: I managed to boot 6.6.22 with applied hantro and rkdevc drivers in the kernel, I'm not sure if this was already discovered but i found something on the 6.6.22 kernel. Hantro and some Rockchip drivers are found in the Device Drivers -> Multimedia Support -> Media Platform Devices Rockchip Raster 2D Graphic Acceleration Unit Rockchip Image Signal Processing v1 Unit Rockchip Video Decoder (on 6.6.22 this can be found in staging drivers) Hantro VPU Driver Use Reference Frame Compression for HEVC Hantro VPU Rockchip support Hantro VPU Allwinner support Current issues: No Display working, but i got ssh working enough to tell me probably what's wrong with the kernel, Now I'm going to try and do the same but this time with the 6.16-rc1 patches found in Github: Kwiboo/linux-rockchip just to see if that would work also. 0 Quote
Harleyyyu Posted 12 hours ago Posted 12 hours ago (edited) Update 2: 6.16-rc1 works with issues.. Good news: It Loads and registers the rga, vpu [ 1.340230] rockchip-rga 20060000.rga: Registered rockchip-rga as /dev/video0 [ 1.345260] hantro-vpu 20020000.video-codec: registered rockchip,rk3399-vpu-enc as /dev/video2 [ 1.345656] hantro-vpu 20020000.video-codec: registered rockchip,rk3399-vpu-dec as /dev/video3 Issues: swap file is gone HDMI output not working probably more, not sure Spoiler i can't remove the spoiler 😐 Edited 12 hours ago by Harleyyyu 0 Quote
Harleyyyu Posted 10 hours ago Posted 10 hours ago So here's the weird thing, whenever i apply my user overlay it refuses to boot (red light stuck). But when i only run the build with the new kernel and stock dtb it works fine?? /dts-v1/; /plugin/; / { compatible = "rockchip,rk3229"; /* Wake up the Projector */ fragment@0 { target-path = "/vop@20050000"; __overlay__ { status = "okay"; }; }; /* Wake up the Cable Port */ fragment@1 { target-path = "/hdmi@200a0000"; __overlay__ { status = "okay"; }; }; /* Wake up the Display Guard */ fragment@2 { target-path = "/iommu@20053f00"; __overlay__ { status = "okay"; }; }; }; Does anyone have a clue why this is happening? 0 Quote
Harleyyyu Posted 8 hours ago Posted 8 hours ago Update 3: almost there! root@rk322x-box:~# dmesg | grep -i drm [ 6.738341] systemd[1]: Starting modprobe@drm.service - Load Kernel Module drm... [ 6.912602] systemd[1]: modprobe@drm.service: Deactivated successfully. [ 6.914174] systemd[1]: Finished modprobe@drm.service - Load Kernel Module drm. [ 11.565138] [drm] Initialized lima 1.1.0 for 20000000.gpu on minor 0 root@rk322x-box:~# dmesg | grep -i rockchip [ 0.068016] rockchip-gpio 11110000.gpio: probed /pinctrl/gpio@11110000 [ 0.069475] rockchip-gpio 11120000.gpio: probed /pinctrl/gpio@11120000 [ 0.070736] rockchip-gpio 11130000.gpio: probed /pinctrl/gpio@11130000 [ 0.071810] rockchip-gpio 11140000.gpio: probed /pinctrl/gpio@11140000 [ 1.330865] rockchip-rga 20060000.rga: HW Version: 0x04.01 [ 1.339866] rockchip-rga 20060000.rga: Registered rockchip-rga as /dev/video0 [ 1.360435] dwmmc_rockchip 30000000.mmc: IDMAC supports 32-bit address mode. [ 1.360814] dwmmc_rockchip 30010000.mmc: IDMAC supports 32-bit address mode. [ 1.361387] dwmmc_rockchip 30020000.mmc: IDMAC supports 32-bit address mode. [ 1.371466] dwmmc_rockchip 30000000.mmc: Using internal DMA controller. [ 1.371502] dwmmc_rockchip 30000000.mmc: Version ID is 270a [ 1.371594] dwmmc_rockchip 30000000.mmc: DW MMC controller at irq 49,32 bit host data width,256 deep fifo [ 1.372013] dwmmc_rockchip 30000000.mmc: Got CD GPIO [ 1.395186] dwmmc_rockchip 30010000.mmc: Using internal DMA controller. [ 1.395237] dwmmc_rockchip 30010000.mmc: Version ID is 270a [ 1.395356] dwmmc_rockchip 30010000.mmc: DW MMC controller at irq 50,32 bit host data width,256 deep fifo [ 1.395646] dwmmc_rockchip 30010000.mmc: allocated mmc-pwrseq [ 1.402395] dwmmc_rockchip 30020000.mmc: Using internal DMA controller. [ 1.402458] dwmmc_rockchip 30020000.mmc: Version ID is 270a [ 1.402603] dwmmc_rockchip 30020000.mmc: DW MMC controller at irq 51,32 bit host data width,256 deep fifo [ 11.719472] hantro-vpu 20020000.video-codec: registered rockchip,rk3399-vpu-enc as /dev/video2 [ 11.723548] hantro-vpu 20020000.video-codec: registered rockchip,rk3399-vpu-dec as /dev/video3 [ 25.632131] rk_gmac-dwmac 30200000.ethernet end0: PHY [stmmac-0:00] driver [Rockchip integrated EPHY] (irq=POLL) root@rk322x-box:~# dmesg | grep -i hdmi [ 0.055584] /vop@20050000: Fixed dependency cycle(s) with /hdmi@200a0000 [ 0.055722] /hdmi@200a0000: Fixed dependency cycle(s) with /vop@20050000 [ 22.293730] platform 200a0000.hdmi: deferred probe pending: (reason unknown) [ 22.293761] platform hdmi-sound: deferred probe pending: asoc-simple-card: parse error root@rk322x-box:~# ls -l /dev/dri total 0 drwxr-xr-x 2 root root 80 Jan 28 11:49 by-path crw-rw---- 1 root video 226, 0 Jan 28 11:49 card0 crw-rw---- 1 root render 226, 128 Jan 28 11:49 renderD128 0 Quote
jock Posted 1 hour ago Author Posted 1 hour ago Sorry @Harleyyyu, but me and @fabiobassa were a bit puzzled about your journey within the hardware video decoding. I recently tested the kernel 6.18 (but I am pretty sure it works fine also in kernel 6.12/6.6/6.1), but everything was already in place even with zero-copy DMA buffers, using the LibreELEC patches which are already compiled in the mainline kernel shipped with armbian for years right now. Then there is also this apt repository I brought up few months ago with ffmpeg already patched and some instructions to run mpv with hardware decoding, which so far works for me either in virtual terminal and wayland (although sometimes with some glitches). Just to let you know, because it looks like hardware video decoding, HDMI and GPU things are unsupported, but actually everything works fine. 0 Quote
Recommended Posts
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.