Skip to content

Commit

Permalink
rockchip-rk3588: it's vendor boogie panthor time (experimental) (#6459)
Browse files Browse the repository at this point in the history
* main-config: fix: avoid errors when BRANCH contains a dash; convert to underscore

* rockchip64_common: shellfmt, no changes

* rockchip64_common: move SERIALCON defaulting logic to a (verbose) hook for flexibility

* config: allow to build BRANCHes not listed in KERNEL_TARGET as long as the config is valid

- useful for `collabora` and other experimental kernels, we don't want to have to add it to each individual board's KERNEL_TARGES one by one
- but we don't want to allow typos in BRANCH to emit very strange unrelated errors

* extensions: mesa-oibaf extension by @monkaBlyat - mainline mesa PPA for Ubuntu

- does nothing on Debian

* extensions: (v3) amazingfated-rk35xx, now `rk-multimedia-amazingfate` - panfork-free

- simply skips if not on Jammy
- deploys Chromium + Widevine if desktop

* rockchip-rk3588: introduce `vendor-boogie-panthor` experimental BRANCH/kernel

- original: https://github.com/hbiyik/linux-rockchip.git (branch `rk-6.1-rkr1-panthor-v6`)
- I picked the commits on top of clean armbian/linux-rockchip `6.1-rkr1` as of 2024-04-01
  - At https://github.com/rpardini/armbian-linux-rockchip-rk3588/tree/armbian-rk-6.1-rkr1-plus-boogie-panthor-v6
  - Diff: armbian/linux-rockchip@rk-6.1-rkr1...rpardini:armbian-linux-rockchip-rk3588:armbian-rk-6.1-rkr1-plus-boogie-panthor-v6

- rockchip-rk3588: introduce `boogie-bsp` BRANCH
- rockchip-rk3588: copy linux-rk35xx-vendor.config into linux-rk35xx-boogie-bsp.config
- rockchip-rk3588: update linux-rk35xx-boogie-bsp.config, no changes
- rockchip-rk3588: linux-rk35xx-boogie-bsp.config: `CONFIG_DRM_PANTHOR=m`
- rockchip-rk3588: linux-rk35xx-boogie-bsp.config: convert to defconfig
- rockchip-rk3588: rename to `BRANCH=vendor-boogie-panthor` for "clarity" (lol)
- rockchip-rk3588: vendor-boogie-panthor: force SERIALCON, full firmware (for blob needed for panthor) & mesa-oibaf extension
- rockchip-rk3588: vendor-boogie-panthor: enable amazingfated-rk35xx extension sans-panfork
  • Loading branch information
