From 78b6fc34812fa368c86028a5c773390ef7da2ccf 2018-11-21 16:51:08 From: Unknown Date: 2018-11-21 16:51:08 Subject: [PATCH] . --- diff --git a/bootstrap.d/13-kernel.sh b/bootstrap.d/13-kernel.sh index f3a1515..2dd2f0f 100644 --- a/bootstrap.d/13-kernel.sh +++ b/bootstrap.d/13-kernel.sh @@ -88,7 +88,7 @@ if [ "$BUILD_KERNEL" = true ] ; then make -C "${KERNEL_DIR}" ARCH="${KERNEL_ARCH}" CROSS_COMPILE="${CROSS_COMPILE}" "${KERNEL_DEFCONFIG}" #Switch to KERNELSRC_DIR pushd "${KERNEL_DIR}" - + # GPL v2.0 #https://github.com/sakaki-/bcmrpi3-kernel-bis/blob/master/conform_config.sh if [ "$KERNEL_ZSWAP" = true ] && { [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; } ; then @@ -103,7 +103,7 @@ if [ "$BUILD_KERNEL" = true ] ; then set_kernel_config ZSMALLOC y set_kernel_config PGTABLE_MAPPING y fi - + if [ "$KERNEL_VIRT" = true ] && { [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; } ; then # enable basic KVM support; see e.g. # https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=210546&start=25#p1300453 @@ -209,7 +209,7 @@ if [ "$BUILD_KERNEL" = true ] ; then #https://github.com/torvalds/linux/blob/master/init/Kconfig#L848 # Enables BPF syscall for systemd-journald if [ "$KERNEL_BPF" = true ] && { [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; } ; then - set_kernel_config CONFIG_BPF_SYSCALL y + set_kernel_config CONFIG_BPF_SYSCALL y set_kernel_config CONFIG_CGROUP_BPF y fi @@ -237,7 +237,7 @@ if [ "$BUILD_KERNEL" = true ] ; then echo "CONFIG_CRYPTO_XTS=y" echo "CONFIG_CRYPTO_SHA512=y" echo "CONFIG_CRYPTO_MANAGER=y" - } >> "${KERNEL_DIR}"/.config + } >> "${KERNEL_DIR}/.config" fi fi @@ -376,17 +376,17 @@ else # BUILD_KERNEL=false if [ "$KERNEL_ARCH" = arm64 ] && { [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; } ; then # Create temporary directory for dl temp_dir=$(as_nobody mktemp -d) - + # Fetch kernel dl as_nobody wget -O "${temp_dir}"/kernel.tar.xz -c "$RPI3_64_KERNEL_URL" #extract download tar -xJf "${temp_dir}"/kernel.tar.xz -C "${temp_dir}" - - #move extracted kernel to /boot/firmware - mkdir "${R}/boot/firmware" - cp "${temp_dir}"/boot/* "${R}"/boot/firmware/ - cp -r "${temp_dir}"/lib/* "${R}"/lib/ - + + #move extracted kernel to /boot/firmware + mkdir "${R}/boot/firmware" + cp "${temp_dir}"/boot/* "${R}"/boot/firmware/ + cp -r "${temp_dir}"/lib/* "${R}"/lib/ + # Remove temporary directory for kernel sources rm -fr "${temp_dir}" # Set permissions of the kernel sources @@ -397,7 +397,7 @@ else # BUILD_KERNEL=false fi # Check if kernel installation was successful - KERNEL="$(ls -1 "${R}"/boot/kernel* | sort | tail -n 1)" + KERNEL="$(ls -1 "${R}"/boot/firmware/kernel* | sort | tail -n 1)" if [ -z "$KERNEL" ] ; then echo "error: kernel installation failed! (/boot/kernel* not found)" cleanup diff --git a/bootstrap.d/15-rpi-config.sh b/bootstrap.d/15-rpi-config.sh index 3f6f73c..38620fc 100644 --- a/bootstrap.d/15-rpi-config.sh +++ b/bootstrap.d/15-rpi-config.sh @@ -114,11 +114,10 @@ if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then # Copy downloaded sources mv "${temp_dir}/pi-bluetooth" "${R}/tmp/" - # Raspberry-sys-mod package for /dev/serial device needed by bluetooth service - wget -O "${R}/tmp/pi-bluetooth/99-com.rules" https://raw.githubusercontent.com/RPi-Distro/raspberrypi-sys-mods/master/etc.armhf/udev/rules.d/99-com.rules - - # Bluetooth firmware from arch aur https://aur.archlinux.org/packages/pi-bluetooth/ - wget -O "${R}/tmp/pi-bluetooth/LICENCE.broadcom_bcm43xx" https://aur.archlinux.org/cgit/aur.git/plain/LICENCE.broadcom_bcm43xx?h=pi-bluetooth + # Raspberry-sys-mod package for /dev/serial device needed by bluetooth service + wget -O "${R}/tmp/pi-bluetooth/99-com.rules" https://raw.githubusercontent.com/RPi-Distro/raspberrypi-sys-mods/master/etc.armhf/udev/rules.d/99-com.rules + # Bluetooth firmware from arch aur https://aur.archlinux.org/packages/pi-bluetooth/ + 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 # Set permissions @@ -128,28 +127,31 @@ if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then # 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" - # 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" - # Install Firmware Flash file and apropiate licence mkdir "${ETC_DIR}/firmware/" - # Install firmware and licence # 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" 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/LICENCE.broadcom_bcm43xx" - + install_readonly "${R}/tmp/pi-bluetooth/BCM43430A1.hcd" "${ETC_DIR}/firmware/LICENCE.broadcom_bcm43xx" # Install systemd service for bluetooth # install_readonly "${R}/tmp/pi-bluetooth/brcm43438.service" "${ETC_DIR}/systemd/system/brcm43438.service" +<<<<<<< HEAD + install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.bthelper@.service" "${ETC_DIR}/systemd/system/pi-bluetooth.bthelper@.service" + install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.hciuart.service" "${ETC_DIR}/systemd/system/pi-bluetooth.hciuart.service" + # Install udev rule for bluetooth device + install_readonly "${R}/tmp/pi-bluetooth/99-com.rules" "${ETC_DIR}/udev/rules.d/99-com.rules" +======= install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.bthelper@.service" "${ETC_DIR}/systemd/system/pi-bluetooth.bthelper@.service" install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.hciuart.service" "${ETC_DIR}/systemd/system/pi-bluetooth.hciuart.service" install_readonly "${R}/tmp/pi-bluetooth/99-com.rules" "${ETC_DIR}/udev/rules.d/99-com.rules" +>>>>>>> bc6d966f8243dd759dfc1c0811528e37879ceb1b - # Remove temporary directory + # Remove temporary directory rm -fr "${temp_dir}" fi fi diff --git a/templates/ALL-configparams b/templates/ALL-configparams new file mode 100644 index 0000000..582fc33 --- /dev/null +++ b/templates/ALL-configparams @@ -0,0 +1,61 @@ +RPI_MODEL=3 +RELEASE=buster + +CROSS_COMPILE=aarch64-linux-gnu- +QEMU_BINARY=/usr/bin/qemu-aarch64-static + +DEFLOCAL=de_DE.UTF-8 + +SET_ARCH=64 +BUILD_KERNEL=true +#KERNEL_BRANCH=rpi-4.18.y +KERNEL_CCACHE=true + +HOSTNAME=pihole +USER_NAME=pi +USER_PASSWORD=password +PASSWORD=password + +ENABLE_IPTABLES=true +ENABLE_I2C=true +ENABLE_SPI=true +ENABLE_NONFREE=true +ENABLE_WIRELESS=true +ENABLE_SOUND=true +ENABLE_MINGPU=true +ENABLE_DBUS=true +ENABLE_SYSVINIT=false +ENABLE_IFNAMES=false +ENABLE_UBOOT=TRUE +ENABLE_SPLITFS=false +ENABLE_INITRAMFS=true +ENABLE_SYSVINIT=true +ENABLE_ROOT=false +ENABLE_MINBASE=false +ENABLE_XORG=false +ENABLE_RSYSLOG=true +ENABLE_HWRANDOM=true +ENABLE_IPV6=true +ENABLE_DHCP=true + +ENABLE_REDUCE=true +REDUCE_APT=true +REDUCE_DOC=true +REDUCE_MAN=true +REDUCE_VIM=false +REDUCE_BASH=false +REDUCE_HWDB=false +REDUCE_SSHD=false +REDUCE_LOCALE=false + + +SSH_LIMIT_USERS=true + +KERNELSRC_DIR=/home/helge/linux +RPI_FIRMWARE_DIR=/home/helge/firmware +UBOOTSRC_DIR=/home/helge/u-boot + +APT_INCLUDES=busybox,kbd,net-tools,wireless-tools,git,crda,wireless-regdb,build-essential + +IMAGE_NAME=RPI-3-64bit +CHROOT_SCRIPTS=/home/helge/rpi23-gen-image/chroot_scripts