@@ -11,29 +11,24 if [ -z "$APT_PROXY" ] ; then | |||
|
11 | 11 | sed -i "s/\"\"/\"${APT_PROXY}\"/" "${ETC_DIR}/apt/apt.conf.d/10proxy" |
|
12 | 12 | fi |
|
13 | 13 | |
|
14 | if [ "$BUILD_KERNEL" = false ] ; then | |
|
15 | echo "Downloading precompiled kernel" | |
|
16 | echo "error: not configured" | |
|
17 | exit 1; | |
|
18 | # BUILD_KERNEL=true | |
|
19 | else | |
|
20 | echo "No precompiled kernel repositories were added" | |
|
21 | fi | |
|
22 | 14 | |
|
23 | 15 | # Upgrade package index and update all installed packages and changed dependencies |
|
24 | 16 | chroot_exec apt-get -qq -y update |
|
25 | 17 | chroot_exec apt-get -qq -y -u dist-upgrade |
|
26 | 18 | |
|
19 | # Install additional packages | |
|
27 | 20 | if [ "$APT_INCLUDES_LATE" ] ; then |
|
28 | 21 | chroot_exec apt-get -qq -y install "$(echo "$APT_INCLUDES_LATE" |tr , ' ')" |
|
29 | 22 | fi |
|
30 | 23 | |
|
24 | # Install Debian custom packages | |
|
31 | 25 | if [ -d packages ] ; then |
|
32 | 26 | for package in packages/*.deb ; do |
|
33 | 27 | cp "$package" "${R}"/tmp |
|
34 | 28 | chroot_exec dpkg --unpack /tmp/"$(basename "$package")" |
|
35 | 29 | done |
|
36 | 30 | fi |
|
31 | ||
|
37 | 32 | chroot_exec apt-get -qq -y -f install |
|
38 | 33 | |
|
39 | 34 | chroot_exec apt-get -qq -y check |
@@ -107,36 +107,21 if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then | |||
|
107 | 107 | # Set permissions |
|
108 | 108 | chown -R root:root "${R}/tmp/pi-bluetooth" |
|
109 | 109 | |
|
110 | # Install files to chroot | |
|
111 | 110 |
|
|
112 | 111 | install_readonly "${R}/tmp/pi-bluetooth/usr/bin/btuart" "${R}/usr/bin/btuart" |
|
113 | 112 | install_readonly "${R}/tmp/pi-bluetooth/usr/bin/bthelper" "${R}/usr/bin/bthelper" |
|
114 | 113 | |
|
115 | 114 | # Install bluetooth udev rule |
|
116 | 115 | install_readonly "${R}/tmp/pi-bluetooth/lib/udev/rules.d/90-pi-bluetooth.rules" "${LIB_DIR}/udev/rules.d/90-pi-bluetooth.rules" |
|
117 | #aur | |
|
118 | #install_readonly "${R}/tmp/pi-bluetooth/50-bluetooth-hci-auto-poweron.rules" "${ETC_DIR}/udev/rules.d/50-bluetooth-hci-auto-poweron.rules" | |
|
119 | 116 |
|
|
120 | 117 | # Install Firmware Flash file and apropiate licence |
|
121 | 118 | mkdir "${ETC_DIR}/firmware/" |
|
122 | 119 | |
|
123 | #aur https://aur.archlinux.org/packages/pi-bluetooth/ | |
|
124 | #install_readonly "${R}/tmp/pi-bluetooth/LICENCE.broadcom_bcm43xx" "${ETC_DIR}/firmware/LICENCE.broadcom_bcm43xx" | |
|
125 | #install_readonly "${R}/tmp/pi-bluetooth/BCM43430A1.hcd" "${ETC_DIR}/firmware/BCM43430A1.hcd" | |
|
126 | ||
|
127 | 120 | wget -O "${R}/tmp/pi-bluetooth/LICENCE.broadcom_bcm43xx" https://aur.archlinux.org/cgit/aur.git/plain/LICENCE.broadcom_bcm43xx?h=pi-bluetooth |
|
128 | 121 | wget -O "${R}/tmp/pi-bluetooth/BCM43430A1.hcd" https://aur.archlinux.org/cgit/aur.git/plain/BCM43430A1.hcd?h=pi-bluetooth |
|
129 | 122 | |
|
130 | # Install systemd service for bluetooth | |
|
131 | #install_readonly "${R}/tmp/pi-bluetooth/brcm43438.service" "${ETC_DIR}/systemd/system/brcm43438.service" | |
|
132 | ||
|
133 | # Remove temporary directory | |
|
134 | #rm -fr "${temp_dir}" | |
|
135 | ||
|
136 | 123 | # Get /dev/serial back for compability |
|
137 | # Raspberry-sys-mod package | |
|
138 | 124 | 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 |
|
139 | ||
|
140 | 125 | fi |
|
141 | 126 | fi |
|
142 | 127 |
@@ -95,7 +95,7 fi | |||
|
95 | 95 | # Download the firmware binary blob required to use the RPi3 wireless interface |
|
96 | 96 | if [ "$ENABLE_WIRELESS" = true ] ; then |
|
97 | 97 | if [ ! -d "${WLAN_FIRMWARE_DIR}" ] ; then |
|
98 |
|
|
|
98 | mkdir -p "${WLAN_FIRMWARE_DIR}" | |
|
99 | 99 | fi |
|
100 | 100 | |
|
101 | 101 | # Create temporary directory for firmware binary blob |
@@ -103,20 +103,21 if [ "$ENABLE_WIRELESS" = true ] ; then | |||
|
103 | 103 | |
|
104 | 104 | # Fetch firmware binary blob for RPI3B+ |
|
105 | 105 | if [ "$RPI_MODEL" = 3P ] ; then |
|
106 | as_nobody wget -q -O "${temp_dir}/brcmfmac43455-sdio.bin" "${WLAN_FIRMWARE_URL}/brcmfmac43455-sdio.bin" | |
|
107 |
as_nobody wget -q -O "${temp_dir}/brcmfmac43455-sdio. |
|
|
108 |
as_nobody wget -q -O "${temp_dir}/brcmfmac43455-sdio. |
|
|
106 | # Fetch firmware binary blob for RPi3P | |
|
107 | as_nobody wget -q -O "${temp_dir}/brcmfmac43455-sdio.bin" "${WLAN_FIRMWARE_URL}/brcmfmac43455-sdio.bin" | |
|
108 | as_nobody wget -q -O "${temp_dir}/brcmfmac43455-sdio.txt" "${WLAN_FIRMWARE_URL}/brcmfmac43455-sdio.txt" | |
|
109 | as_nobody wget -q -O "${temp_dir}/brcmfmac43455-sdio.clm_blob" "${WLAN_FIRMWARE_URL}/brcmfmac43455-sdio.clm_blob" | |
|
109 | 110 | elif [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 0 ] ; then |
|
110 |
# Fetch firmware binary blob for RP |
|
|
111 | as_nobody wget -q -O "${temp_dir}/brcmfmac43430-sdio.bin" "${WLAN_FIRMWARE_URL}/brcmfmac43430-sdio.bin" | |
|
112 | as_nobody wget -q -O "${temp_dir}/brcmfmac43430-sdio.txt" "${WLAN_FIRMWARE_URL}/brcmfmac43430-sdio.txt" | |
|
111 | # Fetch firmware binary blob for RPi3 | |
|
112 | as_nobody wget -q -O "${temp_dir}/brcmfmac43430-sdio.bin" "${WLAN_FIRMWARE_URL}/brcmfmac43430-sdio.bin" | |
|
113 | as_nobody wget -q -O "${temp_dir}/brcmfmac43430-sdio.txt" "${WLAN_FIRMWARE_URL}/brcmfmac43430-sdio.txt" | |
|
113 | 114 | fi |
|
114 | 115 | |
|
115 | 116 | # Move downloaded firmware binary blob |
|
116 | 117 | if [ "$RPI_MODEL" = 3P ] ; then |
|
117 | mv "${temp_dir}/brcmfmac43455-sdio."* "${WLAN_FIRMWARE_DIR}/" | |
|
118 | mv "${temp_dir}/brcmfmac43455-sdio."* "${WLAN_FIRMWARE_DIR}/" | |
|
118 | 119 | elif [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 0 ] ; then |
|
119 | mv "${temp_dir}/brcmfmac43430-sdio."* "${WLAN_FIRMWARE_DIR}/" | |
|
120 | mv "${temp_dir}/brcmfmac43430-sdio."* "${WLAN_FIRMWARE_DIR}/" | |
|
120 | 121 | fi |
|
121 | 122 | |
|
122 | 123 | # Remove temporary directory for firmware binary blob |
@@ -124,10 +125,10 if [ "$ENABLE_WIRELESS" = true ] ; then | |||
|
124 | 125 | |
|
125 | 126 | # Set permissions of the firmware binary blob |
|
126 | 127 | if [ "$RPI_MODEL" = 3P ] ; then |
|
127 | chown root:root "${WLAN_FIRMWARE_DIR}/brcmfmac43455-sdio."* | |
|
128 |
chmod 600 "${WLAN_FIRMWARE_DIR}/brcmfmac43455-sdio."* |
|
|
128 | chown root:root "${WLAN_FIRMWARE_DIR}/brcmfmac43455-sdio."* | |
|
129 | chmod 600 "${WLAN_FIRMWARE_DIR}/brcmfmac43455-sdio."* | |
|
129 | 130 | elif [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 0 ] ; then |
|
130 | chown root:root "${WLAN_FIRMWARE_DIR}/brcmfmac43430-sdio."* | |
|
131 | chmod 600 "${WLAN_FIRMWARE_DIR}/brcmfmac43430-sdio."* | |
|
131 | chown root:root "${WLAN_FIRMWARE_DIR}/brcmfmac43430-sdio."* | |
|
132 | chmod 600 "${WLAN_FIRMWARE_DIR}/brcmfmac43430-sdio."* | |
|
132 | 133 | fi |
|
133 | 134 | fi |
@@ -72,7 +72,7 if [ "$ENABLE_UBOOT" = true ] ; then | |||
|
72 | 72 | printf "\n# 64bit-mode" >> "${BOOT_DIR}/config.txt" |
|
73 | 73 | printf "\n# arm_control=0x200 is deprecated https://www.raspberrypi.org/documentation/configuration/config-txt/misc.md" >> "${BOOT_DIR}/config.txt" |
|
74 | 74 | printf "\narm_64bit=1" >> "${BOOT_DIR}/config.txt" |
|
75 | #in 64bit uboot booti is used instead of bootz [like in KERNEL_BIN_IMAGE=zImage (armv7)|| Image(armv8)] | |
|
75 | ||
|
76 | 76 |
|
|
77 | 77 | fi |
|
78 | 78 |
@@ -29,6 +29,7 if [ "$ENABLE_VIDEOCORE" = true ] ; then | |||
|
29 | 29 | |
|
30 | 30 | # Create build dir |
|
31 | 31 | mkdir "${R}"/tmp/userland/build |
|
32 | ||
|
32 | 33 | # push us to build directory |
|
33 | 34 | pushd "${R}"/tmp/userland/build |
|
34 | 35 | |
@@ -46,6 +47,7 if [ "$ENABLE_VIDEOCORE" = true ] ; then | |||
|
46 | 47 | |
|
47 | 48 | #build userland |
|
48 | 49 | make -j "$(nproc)" |
|
50 | ||
|
49 | 51 | #pop us out of build dir |
|
50 | 52 | popd |
|
51 | 53 | fi |
@@ -45,7 +45,7 RPI_MODEL=${RPI_MODEL:=2} | |||
|
45 | 45 | # Debian release |
|
46 | 46 | RELEASE=${RELEASE:=buster} |
|
47 | 47 | |
|
48 | #Kernel Branch | |
|
48 | # Kernel Branch | |
|
49 | 49 | KERNEL_BRANCH=${KERNEL_BRANCH:=""} |
|
50 | 50 | |
|
51 | 51 | # URLs |
@@ -196,7 +196,7 CHROOT_SCRIPTS=${CHROOT_SCRIPTS:=""} | |||
|
196 | 196 | APT_INCLUDES=${APT_INCLUDES:=""} |
|
197 | 197 | APT_INCLUDES="${APT_INCLUDES},apt-transport-https,apt-utils,ca-certificates,debian-archive-keyring,dialog,sudo,systemd,sysvinit-utils,locales,keyboard-configuration,console-setup" |
|
198 | 198 | |
|
199 | #Packages to exclude from chroot build environment | |
|
199 | # Packages to exclude from chroot build environment | |
|
200 | 200 | APT_EXCLUDES=${APT_EXCLUDES:=""} |
|
201 | 201 | |
|
202 | 202 | # Packages required for bootstrapping |
@@ -208,29 +208,17 COMPILER_PACKAGES="" | |||
|
208 | 208 | |
|
209 | 209 | set +x |
|
210 | 210 | |
|
211 | #If init and systemd-sysv are wanted e.g. halt/reboot/shutdown scripts | |
|
212 | if [ "$ENABLE_SYSVINIT" = false ] ; then | |
|
213 | APT_EXCLUDES="--exclude=${APT_EXCLUDES},init,systemd-sysv" | |
|
214 | fi | |
|
215 | ||
|
216 | #Check if apt-cacher-ng has its default port open on and set APT_PROXY | |
|
217 | if [ -n "$(lsof -i :3142)" ] ; then | |
|
218 | HTTP_PROXY=http://127.0.0.1:3142/ | |
|
219 | fi | |
|
220 | ||
|
221 | #make script easier and more stable to use with convenient setup switch. Just setup SET_ARCH and RPI_MODEL and your good to go! | |
|
211 | # Setup architecture specific settings | |
|
222 | 212 | if [ -n "$SET_ARCH" ] ; then |
|
223 | echo "Setting Architecture specific settings" | |
|
224 | ################################## | |
|
225 | # 64 bit config | |
|
226 | ################################## | |
|
213 | ||
|
214 | # 64 bit configuration | |
|
227 | 215 | if [ "$SET_ARCH" = 64 ] ; then |
|
228 | echo "64 bit mode selected - Setting up enviroment" | |
|
229 | # 64 bit depended settings | |
|
216 | # General 64 bit depended settings | |
|
230 | 217 | QEMU_BINARY=${QEMU_BINARY:=/usr/bin/qemu-aarch64-static} |
|
231 | 218 | KERNEL_ARCH=${KERNEL_ARCH:=arm64} |
|
232 | 219 | KERNEL_BIN_IMAGE=${KERNEL_BIN_IMAGE:="Image"} |
|
233 | 220 | |
|
221 | # Board specific settings | |
|
234 | 222 | if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then |
|
235 | 223 | REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-arm64" |
|
236 | 224 | KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcmrpi3_defconfig} |
@@ -238,32 +226,29 if [ -n "$SET_ARCH" ] ; then | |||
|
238 | 226 | KERNEL_IMAGE=${KERNEL_IMAGE:=kernel8.img} |
|
239 | 227 | CROSS_COMPILE=${CROSS_COMPILE:=aarch64-linux-gnu-} |
|
240 | 228 | else |
|
241 | echo "error: Only Raspberry PI 3 and 3B+ support 64bit" | |
|
229 | echo "error: Only Raspberry PI 3 and 3B+ support 64 bit" | |
|
242 | 230 | exit 1 |
|
243 | 231 | fi |
|
244 | 232 | fi |
|
245 | 233 | |
|
246 | ################################## | |
|
247 | # 32 bit config | |
|
248 | ################################## | |
|
234 | # 32 bit configuration | |
|
249 | 235 | if [ "$SET_ARCH" = 32 ] ; then |
|
250 | echo "32 bit mode selected - Setting up enviroment" | |
|
251 | #General 32bit configuration | |
|
236 | # General 32 bit dependend settings | |
|
252 | 237 | QEMU_BINARY=${QEMU_BINARY:=/usr/bin/qemu-arm-static} |
|
253 | 238 | KERNEL_ARCH=${KERNEL_ARCH:=arm} |
|
254 | 239 | KERNEL_BIN_IMAGE=${KERNEL_BIN_IMAGE:="zImage"} |
|
255 | 240 | |
|
256 | #Raspberry setting grouped by board compability | |
|
241 | # Hardware specific settings | |
|
257 | 242 | if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 1 ] || [ "$RPI_MODEL" = 1P ] ; then |
|
258 | echo "Setting settings for bcm2835 Raspberry PI boards" | |
|
259 | 243 | REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-armel" |
|
260 | 244 | KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcmrpi_defconfig} |
|
261 | 245 | RELEASE_ARCH=${RELEASE_ARCH:=armel} |
|
262 | 246 | KERNEL_IMAGE=${KERNEL_IMAGE:=kernel.img} |
|
263 | 247 | CROSS_COMPILE=${CROSS_COMPILE:=arm-linux-gnueabi-} |
|
264 | 248 | fi |
|
249 | ||
|
250 | # Hardware specific settings | |
|
265 | 251 | if [ "$RPI_MODEL" = 2 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then |
|
266 | echo "Setting settings for bcm2837 Raspberry PI boards" | |
|
267 | 252 | REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-armhf" |
|
268 | 253 | KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcm2709_defconfig} |
|
269 | 254 | RELEASE_ARCH=${RELEASE_ARCH:=armhf} |
@@ -276,9 +261,7 else | |||
|
276 | 261 | echo "error: Please set '32' or '64' as value for SET_ARCH" |
|
277 | 262 | exit 1 |
|
278 | 263 | fi |
|
279 | ||
|
280 | #Device specific configuration and uboot-config | |
|
281 | echo "Select DTB-File" | |
|
264 | # Device specific configuration and U-Boot configuration | |
|
282 | 265 | case "$RPI_MODEL" in |
|
283 | 266 | 0) |
|
284 | 267 | DTB_FILE=${DTB_FILE:=bcm2708-rpi-0-w.dtb} |
@@ -329,6 +312,7 if [ -n "$DISABLE_UNDERVOLT_WARNINGS" ] ; then | |||
|
329 | 312 | fi |
|
330 | 313 | fi |
|
331 | 314 | |
|
315 | # Add cmake to compile videocore sources | |
|
332 | 316 | if [ "$ENABLE_VIDEOCORE" = true ] ; then |
|
333 | 317 | REQUIRED_PACKAGES="${REQUIRED_PACKAGES} cmake" |
|
334 | 318 | fi |
@@ -536,6 +520,21 if [ "$ENABLE_REDUCE" = true ] ; then | |||
|
536 | 520 | fi |
|
537 | 521 | fi |
|
538 | 522 | |
|
523 | # Configure systemd-sysv exclude to make halt/reboot/shutdown scripts available | |
|
524 | if [ "$ENABLE_SYSVINIT" = false ] ; then | |
|
525 | APT_EXCLUDES="--exclude=${APT_EXCLUDES},init,systemd-sysv" | |
|
526 | fi | |
|
527 | ||
|
528 | # Check if kernel is getting compiled | |
|
529 | if [ "$BUILD_KERNEL" = false ] ; then | |
|
530 | echo "Downloading precompiled kernel" | |
|
531 | echo "error: not configured" | |
|
532 | exit 1; | |
|
533 | # BUILD_KERNEL=true | |
|
534 | else | |
|
535 | echo "No precompiled kernel repositories were added" | |
|
536 | fi | |
|
537 | ||
|
539 | 538 | # Configure kernel sources if no KERNELSRC_DIR |
|
540 | 539 | if [ "$BUILD_KERNEL" = true ] && [ -z "$KERNELSRC_DIR" ] ; then |
|
541 | 540 | KERNELSRC_CONFIG=true |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
General Comments 0
Vous devez vous connecter pour laisser un commentaire.
Se connecter maintenant