rpardini authored Apr 2, 2024
1 parent d193307 commit 43cf339
Show file tree
Hide file tree
Showing 9 changed files with 2,610 additions and 100 deletions.
2,359 changes: 2,359 additions & 0 deletions config/kernel/linux-rk35xx-vendor-boogie-panthor.config

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions config/sources/common.conf
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ function late_family_config__common_defaults_for_mainline_kernel() {
# KERNEL_MAJOR_MINOR is the key to all this stuff. It must be set.
if [[ -z ${KERNEL_MAJOR_MINOR} ]]; then
display_alert "KERNEL_MAJOR_MINOR is unset" "common_defaults_for_mainline" "warn"

# Done late (here) to allow family to set it first, so we don't have to add KERNEL_TARGET to all boards for experimental kernels.
if [[ "${BRANCH_VALID_FOR_BOARD}" == "no" ]]; then # Set in config-interactive by comparing KERNEL_TARGETS
exit_with_error "Invalid BRANCH='${BRANCH}' for BOARD='${BOARD}'; please select a valid branch for this board, eg one of '${KERNEL_TARGET}'"
fi
((problems++))
fi

Expand Down
218 changes: 122 additions & 96 deletions config/sources/families/include/rockchip64_common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ BOOTENV_FILE='rockchip64.txt'
UBOOT_TARGET_MAP=";;idbloader.bin uboot.img trust.bin"
BOOTDELAY=0
OVERLAY_PREFIX="${OVERLAY_PREFIX:-"rockchip"}" # default to 'rockchip' if not set by board
SERIALCON=${SERIALCON:=$([[ "${BRANCH}" == "legacy" || "${BRANCH}" == "vendor" ]] && echo "ttyFIQ0:1500000" || echo "ttyS2:1500000")}
# SERIALCON is handled/defaulted in hook post_family_config__900_late_default_serial_console_by_branch at end of this file
GOVERNOR="ondemand"
ATFPATCHDIR='atf-rockchip64'
BOOTPATCHDIR="${BOOTPATCHDIR:-"u-boot-rockchip64"}"
Expand Down Expand Up @@ -73,104 +73,106 @@ CPUMIN=${CPUMIN:="408000"}
declare -g BOOT_SOC_MKIMAGE="${BOOT_SOC}"

case "$BOOT_SOC" in
rk3328)
CPUMAX=${CPUMAX:="1296000"}
BOOT_SCENARIO="${BOOT_SCENARIO:=only-blobs}"
DDR_BLOB="${DDR_BLOB:-"rk33/rk3328_ddr_333MHz_v1.16.bin"}"
MINILOADER_BLOB="${MINILOADER_BLOB:-"rk33/rk322xh_miniloader_v2.50.bin"}"
BL31_BLOB="${BL31_BLOB:-"rk33/rk322xh_bl31_v1.44.elf"}"
;;
rk3399)
CPUMAX=${CPUMAX:="2016000"}
BOOT_SCENARIO="${BOOT_SCENARIO:=only-blobs}"
DDR_BLOB="${DDR_BLOB:-"rk33/rk3399_ddr_933MHz_v1.25.bin"}"
MINILOADER_BLOB="${MINILOADER_BLOB:-"rk33/rk3399_miniloader_v1.26.bin"}"
BL31_BLOB="${BL31_BLOB:-"rk33/rk3399_bl31_v1.35.elf"}"
;;
rk3399pro)
CPUMAX=${CPUMAX:="2016000"}
BOOT_SCENARIO="${BOOT_SCENARIO:=only-blobs}"
DDR_BLOB="${DDR_BLOB:-"rk33/rk3399pro_npu_ddr_933MHz_v1.02.bin"}"
MINILOADER_BLOB="${MINILOADER_BLOB:-"rk33/rk3399pro_miniloader_v1.26.bin"}"
BL31_BLOB="${BL31_BLOB:-"rk33/rk3399pro_bl31_v1.35.elf"}"
;;
rk3528)
CPUMAX=${CPUMAX:="2016000"}
BOOT_SCENARIO="${BOOT_SCENARIO:=spl-blobs}"
DDR_BLOB="${DDR_BLOB:-"rk35/rk3528_ddr_1056MHz_v1.06.bin"}"
BL31_BLOB="${BL31_BLOB:-"rk35/rk3528_bl31_v1.16.elf"}"
;;
rk3566)
CPUMAX=${CPUMAX:="1800000"}
BOOT_SCENARIO="${BOOT_SCENARIO:=spl-blobs}"
DDR_BLOB="${DDR_BLOB:-"rk35/rk3566_ddr_1056MHz_v1.10.bin"}"
BL31_BLOB="${BL31_BLOB:-"rk35/rk3568_bl31_v1.29.elf"}"
BOOT_SOC_MKIMAGE="rk3568" # mkimage does not know about rk3566, and rk3568 works.
;;
rk3568)
CPUMAX=${CPUMAX:="1992000"}
BOOT_SCENARIO="${BOOT_SCENARIO:=spl-blobs}"
DDR_BLOB="${DDR_BLOB:-"rk35/rk3568_ddr_1560MHz_v1.13.bin"}"
BL31_BLOB="${BL31_BLOB:-"rk35/rk3568_bl31_v1.32.elf"}"
;;
rk3588) #CPUMAX undefined?
BOOT_SCENARIO="${BOOT_SCENARIO:=spl-blobs}"
DDR_BLOB="${DDR_BLOB:-"rk35/rk3588_ddr_lp4_2112MHz_lp5_2736MHz_v1.08.bin"}"
BL31_BLOB="${BL31_BLOB:-"rk35/rk3588_bl31_v1.28.elf"}"
;;
rk3308)
CPUMAX=${CPUMAX:="1296000"}
BOOT_SCENARIO="${BOOT_SCENARIO:=only-blobs}"
DDR_BLOB="${DDR_BLOB:-"rk33/rk3308_ddr_589MHz_uart2_m1_v1.30.bin"}"
MINILOADER_BLOB="${MINILOADER_BLOB:-"rk33/rk3308_miniloader_v1.22.bin"}"
BL31_BLOB="${BL31_BLOB:-"rk33/rk3308_bl31_v2.22.elf"}"
if [[ ${BRANCH} == legacy ]]; then
DDR_BLOB="${DDR_BLOB:-"rk33/rk3308_ddr_589MHz_uart2_m0_v1.26.bin"}"
MINILOADER_BLOB="${MINILOADER_BLOB:-"rk33/rk3308_miniloader_sd_nand_v1.13.bin"}"
BL31_BLOB="${BL31_BLOB:-"rk33/rk3308_bl31_v2.10.elf"}"
fi
rk3328)
CPUMAX=${CPUMAX:="1296000"}
BOOT_SCENARIO="${BOOT_SCENARIO:=only-blobs}"
DDR_BLOB="${DDR_BLOB:-"rk33/rk3328_ddr_333MHz_v1.16.bin"}"
MINILOADER_BLOB="${MINILOADER_BLOB:-"rk33/rk322xh_miniloader_v2.50.bin"}"
BL31_BLOB="${BL31_BLOB:-"rk33/rk322xh_bl31_v1.44.elf"}"
;;

