lanefu changed the topic of #armbian-rockchip to: Armbian - Linux for ARM development boards | Rockchip SoC | www.armbian.com | This channel is relayed to the equivalent Discord channel | this channel is logged
DC-IRC has quit [Remote host closed the connection]
DC-IRC has joined #armbian-rockchip
<DC-IRC> <djhardrich> I’m trying to get armbian to build for the OrangePi CM4, made a .csc based on the Opi3b (same cpu, different dts) by making a fork of the uboot repo used for the 3b csc file (removed the reference to a specific commit) with the cm4 dts added to the repo… CM4 dts/uboot dts are available here, if anyone wants to help me figure this out I have a board here to test, just not used <clipped message>
<DC-IRC> <djhardrich> to adding boards to Armbian and am probably missing something obvious: https://github.com/orangepi-xunlong/u-boot-orangepi/commit/c055b322adfadfd3c37482b944b869a78132465b
<DC-IRC> <djhardrich> I’m trying to get armbian to build for the OrangePi CM4, made a .csc based on the Opi3b (same cpu, different dts) by making a fork of the uboot repo used for the 3b csc file (removed the reference to a specific commit) with the cm4 dts added to the repo… CM4 dts/uboot dts are available here, if anyone wants to help me figure this out I have a board here to test, just not used <clipped message>
<DC-IRC> <djhardrich> to adding boards to Armbian and am probably missing something obvious (I’ve built csc images for other boards etc, just never ported a new one): https://github.com/orangepi-xunlong/u-boot-orangepi/commit/c055b322adfadfd3c37482b944b869a78132465b
<DC-IRC> <big_nass> Can anyone help me out for a working setup for HDMI input using GStreamer or V4l2? For the life of me across many images (official & not) get both Rock5b or OP5+ to have smooth functional HDMI in on any linux distros. I've searched and tried everything i can find yet still cannot get it.
<DC-IRC> <big_nass> Anyone have a working setup or image with details of what base image and installed extras make up a nice functional setup for HDMI in?
<DC-IRC> <big_nass> @amazingfate's repo has had many things that have made the general functionality so much better but the rockchip-multimedia-config doesn't seem so far to change much, commands using the rga accelerator just show the timer stuck on 0 with no window output.
<DC-IRC> <amazingfate> ```
<DC-IRC> <amazingfate> #!/bin/bash
<DC-IRC> <amazingfate> gst-launch-1.0 -e pulsesrc device=alsa_input.platform-hdmiin-sound.stereo-fallback ! audioconvert ! audioresample ! queue ! pulsesink device=$(pactl get-default-sink) &
<DC-IRC> <amazingfate> v4l2_pixel_fmt=$(v4l2-ctl --get-fmt-video|grep Pixel|awk '{print $4}')
<DC-IRC> <amazingfate> if [ "$v4l2_pixel_fmt" == "'BGR3'" ];then
<DC-IRC> <amazingfate> echo "pixel format is $v4l2_pixel_fmt, going to use waylandsink"
<DC-IRC> <amazingfate> GST_VIDEO_CONVERT_USE_RGA=1 gst-launch-1.0 -e v4l2src device=/dev/video0 ! videoconvert ! waylandsink
<DC-IRC> <amazingfate> elif [ "$v4l2_pixel_fmt" == "'NV12'" ];then
<DC-IRC> <amazingfate> echo "pixel format is $v4l2_pixel_fmt, going to use glimagesink"
<DC-IRC> <amazingfate> GST_GL_API=gles2 GST_GL_PLATFORM=egl gst-launch-1.0 -e v4l2src device=/dev/video0 ! glimagesink
<DC-IRC> <amazingfate> fi
<DC-IRC> <amazingfate> ```
<DC-IRC> <amazingfate> Or in tty:
<DC-IRC> <amazingfate> `gst-launch-1.0 -e v4l2src device=/dev/video0 ! kmssink plane-id=71`
<DC-IRC> <big_nass> Ok sweet ill give that a go, I am currently installing your repos stuff on a fresh armbian 23.01.2 jammy gnome dt image, so once the packages install i will run the script and let you know hoe it goes
<DC-IRC> <efectn> @rpardini do you plan to bump rk3588-edge to 6.6 or waiting for 6.7-rc.1
<DC-IRC> <efectn> @rpardini do you plan to bump rk3588-edge to 6.6 or waiting for 6.7-rc.1?
<DC-IRC> <rpardini> I've commits borrowing from Spooky's tree for 6.6, but don't think I will send them. I don't have many of the supported boards, and it seems everyone is more interested in 6.7.
<DC-IRC> <efectn> Yeah we will have less patches if we use 6.7
<DC-IRC> <djhardrich> Here's my (broken) board config file for the Opi CM4; it builds 6.6-edge images but doesn't boot, I probably messed up the UBOOT_TARGET_MAP... Note that the Opi CM4 doesn't ship with SPI flash populated, tagging @rpardini / @amazingfate because they both have *way* more 3566/3568-related knowledge than I do (and apologies in advance if I bother anyone by doing so): https://pastebin.com/CLgra6SP
<DC-IRC> <djhardrich> Here's my (broken) board config file for the Opi CM4; it builds edge images but doesn't boot, I probably messed up the UBOOT_TARGET_MAP... Note that the Opi CM4 doesn't ship with SPI flash populated, tagging @rpardini / @amazingfate because they both have *way* more 3566/3568-related knowledge than I do (and apologies in advance if I bother anyone by doing so): https://pastebin.com/CLgra6SP
<DC-IRC> <rpardini> Yoo.... kernel first, where is `rk3566-orangepi-cm4` DT?
<DC-IRC> <rpardini> Then u-boot, you're mixing mainline (binman) and vendor (2017.09) stuff, it probably won't boot
<DC-IRC> <rpardini> @djhardrich actually... take a look at the board file from back when we were using vendor u-boot. https://github.com/armbian/build/blob/71f03ee3805d019d582cce7dbc0a34e0a703fb95/config/boards/orangepi3b.csc
<DC-IRC> <amazingfate> I guess it can use mainline uboot of opo3b.
<DC-IRC> <amazingfate> I guess it can use mainline uboot of opi3b.
<DC-IRC> <djhardrich> @amazingfate that's where I started, but couldn't get a fork of the repo used in the 3b csc where I manually added the cm4 dts/edited makefile to include the cm4 dtb to compile
<DC-IRC> <djhardrich> hence the ugly vendor uboot hacks
<DC-IRC> <djhardrich> it *should* be extremely similar to the 3b (I have one of those here as well and have been building/using armbian images for it without issue)
<DC-IRC> <rpardini> yeah but you can't mix vendor uboot code with binman-oriented UBOOT_TARGET_MAP's
<DC-IRC> <djhardrich> it *should* be extremely similar to the 3b but with the cm4 dts (I have one of those here as well and have been building/using armbian images for it without issue)
<DC-IRC> <djhardrich> ahh..... this is my first attempt at an armbian board port
<DC-IRC> <rpardini> n/p, I'd say try with the simple vendor version first, get it booting, fix the kernel DT until it works, then use the kernel DT as base for u-boot DT
<DC-IRC> <djhardrich> noted, saw the older 3b csc you linked to; making edits and trying another build, thanks!
<DC-IRC> <djhardrich> noted, saw the older 3b csc you linked to; making edits and trying another minimal build, thanks!
<DC-IRC> <djhardrich> Sorry, glossed over your first question; DT is here in case you want to look at it/add it to the `u-boot-rockchip` repo: https://github.com/orangepi-xunlong/u-boot-orangepi/blob/c055b322adfadfd3c37482b944b869a78132465b/arch/arm/dts/rk3566-orangepi-cm4.dts
<DC-IRC> <rpardini> That's the _vendor_ (rockchip vendor) DT for u-boot.
<DC-IRC> <rpardini> I suggest you start with the vendor uboot, get it booting, use the vendor kernel (rk35xx `legacy`), send a PR to armbian/linux-rockchip to add vendor cm4 DT there.
<DC-IRC> <rpardini> Once that works, work on armbian/build's rockchip64-edge (mainline 6.6.y) DT, shouldn't be too hard based on the opi3b, add the `edge` target for mainline kernel.
<DC-IRC> <rpardini> When all that works, we can think about the mainline u-boot....
<DC-IRC> <djhardrich> Noted; built a minimal bookworm image with vendor uboot + legacy kernel and it didn't seem to boot; grabbing uart cable to see if I can see -anything-, also building/writing more images using vendor uboot+legacy kernel like the old 3b csc file, will report back if I get anything to boot
<DC-IRC> <djhardrich> aaaaaand on a whim I flashed the opi3b 6.5 bookworm gnome image to an sd; booted to desktop, wireless and bt also working
<DC-IRC> <djhardrich> aaaaaand on a whim I flashed the opi3b 6.5 bookworm gnome image to an sd; booted to desktop, wireless and bt also working.. Will continue to look at vendor dts and try to get legacy kernel to work/make a PR, etc.... -Thank you both- for the pointers in the right direction
<DC-IRC> <rpardini> Yeah, I bet you haven't added the DT to the vendor kernel yet, so it will fail to boot. Get UART logs 👍
<DC-IRC> <djhardrich> Last (probably dumb) question: is there a preferred place to locally edit my armbian build environment (or cm4 csc file) to use a fork of `linux-rockchip` so I can test/build my changes (adding the vendor dts+vendor defconfig) and have the vendor dts compile during the image build process? That way I can make sure everything works before making a PR to `linux-rockchip`?
<DC-IRC> <amazingfate> `git format-patch` to generate your commits to patches, and put patches to patch/kernel/rk35xx-legacy
<DC-IRC> <rpardini> If you wanna avoid `.patch` files: what I do is use a config file (`userpatches/config-xxx.conf`, then build with `./compile xxx BOARD=...`). In the config file, you add a hook that changes the git references to the kernel. Example:
<DC-IRC> <rpardini> ```bash
<DC-IRC> <rpardini> function user_config__use_my_fork_for_rk_legacy_kernel() {
<DC-IRC> <rpardini> if [[ "${KERNELSOURCE}" == 'https://github.com/armbian/linux-rockchip.git' ]]; then
<DC-IRC> <rpardini> declare -g KERNELSOURCE="https://github.com/someone/armbian-linux-rockchip.git"
<DC-IRC> <rpardini> declare -g KERNELBRANCH='branch:add-some-board'
<DC-IRC> <rpardini> display_alert "Using my own fork of linux-rockchip for rk3588" "${KERNELBRANCH} :: ttl ${KERNEL_GIT_CACHE_TTL}" "warn"
<DC-IRC> <rpardini> fi
<DC-IRC> <rpardini> return 0
<DC-IRC> <rpardini> }
<DC-IRC> <rpardini> ```
<DC-IRC> <djhardrich> Wow, thank you both, this is exactly what I needed, have been trying to figure this out for a couple days 🤣
<DC-IRC> <djhardrich> I’m going to get a little rest, get this working, and make my first PR!
<DC-IRC> <djhardrich> Wow, thank you both, this is exactly what I needed, have been trying to figure this out for a couple days 🤣
<DC-IRC> <djhardrich> I’m going to get a little rest, get this working, and make my first Armbian PR!
<DC-IRC> <medullaoblongata_10> How does one get proton tkg working on debian
<DC-IRC> <infinity_q> idk, probably how you install it normally. but this is not the place to ask questions like these.