Deoptim Posted April 22 Posted April 22 (edited) Armbian 24.5.0 Bookworm images (linux-6.1/linux-6.6) for TVBoxes: Vontar KK MAX / HK1 RBOX R2 / HK1 RBOX R3 (the same dts/dtb should work for these TVBoxes) Here is a dts and dtb files, working reworked for mainline: hk1-rbox-r3-profile-kernel-6.1-6.6.zip (original dts and dtb from TVBox rk-kernel-orig.zip) Checked the following: HDMI - works (need to check hot plugging) HDMI sound - works USB 2.0 - works USB 3.0 - works SPDIF - should work (I cannot to check) SD-Card booting and detection - works eMMC install on it (/sbin/nand-sata-install) and detection - works RKDevTool installing and loading images on/from eMMC - works GPU (bugs/frizzes on mainline are not canceled) - works Hardware video acceleration(except for browsers) - works Dualboot if you flash new bootloader (SD-Card boot high priority) - works Here are the compiled Armbian images (Bookworm only) with integrated dtb: https://www.mediafire.com/file/4dwf7ce922x7obq/Armbian-unofficial_24.5.0-trunk_Hk1-rbox-r3_bookworm_current_6.1.87_cinnamon_desktop.img.xz/file https://www.mediafire.com/file/fjwtxb5gjzip341/Armbian-unofficial_24.5.0-trunk_Hk1-rbox-r3_bookworm_current_6.1.87_minimal.img.xz/file https://www.mediafire.com/file/iuz4uijgjh5ry1r/Armbian-unofficial_24.5.0-trunk_Hk1-rbox-r3_bookworm_current_6.6.28_cinnamon_desktop.img.xz/file https://www.mediafire.com/file/kofyqabr5k6qxm8/Armbian-unofficial_24.5.0-trunk_Hk1-rbox-r3_bookworm_current_6.6.28_minimal.img.xz/file The one of this box itself is HK1 RBOX R3, the photo shows the pins for short to go to the Maskrom bootloader and UART pins: Скрытый текст A working bootloader(supports dualboot) on this hardware for RKDevTool tool just in case: Loader.zip Скрытый текст Please note that RKDevTool flashing utility only needs to flash the .img file with the bootloader, i.e. you need to unpack the .xz archive somewhere first (for ex. you can use 7-zip). -- Recommendations for installation on eMMC Скрытый текст It is NOT recommended to install these images using RKDevTool utility on eMMC memory card because ext4 file system is not optimized for eMMC memory lifetime. It is recommended to install the image on SD-card and boot from it, then configure the system according to your wishes and install it on eMMC using the script "sudo /sbin/nand-sata-install" built into Armbian using the F2FS file system for eMMC - this will extend the life of this memory many times. 1. Booting from SD-card and after configuring Armbian you need to install the f2fs-tools dependency: sudo apt update && sudo apt install f2fs-tools 2. Run the script: sudo /sbin/nand-sata-install Alternatively, you can pre-compile an F2FS image for SD-Card and eMMC and immediately burn such an image with RKDevTool. Just add these parameters during compilation: ./compile.sh ROOTFS_TYPE=f2fs FIXED_IMAGE_SIZE=31744 PACKAGE_LIST_BOARD="f2fs-tools" (Where you should use a fixed image size for F2FS - here I have chosen 31GB (+ boot partition about 250MB by default) for eMMC 32GB. Keep in mind that the image must fit on the your disk where Armbian is compiled and after installing such image on eMMC you will not be able to change its size on booted TVBox only via external SD-Card OS or etc.... See how big your eMMC is and set your value to -1GB.) ---------------------------------------------------- For those who want to build Armbian themselves, here are the instructions: Скрытый текст 1. Basic instruction https://docs.armbian.com/Developer-Guide_Build-Preparation/ 2. Before execute "./compile.sh" - copy the contents of the archive "hk1-rbox-r3-profile-kernel-6.1-6.6.zip" into next folders: build\config\boards\hk1-rbox-r3.tvb build\packages\blobs\hk1-rbox-r3\rk3566-hk1-rbox-r3.dtb (where the build folder is our cloned Armbian repository and accordingly a new hk1-rbox-r3 folder should be created on the second path). 3. Before compilation, in the file hk1-rbox-r3.tvb we can edit the following: If we use the BOARDFAMILY variable "media": BOARDFAMILY="media" Then when we execute "./compile.sh" and selecting our profile in the expert menu - the kernel 6.1 will build like a building block - and not compiled, it will take about tens of minutes, it will be built from precompiled distributions with the insertion of our dtb profile and only. If we use instead of "media" the BOARDFAMILY variable "rockchip64": BOARDFAMILY="rockchip64" Its will already compile kernel 6.6 (on this date of publication) - it will take hours. If you uncomment the variable: SRC_CMDLINE="earlycon=uart8250,mmio32,0xfe660000" The UART will display the kernel booting - useful for debugging. UPD: Added to images "f2fs-tools" package, added loader to support dualboot without touching the original Android(or other OS) image on eMMC - priority is given to SD-Card. Boot will be from SD-Card if there is on boot partition exist folder and file \boot.scr or extlinux\extlinux.conf - uboot(both: original Android and compiled for Armbian) searches for this path and file if it found this file, it will load from device which contains this file. mmc1(SD-Card) - first, mmc0(eMMC) - second. For correct priority loading it is necessary to replace the main bootloader which is in the archive Loader.zip - if you have an Android it is enough to flash only this bootloader as Loader at 0x0 offset using RKDevTool utility, the rest of the eMMC part should not be touched if the OS and settings we need are there. U-boot on eMMC must be original or Armbian and preinstalled at offset 0x4000. Instructions: Скрытый текст 1. Unplug power of TVBox and any SD-card 2. Press the reset(upgrade) button on the box with a paper clip and same time plug USB-A-USB-A(Male-to-Male) to USB 2.0 of TVBox Then sequentially: (remember, uboot must be on eMMC (even the original Android or Armbian, i.e. if you erase the eMMC - the boot will not work) and this is relevant if you have installed the original MiniLoaderAll.bin, which does not support booting from SD-Card, but only from eMMC. Some TVBoxes may already have a bootloader that supports SD-card booting.). Feel free to test... Edited April 23 by Deoptim added dualboot images and info about it 1 Quote
Energokom Posted May 4 Posted May 4 On 4/22/2024 at 3:42 PM, Deoptim said: For correct priority loading it is necessary to replace the main bootloader which is in the archive Loader.zip Hi. Can you buid a loader c with rk3566_ddr_1056MHz_v1.21.bin https://github.com/rockchip-linux/rkbin/blob/master/bin/rk35/rk3566_ddr_1056MHz_v1.21.bin or tell me how to do it. Thanks! 0 Quote
Hqnicolas Posted May 16 Posted May 16 (edited) On 5/4/2024 at 3:17 AM, Energokom said: Can you buid a loader c with rk3566_ddr_1056MHz_v1.21.bin @Energokom to build your DDR_1056mhz ADD This lines to the botom of the file Armbian: build/config/board/yourboardname.conf # Newer blobs. Tested to work with 1056MHz DDR_BLOB="rk35/rk3566_ddr_1056MHz_v1.18.bin" BL31_BLOB="rk35/rk3568_bl31_v1.43.elf" # NOT a typo, bl31 is shared across 68 and 66 ROCKUSB_BLOB="rk35/rk3566_spl_loader_1.14.bin" # For `EXT=rkdevflash` flashing Edited May 16 by Hqnicolas 0 Quote
Energokom Posted May 19 Posted May 19 (edited) On 5/16/2024 at 5:19 PM, Hqnicolas said: # Newer blobs. Tested to work with 1056MHz DDR_BLOB="rk35/rk3566_ddr_1056MHz_v1.18.bin" BL31_BLOB="rk35/rk3568_bl31_v1.43.elf" # NOT a typo, bl31 is shared across 68 and 66 ROCKUSB_BLOB="rk35/rk3566_spl_loader_1.14.bin" # For `EXT=rkdevflash` flashing Unfortunately, it didn't work. I want to build u-boot 2024 (since the old u-boot 2019 is being used now). But it doesn't work out for me. I can't change defconf, since ./compile.sh CREATE_PATCHES="yes", doesn't work now. I try CREATE_PATCHES (uboot-patch) but I don't get a pause to make changes. I used to use CREATE_PATCHES=yes and everything worked, now I can't build u-boot with my settings. You need more detailed instructions in the description of build options Edited May 19 by Energokom 0 Quote
Hqnicolas Posted May 19 Posted May 19 3 hours ago, Energokom said: I want to build u-boot 2024 (since the old u-boot 2019 is being used now). find a board with u-boot 2024 and rebase your board config file I use OrangePi3B as a base config Quote # Rockchip RK3566 quad core 4/8GB RAM SoC WIFI/BT eMMC USB2 USB3 NVMe PCIe GbE HDMI SPI BOARD_NAME="orangepi3b" BOARDFAMILY="rk35xx" BOARD_MAINTAINER="" BOOTCONFIG="orangepi-3b-rk3566_defconfig" BOOT_SOC="rk3566" KERNEL_TARGET="legacy,vendor,edge" FULL_DESKTOP="yes" BOOT_LOGO="desktop" BOOT_FDT_FILE="rockchip/rk3566-orangepi-3b.dtb" IMAGE_PARTITION_TABLE="gpt" BOOT_SCENARIO="spl-blobs" BOOT_SUPPORT_SPI="yes" BOOT_SPI_RKSPI_LOADER="yes" MODULES="sprdbt_tty sprdwl_ng" MODULES_BLACKLIST_LEGACY="bcmdhd" # Newer blobs. Tested to work with opi3b DDR_BLOB="rk35/rk3566_ddr_1056MHz_v1.18.bin" BL31_BLOB="rk35/rk3568_bl31_v1.43.elf" # NOT a typo, bl31 is shared across 68 and 66 ROCKUSB_BLOB="rk35/rk3566_spl_loader_1.14.bin" # For `EXT=rkdevflash` flashing # Override family config for this board; let's avoid conditionals in family config. function post_family_config__orangepi3b_use_mainline_uboot() { display_alert "$BOARD" "mainline (Kwiboo's tree) u-boot overrides" "info" BOOTSOURCE="https://github.com/Kwiboo/u-boot-rockchip.git" BOOTBRANCH="branch:rk3xxx-2024.04" # specific commit tested is commit:ccef7dfc453bc03c5b5c61fa67d2745b96fa7da6 BOOTPATCHDIR="v2024.04-orangepi3b" # empty, patches are already in Kwiboo's branch:rk3xxx-2024.04 BOOTDIR="u-boot-${BOARD}" # do not share u-boot directory BOOTDELAY=1 # Wait for UART interrupt to enter UMS/RockUSB mode etc UBOOT_TARGET_MAP="BL31=${RKBIN_DIR}/${BL31_BLOB} ROCKCHIP_TPL=${RKBIN_DIR}/${DDR_BLOB};;u-boot-rockchip.bin u-boot-rockchip-spi.bin u-boot.itb idbloader.img idbloader-spi.img" unset uboot_custom_postprocess write_uboot_platform write_uboot_platform_mtd # disable stuff from rockchip64_common; we're using binman here which does all the work already # Just use the binman-provided u-boot-rockchip.bin, which is ready-to-go function write_uboot_platform() { dd if=${1}/u-boot-rockchip.bin of=${2} bs=32k seek=1 conv=fsync } # Smarter/faster/better to-spi writer using flashcp (hopefully with --partition), using the binman-provided 'u-boot-rockchip-spi.bin' function write_uboot_platform_mtd() { declare -a extra_opts_flashcp=("--verbose") if flashcp -h | grep -q -e '--partition'; then echo "Confirmed flashcp supports --partition -- read and write only changed blocks." >&2 extra_opts_flashcp+=("--partition") else echo "flashcp does not support --partition, will write full SPI flash blocks." >&2 fi flashcp "${extra_opts_flashcp[@]}" "${1}/u-boot-rockchip-spi.bin" /dev/mtd0 } } function post_family_tweaks_bsp__orangepi3b() { display_alert "$BOARD" "Installing sprd-bluetooth.service" "info" # Bluetooth on orangepi3b board is handled by a Spreadtrum (sprd) chip and requires # a custom hciattach_opi binary, plus a systemd service to run it at boot time install -m 755 $SRC/packages/bsp/rk3399/hciattach_opi $destination/usr/bin cp $SRC/packages/bsp/rk3399/sprd-bluetooth.service $destination/lib/systemd/system/ return 0 } function post_family_tweaks__orangepi3b_enable_services() { display_alert "$BOARD" "Enabling sprd-bluetooth.service" "info" chroot_sdcard systemctl enable sprd-bluetooth.service return 0 } 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.