rk3399)
CPUMAX=${CPUMAX:="2016000"}
BOOT_SCENARIO="${BOOT_SCENARIO:=only-blobs}"
DDR_BLOB="${DDR_BLOB:-"rk33/rk3399_ddr_933MHz_v1.25.bin"}"
MINILOADER_BLOB="${MINILOADER_BLOB:-"rk33/rk3399_miniloader_v1.26.bin"}"
BL31_BLOB="${BL31_BLOB:-"rk33/rk3399_bl31_v1.35.elf"}"
;;

rk3399pro)
CPUMAX=${CPUMAX:="2016000"}
BOOT_SCENARIO="${BOOT_SCENARIO:=only-blobs}"
DDR_BLOB="${DDR_BLOB:-"rk33/rk3399pro_npu_ddr_933MHz_v1.02.bin"}"
MINILOADER_BLOB="${MINILOADER_BLOB:-"rk33/rk3399pro_miniloader_v1.26.bin"}"
BL31_BLOB="${BL31_BLOB:-"rk33/rk3399pro_bl31_v1.35.elf"}"
;;

rk3528)
CPUMAX=${CPUMAX:="2016000"}
BOOT_SCENARIO="${BOOT_SCENARIO:=spl-blobs}"
DDR_BLOB="${DDR_BLOB:-"rk35/rk3528_ddr_1056MHz_v1.06.bin"}"
BL31_BLOB="${BL31_BLOB:-"rk35/rk3528_bl31_v1.16.elf"}"
;;

rk3566)
CPUMAX=${CPUMAX:="1800000"}
BOOT_SCENARIO="${BOOT_SCENARIO:=spl-blobs}"
DDR_BLOB="${DDR_BLOB:-"rk35/rk3566_ddr_1056MHz_v1.10.bin"}"
BL31_BLOB="${BL31_BLOB:-"rk35/rk3568_bl31_v1.29.elf"}"
BOOT_SOC_MKIMAGE="rk3568" # mkimage does not know about rk3566, and rk3568 works.
;;

rk3568)
CPUMAX=${CPUMAX:="1992000"}
BOOT_SCENARIO="${BOOT_SCENARIO:=spl-blobs}"
DDR_BLOB="${DDR_BLOB:-"rk35/rk3568_ddr_1560MHz_v1.13.bin"}"
BL31_BLOB="${BL31_BLOB:-"rk35/rk3568_bl31_v1.32.elf"}"
;;

