@@ -0,0 +1,61 | |||||
|
1 | RPI_MODEL=3 | |||
|
2 | RELEASE=buster | |||
|
3 | ||||
|
4 | CROSS_COMPILE=aarch64-linux-gnu- | |||
|
5 | QEMU_BINARY=/usr/bin/qemu-aarch64-static | |||
|
6 | ||||
|
7 | DEFLOCAL=de_DE.UTF-8 | |||
|
8 | ||||
|
9 | SET_ARCH=64 | |||
|
10 | BUILD_KERNEL=true | |||
|
11 | #KERNEL_BRANCH=rpi-4.18.y | |||
|
12 | KERNEL_CCACHE=true | |||
|
13 | ||||
|
14 | HOSTNAME=pihole | |||
|
15 | USER_NAME=pi | |||
|
16 | USER_PASSWORD=password | |||
|
17 | PASSWORD=password | |||
|
18 | ||||
|
19 | ENABLE_IPTABLES=true | |||
|
20 | ENABLE_I2C=true | |||
|
21 | ENABLE_SPI=true | |||
|
22 | ENABLE_NONFREE=true | |||
|
23 | ENABLE_WIRELESS=true | |||
|
24 | ENABLE_SOUND=true | |||
|
25 | ENABLE_MINGPU=true | |||
|
26 | ENABLE_DBUS=true | |||
|
27 | ENABLE_SYSVINIT=false | |||
|
28 | ENABLE_IFNAMES=false | |||
|
29 | ENABLE_UBOOT=TRUE | |||
|
30 | ENABLE_SPLITFS=false | |||
|
31 | ENABLE_INITRAMFS=true | |||
|
32 | ENABLE_SYSVINIT=true | |||
|
33 | ENABLE_ROOT=false | |||
|
34 | ENABLE_MINBASE=false | |||
|
35 | ENABLE_XORG=false | |||
|
36 | ENABLE_RSYSLOG=true | |||
|
37 | ENABLE_HWRANDOM=true | |||
|
38 | ENABLE_IPV6=true | |||
|
39 | ENABLE_DHCP=true | |||
|
40 | ||||
|
41 | ENABLE_REDUCE=true | |||
|
42 | REDUCE_APT=true | |||
|
43 | REDUCE_DOC=true | |||
|
44 | REDUCE_MAN=true | |||
|
45 | REDUCE_VIM=false | |||
|
46 | REDUCE_BASH=false | |||
|
47 | REDUCE_HWDB=false | |||
|
48 | REDUCE_SSHD=false | |||
|
49 | REDUCE_LOCALE=false | |||
|
50 | ||||
|
51 | ||||
|
52 | SSH_LIMIT_USERS=true | |||
|
53 | ||||
|
54 | KERNELSRC_DIR=/home/helge/linux | |||
|
55 | RPI_FIRMWARE_DIR=/home/helge/firmware | |||
|
56 | UBOOTSRC_DIR=/home/helge/u-boot | |||
|
57 | ||||
|
58 | APT_INCLUDES=busybox,kbd,net-tools,wireless-tools,git,crda,wireless-regdb,build-essential | |||
|
59 | ||||
|
60 | IMAGE_NAME=RPI-3-64bit | |||
|
61 | CHROOT_SCRIPTS=/home/helge/rpi23-gen-image/chroot_scripts |
@@ -88,7 +88,7 if [ "$BUILD_KERNEL" = true ] ; then | |||||
88 | make -C "${KERNEL_DIR}" ARCH="${KERNEL_ARCH}" CROSS_COMPILE="${CROSS_COMPILE}" "${KERNEL_DEFCONFIG}" |
|
88 | make -C "${KERNEL_DIR}" ARCH="${KERNEL_ARCH}" CROSS_COMPILE="${CROSS_COMPILE}" "${KERNEL_DEFCONFIG}" | |
89 | #Switch to KERNELSRC_DIR |
|
89 | #Switch to KERNELSRC_DIR | |
90 | pushd "${KERNEL_DIR}" |
|
90 | pushd "${KERNEL_DIR}" | |
91 |
|
91 | |||
92 | # GPL v2.0 |
|
92 | # GPL v2.0 | |
93 | #https://github.com/sakaki-/bcmrpi3-kernel-bis/blob/master/conform_config.sh |
|
93 | #https://github.com/sakaki-/bcmrpi3-kernel-bis/blob/master/conform_config.sh | |
94 | if [ "$KERNEL_ZSWAP" = true ] && { [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; } ; then |
|
94 | if [ "$KERNEL_ZSWAP" = true ] && { [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; } ; then | |
@@ -103,7 +103,7 if [ "$BUILD_KERNEL" = true ] ; then | |||||
103 | set_kernel_config ZSMALLOC y |
|
103 | set_kernel_config ZSMALLOC y | |
104 | set_kernel_config PGTABLE_MAPPING y |
|
104 | set_kernel_config PGTABLE_MAPPING y | |
105 | fi |
|
105 | fi | |
106 |
|
106 | |||
107 | if [ "$KERNEL_VIRT" = true ] && { [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; } ; then |
|
107 | if [ "$KERNEL_VIRT" = true ] && { [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; } ; then | |
108 | # enable basic KVM support; see e.g. |
|
108 | # enable basic KVM support; see e.g. | |
109 | # https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=210546&start=25#p1300453 |
|
109 | # https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=210546&start=25#p1300453 | |
@@ -209,7 +209,7 if [ "$BUILD_KERNEL" = true ] ; then | |||||
209 | #https://github.com/torvalds/linux/blob/master/init/Kconfig#L848 |
|
209 | #https://github.com/torvalds/linux/blob/master/init/Kconfig#L848 | |
210 | # Enables BPF syscall for systemd-journald |
|
210 | # Enables BPF syscall for systemd-journald | |
211 | if [ "$KERNEL_BPF" = true ] && { [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; } ; then |
|
211 | if [ "$KERNEL_BPF" = true ] && { [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; } ; then | |
212 | set_kernel_config CONFIG_BPF_SYSCALL y |
|
212 | set_kernel_config CONFIG_BPF_SYSCALL y | |
213 | set_kernel_config CONFIG_CGROUP_BPF y |
|
213 | set_kernel_config CONFIG_CGROUP_BPF y | |
214 | fi |
|
214 | fi | |
215 |
|
215 | |||
@@ -237,7 +237,7 if [ "$BUILD_KERNEL" = true ] ; then | |||||
237 | echo "CONFIG_CRYPTO_XTS=y" |
|
237 | echo "CONFIG_CRYPTO_XTS=y" | |
238 | echo "CONFIG_CRYPTO_SHA512=y" |
|
238 | echo "CONFIG_CRYPTO_SHA512=y" | |
239 | echo "CONFIG_CRYPTO_MANAGER=y" |
|
239 | echo "CONFIG_CRYPTO_MANAGER=y" | |
240 |
} >> "${KERNEL_DIR}" |
|
240 | } >> "${KERNEL_DIR}/.config" | |
241 | fi |
|
241 | fi | |
242 | fi |
|
242 | fi | |
243 |
|
243 | |||
@@ -376,17 +376,17 else # BUILD_KERNEL=false | |||||
376 | if [ "$KERNEL_ARCH" = arm64 ] && { [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; } ; then |
|
376 | if [ "$KERNEL_ARCH" = arm64 ] && { [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; } ; then | |
377 | # Create temporary directory for dl |
|
377 | # Create temporary directory for dl | |
378 | temp_dir=$(as_nobody mktemp -d) |
|
378 | temp_dir=$(as_nobody mktemp -d) | |
379 |
|
379 | |||
380 | # Fetch kernel dl |
|
380 | # Fetch kernel dl | |
381 | as_nobody wget -O "${temp_dir}"/kernel.tar.xz -c "$RPI3_64_KERNEL_URL" |
|
381 | as_nobody wget -O "${temp_dir}"/kernel.tar.xz -c "$RPI3_64_KERNEL_URL" | |
382 | #extract download |
|
382 | #extract download | |
383 | tar -xJf "${temp_dir}"/kernel.tar.xz -C "${temp_dir}" |
|
383 | tar -xJf "${temp_dir}"/kernel.tar.xz -C "${temp_dir}" | |
384 |
|
384 | |||
385 |
|
|
385 | #move extracted kernel to /boot/firmware | |
386 |
|
|
386 | mkdir "${R}/boot/firmware" | |
387 |
|
|
387 | cp "${temp_dir}"/boot/* "${R}"/boot/firmware/ | |
388 |
|
|
388 | cp -r "${temp_dir}"/lib/* "${R}"/lib/ | |
389 |
|
389 | |||
390 | # Remove temporary directory for kernel sources |
|
390 | # Remove temporary directory for kernel sources | |
391 | rm -fr "${temp_dir}" |
|
391 | rm -fr "${temp_dir}" | |
392 | # Set permissions of the kernel sources |
|
392 | # Set permissions of the kernel sources | |
@@ -397,7 +397,7 else # BUILD_KERNEL=false | |||||
397 | fi |
|
397 | fi | |
398 |
|
398 | |||
399 | # Check if kernel installation was successful |
|
399 | # Check if kernel installation was successful | |
400 | KERNEL="$(ls -1 "${R}"/boot/kernel* | sort | tail -n 1)" |
|
400 | KERNEL="$(ls -1 "${R}"/boot/firmware/kernel* | sort | tail -n 1)" | |
401 | if [ -z "$KERNEL" ] ; then |
|
401 | if [ -z "$KERNEL" ] ; then | |
402 | echo "error: kernel installation failed! (/boot/kernel* not found)" |
|
402 | echo "error: kernel installation failed! (/boot/kernel* not found)" | |
403 | cleanup |
|
403 | cleanup |
@@ -114,11 +114,10 if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then | |||||
114 | # Copy downloaded sources |
|
114 | # Copy downloaded sources | |
115 | mv "${temp_dir}/pi-bluetooth" "${R}/tmp/" |
|
115 | mv "${temp_dir}/pi-bluetooth" "${R}/tmp/" | |
116 |
|
116 | |||
117 |
|
|
117 | # Raspberry-sys-mod package for /dev/serial device needed by bluetooth service | |
118 |
|
|
118 | 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 | |
119 |
|
119 | # Bluetooth firmware from arch aur https://aur.archlinux.org/packages/pi-bluetooth/ | ||
120 | # Bluetooth firmware from arch aur https://aur.archlinux.org/packages/pi-bluetooth/ |
|
120 | wget -O "${R}/tmp/pi-bluetooth/LICENCE.broadcom_bcm43xx" https://aur.archlinux.org/cgit/aur.git/plain/LICENCE.broadcom_bcm43xx?h=pi-bluetooth | |
121 | wget -O "${R}/tmp/pi-bluetooth/LICENCE.broadcom_bcm43xx" https://aur.archlinux.org/cgit/aur.git/plain/LICENCE.broadcom_bcm43xx?h=pi-bluetooth |
|
|||
122 | wget -O "${R}/tmp/pi-bluetooth/BCM43430A1.hcd" https://aur.archlinux.org/cgit/aur.git/plain/BCM43430A1.hcd?h=pi-bluetooth |
|
121 | wget -O "${R}/tmp/pi-bluetooth/BCM43430A1.hcd" https://aur.archlinux.org/cgit/aur.git/plain/BCM43430A1.hcd?h=pi-bluetooth | |
123 |
|
122 | |||
124 | # Set permissions |
|
123 | # Set permissions | |
@@ -128,28 +127,31 if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then | |||||
128 | # Install tools |
|
127 | # Install tools | |
129 | install_readonly "${R}/tmp/pi-bluetooth/usr/bin/btuart" "${R}/usr/bin/btuart" |
|
128 | install_readonly "${R}/tmp/pi-bluetooth/usr/bin/btuart" "${R}/usr/bin/btuart" | |
130 | install_readonly "${R}/tmp/pi-bluetooth/usr/bin/bthelper" "${R}/usr/bin/bthelper" |
|
129 | install_readonly "${R}/tmp/pi-bluetooth/usr/bin/bthelper" "${R}/usr/bin/bthelper" | |
131 |
|
||||
132 | # Install bluetooth udev rule |
|
130 | # Install bluetooth udev rule | |
133 | install_readonly "${R}/tmp/pi-bluetooth/lib/udev/rules.d/90-pi-bluetooth.rules" "${LIB_DIR}/udev/rules.d/90-pi-bluetooth.rules" |
|
131 | install_readonly "${R}/tmp/pi-bluetooth/lib/udev/rules.d/90-pi-bluetooth.rules" "${LIB_DIR}/udev/rules.d/90-pi-bluetooth.rules" | |
134 | # aur |
|
132 | # aur | |
135 | # install_readonly "${R}/tmp/pi-bluetooth/50-bluetooth-hci-auto-poweron.rules" "${ETC_DIR}/udev/rules.d/50-bluetooth-hci-auto-poweron.rules" |
|
133 | # install_readonly "${R}/tmp/pi-bluetooth/50-bluetooth-hci-auto-poweron.rules" "${ETC_DIR}/udev/rules.d/50-bluetooth-hci-auto-poweron.rules" | |
136 |
|
||||
137 | # Install Firmware Flash file and apropiate licence |
|
134 | # Install Firmware Flash file and apropiate licence | |
138 | mkdir "${ETC_DIR}/firmware/" |
|
135 | mkdir "${ETC_DIR}/firmware/" | |
139 |
|
||||
140 | # Install firmware and licence |
|
136 | # Install firmware and licence | |
141 | # install_readonly "${R}/tmp/pi-bluetooth/LICENCE.broadcom_bcm43xx" "${ETC_DIR}/firmware/LICENCE.broadcom_bcm43xx" |
|
137 | # install_readonly "${R}/tmp/pi-bluetooth/LICENCE.broadcom_bcm43xx" "${ETC_DIR}/firmware/LICENCE.broadcom_bcm43xx" | |
142 | # install_readonly "${R}/tmp/pi-bluetooth/BCM43430A1.hcd" "${ETC_DIR}/firmware/BCM43430A1.hcd" |
|
138 | # install_readonly "${R}/tmp/pi-bluetooth/BCM43430A1.hcd" "${ETC_DIR}/firmware/BCM43430A1.hcd" | |
143 | install_readonly "${R}/tmp/pi-bluetooth/LICENCE.broadcom_bcm43xx" "${ETC_DIR}/firmware/LICENCE.broadcom_bcm43xx" |
|
139 | install_readonly "${R}/tmp/pi-bluetooth/LICENCE.broadcom_bcm43xx" "${ETC_DIR}/firmware/LICENCE.broadcom_bcm43xx" | |
144 |
|
|
140 | install_readonly "${R}/tmp/pi-bluetooth/BCM43430A1.hcd" "${ETC_DIR}/firmware/LICENCE.broadcom_bcm43xx" | |
145 |
|
||||
146 | # Install systemd service for bluetooth |
|
141 | # Install systemd service for bluetooth | |
147 | # install_readonly "${R}/tmp/pi-bluetooth/brcm43438.service" "${ETC_DIR}/systemd/system/brcm43438.service" |
|
142 | # install_readonly "${R}/tmp/pi-bluetooth/brcm43438.service" "${ETC_DIR}/systemd/system/brcm43438.service" | |
|
143 | <<<<<<< HEAD | |||
|
144 | install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.bthelper@.service" "${ETC_DIR}/systemd/system/pi-bluetooth.bthelper@.service" | |||
|
145 | install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.hciuart.service" "${ETC_DIR}/systemd/system/pi-bluetooth.hciuart.service" | |||
|
146 | # Install udev rule for bluetooth device | |||
|
147 | install_readonly "${R}/tmp/pi-bluetooth/99-com.rules" "${ETC_DIR}/udev/rules.d/99-com.rules" | |||
|
148 | ======= | |||
148 |
|
|
149 | install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.bthelper@.service" "${ETC_DIR}/systemd/system/pi-bluetooth.bthelper@.service" | |
149 | install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.hciuart.service" "${ETC_DIR}/systemd/system/pi-bluetooth.hciuart.service" |
|
150 | install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.hciuart.service" "${ETC_DIR}/systemd/system/pi-bluetooth.hciuart.service" | |
150 | install_readonly "${R}/tmp/pi-bluetooth/99-com.rules" "${ETC_DIR}/udev/rules.d/99-com.rules" |
|
151 | install_readonly "${R}/tmp/pi-bluetooth/99-com.rules" "${ETC_DIR}/udev/rules.d/99-com.rules" | |
|
152 | >>>>>>> bc6d966f8243dd759dfc1c0811528e37879ceb1b | |||
151 |
|
153 | |||
152 |
|
|
154 | # Remove temporary directory | |
153 | rm -fr "${temp_dir}" |
|
155 | rm -fr "${temp_dir}" | |
154 | fi |
|
156 | fi | |
155 | fi |
|
157 | fi |
General Comments 0
Vous devez vous connecter pour laisser un commentaire.
Se connecter maintenant