diff --git a/bootstrap.d/10-bootstrap.sh b/bootstrap.d/10-bootstrap.sh index bb58cab..7a5315c 100644 --- a/bootstrap.d/10-bootstrap.sh +++ b/bootstrap.d/10-bootstrap.sh @@ -19,7 +19,7 @@ if [ "$ENABLE_MINBASE" = true ] ; then fi # Base debootstrap (unpack only) -http_proxy=${APT_PROXY} debootstrap ${APT_EXCLUDES} --arch="${RELEASE_ARCH}" --foreign ${VARIANT} --components="${COMPONENTS}" --include="${APT_INCLUDES}" "${RELEASE}" "${R}" "http://${APT_SERVER}" +http_proxy=${APT_PROXY} debootstrap "${APT_EXCLUDES}" --arch="${RELEASE_ARCH}" --foreign ${VARIANT} --components="${COMPONENTS}" --include="${APT_INCLUDES}" "${RELEASE}" "${R}" "http://${APT_SERVER}" # Copy qemu emulator binary to chroot install -m 755 -o root -g root "${QEMU_BINARY}" "${R}${QEMU_BINARY}" diff --git a/bootstrap.d/13-kernel.sh b/bootstrap.d/13-kernel.sh index 34e93e4..0e53ddf 100644 --- a/bootstrap.d/13-kernel.sh +++ b/bootstrap.d/13-kernel.sh @@ -379,7 +379,7 @@ if [ "$KERNEL_ARCH" = arm64 ] && ( [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] temp_dir=$(as_nobody mktemp -d) # Fetch kernel dl - as_nobody wget -c "$RPI3_64_KERNEL_URL" "${temp_dir}"/kernel.tar.xz + as_nobody wget -O "${temp_dir}"/kernel.tar.xz -c "$RPI3_64_KERNEL_URL" #extract download tar -xJf kernel.tar.xz -C "${R}" diff --git a/bootstrap.d/15-rpi-config.sh b/bootstrap.d/15-rpi-config.sh index 3fe22ce..6d0527d 100644 --- a/bootstrap.d/15-rpi-config.sh +++ b/bootstrap.d/15-rpi-config.sh @@ -109,24 +109,49 @@ if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] || [ "$RPI_MODEL" = 3P ]; then if [ "$ENABLE_CONSOLE" = true ] && [ "$ENABLE_UBOOT" = false ] ; then echo "dtoverlay=pi3-disable-bt" >> "${BOOT_DIR}/config.txt" echo "enable_uart=1" >> "${BOOT_DIR}/config.txt" - #else - # Create temporary directory for U-Boot sources - #temp_dir=$(as_nobody mktemp -d) + else + # Create temporary directory for Bluetooth sources + temp_dir=$(as_nobody mktemp -d) + + # Fetch Bluetooth sources + as_nobody git -C "${temp_dir}" clone "${BLUETOOTH_URL}" + + # Copy downloaded sources + mv "${temp_dir}/pi-bluetooth" "${R}/tmp/" + + # Set permissions + chown -R root:root "${R}/tmp/pi-bluetooth" + + # Install files to chroot + # Install tools + install_readonly "${R}/tmp/pi-bluetooth/usr/bin/btuart" "${R}/usr/bin/btuart" + install_readonly "${R}/tmp/pi-bluetooth/usr/bin/bthelper" "${R}/usr/bin/bthelper" - # Fetch U-Boot sources - #as_nobody git -C "${temp_dir}" clone "${BLUETOOTH_URL}" + # Install bluetooth udev rule + install_readonly "${R}/tmp/pi-bluetooth/lib/udev/rules.d/90-pi-bluetooth.rules" "${LIB_DIR}/udev/rules.d/90-pi-bluetooth.rules" + #aur + #install_readonly "${R}/tmp/pi-bluetooth/50-bluetooth-hci-auto-poweron.rules" "${ETC_DIR}/udev/rules.d/50-bluetooth-hci-auto-poweron.rules" - # Copy downloaded U-Boot sources - #mv "${temp_dir}/pi-bluetooth" "${R}/tmp/" + # Install Firmware Flash file and apropiate licence + mkdir "${ETC_DIR}/firmware/" - # Set permissions of the U-Boot sources - #chown -R root:root "${R}/tmp/pi-bluetooth" + #aur https://aur.archlinux.org/packages/pi-bluetooth/ + #install_readonly "${R}/tmp/pi-bluetooth/LICENCE.broadcom_bcm43xx" "${ETC_DIR}/firmware/LICENCE.broadcom_bcm43xx" + #install_readonly "${R}/tmp/pi-bluetooth/BCM43430A1.hcd" "${ETC_DIR}/firmware/BCM43430A1.hcd" + + wget -O "${R}/tmp/pi-bluetooth/LICENCE.broadcom_bcm43xx" https://aur.archlinux.org/cgit/aur.git/plain/LICENCE.broadcom_bcm43xx?h=pi-bluetooth + wget -O "${R}/tmp/pi-bluetooth/BCM43430A1.hcd" https://aur.archlinux.org/cgit/aur.git/plain/BCM43430A1.hcd?h=pi-bluetooth + + # Install systemd service for bluetooth + #install_readonly "${R}/tmp/pi-bluetooth/brcm43438.service" "${ETC_DIR}/systemd/system/brcm43438.service" - # Remove temporary directory for U-Boot sources + # Remove temporary directory #rm -fr "${temp_dir}" + # Get /dev/serial back for compability + # Raspberry-sys-mod package + wget -O "${ETC_DIR}/udev/rules.d/99-com.rules" https://raw.githubusercontent.com/RPi-Distro/raspberrypi-sys-mods/master/etc.armhf/udev/rules.d/99-com.rules - #"${R}/tmp/userland" fi fi diff --git a/rpi23-gen-image.sh b/rpi23-gen-image.sh index 8ba8102..b48b9cb 100755 --- a/rpi23-gen-image.sh +++ b/rpi23-gen-image.sh @@ -63,7 +63,8 @@ RPI3_64_DEF_KERNEL_URL=${RPI3_64_DEF_KERNEL_URL:=https://github.com/sakaki-/bcmr #enhanced kernel RPI3_64_KERNEL_URL=${RPI3_64_KERNEL_URL:=$RPI3_64_BIS_KERNEL_URL} #https://aur.archlinux.org/packages/pi-bluetooth/ -BLUETOOTH_URL=${BLUETOOTH_URL:=https://aur.archlinux.org/pi-bluetooth.git} +#BLUETOOTH_URL=${BLUETOOTH_URL:=https://aur.archlinux.org/pi-bluetooth.git} +BLUETOOTH_URL=${BLUETOOTH_URL:=https://github.com/RPi-Distro/pi-bluetooth.git} # Build directories BASEDIR=${BASEDIR:=$(pwd)/images/${RELEASE}}