rk3588) #CPUMAX undefined?
BOOT_SCENARIO="${BOOT_SCENARIO:=spl-blobs}"
DDR_BLOB="${DDR_BLOB:-"rk35/rk3588_ddr_lp4_2112MHz_lp5_2736MHz_v1.08.bin"}"
BL31_BLOB="${BL31_BLOB:-"rk35/rk3588_bl31_v1.28.elf"}"
;;

rk3308)
CPUMAX=${CPUMAX:="1296000"}
BOOT_SCENARIO="${BOOT_SCENARIO:=only-blobs}"
DDR_BLOB="${DDR_BLOB:-"rk33/rk3308_ddr_589MHz_uart2_m1_v1.30.bin"}"
MINILOADER_BLOB="${MINILOADER_BLOB:-"rk33/rk3308_miniloader_v1.22.bin"}"
BL31_BLOB="${BL31_BLOB:-"rk33/rk3308_bl31_v2.22.elf"}"

if [[ ${BRANCH} == legacy ]]; then
DDR_BLOB="${DDR_BLOB:-"rk33/rk3308_ddr_589MHz_uart2_m0_v1.26.bin"}"
MINILOADER_BLOB="${MINILOADER_BLOB:-"rk33/rk3308_miniloader_sd_nand_v1.13.bin"}"
BL31_BLOB="${BL31_BLOB:-"rk33/rk3308_bl31_v2.10.elf"}"
fi
;;
esac

prepare_boot_configuration() {
case "$BOOT_SCENARIO" in
blobless|tpl-blob-atf-mainline)
UBOOT_TARGET_MAP="BL31=bl31.elf idbloader.img u-boot.itb;;idbloader.img u-boot.itb"
ATFSOURCE='https://github.com/ARM-software/arm-trusted-firmware'
ATF_COMPILER='aarch64-linux-gnu-'
ATFDIR='arm-trusted-firmware'
ATFBRANCH='tag:lts-v2.8.8'
ATF_USE_GCC='> 6.3'
ATF_TARGET_MAP="M0_CROSS_COMPILE=arm-linux-gnueabi- PLAT=$BOOT_SOC bl31;;build/$BOOT_SOC/release/bl31/bl31.elf:bl31.elf"
ATF_TOOLCHAIN2="arm-linux-gnueabi-:< 10.0"
[[ $BOOT_SCENARIO == tpl-blob-atf-mainline ]] &&
UBOOT_TARGET_MAP="BL31=bl31.elf idbloader.img u-boot.itb;;idbloader.img u-boot.itb"
;;
tpl-spl-blob)
UBOOT_TARGET_MAP="BL31=$RKBIN_DIR/$BL31_BLOB idbloader.img u-boot.itb;;idbloader.img u-boot.itb"
ATFSOURCE=''
ATF_COMPILE='no'
;;
spl-blobs)
UBOOT_TARGET_MAP="BL31=$RKBIN_DIR/$BL31_BLOB spl/u-boot-spl.bin u-boot.dtb u-boot.itb;;idbloader.img u-boot.itb"
ATFSOURCE=''
ATF_COMPILE='no'
;;
only-blobs)
UBOOT_TARGET_MAP="u-boot-dtb.bin;;idbloader.bin uboot.img trust.bin"
ATFSOURCE=''
ATF_COMPILE='no'
esac
case "$BOOT_SCENARIO" in
blobless | tpl-blob-atf-mainline)
UBOOT_TARGET_MAP="BL31=bl31.elf idbloader.img u-boot.itb;;idbloader.img u-boot.itb"
ATFSOURCE='https://github.com/ARM-software/arm-trusted-firmware'
ATF_COMPILER='aarch64-linux-gnu-'
ATFDIR='arm-trusted-firmware'
ATFBRANCH='tag:lts-v2.8.8'
ATF_USE_GCC='> 6.3'
ATF_TARGET_MAP="M0_CROSS_COMPILE=arm-linux-gnueabi- PLAT=$BOOT_SOC bl31;;build/$BOOT_SOC/release/bl31/bl31.elf:bl31.elf"
ATF_TOOLCHAIN2="arm-linux-gnueabi-:< 10.0"

