haven Posted November 27 Author Posted November 27 (edited) Just in case you want to build your own kernel and choose a specific version (es 23.11): git clone --depth=1 --branch=v23.11 https://github.com/armbian/build Choose edge or current ./compile.sh kernel BOARD=rk3318-box EXPERT="yes" INSTALL_HEADERS=yes RELEASE=jammy BRANCH=edge Optional you can choose specific kernel version using KERNELBRANCH: ./compile.sh kernel BOARD=rk3318-box EXPERT="yes" INSTALL_HEADERS=yes RELEASE=jammy BRANCH=edge KERNELBRANCH="tag:v6.6.2" Compile is quite fast (few minutes). In folder you will find the deb pckgs to be installed: ls output/debs/ linux-dtb-edge-rockchip64_23.11.0-trunk_arm64__6.6.2-Sa06c-Df461-P65a8-C40f3Hfe66-HK01ba-Vc222-B1743-R448a.deb linux-headers-edge-rockchip64_23.11.0-trunk_arm64__6.6.2-Sa06c-Df461-P65a8-C40f3Hfe66-HK01ba-Vc222-B1743-R448a.deb linux-image-edge-rockchip64_23.11.0-trunk_arm64__6.6.2-Sa06c-Df461-P65a8-C40f3Hfe66-HK01ba-Vc222-B1743-R448a.deb Install all and reboot: sudo dpkg -i * Optional - compile u-boot: ./compile.sh uboot BOARD=rk3318-box EXPERT="yes" BRANCH=edge Edited November 27 by haven 0 Quote
haven Posted November 29 Author Posted November 29 In the last few weeks I had problems with HDMI audio. See details here: 0 Quote
haven Posted November 29 Author Posted November 29 The HDMI audio problem was a great opportunity to study how HDMI is detected and handled in rk3318 box! Initially I supposed it was a kernel problem and tried with many kernel version 6.1.63 - 6.2 - 6.6.2 - 6.6.39 - 6.6.47 - 6.6.60 (current or edge no matters), with poor results. Then discovered If I boot with HDMI cable disconnected and connect the cable after BOOT (15s after power-up) -> HDMI sound ok This pointed me towards the investigation of the boot process: if HDMI is connected after the u-boot process, it works like charm! How to disable HDMI detection in u-boot config? Get armbian sources and tools: git clone --depth=1 --branch=v23.11 https://github.com/armbian/build I used branch 23.11 to match kernel 6.6.2 Turned out that U-boot config can be changed only with a patch. ./compile.sh uboot-patch BOARD=rk3318-box BRANCH=edge Attached the patch I created for include/configs/evb_rk3328.h to dIsable video output in u-boot and use only console. u-boot-rockchip64-edge.patch +#define ROCKCHIP_DEVICE_SETTINGS \ + "stdin=serial,usbkbd\0" \ + "stdout=serial,vidconsole\0" \ + "stderr=serial,vidconsole\0" + Placed the patch in: build/patch/u-boot/u-boot-rockchip64 Then rebuild u-boot only: ./compile.sh uboot ARTIFACT_IGNORE_CACHE=yes BOARD=rk3318-box BRANCH=edge During the process you will see which patches are applied, hopefully without any error. This will create a deb package in build/output/debs: linux-u-boot-rk3318-box-edge_23.11.0-trunk_arm64__2022.07-Se092-P44dd-H8c72-Ve9d0-B1179-R448a.deb Install with dpkg: sudo dpkg -i linux-u-boot-rk3318-box-edge_23.11.0-trunk_arm64__2022.07-Se092-P44dd-H8c72-Ve9d0-B1179-R448a.deb This will create 2 files: ls /usr/lib/linux-u-boot-edge-rk3318-box/ idbloader.img u-boot.itb Last step - need to flash the new u-boot into boot partition ( /dev/mmcblk0 ) sudo dd if=idbloader.img of=/dev/mmcblk0 seek=64 conv=notrunc sudo dd if=u-boot.itb of=/dev/mmcblk0 seek=16384 conv=notrunc Done! Reboot and I see a black screen during u-boot. Soon after the kernel is loaded, HDMI is activated and works properly, both video and audio. u-boot-rockchip64-edge.patch 0 Quote
haven Posted November 30 Author Posted November 30 Modified instruction for H96 Max rk3318, with armbian installed to internal emmc (/dev/mmcblk2) kernel 6.60 current git clone --depth=1 --branch=main https://github.com/armbian/build Create patch: ./compile.sh uboot-patch BOARD=rk3318-box BRANCH=current During patch process, modify config: cd build/cache/sources/u-boot-worktree/u-boot/v2024.07/configs sudo nano rk3318-box_defconfig CONFIG_VIDEO=n After creation, move patch: mv build/output/patch/u-boot-rockchip64-current.patch build/patch/u-boot/v2024.07/ Compile u-boot: ./compile.sh uboot ARTIFACT_IGNORE_CACHE=yes BOARD=rk3318-box BRANCH=current Install with dpkg: cd output/debs sudo dpkg -i linux-u-boot-rk3318-box-current_24.11.0-trunk_arm64__2024.07-S3f77-P1c9c-H4674-Vfe58-Bda0a-R448a.deb Flash uboot to boot partition: cd /usr/lib/linux-u-boot-current-rk3318-box/ sudo dd if=idbloader.img of=/dev/mmcblk2 seek=64 conv=notrunc sudo dd if=u-boot.itb of=/dev/mmcblk2 seek=16384 conv=notrunc Done! Reboot and I see a black screen during u-boot. 0 Quote
jock Posted December 1 Posted December 1 @haven did you just try a different TV/monitor to see if the missing audio persists? In my case I tested and checked I have HDMI audio working even with u-boot video output enabled. 0 Quote
haven Posted December 22 Author Posted December 22 yes, tried different tv/monitor always with the same problem, solved by disabling video driver in u-boot. 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.