|
| 1 | +# Rockchip RK3588S octa core 4/8/16GB RAM SoC NVMe USB3 USB-C GbE |
| 2 | +BOARD_NAME="Retro Lite CM5" |
| 3 | +BOARDFAMILY="rockchip-rk3588" |
| 4 | +BOARD_MAINTAINER="ginkage" |
| 5 | +BOOT_SOC="rk3588" |
| 6 | +KERNEL_TARGET="vendor" |
| 7 | +FULL_DESKTOP="yes" |
| 8 | +BOOT_LOGO="desktop" |
| 9 | +BOOT_FDT_FILE="rockchip/rk3588s-retro-lite-cm5.dtb" |
| 10 | +BOOT_SCENARIO="spl-blobs" |
| 11 | +IMAGE_PARTITION_TABLE="gpt" |
| 12 | +DDR_BLOB="rk35/rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.16.bin" |
| 13 | +BL31_BLOB="rk35/rk3588_bl31_v1.45.elf" |
| 14 | + |
| 15 | +function post_family_tweaks__retrolitecm5_naming_audios() { |
| 16 | + display_alert "$BOARD" "Renaming Retro Lite CM5 audios" "info" |
| 17 | + |
| 18 | + mkdir -p $SDCARD/etc/udev/rules.d/ |
| 19 | + echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-hdmi0-sound", ENV{SOUND_DESCRIPTION}="HDMI0 Audio"' > $SDCARD/etc/udev/rules.d/90-naming-audios.rules |
| 20 | + echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-dp0-sound", ENV{SOUND_DESCRIPTION}="DP0 Audio"' >> $SDCARD/etc/udev/rules.d/90-naming-audios.rules |
| 21 | + echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-wm8960-sound", ENV{SOUND_DESCRIPTION}="WM8960 Audio"' >> $SDCARD/etc/udev/rules.d/90-naming-audios.rules |
| 22 | + |
| 23 | + return 0 |
| 24 | +} |
| 25 | + |
| 26 | +# Mainline U-Boot |
| 27 | +function post_family_config__retro_lite_cm5_use_mainline_uboot() { |
| 28 | + display_alert "$BOARD" "Using mainline U-Boot for $BOARD / $BRANCH" "info" |
| 29 | + |
| 30 | + declare -g BOOTCONFIG="generic-rk3588_defconfig" # Use generic defconfig which should boot all RK3588 boards |
| 31 | + declare -g BOOTDELAY=1 # Wait for UART interrupt to enter UMS/RockUSB mode etc |
| 32 | + declare -g BOOTSOURCE="https://github.com/u-boot/u-boot.git" # We ❤️ Mainline U-Boot |
| 33 | + declare -g BOOTBRANCH="tag:v2024.07-rc4" |
| 34 | + declare -g BOOTPATCHDIR="v2024.07/board_${BOARD}" |
| 35 | + # Don't set BOOTDIR, allow shared U-Boot source directory for disk space efficiency |
| 36 | + |
| 37 | + declare -g UBOOT_TARGET_MAP="BL31=${RKBIN_DIR}/${BL31_BLOB} ROCKCHIP_TPL=${RKBIN_DIR}/${DDR_BLOB};;u-boot-rockchip.bin" |
| 38 | + |
| 39 | + # Disable stuff from rockchip64_common; we're using binman here which does all the work already |
| 40 | + unset uboot_custom_postprocess write_uboot_platform write_uboot_platform_mtd |
| 41 | + |
| 42 | + # Just use the binman-provided u-boot-rockchip.bin, which is ready-to-go |
| 43 | + function write_uboot_platform() { |
| 44 | + dd "if=$1/u-boot-rockchip.bin" "of=$2" bs=32k seek=1 conv=notrunc status=none |
| 45 | + } |
| 46 | +} |
| 47 | + |
0 commit comments