[[ $BOOT_SCENARIO == tpl-blob-atf-mainline ]] &&
UBOOT_TARGET_MAP="BL31=bl31.elf idbloader.img u-boot.itb;;idbloader.img u-boot.itb"
;;

tpl-spl-blob)
UBOOT_TARGET_MAP="BL31=$RKBIN_DIR/$BL31_BLOB idbloader.img u-boot.itb;;idbloader.img u-boot.itb"
ATFSOURCE=''
ATF_COMPILE='no'
;;
spl-blobs)
UBOOT_TARGET_MAP="BL31=$RKBIN_DIR/$BL31_BLOB spl/u-boot-spl.bin u-boot.dtb u-boot.itb;;idbloader.img u-boot.itb"
ATFSOURCE=''
ATF_COMPILE='no'
;;

only-blobs)
UBOOT_TARGET_MAP="u-boot-dtb.bin;;idbloader.bin uboot.img trust.bin"
ATFSOURCE=''
ATF_COMPILE='no'
;;
esac

if [[ $BOOT_SUPPORT_SPI == yes ]]; then

Expand Down Expand Up @@ -319,3 +321,27 @@ family_tweaks_bsp() {
cp $SRC/packages/bsp/rk3399/20-gpu-governor.conf $destination/etc/sysfs.d/

}

# A late hook to default SERIALCON based on BRANCH; BOARD and hooks (earlier than 900) can set it to override this.
function post_family_config__900_late_default_serial_console_by_branch() {
display_alert "rockchip64_common: defaulting SERIALCON" "initial SERIALCON: '${SERIALCON:-"unset"}'" "debug"

# If already set (by BOARD or hooks/extensions ran before this), keep it.
if [[ -n $SERIALCON ]]; then
display_alert "rockchip64_common: defaulting SERIALCON" "SERIALCON already set to '${SERIALCON}', keeping it." "info"
return 0
fi

case $BRANCH in
legacy | vendor)
display_alert "rockchip64_common: defaulting SERIALCON" "Setting SERIALCON to ttyFIQ0 for BRANCH='${BRANCH}'" "info"
SERIALCON="ttyFIQ0"
;;
*)
display_alert "rockchip64_common: defaulting SERIALCON" "Setting SERIALCON to ttyS2 for BRANCH='${BRANCH}'" "info"
SERIALCON="ttyS2"
;;
esac

display_alert "rockchip64_common: defaulting SERIALCON" "final SERIALCON: '${SERIALCON}' for BRANCH='${BRANCH}'" "debug"
}
17 changes: 17 additions & 0 deletions config/sources/families/rockchip-rk3588.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,23 @@ case $BRANCH in
LINUXFAMILY=rk35xx
;;

vendor-boogie-panthor)
BOOTSCRIPT='boot-rk3588-legacy.cmd:boot.cmd'
BOOTDIR='u-boot-rockchip64'
declare -g KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel.
declare -g -i KERNEL_GIT_CACHE_TTL=120 # 2 minutes; this is a high-traffic repo
KERNELSOURCE='https://github.com/rpardini/armbian-linux-rockchip-rk3588.git'
KERNELBRANCH='branch:armbian-rk-6.1-rkr1-plus-boogie-panthor-v6' # which is armbian/linux-rockchip#rk-6.1-rkr1 as-of 2024-04-01 plus boogie's panthor-v6 patches picked
KERNELPATCHDIR='rk35xx-vendor-boogie-panthor-6.1'
LINUXFAMILY=rk35xx
KERNELCONFIG='linux-rk35xx-vendor-boogie-panthor'
# Extra overrides, full firmware for blobs, and oibaf for mainline mesa; amazingfated multimedia-only (not panfork)
SERIALCON="ttyFIQ0" # so that rockchip64_common's SERIALCON hook won't default it to ttyS2
BOARD_FIRMWARE_INSTALL="-full" # Install full firmware, for blob required for panthor - huge @TODO add blob to armbian-firmware
enable_extension "mesa-oibaf" # Enable OIBAF repo for mainline mesa
enable_extension "rk-multimedia-amazingfate" # for chromium, widevine (glibc) & multimedia - NOT panfork
;;

