@@ -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 | 88 | make -C "${KERNEL_DIR}" ARCH="${KERNEL_ARCH}" CROSS_COMPILE="${CROSS_COMPILE}" "${KERNEL_DEFCONFIG}" |
|
89 | 89 | #Switch to KERNELSRC_DIR |
|
90 | 90 | pushd "${KERNEL_DIR}" |
|
91 | ||
|
91 | ||
|
92 | 92 | # GPL v2.0 |
|
93 | 93 | #https://github.com/sakaki-/bcmrpi3-kernel-bis/blob/master/conform_config.sh |
|
94 | 94 | if [ "$KERNEL_ZSWAP" = true ] && { [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; } ; then |
@@ -103,7 +103,7 if [ "$BUILD_KERNEL" = true ] ; then | |||
|
103 | 103 | set_kernel_config ZSMALLOC y |
|
104 | 104 | set_kernel_config PGTABLE_MAPPING y |
|
105 | 105 | fi |
|
106 | ||
|
106 | ||
|
107 | 107 | if [ "$KERNEL_VIRT" = true ] && { [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; } ; then |
|
108 | 108 | # enable basic KVM support; see e.g. |
|
109 | 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 | 209 | #https://github.com/torvalds/linux/blob/master/init/Kconfig#L848 |
|
210 | 210 | # Enables BPF syscall for systemd-journald |
|
211 | 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 | 213 | set_kernel_config CONFIG_CGROUP_BPF y |
|
214 | 214 | fi |
|
215 | 215 | |
@@ -237,7 +237,7 if [ "$BUILD_KERNEL" = true ] ; then | |||
|
237 | 237 | echo "CONFIG_CRYPTO_XTS=y" |
|
238 | 238 | echo "CONFIG_CRYPTO_SHA512=y" |
|
239 | 239 | echo "CONFIG_CRYPTO_MANAGER=y" |
|
240 |
} >> "${KERNEL_DIR}" |
|
|
240 | } >> "${KERNEL_DIR}/.config" | |
|
241 | 241 | fi |
|
242 | 242 | fi |
|
243 | 243 | |
@@ -376,17 +376,17 else # BUILD_KERNEL=false | |||
|
376 | 376 | if [ "$KERNEL_ARCH" = arm64 ] && { [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; } ; then |
|
377 | 377 | # Create temporary directory for dl |
|
378 | 378 | temp_dir=$(as_nobody mktemp -d) |
|
379 | ||
|
379 | ||
|
380 | 380 | # Fetch kernel dl |
|
381 | 381 | as_nobody wget -O "${temp_dir}"/kernel.tar.xz -c "$RPI3_64_KERNEL_URL" |
|
382 | 382 | #extract download |
|
383 | 383 | tar -xJf "${temp_dir}"/kernel.tar.xz -C "${temp_dir}" |
|
384 | ||
|
385 |
|
|
|
386 |
|
|
|
387 |
|
|
|
388 |
|
|
|
389 | ||
|
384 | ||
|
385 | #move extracted kernel to /boot/firmware | |
|
386 | mkdir "${R}/boot/firmware" | |
|
387 | cp "${temp_dir}"/boot/* "${R}"/boot/firmware/ | |
|
388 | cp -r "${temp_dir}"/lib/* "${R}"/lib/ | |
|
389 | ||
|
390 | 390 | # Remove temporary directory for kernel sources |
|
391 | 391 | rm -fr "${temp_dir}" |
|
392 | 392 | # Set permissions of the kernel sources |
@@ -397,7 +397,7 else # BUILD_KERNEL=false | |||
|
397 | 397 | fi |
|
398 | 398 | |
|
399 | 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 | 401 | if [ -z "$KERNEL" ] ; then |
|
402 | 402 | echo "error: kernel installation failed! (/boot/kernel* not found)" |
|
403 | 403 | cleanup |
@@ -114,11 +114,10 if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then | |||
|
114 | 114 | # Copy downloaded sources |
|
115 | 115 | mv "${temp_dir}/pi-bluetooth" "${R}/tmp/" |
|
116 | 116 | |
|
117 |
|
|
|
118 |
|
|
|
119 | ||
|
120 | # Bluetooth firmware from arch aur https://aur.archlinux.org/packages/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 | |
|
117 | # Raspberry-sys-mod package for /dev/serial device needed by bluetooth service | |
|
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 | # 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 | |
|
122 | 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 | 123 | # Set permissions |
@@ -128,28 +127,31 if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then | |||
|
128 | 127 | # Install tools |
|
129 | 128 | install_readonly "${R}/tmp/pi-bluetooth/usr/bin/btuart" "${R}/usr/bin/btuart" |
|
130 | 129 | install_readonly "${R}/tmp/pi-bluetooth/usr/bin/bthelper" "${R}/usr/bin/bthelper" |
|
131 | ||
|
132 | 130 | # Install bluetooth udev rule |
|
133 | 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 | 132 | # aur |
|
135 | 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 | 134 | # Install Firmware Flash file and apropiate licence |
|
138 | 135 | mkdir "${ETC_DIR}/firmware/" |
|
139 | ||
|
140 | 136 | # Install firmware and licence |
|
141 | 137 | # install_readonly "${R}/tmp/pi-bluetooth/LICENCE.broadcom_bcm43xx" "${ETC_DIR}/firmware/LICENCE.broadcom_bcm43xx" |
|
142 | 138 | # install_readonly "${R}/tmp/pi-bluetooth/BCM43430A1.hcd" "${ETC_DIR}/firmware/BCM43430A1.hcd" |
|
143 | 139 | install_readonly "${R}/tmp/pi-bluetooth/LICENCE.broadcom_bcm43xx" "${ETC_DIR}/firmware/LICENCE.broadcom_bcm43xx" |
|
144 |
|
|
|
145 | ||
|
140 | install_readonly "${R}/tmp/pi-bluetooth/BCM43430A1.hcd" "${ETC_DIR}/firmware/LICENCE.broadcom_bcm43xx" | |
|
146 | 141 | # Install systemd service for bluetooth |
|
147 | 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 |
|
|
149 | 150 | install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.hciuart.service" "${ETC_DIR}/systemd/system/pi-bluetooth.hciuart.service" |
|
150 | 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 | 155 | rm -fr "${temp_dir}" |
|
154 | 156 | fi |
|
155 | 157 | fi |
General Comments 0
Vous devez vous connecter pour laisser un commentaire.
Se connecter maintenant