diff --git a/lib/build-all.sh b/lib/build-all.sh index d7ccd76d85..71366068a3 100644 --- a/lib/build-all.sh +++ b/lib/build-all.sh @@ -198,7 +198,8 @@ n=0 for line in "${buildlist[@]}"; do unset LINUXFAMILY LINUXCONFIG KERNELDIR KERNELSOURCE KERNELBRANCH BOOTDIR BOOTSOURCE BOOTBRANCH ARCH UBOOT_USE_GCC KERNEL_USE_GCC \ CPUMIN CPUMAX UBOOT_VER KERNEL_VER GOVERNOR BOOTSIZE BOOTFS_TYPE UBOOT_TOOLCHAIN KERNEL_TOOLCHAIN PACKAGE_LIST_EXCLUDE KERNEL_IMAGE_TYPE \ - write_uboot_platform family_tweaks family_tweaks_bsp setup_write_uboot_platform BOOTSCRIPT UBOOT_TARGET_MAP LOCALVERSION UBOOT_COMPILER KERNEL_COMPILER \ + write_uboot_platform family_tweaks family_tweaks_bsp setup_write_uboot_platform uboot_custom_postprocess atf_custom_postprocess \ + BOOTSCRIPT UBOOT_TARGET_MAP LOCALVERSION UBOOT_COMPILER KERNEL_COMPILER \ MODULES MODULES_NEXT MODULES_DEV INITRD_ARCH HAS_UUID_SUPPORT BOOTENV_FILE BOOTDELAY MODULES_BLACKLIST MODULES_BLACKLIST_NEXT \ MODULES_BLACKLIST_DEV MOUNT SDCARD BOOTPATCHDIR KERNELPATCHDIR buildtext RELEASE IMAGE_TYPE OVERLAY_PREFIX ASOUND_STATE \ ATF_COMPILER ATF_USE_GCC ATFSOURCE ATFDIR ATFBRANCH ATFSOURCEDIR diff --git a/lib/compilation.sh b/lib/compilation.sh index d82d6e0465..0ad0d7209a 100644 --- a/lib/compilation.sh +++ b/lib/compilation.sh @@ -12,6 +12,7 @@ # compile_uboot # compile_kernel # compile_sunxi_tools +# install_rkbin_tools # grab_version # find_toolchain # advanced_patch @@ -63,6 +64,8 @@ compile_atf() [[ ${PIPESTATUS[0]} -ne 0 ]] && exit_with_error "ATF compilation failed" + [[ $(type -t atf_custom_postprocess) == function ]] && atf_custom_postprocess + local atftempdir=$SRC/.tmp/atf-${LINUXFAMILY}-${BOARD}-${BRANCH} mkdir -p $atftempdir @@ -161,6 +164,8 @@ compile_uboot() [[ ${PIPESTATUS[0]} -ne 0 ]] && exit_with_error "U-boot compilation failed" + [[ $(type -t uboot_custom_postprocess) == function ]] && uboot_custom_postprocess + # copy files to build directory for f in $target_files; do local f_src=$(cut -d':' -f1 <<< $f) @@ -384,6 +389,20 @@ compile_sunxi_tools() fi } +install_rkbin_tools() +{ + # install only if git commit hash changed + cd $SRC/cache/sources/rkbin-tools + # need to check if /usr/local/bin/sunxi-fexc to detect new Docker containers with old cached sources + if [[ ! -f .commit_id || $(git rev-parse @ 2>/dev/null) != $(<.commit_id) || ! -f /usr/local/bin/loaderimage ]]; then + display_alert "Installing" "rkbin-tools" "info" + mkdir -p /usr/local/bin/ + install -m 755 tools/loaderimage /usr/local/bin/ + install -m 755 tools/trust_merger /usr/local/bin/ + git rev-parse @ 2>/dev/null > .commit_id + fi +} + grab_version() { local ver=() diff --git a/lib/main.sh b/lib/main.sh index d18c73ff43..596919c649 100644 --- a/lib/main.sh +++ b/lib/main.sh @@ -258,9 +258,11 @@ if [[ $IGNORE_UPDATES != yes ]]; then fi fetch_from_repo "https://github.com/linux-sunxi/sunxi-tools" "sunxi-tools" "branch:master" fetch_from_repo "https://github.com/armbian/config" "armbian-config" "branch:dev" + fetch_from_repo "https://github.com/rockchip-linux/rkbin" "rkbin-tools" "branch:master" fi compile_sunxi_tools +install_rkbin_tools # define package names DEB_BRANCH=${BRANCH//default}