edge)
LINUXFAMILY=rockchip-rk3588
LINUXCONFIG='linux-rockchip-rk3588-'$BRANCH
Expand Down
37 changes: 37 additions & 0 deletions extensions/mesa-oibaf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#
# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2024 Ricardo Pardini <[email protected]>
# Copyright (c) 2024 Monka
# This file is a part of the Armbian Build Framework https://github.com/armbian/build/

# This add's oibaf PPAs to the the image, and installs all needed packages.
# It only works with mainline mesa enabled kernels, eg, not legacy/vendor ones, usually.

function extension_prepare_config__oibaf() {
display_alert "Preparing oibaf extension" "${EXTENSION}" "info"

if [[ "${DISTRIBUTION}" != "Ubuntu" ]]; then
display_alert "oibaf" "${EXTENSION} extension only works with Ubuntu (currently '${DISTRIBUTION}'), skipping" "warn"
return 0
fi

# Add to the image suffix.
EXTRA_IMAGE_SUFFIXES+=("-oibaf") # global array
}

function post_install_kernel_debs__oibaf() {
if [[ "${DISTRIBUTION}" != "Ubuntu" ]]; then
display_alert "oibaf" "${EXTENSION} extension only works with Ubuntu, skipping" "debug"
return 0
fi

display_alert "Adding oibaf PPAs" "${EXTENSION}" "info"
do_with_retries 3 chroot_sdcard add-apt-repository ppa:oibaf/graphics-drivers --yes --no-update
display_alert "Updating sources list, after oibaf PPAs" "${EXTENSION}" "info"
do_with_retries 3 chroot_sdcard_apt_get_update
display_alert "Installing oibaf packages" "${EXTENSION}" "info"
do_with_retries 3 chroot_sdcard_apt_get_install glmark2-wayland glmark2-es2 glmark2-es2-wayland mesa-utils
display_alert "Upgrading oibaf packages" "${EXTENSION}" "info"
do_with_retries 3 chroot_sdcard_apt_get upgrade
display_alert "Installed oibaf packages" "${EXTENSION}" "info"
}
57 changes: 57 additions & 0 deletions extensions/rk-multimedia-amazingfate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#
# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2023 Ricardo Pardini <[email protected]>
# This file is a part of the Armbian Build Framework https://github.com/armbian/build/
#

# This add's amazingfate's PPAs to the the image, and installs all needed packages.
# It only works on LINUXFAMILY="rk3588-legacy" and RELEASE=jammy and BRANCH=legacy/vendor
# if on a desktop, installs more useful packages, and tries to coerce lightdm to use gtk-greeter and a Wayland session.
function extension_prepare_config__amazingfate_rk35xx_multimedia() {
display_alert "Preparing amazingfate's PPAs for rk35xx multimedia" "${EXTENSION}" "info"
EXTRA_IMAGE_SUFFIXES+=("-amazingfated") # Add to the image suffix. # global array

[[ "${BUILDING_IMAGE}" != "yes" ]] && return 0

if [[ "${RELEASE}" != "jammy" ]]; then
display_alert "skipping..." "${EXTENSION} not for ${RELEASE}, only jammy, skipping" "warn"
return 0
fi

if [[ "${LINUXFAMILY}" != "rockchip-rk3588" && "${LINUXFAMILY}" != "rk35xx" ]]; then
exit_with_error "${EXTENSION} only works on LINUXFAMILY=rockchip-rk3588/rk35xx, currently on '${LINUXFAMILY}'"
fi

if [[ "${BRANCH}" != "legacy" && "${BRANCH}" != "vendor" && "${BRANCH}" != "vendor-boogie-panthor" ]]; then
exit_with_error "${EXTENSION} only works on BRANCH=legacy/vendor/vendor-boogie-panthor, currently on '${BRANCH}'"
fi
}

