From 37b50f154af402fbe2930be5ed23a9923292f2d4 Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Thu, 12 Nov 2020 19:46:47 +0100 Subject: [PATCH] Bugfix related to firmware creation --- lib/build-all-ng.sh | 2 +- lib/compilation.sh | 16 ++++++++-------- lib/distributions.sh | 3 ++- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/build-all-ng.sh b/lib/build-all-ng.sh index aa8409770a..8bab9bfd99 100644 --- a/lib/build-all-ng.sh +++ b/lib/build-all-ng.sh @@ -60,7 +60,7 @@ unset LINUXFAMILY LINUXCONFIG KERNELDIR KERNELSOURCE KERNELBRANCH BOOTDIR BOOTSO PACKAGE_LIST_BOARD PACKAGE_LIST_FAMILY PACKAGE_LIST_DESKTOP_BOARD PACKAGE_LIST_DESKTOP_FAMILY ATF_COMPILE ATFPATCHDIR OFFSET BOOTSOURCEDIR BOOT_USE_BLOBS \ BOOT_SOC DDR_BLOB MINILOADER_BLOB BL31_BLOB BOOT_RK3328_USE_AYUFAN_ATF BOOT_USE_BLOBS BOOT_RK3399_LEGACY_HYBRID \ BOOT_USE_MAINLINE_ATF BOOT_USE_TPL_SPL_BLOB BOOT_SUPPORT_SPI OFFLINE_WORK IMAGE_PARTITION_TABLE BOOT_LOGO UPSTREM_VER FORCED_MONTH_OFFSET \ - PACKAGE_LIST_BOARD_REMOVE PACKAGE_LIST_FAMILY_REMOVE PACKAGE_LIST_DESKTOP_BOARD_REMOVE PACKAGE_LIST_DESKTOP_FAMILY_REMOVE BOOTCONFIG_DEV + PACKAGE_LIST_BOARD_REMOVE PACKAGE_LIST_FAMILY_REMOVE PACKAGE_LIST_DESKTOP_BOARD_REMOVE PACKAGE_LIST_DESKTOP_FAMILY_REMOVE BOOTCONFIG_DEV USE_OVERLAYFS } pack_upload () diff --git a/lib/compilation.sh b/lib/compilation.sh index 75d795290e..ffefbdbe66 100644 --- a/lib/compilation.sh +++ b/lib/compilation.sh @@ -169,7 +169,7 @@ compile_uboot() # create patch for manual source changes [[ $CREATE_PATCHES == yes ]] && userpatch_create "u-boot" - if [[ -n $ATFSOURCE ]]; then + if [[ -n $ATFSOURCE ]]; then cp -Rv "${atftempdir}"/*.bin . rm -rf "${atftempdir}" fi @@ -275,7 +275,7 @@ compile_uboot() [[ ! -f $uboottempdir/${uboot_name}.deb ]] && exit_with_error "Building u-boot package failed" - rsync -rq --delete-after "$uboottempdir/${uboot_name}.deb" "${DEB_STORAGE}/" + rsync -rq "$uboottempdir/${uboot_name}.deb" "${DEB_STORAGE}/" } compile_kernel() @@ -447,14 +447,14 @@ compile_kernel() if [[ $BUILD_KSRC != no ]]; then fakeroot dpkg-deb -z0 -b "${sources_pkg_dir}" "${sources_pkg_dir}.deb" - rsync -rq --delete-after "${sources_pkg_dir}.deb" "${DEB_STORAGE}/" + rsync -rq "${sources_pkg_dir}.deb" "${DEB_STORAGE}/" fi rm -rf "${sources_pkg_dir}" cd .. || exit # remove firmare image packages here - easier than patching ~40 packaging scripts at once rm -f linux-firmware-image-*.deb - rsync -rq --delete-after ./*.deb "${DEB_STORAGE}/" || exit_with_error "Failed moving kernel DEBs" + rsync -rq ./*.deb "${DEB_STORAGE}/" || exit_with_error "Failed moving kernel DEBs" # store git hash to the file echo "${hash}" > "${SRC}/cache/hash"$([[ ${BETA} == yes ]] && echo "-beta")"/linux-image-${BRANCH}-${LINUXFAMILY}.githash" @@ -513,10 +513,10 @@ compile_firmware() cd "${firmwaretempdir}" || exit # pack - rsync -rq --delete-after "armbian-firmware${FULL}" "armbian-firmware${FULL}_${REVISION}_all" + mv "armbian-firmware${FULL}" "armbian-firmware${FULL}_${REVISION}_all" fakeroot dpkg -b "armbian-firmware${FULL}_${REVISION}_all" >> "${DEST}"/debug/install.log 2>&1 - rsync -rq --delete-after "armbian-firmware${FULL}_${REVISION}_all" "armbian-firmware${FULL}" - rsync -rq --delete-after "armbian-firmware${FULL}_${REVISION}_all.deb" "${DEB_STORAGE}/" + mv "armbian-firmware${FULL}_${REVISION}_all" "armbian-firmware${FULL}" + rsync -rq "armbian-firmware${FULL}_${REVISION}_all.deb" "${DEB_STORAGE}/" # remove temp directory rm -rf "${firmwaretempdir}" @@ -564,7 +564,7 @@ compile_armbian-config() ln -sf /usr/sbin/softy "${tmpdir}"/usr/bin/softy fakeroot dpkg -b "${tmpdir}" >/dev/null - rsync -rq --delete-after "${tmpdir}.deb" "${DEB_STORAGE}/" + rsync -rq "${tmpdir}.deb" "${DEB_STORAGE}/" rm -rf "${tmpdir}" } diff --git a/lib/distributions.sh b/lib/distributions.sh index 8ae34c08ea..541704c889 100644 --- a/lib/distributions.sh +++ b/lib/distributions.sh @@ -246,7 +246,8 @@ install_common() chroot "${SDCARD}" /bin/bash -c "apt-get -qq -y install linux-u-boot-${BOARD}-${BRANCH}" >> "${DEST}"/debug/install.log 2>&1 # we need package later, move to output, apt-get must be here, apt deletes file UPSTREM_VER=$(dpkg-deb -I "${SDCARD}"/var/cache/apt/archives/linux-u-boot-${BOARD}-${BRANCH}*_${ARCH}.deb | grep Version | awk '{print $(NF)}') - rsync -rq --delete-after "${SDCARD}"/var/cache/apt/archives/linux-u-boot-${BOARD}-${BRANCH}*_${ARCH}.deb ${DEB_STORAGE}/${CHOSEN_UBOOT}_${UPSTREM_VER}_${ARCH}.deb + rsync -rq "${SDCARD}"/var/cache/apt/archives/linux-u-boot-${BOARD}-${BRANCH}*_${ARCH}.deb ${DEB_STORAGE}/${CHOSEN_UBOOT}_${UPSTREM_VER}_${ARCH}.deb + [[ $? -ne 0 ]] && exit_with_error "U-boot linux-u-boot-${BOARD}-${BRANCH}*_${ARCH}.deb download failed" fi # install kernel