From 58f65a9f6e9da6357c1eb3e1bd295246805accfd 2018-11-18 20:38:44 From: Unknown Date: 2018-11-18 20:38:44 Subject: [PATCH] use variables more often --- diff --git a/bootstrap.d/13-kernel.sh b/bootstrap.d/13-kernel.sh index 054b554..e86ae33 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/linux" + mkdir -p "${KERNEL_DIR}" # Copy existing kernel sources into chroot directory if [ -n "$KERNELSRC_DIR" ] && [ -d "$KERNELSRC_DIR" ] ; then # Copy kernel sources and include hidden files - cp -r "${KERNELSRC_DIR}/". "${R}/usr/src/linux" + cp -r "${KERNELSRC_DIR}/". "${KERNEL_DIR}" # Clean the kernel sources if [ "$KERNELSRC_CLEAN" = true ] && [ "$KERNELSRC_PREBUILT" = false ] ; then @@ -31,7 +31,7 @@ if [ "$BUILD_KERNEL" = true ] ; then fi # Copy downloaded kernel sources - cp -r "${temp_dir}/linux/"* "${R}/usr/src/linux/" + cp -r "${temp_dir}/linux/"* "${KERNEL_DIR}" # Remove temporary directory for kernel sources rm -fr "${temp_dir}" diff --git a/rpi23-gen-image.sh b/rpi23-gen-image.sh index 59f2758..04de63a 100755 --- a/rpi23-gen-image.sh +++ b/rpi23-gen-image.sh @@ -123,7 +123,7 @@ ETC_DIR="${R}/etc" LIB_DIR="${R}/lib" BOOT_DIR="${R}/boot/firmware" KERNEL_DIR="${R}/usr/src/linux" -WLAN_FIRMWARE_DIR="${R}/lib/firmware/brcm" +WLAN_FIRMWARE_DIR="${LIB_DIR}/firmware/brcm" # Firmware directory: Blank if download from github RPI_FIRMWARE_DIR=${RPI_FIRMWARE_DIR:=""}