function post_install_kernel_debs__amazingfated_rk35xx_multimedia() {
if [[ "${RELEASE}" != "jammy" ]]; then
display_alert "skipping..." "${EXTENSION} not for ${RELEASE}, only jammy, skipping" "info"
return 0
fi

display_alert "Adding rockchip-multimedia by Amazingfate PPAs" "${EXTENSION}" "info"

do_with_retries 3 chroot_sdcard add-apt-repository ppa:liujianfeng1994/rockchip-multimedia --yes --no-update

display_alert "Updating sources list, after rockchip-multimedia by Amazingfate PPAs" "${EXTENSION}" "info"
do_with_retries 3 chroot_sdcard_apt_get_update

declare -a pkgs=(rockchip-multimedia-config)
if [[ "${BUILD_DESKTOP}" == "yes" ]]; then
pkgs+=(chromium-browser libwidevinecdm)
fi

display_alert "Installing rockchip-multimedia by Amazingfate packages" "${EXTENSION} :: ${pkgs[*]}" "info"
do_with_retries 3 chroot_sdcard_apt_get_install "${pkgs[@]}"

display_alert "Upgrading rockchip-multimedia by Amazingfate packages" "${EXTENSION}" "info"
do_with_retries 3 chroot_sdcard_apt_get upgrade

display_alert "Installed rockchip-multimedia by Amazingfate packages" "${EXTENSION}" "info"

return 0
}
3 changes: 2 additions & 1 deletion lib/functions/configuration/main-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,8 @@ function do_extra_configuration() {
[[ -z $UBOOT_USE_GCC ]] && exit_with_error "Error in configuration: UBOOT_USE_GCC is unset"
[[ -z $KERNEL_USE_GCC ]] && exit_with_error "Error in configuration: KERNEL_USE_GCC is unset"

declare BOOTCONFIG_VAR_NAME="BOOTCONFIG_${BRANCH^^}"
declare BOOTCONFIG_VAR_NAME="BOOTCONFIG_${BRANCH^^}" # Branch name, uppercase
BOOTCONFIG_VAR_NAME=${BOOTCONFIG_VAR_NAME//-/_} # Replace dashes with underscores
[[ -n ${!BOOTCONFIG_VAR_NAME} ]] && BOOTCONFIG=${!BOOTCONFIG_VAR_NAME}
[[ -z $BOOTPATCHDIR ]] && BOOTPATCHDIR="u-boot-$LINUXFAMILY" # @TODO move to hook
[[ -z $ATFPATCHDIR ]] && ATFPATCHDIR="atf-$LINUXFAMILY"
Expand Down
8 changes: 7 additions & 1 deletion lib/functions/main/config-interactive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ function config_possibly_interactive_kernel_board() {
function config_possibly_interactive_branch_release_desktop_minimal() {
interactive_config_ask_branch
[[ -z $BRANCH ]] && exit_with_error "No kernel branch selected: BRANCH"
[[ ${KERNEL_TARGET} != *${BRANCH}* && ${BRANCH} != "ddk" ]] && exit_with_error "Kernel branch not defined for this board: '${BRANCH}' for '${BOARD}'"

# Check for BRANCH validity, warn but don't break the build if invalid; mark it as invalid for later checks -- if really no valid config, common.conf will exit with error later.
declare -g BRANCH_VALID_FOR_BOARD='yes'
if [[ ${KERNEL_TARGET} != *${BRANCH}* && ${BRANCH} != "ddk" ]]; then
display_alert "BRANCH not found for board" "BRANCH='${BRANCH}' not valid for BOARD='${BOARD}' - listed KERNEL_TARGET='${KERNEL_TARGET}'" "warn"
declare -g BRANCH_VALID_FOR_BOARD='no'
fi

interactive_config_ask_release
# If building image or rootfs (and thus "NEEDS_BINFMT=yes"), then RELEASE must be set.
Expand Down
Loading

0 comments on commit 43cf339

Please sign in to comment.