|
@@
-270,14
+270,14
fi
|
|
270
|
|
|
270
|
|
|
271
|
# Setup architecture specific settings
|
|
271
|
# Setup architecture specific settings
|
|
272
|
if [ -n "$SET_ARCH" ] ; then
|
|
272
|
if [ -n "$SET_ARCH" ] ; then
|
|
273
|
# 64-bit configuration
|
|
273
|
## 64-bit configuration
|
|
274
|
if [ "$SET_ARCH" = 64 ] ; then
|
|
274
|
if [ "$SET_ARCH" = 64 ] ; then
|
|
275
|
# General 64-bit depended settings
|
|
275
|
### General 64-bit depended settings
|
|
276
|
QEMU_BINARY=${QEMU_BINARY:=/usr/bin/qemu-aarch64-static}
|
|
276
|
QEMU_BINARY=${QEMU_BINARY:=/usr/bin/qemu-aarch64-static}
|
|
277
|
KERNEL_ARCH=${KERNEL_ARCH:=arm64}
|
|
277
|
KERNEL_ARCH=${KERNEL_ARCH:=arm64}
|
|
278
|
KERNEL_BIN_IMAGE=${KERNEL_BIN_IMAGE:="Image"}
|
|
278
|
KERNEL_BIN_IMAGE=${KERNEL_BIN_IMAGE:="Image"}
|
|
279
|
|
|
279
|
|
|
280
|
# Raspberry Pi model specific settings
|
|
280
|
### Raspberry Pi 64-bit model specific settings
|
|
281
|
if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] || [ "$RPI_MODEL" = 4 ] ; then
|
|
281
|
if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] || [ "$RPI_MODEL" = 4 ] ; then
|
|
282
|
if [ "$RPI_MODEL" != 4 ] ; then
|
|
282
|
if [ "$RPI_MODEL" != 4 ] ; then
|
|
283
|
KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcmrpi3_defconfig}
|
|
283
|
KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcmrpi3_defconfig}
|
|
@@
-289,27
+289,27
if [ -n "$SET_ARCH" ] ; then
|
|
289
|
RELEASE_ARCH=${RELEASE_ARCH:=arm64}
|
|
289
|
RELEASE_ARCH=${RELEASE_ARCH:=arm64}
|
|
290
|
KERNEL_IMAGE=${KERNEL_IMAGE:=kernel8.img}
|
|
290
|
KERNEL_IMAGE=${KERNEL_IMAGE:=kernel8.img}
|
|
291
|
CROSS_COMPILE=${CROSS_COMPILE:=aarch64-linux-gnu-}
|
|
291
|
CROSS_COMPILE=${CROSS_COMPILE:=aarch64-linux-gnu-}
|
|
|
|
|
292
|
|
|
292
|
else
|
|
293
|
else
|
|
293
|
echo "error: Only Raspberry PI 3, 3B+ and 4 support 64-bit"
|
|
294
|
echo "error: Only Raspberry PI 3, 3B+ and 4 support 64-bit"
|
|
294
|
exit 1
|
|
295
|
exit 1
|
|
295
|
fi
|
|
296
|
fi
|
|
296
|
fi
|
|
297
|
fi
|
|
297
|
|
|
298
|
|
|
298
|
# 32-bit configuration
|
|
299
|
## 32-bit configuration
|
|
299
|
if [ "$SET_ARCH" = 32 ] ; then
|
|
300
|
if [ "$SET_ARCH" = 32 ] ; then
|
|
300
|
# General 32-bit dependend settings
|
|
301
|
### General 32-bit dependend settings
|
|
301
|
QEMU_BINARY=${QEMU_BINARY:=/usr/bin/qemu-arm-static}
|
|
302
|
QEMU_BINARY=${QEMU_BINARY:=/usr/bin/qemu-arm-static}
|
|
302
|
KERNEL_ARCH=${KERNEL_ARCH:=arm}
|
|
303
|
KERNEL_ARCH=${KERNEL_ARCH:=arm}
|
|
303
|
KERNEL_BIN_IMAGE=${KERNEL_BIN_IMAGE:="zImage"}
|
|
304
|
KERNEL_BIN_IMAGE=${KERNEL_BIN_IMAGE:="zImage"}
|
|
304
|
|
|
305
|
|
|
305
|
# Raspberry Pi model specific settings
|
|
306
|
### Raspberry Pi (0-1P) model specific settings
|
|
306
|
if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 1 ] || [ "$RPI_MODEL" = 1P ] ; then
|
|
307
|
if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 1 ] || [ "$RPI_MODEL" = 1P ] ; then
|
|
307
|
REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-armel"
|
|
308
|
REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-armel"
|
|
308
|
KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcmrpi_defconfig}
|
|
309
|
KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcmrpi_defconfig}
|
|
309
|
RELEASE_ARCH=${RELEASE_ARCH:=armel}
|
|
310
|
RELEASE_ARCH=${RELEASE_ARCH:=armel}
|
|
310
|
KERNEL_IMAGE=${KERNEL_IMAGE:=kernel.img}
|
|
311
|
KERNEL_IMAGE=${KERNEL_IMAGE:=kernel.img}
|
|
311
|
CROSS_COMPILE=${CROSS_COMPILE:=arm-linux-gnueabi-}
|
|
312
|
CROSS_COMPILE=${CROSS_COMPILE:=arm-linux-gnueabi-}
|
|
312
|
|
|
|
|
|
313
|
if [ $ENABLE_XORG = true ] ; then
|
|
313
|
if [ $ENABLE_XORG = true ] ; then
|
|
314
|
if [$RELEASE = "stretch" ] || [$RELEASE = "oldstable" ] ; then
|
|
314
|
if [$RELEASE = "stretch" ] || [$RELEASE = "oldstable" ] ; then
|
|
315
|
printf "\nBest support for armel architecture is provided under Debian stretch/oldstable. Choose yes to change release to Debian stretch[y/n] "
|
|
315
|
printf "\nBest support for armel architecture is provided under Debian stretch/oldstable. Choose yes to change release to Debian stretch[y/n] "
|
|
@@
-320,7
+320,7
if [ -n "$SET_ARCH" ] ; then
|
|
320
|
fi
|
|
320
|
fi
|
|
321
|
fi
|
|
321
|
fi
|
|
322
|
fi
|
|
322
|
fi
|
|
323
|
# Raspberry Pi model specific settings
|
|
323
|
### Raspberry Pi (2-4) model specific settings
|
|
324
|
if [ "$RPI_MODEL" = 2 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] || [ "$RPI_MODEL" = 4 ] ; then
|
|
324
|
if [ "$RPI_MODEL" = 2 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] || [ "$RPI_MODEL" = 4 ] ; then
|
|
325
|
if [ "$RPI_MODEL" != 4 ] ; then
|
|
325
|
if [ "$RPI_MODEL" != 4 ] ; then
|
|
326
|
KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcm2709_defconfig}
|
|
326
|
KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcm2709_defconfig}
|
|
@@
-336,6
+336,7
if [ -n "$SET_ARCH" ] ; then
|
|
336
|
CROSS_COMPILE=${CROSS_COMPILE:=arm-linux-gnueabihf-}
|
|
336
|
CROSS_COMPILE=${CROSS_COMPILE:=arm-linux-gnueabihf-}
|
|
337
|
fi
|
|
337
|
fi
|
|
338
|
fi
|
|
338
|
fi
|
|
|
|
|
339
|
|
|
339
|
# SET_ARCH not set
|
|
340
|
# SET_ARCH not set
|
|
340
|
else
|
|
341
|
else
|
|
341
|
echo "error: Please set '32' or '64' as value for SET_ARCH"
|
|
342
|
echo "error: Please set '32' or '64' as value for SET_ARCH"
|
|
@@
-379,15
+380,16
esac
|
|
379
|
|
|
380
|
|
|
380
|
# Raspberry PI 0,3,3P with Bluetooth and Wifi onboard
|
|
381
|
# Raspberry PI 0,3,3P with Bluetooth and Wifi onboard
|
|
381
|
if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] || [ "$RPI_MODEL" = 4 ] ; then
|
|
382
|
if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] || [ "$RPI_MODEL" = 4 ] ; then
|
|
382
|
# Include bluetooth packages on supported boards
|
|
383
|
## Include bluetooth packages on supported boards
|
|
383
|
if [ "$ENABLE_BLUETOOTH" = true ] ; then
|
|
384
|
if [ "$ENABLE_BLUETOOTH" = true ] ; then
|
|
384
|
APT_INCLUDES="${APT_INCLUDES},bluetooth,bluez"
|
|
385
|
APT_INCLUDES="${APT_INCLUDES},bluetooth,bluez"
|
|
385
|
fi
|
|
386
|
fi
|
|
386
|
if [ "$ENABLE_WIRELESS" = true ] ; then
|
|
387
|
if [ "$ENABLE_WIRELESS" = true ] ; then
|
|
387
|
APT_INCLUDES="${APT_INCLUDES},wireless-tools,crda,wireless-regdb,wpasupplicant"
|
|
388
|
APT_INCLUDES="${APT_INCLUDES},wireless-tools,crda,wireless-regdb,wpasupplicant"
|
|
388
|
fi
|
|
389
|
fi
|
|
389
|
else # Raspberry PI 1,1P,2 without Wifi and bluetooth onboard
|
|
390
|
# Raspberry PI 1,1P,2 without Wifi and bluetooth onboard
|
|
390
|
# Check if the internal wireless interface is not supported by the RPi model
|
|
391
|
else
|
|
|
|
|
392
|
## Check if the internal wireless interface is not supported by the RPi model
|
|
391
|
if [ "$ENABLE_WIRELESS" = true ] || [ "$ENABLE_BLUETOOTH" = true ]; then
|
|
393
|
if [ "$ENABLE_WIRELESS" = true ] || [ "$ENABLE_BLUETOOTH" = true ]; then
|
|
392
|
echo "error: The selected Raspberry Pi model has no integrated interface for wireless or bluetooth"
|
|
394
|
echo "error: The selected Raspberry Pi model has no integrated interface for wireless or bluetooth"
|
|
393
|
exit 1
|
|
395
|
exit 1
|
|
@@
-440,7
+442,7
if [ "$ENABLE_CRYPTFS" = true ] && [ "$BUILD_KERNEL" = true ] ; then
|
|
440
|
REQUIRED_PACKAGES="${REQUIRED_PACKAGES} cryptsetup"
|
|
442
|
REQUIRED_PACKAGES="${REQUIRED_PACKAGES} cryptsetup"
|
|
441
|
APT_INCLUDES="${APT_INCLUDES},cryptsetup,busybox,console-setup,cryptsetup-initramfs"
|
|
443
|
APT_INCLUDES="${APT_INCLUDES},cryptsetup,busybox,console-setup,cryptsetup-initramfs"
|
|
442
|
|
|
444
|
|
|
443
|
# If cryptfs,dropbear and initramfs are enabled include dropbear-initramfs package
|
|
445
|
## If cryptfs,dropbear and initramfs are enabled include dropbear-initramfs package
|
|
444
|
if [ "$CRYPTFS_DROPBEAR" = true ] && [ "$ENABLE_INITRAMFS" = true ]; then
|
|
446
|
if [ "$CRYPTFS_DROPBEAR" = true ] && [ "$ENABLE_INITRAMFS" = true ]; then
|
|
445
|
APT_INCLUDES="${APT_INCLUDES},dropbear-initramfs"
|
|
447
|
APT_INCLUDES="${APT_INCLUDES},dropbear-initramfs"
|
|
446
|
fi
|
|
448
|
fi
|
|
@@
-506,7
+508,7
if [ -n "$MISSING_PACKAGES" ] ; then
|
|
506
|
read -r confirm
|
|
508
|
read -r confirm
|
|
507
|
[ "$confirm" != "y" ] && exit 1
|
|
509
|
[ "$confirm" != "y" ] && exit 1
|
|
508
|
|
|
510
|
|
|
509
|
# Make sure all missing required packages are installed
|
|
511
|
## Make sure all missing required packages are installed
|
|
510
|
apt-get update && apt-get -qq -y install `echo "${MISSING_PACKAGES}" | sed "s/ //"`
|
|
512
|
apt-get update && apt-get -qq -y install `echo "${MISSING_PACKAGES}" | sed "s/ //"`
|
|
511
|
fi
|
|
513
|
fi
|
|
512
|
|
|
514
|
|
|
@@
-649,12
+651,12
fi
|
|
649
|
|
|
651
|
|
|
650
|
# Replace selected packages with smaller clones
|
|
652
|
# Replace selected packages with smaller clones
|
|
651
|
if [ "$ENABLE_REDUCE" = true ] ; then
|
|
653
|
if [ "$ENABLE_REDUCE" = true ] ; then
|
|
652
|
# Add levee package instead of vim-tiny
|
|
654
|
## Add levee package instead of vim-tiny
|
|
653
|
if [ "$REDUCE_VIM" = true ] ; then
|
|
655
|
if [ "$REDUCE_VIM" = true ] ; then
|
|
654
|
APT_INCLUDES="$(echo ${APT_INCLUDES} | sed "s/vim-tiny/levee/")"
|
|
656
|
APT_INCLUDES="$(echo ${APT_INCLUDES} | sed "s/vim-tiny/levee/")"
|
|
655
|
fi
|
|
657
|
fi
|
|
656
|
|
|
658
|
|
|
657
|
# Add dropbear package instead of openssh-server
|
|
659
|
## Add dropbear package instead of openssh-server
|
|
658
|
if [ "$REDUCE_SSHD" = true ] ; then
|
|
660
|
if [ "$REDUCE_SSHD" = true ] ; then
|
|
659
|
APT_INCLUDES="$(echo "${APT_INCLUDES}" | sed "s/openssh-server/dropbear/")"
|
|
661
|
APT_INCLUDES="$(echo "${APT_INCLUDES}" | sed "s/openssh-server/dropbear/")"
|
|
660
|
fi
|
|
662
|
fi
|