From aa39f37a8454af249a188be947436156842a5af6 2018-11-26 05:24:25 From: Unknown Date: 2018-11-26 05:24:25 Subject: [PATCH] a --- diff --git a/bootstrap.d/13-kernel.sh b/bootstrap.d/13-kernel.sh index 50fd8b7..46940d3 100644 --- a/bootstrap.d/13-kernel.sh +++ b/bootstrap.d/13-kernel.sh @@ -441,19 +441,28 @@ else # BUILD_KERNEL=false touch "${BOOT_DIR}/cmdline.txt" fi - # Install Kernel from hypriot comptabile with all Raspberry PI + # INstall Kernel from hypriot comptabile with all Raspberry PI if [ "$SET_ARCH" = 32 ] ; then + # Create temporary directory for dl + temp_dir=$(as_nobody mktemp -d) + # Fetch kernel - as_nobody wget -O "${R}"/kernel.deb -c "$RPI_32_KERNEL_URL" - + as_nobody wget -O "${temp_dir}"/kernel.deb -c "$RPI_32_KERNEL_URL" # Fetch kernel header - as_nobody wget -O "${R}"/kernel-header.deb -c "$RPI_32_KERNELHEADER_URL" + as_nobody wget -O "${temp_dir}"/kernel-header.deb -c "$RPI_32_KERNELHEADER_URL" - # Install kernel - chroot_exec dpkg -i "${R}"/kernel.deb + # Copy downloaded U-Boot sources + mv "${temp_dir}"/kernel.deb "${R}"/kernel.deb + mv "${temp_dir}"/kernel-header.deb "${R}"/kernel-header.deb + + # Set permissions + chown -R root:root "${R}"/kernel.deb + chown -R root:root "${R}"/kernel-header.deb + # Install kernel + chroot_exec dpkg -i "${temp_dir}"/kernel.deb # Install kernel header - chroot_exec dpkg -i "${R}"/kernel-header.deb + chroot_exec dpkg -i "${temp_dir}"/kernel-header.deb # Remove temporary directory for U-Boot sources rm -fr "${temp_dir}"