From e8ebe36462f0a8c0ffa799303c1934b649d294f8 2017-10-28 22:15:13 From: drtyhlpr Date: 2017-10-28 22:15:13 Subject: [PATCH] Merge pull request #104 from nexus166/master fixed /usr/src/linux by hardcoding paths - thx to nexus166 --- diff --git a/bootstrap.d/13-kernel.sh b/bootstrap.d/13-kernel.sh index 9946c81..f8c4256 100644 --- a/bootstrap.d/13-kernel.sh +++ b/bootstrap.d/13-kernel.sh @@ -8,12 +8,12 @@ # Fetch and build latest raspberry kernel if [ "$BUILD_KERNEL" = true ] ; then # Setup source directory - mkdir -p "${R}/usr/src" + mkdir -p "${R}/usr/src/linux" # Copy existing kernel sources into chroot directory if [ -n "$KERNELSRC_DIR" ] && [ -d "$KERNELSRC_DIR" ] ; then # Copy kernel sources - cp -r "${KERNELSRC_DIR}" "${R}/usr/src" + cp -r "${KERNELSRC_DIR}/*" "${R}/usr/src/linux" # Clean the kernel sources if [ "$KERNELSRC_CLEAN" = true ] && [ "$KERNELSRC_PREBUILT" = false ] ; then @@ -25,13 +25,13 @@ if [ "$BUILD_KERNEL" = true ] ; then # Fetch current RPi2/3 kernel sources if [ -z "${KERNEL_BRANCH}" ] ; then - as_nobody -u nobody git -C "${temp_dir}" clone --depth=1 "${KERNEL_URL}" + as_nobody -u nobody git -C "${temp_dir}" clone --depth=1 "${KERNEL_URL}" linux else - as_nobody -u nobody git -C "${temp_dir}" clone --depth=1 --branch "${KERNEL_BRANCH}" "${KERNEL_URL}" + as_nobody -u nobody git -C "${temp_dir}" clone --depth=1 --branch "${KERNEL_BRANCH}" "${KERNEL_URL}" linux fi # Copy downloaded kernel sources - mv "${temp_dir}/linux" "${R}/usr/src/" + mv "${temp_dir}/linux/*" "${R}/usr/src/linux/" # Remove temporary directory for kernel sources rm -fr "${temp_dir}"