summaryrefslogtreecommitdiffstats
path: root/helper
diff options
context:
space:
mode:
authorSimon Rettberg2013-06-24 18:41:22 +0200
committerSimon Rettberg2013-06-24 18:41:22 +0200
commit2b8b987b79ac1b0d8ebcb64475957c20dd7ddf22 (patch)
tree2e4b46f68b15348e121c57264f1de764b6d4e1c2 /helper
parentUpdate .gitignore: no *.so files please! (diff)
downloadtm-scripts-2b8b987b79ac1b0d8ebcb64475957c20dd7ddf22.tar.gz
tm-scripts-2b8b987b79ac1b0d8ebcb64475957c20dd7ddf22.tar.xz
tm-scripts-2b8b987b79ac1b0d8ebcb64475957c20dd7ddf22.zip
Don't fail when copying firmware modules that already exist
Diffstat (limited to 'helper')
-rw-r--r--helper/kernel.inc10
1 files changed, 7 insertions, 3 deletions
diff --git a/helper/kernel.inc b/helper/kernel.inc
index a5989b15..af2af38b 100644
--- a/helper/kernel.inc
+++ b/helper/kernel.inc
@@ -105,6 +105,7 @@ copy_kernel_modules() {
copy_firmware() {
[ -z "${REQUIRED_FIRMWARE}" ] && perror "REQUIRED_FIRMWARE is empty. Check your config file."
+ local HORST=$(pwd)
check_kernel_build_dir
#
# process firmware list
@@ -153,13 +154,16 @@ copy_firmware() {
# which have to be copied to /lib/firmware/${KERNEL_NEW_VERSION}
if [ -d "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_VERSION}" ]; then
mkdir -p "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_NEW_VERSION}/"
- mv "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_VERSION}/"* "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_NEW_VERSION}/"
- rmdir "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_VERSION}/" || perror "something went very wrong..."
+ #mv -f "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_VERSION}/"* "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_NEW_VERSION}/"
+ cd "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_VERSION}" || perror "old kernel but no old kernel"
+ tarcopy "$(ls)" "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_NEW_VERSION}/"
+ cd -
+ rm -r "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_VERSION}" || perror "something went very wrong..."
else
pdebug "No ${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_VERSION} directory, skipping the merge."
fi
- cd - >/dev/null
+ cd "$HORST"
}
copy_kernel() {