##// END OF EJS Templates
Added choice to enable v3d graphics accelerator for Pi4...
Added choice to enable v3d graphics accelerator for Pi4 if true excludes fbturbo for pi4 fbturbo is faulty

Fichier de la dernière révision:

r762:9c40b3f139b8
r762:9c40b3f139b8
Show More
rpi23-gen-image.sh
921 lines | 30.8 KiB | application/x-sh | BashLexer
Unknown
its bin/sh again...
r384 #!/bin/sh
Jan Wagner
first public release
r2 ########################################################################
drtyhlpr
Added: SSH public key auth, other fixes
r120 # rpi23-gen-image.sh 2015-2017
Jan Wagner
first public release
r2 #
drtyhlpr
Small fixes
r429 # Advanced Debian "stretch" and "buster" bootstrap script for Raspberry Pi
Jan Wagner
first public release
r2 #
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
drtyhlpr
Fixed: DEFLOCAL now works with MINBASE, author added on request
r88 # Copyright (C) 2015 Jan Wagner <mail@jwagner.eu>
#
drtyhlpr
Debian Buster (testing) release support
r217 # Big thanks for patches and enhancements by 20+ github contributors!
Jan Wagner
first public release
r2 ########################################################################
Jan Wagner
Added: KERNEL_REDUCE - less than 128MB used space, Added: REDUCE_ parameters
r76 # Are we running as root?
if [ "$(id -u)" -ne "0" ] ; then
echo "error: this script must be executed with root privileges!"
exit 1
fi
Jan Wagner
Added: KERNEL_SRCDIR, path-checks, code-cleanup
r72 # Check if ./functions.sh script exists
if [ ! -r "./functions.sh" ] ; then
Jan Wagner
Added: ENABLE_CRYPTFS - encrypted rootfs, use-latest-bootloader, cp-cleanup
r77 echo "error: './functions.sh' required script not found!"
Jan Wagner
Added: KERNEL_SRCDIR, path-checks, code-cleanup
r72 exit 1
fi
Jan Wagner
spliting more files, fix-uboot, fix-fbturbo, fix-locale
r67 # Load utility functions
. ./functions.sh
Filip Pytloun
Option to disable rsyslog and improvements (also security)...
r45
drtyhlpr
Added: Configuration template file support (testing)
r117 # Load parameters from configuration template file
Unknown
https://www.shellcheck.net/...
r336 if [ -n "$CONFIG_TEMPLATE" ] ; then
drtyhlpr
Added: Configuration template file support (testing)
r117 use_template
fi
Jan Wagner
code cleanup and even more spliting
r70 # Introduce settings
Jan Wagner
first public release
r2 set -e
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 echo -n -e "\n#\n# RPi 0/1/2/3/4 Bootstrap Settings\n#\n"
Jan Wagner
first public release
r2 set -x
drtyhlpr
Added Raspberry Pi 3 model support
r94 # Raspberry Pi model configuration
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 RPI_MODEL=${RPI_MODEL:=3P}
drtyhlpr
fix: typos in DTB for all
r261
Jan Wagner
fix: ENABLE_SOUND
r21 # Debian release
Unknown
Refactor...
r375 RELEASE=${RELEASE:=buster}
Unknown
fixes bullseye/testing renaming for chroot...
r668 if [ $RELEASE = "bullseye" ] ; then
RELEASE=testing
fi
Unknown
All other RPI devices added
r254
drtyhlpr
fix: various fixes
r398 # Kernel Branch
Bobberty
Added variables to allow for arm64 and different branches.
r146 KERNEL_BRANCH=${KERNEL_BRANCH:=""}
Jan Wagner
first public release
r2
drtyhlpr
Added ENABLE_NONFREE support and more
r91 # URLs
KERNEL_URL=${KERNEL_URL:=https://github.com/raspberrypi/linux}
FIRMWARE_URL=${FIRMWARE_URL:=https://github.com/raspberrypi/firmware/raw/master/boot}
Aman Sharma
Update WLAN firmware link...
r234 WLAN_FIRMWARE_URL=${WLAN_FIRMWARE_URL:=https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm}
drtyhlpr
Added ENABLE_NONFREE support and more
r91 FBTURBO_URL=${FBTURBO_URL:=https://github.com/ssvb/xf86-video-fbturbo.git}
Tobias Gruetzmacher
Change every URL to https
r249 UBOOT_URL=${UBOOT_URL:=https://git.denx.de/u-boot.git}
Unknown
Refactor...
r375 VIDEOCORE_URL=${VIDEOCORE_URL:=https://github.com/raspberrypi/userland}
Unknown
add bluetooth firmware and systemd service...
r368 BLUETOOTH_URL=${BLUETOOTH_URL:=https://github.com/RPi-Distro/pi-bluetooth.git}
Unknown
kernel features + nexmon monitor mode wlan patch(kali-kernel) with RPI3,RPI3B+ firmware patch...
r502 NEXMON_URL=${NEXMON_URL:=https://github.com/seemoo-lab/nexmon.git}
SYSTEMDSWAP_URL=${SYSTEMDSWAP_URL:=https://github.com/Nefelim4ag/systemd-swap.git}
# Kernel deb packages for 32bit kernel
RPI_32_KERNEL_URL=${RPI_32_KERNEL_URL:=https://github.com/hypriot/rpi-kernel/releases/download/v4.14.34/raspberrypi-kernel_20180422-141901_armhf.deb}
RPI_32_KERNELHEADER_URL=${RPI_32_KERNELHEADER_URL:=https://github.com/hypriot/rpi-kernel/releases/download/v4.14.34/raspberrypi-kernel-headers_20180422-141901_armhf.deb}
# Kernel has KVM and zswap enabled - use if KERNEL_* parameters and precompiled kernel are used
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 RPI3_64_BIS_KERNEL_URL=${RPI3_64_BIS_KERNEL_URL:=https://github.com/sakaki-/bcmrpi3-kernel-bis/releases/download/4.19.102.20200211/bcmrpi3-kernel-bis-4.19.102.20200211.tar.xz}
Unknown
kernel features + nexmon monitor mode wlan patch(kali-kernel) with RPI3,RPI3B+ firmware patch...
r502 # Default precompiled 64bit kernel
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 RPI3_64_DEF_KERNEL_URL=${RPI3_64_DEF_KERNEL_URL:=https://github.com/sakaki-/bcmrpi3-kernel/releases/download/4.19.102.20200211/bcmrpi3-kernel-4.19.102.20200211.tar.xz}
Unknown
PATCHES for:...
r665 # Sakaki BIS Kernel RPI4 - https://github.com/sakaki-/bcm2711-kernel-bis
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 RPI4_64_BIS_KERNEL_URL=${RPI4_64_BIS_KERNEL_URL:=https://github.com/sakaki-/bcm2711-kernel-bis/releases/download/4.19.102.20200211/bcm2711-kernel-bis-4.19.102.20200211.tar.xz}
Unknown
PATCHES for:...
r665 # Default precompiled 64bit kernel - https://github.com/sakaki-/bcm2711-kernel
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 RPI4_64_DEF_KERNEL_URL=${RPI4_64_DEF_KERNEL_URL:=https://github.com/sakaki-/bcm2711-kernel-bis/releases/download/4.19.102.20200211/bcm2711-kernel-bis-4.19.102.20200211.tar.xz}
Unknown
kernel features + nexmon monitor mode wlan patch(kali-kernel) with RPI3,RPI3B+ firmware patch...
r502 # Generic
RPI3_64_KERNEL_URL=${RPI3_64_KERNEL_URL:=$RPI3_64_DEF_KERNEL_URL}
Unknown
PATCHES for:...
r665 RPI4_64_KERNEL_URL=${RPI4_64_KERNEL_URL:=$RPI4_64_DEF_KERNEL_URL}
Unknown
kernel features + nexmon monitor mode wlan patch(kali-kernel) with RPI3,RPI3B+ firmware patch...
r502 # Kali kernel src - used if ENABLE_NEXMON=true (they patch the wlan kernel modul)
KALI_KERNEL_URL=${KALI_KERNEL_URL:=https://github.com/Re4son/re4son-raspberrypi-linux.git}
drtyhlpr
Added ENABLE_NONFREE support and more
r91
Jan Wagner
Added: KERNEL_REDUCE - less than 128MB used space, Added: REDUCE_ parameters
r76 # Build directories
Unknown
- removed wrong/old logic for locales...
r431 WORKDIR=$(pwd)
BASEDIR=${BASEDIR:=${WORKDIR}/images/${RELEASE}}
Jan Wagner
Added: ENABLE_CRYPTFS - encrypted rootfs, use-latest-bootloader, cp-cleanup
r77 BUILDDIR="${BASEDIR}/build"
Bobberty
Added variables to allow for arm64 and different branches.
r146
Jan Wagner
fix: ENABLE_CRYPTFS -> UBOOT, SPLITFS, EXPANDROOT - cleanup
r82 # Chroot directories
Jan Wagner
Added: ENABLE_CRYPTFS - encrypted rootfs, use-latest-bootloader, cp-cleanup
r77 R="${BUILDDIR}/chroot"
drtyhlpr
Added Raspberry Pi 3 model support
r94 ETC_DIR="${R}/etc"
LIB_DIR="${R}/lib"
BOOT_DIR="${R}/boot/firmware"
KERNEL_DIR="${R}/usr/src/linux"
Unknown
use variables more often
r355 WLAN_FIRMWARE_DIR="${LIB_DIR}/firmware/brcm"
Unknown
Bluetooth and serial...
r451 BLUETOOTH_FIRMWARE_DIR="${ETC_DIR}/firmware/bt"
Jan Wagner
first public release
r2
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 # APT settings
APT_SERVER=${APT_SERVER:="ftp.debian.org"}
APT_PROXY=${APT_PROXY:=""}
KEEP_APT_PROXY=${KEEP_APT_PROXY:=false}
# Packages required in the chroot build environment
APT_INCLUDES=${APT_INCLUDES:=""}
APT_INCLUDES="${APT_INCLUDES},apt-transport-https,apt-utils,ca-certificates,debian-archive-keyring,dialog,sudo,systemd,sysvinit-utils,locales,keyboard-configuration,console-setup,libnss-systemd"
# Packages to exclude from chroot build environment
APT_EXCLUDES=${APT_EXCLUDES:=""}
drtyhlpr
Fixes for Debian stretch release support
r93
Jan Wagner
first public release
r2 # General settings
Unknown
Refactor...
r375 SET_ARCH=${SET_ARCH:=32}
drtyhlpr
Added Raspberry Pi 3 model support
r94 HOSTNAME=${HOSTNAME:=rpi${RPI_MODEL}-${RELEASE}}
Jan Wagner
first public release
r2 DEFLOCAL=${DEFLOCAL:="en_US.UTF-8"}
Jan Wagner
fix for a upcomming merge
r32 TIMEZONE=${TIMEZONE:="Europe/Berlin"}
Filip Pytloun
Option to expand partition and rootfs on first boot...
r46 EXPANDROOT=${EXPANDROOT:=true}
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732
ENABLE_ROOT=${ENABLE_ROOT:=false}
ROOT_PASSWORD=${ROOT_PASSWORD:=raspberry}
ENABLE_USER=${ENABLE_USER:=true}
USER_NAME=${USER_NAME:="pi"}
USER_PASSWORD=${USER_PASSWORD:=raspberry}
Jan Wagner
first public release
r2
Jan Wagner
spliting more files, fix-uboot, fix-fbturbo, fix-locale
r67 # Keyboard settings
XKB_MODEL=${XKB_MODEL:=""}
XKB_LAYOUT=${XKB_LAYOUT:=""}
XKB_VARIANT=${XKB_VARIANT:=""}
XKB_OPTIONS=${XKB_OPTIONS:=""}
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 # Networking settings:
ENABLE_IPV6=${ENABLE_IPV6:=true}
ENABLE_WIRELESS=${ENABLE_WIRELESS:=false}
ENABLE_IPTABLES=${ENABLE_IPTABLES:=false}
ENABLE_HARDNET=${ENABLE_HARDNET:=false}
ENABLE_IFNAMES=${ENABLE_IFNAMES:=true}
Jan Wagner
spliting more files, fix-uboot, fix-fbturbo, fix-locale
r67 # Network settings (DHCP)
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 ENABLE_ETH_DHCP=${ENABLE_ETH_DHCP:=true}
ENABLE_WIFI_DHCP=${ENABLE_ETH_DHCP:=true}
Jan Wagner
spliting more files, fix-uboot, fix-fbturbo, fix-locale
r67
# Network settings (static)
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 NET_ETH_ADDRESS=${NET_ETH_ADDRESS:=""}
NET_ETH_GATEWAY=${NET_ETH_GATEWAY:=""}
NET_ETH_DNS_1=${NET_ETH_DNS_1:=""}
NET_ETH_DNS_2=${NET_ETH_DNS_2:=""}
NET_ETH_DNS_DOMAINS=${NET_ETH_DNS_DOMAINS:=""}
NET_ETH_NTP_1=${NET_ETH_NTP_1:=""}
NET_ETH_NTP_2=${NET_ETH_NTP_2:=""}
# Networking settings (WIFI):
NET_WIFI_SSID=${NET_WIFI_SSID:=""}
NET_WIFI_PSK=${NET_WIFI_PSK:=""}
Vincent Knecht
Add support for static network configuration.
r25
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 # Network settings (static)
NET_WIFI_ADDRESS=${NET_WIFI_ADDRESS:=""}
NET_WIFI_GATEWAY=${NET_WIFI_GATEWAY:=""}
NET_WIFI_DNS_1=${NET_WIFI_DNS_1:=""}
NET_WIFI_DNS_2=${NET_WIFI_DNS_2:=""}
NET_WIFI_DNS_DOMAINS=${NET_WIFI_DNS_DOMAINS:=""}
NET_WIFI_NTP_1=${NET_WIFI_NTP_1:=""}
NET_WIFI_NTP_2=${NET_WIFI_NTP_2:=""}
Jan Wagner
first public release
r2
# Feature settings
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 ENABLE_CONSOLE=${ENABLE_CONSOLE:=false}
Unknown
Bluetooth and serial...
r451 ENABLE_PRINTK=${ENABLE_PRINTK:=false}
Unknown
Enable_Bluetooth var...
r437 ENABLE_BLUETOOTH=${ENABLE_BLUETOOTH:=false}
Unknown
Bluetooth and serial...
r451 ENABLE_MINIUART_OVERLAY=${ENABLE_MINIUART_OVERLAY:=false}
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 ENABLE_TURBO=${ENABLE_TURBO:=false}
drtyhlpr
Added: I2C and SPI interface support
r125 ENABLE_I2C=${ENABLE_I2C:=false}
ENABLE_SPI=${ENABLE_SPI:=false}
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732
drtyhlpr
Added ENABLE_NONFREE support and more
r91 ENABLE_NONFREE=${ENABLE_NONFREE:=false}
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 ENABLE_RSYSLOG=${ENABLE_RSYSLOG:=true}
ENABLE_SOUND=${ENABLE_SOUND:=false}
Jan Wagner
first public release
r2 ENABLE_HWRANDOM=${ENABLE_HWRANDOM:=true}
ENABLE_MINGPU=${ENABLE_MINGPU:=false}
ENABLE_XORG=${ENABLE_XORG:=false}
Jan Wagner
Replaced: ENABLE_FLUXBOX -\> ENABLE_WM
r22 ENABLE_WM=${ENABLE_WM:=""}
Unknown
APT_exclude enhancment
r275 ENABLE_SYSVINIT=${ENABLE_SYSVINIT:=false}
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 ENABLE_SPLASH=${ENABLE_SPLASH:=true}
ENABLE_LOGO=${ENABLE_LOGO:=true}
ENABLE_SILENT_BOOT=${ENABLE_SILENT_BOOT=false}
DISABLE_UNDERVOLT_WARNINGS=${DISABLE_UNDERVOLT_WARNINGS:=}
Jan Wagner
first public release
r2
# Advanced settings
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 ENABLE_DPHYSSWAP=${ENABLE_DPHYSSWAP:=true}
Unknown
kernel features + nexmon monitor mode wlan patch(kali-kernel) with RPI3,RPI3B+ firmware patch...
r502 ENABLE_SYSTEMDSWAP=${ENABLE_SYSTEMDSWAP:=false}
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 ENABLE_QEMU=${ENABLE_QEMU:=false}
ENABLE_KEYGEN=${ENABLE_KEYGEN:=false}
Jan Wagner
Added: ENABLE_MINBASE, Fix: Use systemd-networkd
r16 ENABLE_MINBASE=${ENABLE_MINBASE:=false}
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 ENABLE_SPLITFS=${ENABLE_SPLITFS:=false}
ENABLE_INITRAMFS=${ENABLE_INITRAMFS:=false}
ENABLE_DBUS=${ENABLE_DBUS:=true}
ENABLE_USBBOOT=${ENABLE_USBBOOT=false}
CHROOT_SCRIPTS=${CHROOT_SCRIPTS:=""}
Jan Wagner
Added ENABLE_UBOOT support
r3 ENABLE_UBOOT=${ENABLE_UBOOT:=false}
drtyhlpr
Fixed: RPi3 stretch support, uboot updated compiler and src dir
r139 UBOOTSRC_DIR=${UBOOTSRC_DIR:=""}
Jan Wagner
Added: ENABLE_FBTURBO
r20 ENABLE_FBTURBO=${ENABLE_FBTURBO:=false}
Added choice to enable v3d graphics accelerator for Pi4...
r762 ENABLE_GR_ACCEL=${ENABLE_GR_ACCEL:=true}
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 FBTURBOSRC_DIR=${FBTURBOSRC_DIR:=""}
drtyhlpr
fix: various fixes 2
r399 ENABLE_VIDEOCORE=${ENABLE_VIDEOCORE:=false}
Unknown
Raspberry Userland...
r332 VIDEOCORESRC_DIR=${VIDEOCORESRC_DIR:=""}
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 ENABLE_NEXMON=${ENABLE_NEXMON:=false}
Unknown
kernel features + nexmon monitor mode wlan patch(kali-kernel) with RPI3,RPI3B+ firmware patch...
r502 NEXMONSRC_DIR=${NEXMONSRC_DIR:=""}
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732
# SSH settings
SSH_ENABLE=${SSH_ENABLE:=true}
SSH_ENABLE_ROOT=${SSH_ENABLE_ROOT:=false}
SSH_DISABLE_PASSWORD_AUTH=${SSH_DISABLE_PASSWORD_AUTH:=false}
SSH_LIMIT_USERS=${SSH_LIMIT_USERS:=false}
SSH_ROOT_PUB_KEY=${SSH_ROOT_PUB_KEY:=""}
SSH_USER_PUB_KEY=${SSH_USER_PUB_KEY:=""}
Jan Wagner
first public release
r2
Jan Wagner
Added: BUILD_KERNEL - build latest rpi2 kernel
r55 # Kernel compilation settings
Unknown
Refactor...
r375 BUILD_KERNEL=${BUILD_KERNEL:=true}
Jan Wagner
spliting more files, fix-uboot, fix-fbturbo, fix-locale
r67 KERNEL_THREADS=${KERNEL_THREADS:=1}
Filip Pytloun
Enhance kernel build by headers install, parallelism and cleanup
r60 KERNEL_HEADERS=${KERNEL_HEADERS:=true}
Jan Wagner
comment-cleanup, net-cleanup, size-calc-fix, split-more, menuconfig
r71 KERNEL_MENUCONFIG=${KERNEL_MENUCONFIG:=false}
drtyhlpr
fix: kernel compilation, add ccache support
r248 KERNEL_OLDDEFCONFIG=${KERNEL_OLDDEFCONFIG:=false}
KERNEL_CCACHE=${KERNEL_CCACHE:=false}
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 KERNEL_REMOVESRC=${KERNEL_REMOVESRC:=true}
KERNELSRC_DIR=${KERNELSRC_DIR:=""}
KERNELSRC_CLEAN=${KERNELSRC_CLEAN:=false}
KERNELSRC_CONFIG=${KERNELSRC_CONFIG:=true}
KERNELSRC_USRCONFIG=${KERNELSRC_USRCONFIG:=""}
KERNELSRC_PREBUILT=${KERNELSRC_PREBUILT:=false}
# Firmware directory: Blank if download from github
RPI_FIRMWARE_DIR=${RPI_FIRMWARE_DIR:=""}
KERNEL_DEFAULT_GOV=${KERNEL_DEFAULT_GOV:=ondemand}
KERNEL_NF=${KERNEL_NF:=false}
Unknown
kernel features + nexmon monitor mode wlan patch(kali-kernel) with RPI3,RPI3B+ firmware patch...
r502 KERNEL_VIRT=${KERNEL_VIRT:=false}
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 KERNEL_ZSWAP=${KERNEL_ZSWAP:=false}
Unknown
kernel features + nexmon monitor mode wlan patch(kali-kernel) with RPI3,RPI3B+ firmware patch...
r502 KERNEL_BPF=${KERNEL_BPF:=false}
KERNEL_SECURITY=${KERNEL_SECURITY:=false}
Unknown
-using --verbose and debug while creating cryptfs to give a hint by default...
r696 KERNEL_BTRFS=${KERNEL_BTRFS:=false}
KERNEL_POEHAT=${KERNEL_POEHAT:=false}
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 KERNEL_NSPAN=${KERNEL_NSPAN:=false}
KERNEL_DHKEY=${KERNEL_DHKEY:=true}
Jan Wagner
Added: BUILD_KERNEL - build latest rpi2 kernel
r55
Jan Wagner
Added: KERNEL_REDUCE - less than 128MB used space, Added: REDUCE_ parameters
r76 # Reduce disk usage settings
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 ENABLE_REDUCE=${ENABLE_REDUCE:=false}
Jan Wagner
Added: KERNEL_REDUCE - less than 128MB used space, Added: REDUCE_ parameters
r76 REDUCE_APT=${REDUCE_APT:=true}
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 REDUCE_DOC=${REDUCE_DOC:=false}
REDUCE_MAN=${REDUCE_MAN:=false}
Jan Wagner
Added: ENABLE_CRYPTFS - encrypted rootfs, use-latest-bootloader, cp-cleanup
r77 REDUCE_VIM=${REDUCE_VIM:=false}
Jan Wagner
Added: KERNEL_REDUCE - less than 128MB used space, Added: REDUCE_ parameters
r76 REDUCE_BASH=${REDUCE_BASH:=false}
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 REDUCE_HWDB=${REDUCE_HWDB:=false}
REDUCE_SSHD=${REDUCE_SSHD:=false}
REDUCE_LOCALE=${REDUCE_LOCALE:=false}
REDUCE_KERNEL=${REDUCE_KERNEL:=false}
Jan Wagner
Added: KERNEL_REDUCE - less than 128MB used space, Added: REDUCE_ parameters
r76
Jan Wagner
Added: ENABLE_CRYPTFS - encrypted rootfs, use-latest-bootloader, cp-cleanup
r77 # Encrypted filesystem settings
ENABLE_CRYPTFS=${ENABLE_CRYPTFS:=false}
CRYPTFS_PASSWORD=${CRYPTFS_PASSWORD:=""}
CRYPTFS_MAPPING=${CRYPTFS_MAPPING:="secure"}
Unknown
-using --verbose and debug while creating cryptfs to give a hint by default...
r696 CRYPTFS_CIPHER=${CRYPTFS_CIPHER:="aes-xts-plain64"}
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 CRYPTFS_HASH=${CRYPTFS_HASH:="sha256"}
CRYPTFS_XTSKEYSIZE=${CRYPTFS_XTSKEYSIZE:=256}
Unknown
Dropbear initramfs...
r501 #Dropbear-initramfs supports unlocking encrypted filesystem via SSH on bootup
CRYPTFS_DROPBEAR=${CRYPTFS_DROPBEAR:=false}
#Provide your own Dropbear Public RSA-OpenSSH Key otherwise it will be generated
CRYPTFS_DROPBEAR_PUBKEY=${CRYPTFS_DROPBEAR_PUBKEY:=""}
Jan Wagner
Added: ENABLE_CRYPTFS - encrypted rootfs, use-latest-bootloader, cp-cleanup
r77
Jan Wagner
Added: KERNEL_REDUCE - less than 128MB used space, Added: REDUCE_ parameters
r76 # Packages required for bootstrapping
Sven Ginka
add: REQUIRED_PACKAGES -- libssl-dev for kernel building
r702 REQUIRED_PACKAGES="debootstrap debian-archive-keyring qemu-user-static binfmt-support dosfstools rsync bmap-tools whois git bc psmisc dbus bison flex libssl-dev sudo"
Jan Wagner
Added: KERNEL_REDUCE - less than 128MB used space, Added: REDUCE_ parameters
r76 MISSING_PACKAGES=""
Jan Wagner
Added: KERNEL_SRCDIR, path-checks, code-cleanup
r72
drtyhlpr
Updated: Dropping privileges, chroot compiler install, dropbear sshd config
r142 # Packages installed for c/c++ build environment in chroot (keep empty)
COMPILER_PACKAGES=""
Unknown
Dropbear initramfs...
r501 # Check if apt-cacher-ng has port 3142 open and set APT_PROXY
APT_CACHER_RUNNING=$(lsof -i :3142 | cut -d ' ' -f3 | uniq | sed '/^\s*$/d')
if [ "${APT_CACHER_RUNNING}" = "apt-cacher-ng" ] ; then
Unknown
better apt-chacher-ng detection and correction apt_proxy
r434 APT_PROXY=http://127.0.0.1:3142/
Unknown
- removed wrong/old logic for locales...
r431 fi
drtyhlpr
fix: various fixes
r398 # Setup architecture specific settings
Unknown
Refactor...
r375 if [ -n "$SET_ARCH" ] ; then
drtyhlpr
Small fixes
r429 # 64-bit configuration
Unknown
Refactor...
r375 if [ "$SET_ARCH" = 64 ] ; then
drtyhlpr
Small fixes
r429 # General 64-bit depended settings
Unknown
Refactor...
r375 QEMU_BINARY=${QEMU_BINARY:=/usr/bin/qemu-aarch64-static}
KERNEL_ARCH=${KERNEL_ARCH:=arm64}
KERNEL_BIN_IMAGE=${KERNEL_BIN_IMAGE:="Image"}
drtyhlpr
Small fixes
r429 # Raspberry Pi model specific settings
drtyhlpr
Raspberry Pi 4: inital model support...
r621 if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] || [ "$RPI_MODEL" = 4 ] ; then
if [ "$RPI_MODEL" != 4 ] ; then
KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcmrpi3_defconfig}
else
KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcm2711_defconfig}
fi
Unknown
Refactor...
r375 REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-arm64"
RELEASE_ARCH=${RELEASE_ARCH:=arm64}
KERNEL_IMAGE=${KERNEL_IMAGE:=kernel8.img}
CROSS_COMPILE=${CROSS_COMPILE:=aarch64-linux-gnu-}
else
drtyhlpr
Raspberry Pi 4: inital model support...
r621 echo "error: Only Raspberry PI 3, 3B+ and 4 support 64-bit"
Unknown
Refactor...
r375 exit 1
fi
fi
Unknown
always include locales ...
r374
drtyhlpr
Small fixes
r429 # 32-bit configuration
Unknown
Refactor...
r375 if [ "$SET_ARCH" = 32 ] ; then
drtyhlpr
Small fixes
r429 # General 32-bit dependend settings
Unknown
Refactor...
r375 QEMU_BINARY=${QEMU_BINARY:=/usr/bin/qemu-arm-static}
KERNEL_ARCH=${KERNEL_ARCH:=arm}
KERNEL_BIN_IMAGE=${KERNEL_BIN_IMAGE:="zImage"}
drtyhlpr
Small fixes
r429 # Raspberry Pi model specific settings
Unknown
Refactor...
r375 if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 1 ] || [ "$RPI_MODEL" = 1P ] ; then
REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-armel"
KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcmrpi_defconfig}
RELEASE_ARCH=${RELEASE_ARCH:=armel}
KERNEL_IMAGE=${KERNEL_IMAGE:=kernel.img}
CROSS_COMPILE=${CROSS_COMPILE:=arm-linux-gnueabi-}
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732
if [ $ENABLE_XORG = true ] ; then
if [$RELEASE = "stretch" ] || [$RELEASE = "oldstable" ] ; then
printf "\nBest support for armel architecture is provided under Debian stretch/oldstable. Choose yes to change release to Debian stretch[y/n] "
read -r confirm
if [ "$confirm" = "y" ] ; then
$RELEASE = "stretch"
fi
fi
fi
Unknown
Refactor...
r375 fi
drtyhlpr
Small fixes
r429 # Raspberry Pi model specific settings
drtyhlpr
Raspberry Pi 4: inital model support...
r621 if [ "$RPI_MODEL" = 2 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] || [ "$RPI_MODEL" = 4 ] ; then
if [ "$RPI_MODEL" != 4 ] ; then
KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcm2709_defconfig}
Unknown
PATCHES for:...
r665 KERNEL_IMAGE=${KERNEL_IMAGE:=kernel7.img}
drtyhlpr
Raspberry Pi 4: inital model support...
r621 else
KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcm2711_defconfig}
Unknown
PATCHES for:...
r665 KERNEL_IMAGE=${KERNEL_IMAGE:=kernel7l.img}
drtyhlpr
Raspberry Pi 4: inital model support...
r621 fi
Unknown
Refactor...
r375 REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-armhf"
RELEASE_ARCH=${RELEASE_ARCH:=armhf}
Unknown
PATCHES for:...
r665
Unknown
Refactor...
r375 CROSS_COMPILE=${CROSS_COMPILE:=arm-linux-gnueabihf-}
fi
fi
Unknown
Dropbear initramfs...
r501 # SET_ARCH not set
drtyhlpr
Added Raspberry Pi 3 model support
r94 else
Unknown
Refactor...
r375 echo "error: Please set '32' or '64' as value for SET_ARCH"
drtyhlpr
Added Raspberry Pi 3 model support
r94 exit 1
fi
Unknown
- removed wrong/old logic for locales...
r431 # Device specific configuration and U-Boot configuration
case "$RPI_MODEL" in
0)
DTB_FILE=${DTB_FILE:=bcm2708-rpi-0-w.dtb}
UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_defconfig}
;;
1)
DTB_FILE=${DTB_FILE:=bcm2708-rpi-b.dtb}
UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_defconfig}
;;
1P)
DTB_FILE=${DTB_FILE:=bcm2708-rpi-b-plus.dtb}
UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_defconfig}
;;
2)
DTB_FILE=${DTB_FILE:=bcm2709-rpi-2-b.dtb}
UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_2_defconfig}
;;
3)
DTB_FILE=${DTB_FILE:=bcm2710-rpi-3-b.dtb}
UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_3_defconfig}
;;
3P)
DTB_FILE=${DTB_FILE:=bcm2710-rpi-3-b.dtb}
UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_3_defconfig}
;;
drtyhlpr
Raspberry Pi 4: inital model support...
r621 4)
DTB_FILE=${DTB_FILE:=bcm2711-rpi-4-b.dtb}
UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_4_defconfig}
;;
Unknown
- removed wrong/old logic for locales...
r431 *)
echo "error: Raspberry Pi model $RPI_MODEL is not supported!"
exit 1
;;
esac
drtyhlpr
Fix: IMAGE_NAME
r407
Unknown
Bluetooth and serial...
r451 # Raspberry PI 0,3,3P with Bluetooth and Wifi onboard
drtyhlpr
Raspberry Pi 4: inital model support...
r621 if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] || [ "$RPI_MODEL" = 4 ] ; then
Unknown
Bluetooth and serial...
r451 # Include bluetooth packages on supported boards
Unknown
Dropbear initramfs...
r501 if [ "$ENABLE_BLUETOOTH" = true ] ; then
Unknown
Bluetooth and serial...
r451 APT_INCLUDES="${APT_INCLUDES},bluetooth,bluez"
fi
Unknown
Dropbear initramfs...
r501 if [ "$ENABLE_WIRELESS" = true ] ; then
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 APT_INCLUDES="${APT_INCLUDES},wireless-tools,crda,wireless-regdb,wpasupplicant"
Unknown
Dropbear initramfs...
r501 fi
Unknown
Bluetooth and serial...
r451 else # Raspberry PI 1,1P,2 without Wifi and bluetooth onboard
# Check if the internal wireless interface is not supported by the RPi model
if [ "$ENABLE_WIRELESS" = true ] || [ "$ENABLE_BLUETOOTH" = true ]; then
echo "error: The selected Raspberry Pi model has no integrated interface for wireless or bluetooth"
exit 1
fi
fi
Unknown
kernel features + nexmon monitor mode wlan patch(kali-kernel) with RPI3,RPI3B+ firmware patch...
r502 if [ "$BUILD_KERNEL" = false ] && [ "$ENABLE_NEXMON" = true ]; then
echo "error: You have to compile kernel sources, if you want to enable nexmon"
exit 1
fi
drtyhlpr
Fix: IMAGE_NAME
r407 # Prepare date string for default image file name
DATE="$(date +%Y-%m-%d)"
if [ -z "$KERNEL_BRANCH" ] ; then
IMAGE_NAME=${IMAGE_NAME:=${BASEDIR}/${DATE}-${KERNEL_ARCH}-CURRENT-rpi${RPI_MODEL}-${RELEASE}-${RELEASE_ARCH}}
else
IMAGE_NAME=${IMAGE_NAME:=${BASEDIR}/${DATE}-${KERNEL_ARCH}-${KERNEL_BRANCH}-rpi${RPI_MODEL}-${RELEASE}-${RELEASE_ARCH}}
fi
Unknown
DTB and devices with no wlan
r271
drtyhlpr
Added: Disable RPi2/3 under-volt warnings (from michaelfranzl PR)
r130 # Check if DISABLE_UNDERVOLT_WARNINGS parameter value is supported
Unknown
https://www.shellcheck.net/...
r336 if [ -n "$DISABLE_UNDERVOLT_WARNINGS" ] ; then
drtyhlpr
Fixed: Disable RPi2/3 under-volt warnings
r132 if [ "$DISABLE_UNDERVOLT_WARNINGS" != 1 ] && [ "$DISABLE_UNDERVOLT_WARNINGS" != 2 ] ; then
echo "error: DISABLE_UNDERVOLT_WARNINGS=${DISABLE_UNDERVOLT_WARNINGS} is not supported"
exit 1
fi
drtyhlpr
Added: Disable RPi2/3 under-volt warnings (from michaelfranzl PR)
r130 fi
drtyhlpr
fix: various fixes
r398 # Add cmake to compile videocore sources
Unknown
Raspberry Userland...
r332 if [ "$ENABLE_VIDEOCORE" = true ] ; then
REQUIRED_PACKAGES="${REQUIRED_PACKAGES} cmake"
fi
Unknown
kernel features + nexmon monitor mode wlan patch(kali-kernel) with RPI3,RPI3B+ firmware patch...
r502 # Add deps for nexmon
if [ "$ENABLE_NEXMON" = true ] ; then
Unknown
PATCHES for:...
r665 REQUIRED_PACKAGES="${REQUIRED_PACKAGES} libgmp3-dev gawk qpdf make autoconf automake build-essential libtool"
Unknown
kernel features + nexmon monitor mode wlan patch(kali-kernel) with RPI3,RPI3B+ firmware patch...
r502 fi
Jan Wagner
Added: KERNEL_REDUCE - less than 128MB used space, Added: REDUCE_ parameters
r76 # Add libncurses5 to enable kernel menuconfig
if [ "$KERNEL_MENUCONFIG" = true ] ; then
Unknown
bugfixes...
r337 REQUIRED_PACKAGES="${REQUIRED_PACKAGES} libncurses-dev"
Jan Wagner
Added: BUILD_KERNEL - build latest rpi2 kernel
r55 fi
drtyhlpr
fix: kernel compilation, add ccache support
r248 # Add ccache compiler cache for (faster) kernel cross (re)compilation
if [ "$KERNEL_CCACHE" = true ] ; then
REQUIRED_PACKAGES="${REQUIRED_PACKAGES} ccache"
fi
Jan Wagner
Added: ENABLE_CRYPTFS - encrypted rootfs, use-latest-bootloader, cp-cleanup
r77 # Add cryptsetup package to enable filesystem encryption
if [ "$ENABLE_CRYPTFS" = true ] && [ "$BUILD_KERNEL" = true ] ; then
REQUIRED_PACKAGES="${REQUIRED_PACKAGES} cryptsetup"
Unknown
-using --verbose and debug while creating cryptfs to give a hint by default...
r696 APT_INCLUDES="${APT_INCLUDES},cryptsetup,busybox,console-setup,cryptsetup-initramfs"
Jan Wagner
Added: ENABLE_CRYPTFS - encrypted rootfs, use-latest-bootloader, cp-cleanup
r77
Unknown
Dropbear initramfs...
r501 # If cryptfs,dropbear and initramfs are enabled include dropbear-initramfs package
if [ "$CRYPTFS_DROPBEAR" = true ] && [ "$ENABLE_INITRAMFS" = true ]; then
APT_INCLUDES="${APT_INCLUDES},dropbear-initramfs"
fi
Jan Wagner
Added: ENABLE_CRYPTFS - encrypted rootfs, use-latest-bootloader, cp-cleanup
r77 if [ -z "$CRYPTFS_PASSWORD" ] ; then
echo "error: no password defined (CRYPTFS_PASSWORD)!"
exit 1
fi
ENABLE_INITRAMFS=true
fi
# Add initramfs generation tools
if [ "$ENABLE_INITRAMFS" = true ] && [ "$BUILD_KERNEL" = true ] ; then
APT_INCLUDES="${APT_INCLUDES},initramfs-tools"
fi
drtyhlpr
Fixed: Added device-tree-compiler for U-Boot
r114 # Add device-tree-compiler required for building the U-Boot bootloader
if [ "$ENABLE_UBOOT" = true ] ; then
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 APT_INCLUDES="${APT_INCLUDES},device-tree-compiler,bc"
drtyhlpr
Fixed: Added device-tree-compiler for U-Boot
r114 fi
Unknown
USBBOOT is Back...
r568 if [ "$ENABLE_USBBOOT" = true ] ; then
if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 1P ] || [ "$RPI_MODEL" = 1 ] || [ "$RPI_MODEL" = 2 ]; then
echo "error: Booting from USB alone is only supported by Raspberry Pi 3 and 3P"
exit 1
fi
fi
drtyhlpr
Added: SSH public key auth, other fixes
r120 # Check if root SSH (v2) public key file exists
Unknown
https://www.shellcheck.net/...
r336 if [ -n "$SSH_ROOT_PUB_KEY" ] ; then
drtyhlpr
Added: SSH public key auth, other fixes
r120 if [ ! -f "$SSH_ROOT_PUB_KEY" ] ; then
echo "error: '$SSH_ROOT_PUB_KEY' specified SSH public key file not found (SSH_ROOT_PUB_KEY)!"
exit 1
fi
fi
# Check if $USER_NAME SSH (v2) public key file exists
Unknown
https://www.shellcheck.net/...
r336 if [ -n "$SSH_USER_PUB_KEY" ] ; then
drtyhlpr
Added: SSH public key auth, other fixes
r120 if [ ! -f "$SSH_USER_PUB_KEY" ] ; then
echo "error: '$SSH_USER_PUB_KEY' specified SSH public key file not found (SSH_USER_PUB_KEY)!"
exit 1
fi
fi
Unknown
kernel features + nexmon monitor mode wlan patch(kali-kernel) with RPI3,RPI3B+ firmware patch...
r502 if [ "$ENABLE_NEXMON" = true ] && [ -n "$KERNEL_BRANCH" ] ; then
echo "error: Please unset KERNEL_BRANCH if using ENABLE_NEXMON"
exit 1
fi
Jan Wagner
Added: KERNEL_REDUCE - less than 128MB used space, Added: REDUCE_ parameters
r76 # Check if all required packages are installed on the build system
Jan Wagner
fix: confirm y/n installation of required packages
r8 for package in $REQUIRED_PACKAGES ; do
Unknown
- removed wrong/old logic for locales...
r431 if [ "$(dpkg-query -W -f='${Status}' "$package")" != "install ok installed" ] ; then
Jan Wagner
Added: KERNELSRC_PREBUILT, KERNELSRC_ rename, fix-quotes
r75 MISSING_PACKAGES="${MISSING_PACKAGES} $package"
Jan Wagner
fix: confirm y/n installation of required packages
r8 fi
done
Aurélien COUDERC
Don’t require apt lock to be available on build machine if there are no packages to install
r106 # If there are missing packages ask confirmation for install, or exit
Jan Wagner
fix: confirm y/n installation of required packages
r8 if [ -n "$MISSING_PACKAGES" ] ; then
echo "the following packages needed by this script are not installed:"
echo "$MISSING_PACKAGES"
Unknown
bugfixes...
r337 printf "\ndo you want to install the missing packages right now? [y/n] "
Unknown
https://www.shellcheck.net/...
r336 read -r confirm
Jan Wagner
Added: KERNEL_REDUCE - less than 128MB used space, Added: REDUCE_ parameters
r76 [ "$confirm" != "y" ] && exit 1
Jan Wagner
fix: confirm y/n installation of required packages
r8
Aurélien COUDERC
Don’t require apt lock to be available on build machine if there are no packages to install
r106 # Make sure all missing required packages are installed
Unknown
PATCHES for:...
r665 apt-get update && apt-get -qq -y install `echo "${MISSING_PACKAGES}" | sed "s/ //"`
Aurélien COUDERC
Don’t require apt lock to be available on build machine if there are no packages to install
r106 fi
Jan Wagner
fix: confirm y/n installation of required packages
r8
Jan Wagner
Added: KERNEL_REDUCE - less than 128MB used space, Added: REDUCE_ parameters
r76 # Check if ./bootstrap.d directory exists
if [ ! -d "./bootstrap.d/" ] ; then
echo "error: './bootstrap.d' required directory not found!"
exit 1
fi
# Check if ./files directory exists
if [ ! -d "./files/" ] ; then
echo "error: './files' required directory not found!"
exit 1
fi
# Check if specified KERNELSRC_DIR directory exists
if [ -n "$KERNELSRC_DIR" ] && [ ! -d "$KERNELSRC_DIR" ] ; then
echo "error: '${KERNELSRC_DIR}' specified directory not found (KERNELSRC_DIR)!"
exit 1
fi
drtyhlpr
Fixed: RPi3 stretch support, uboot updated compiler and src dir
r139 # Check if specified UBOOTSRC_DIR directory exists
if [ -n "$UBOOTSRC_DIR" ] && [ ! -d "$UBOOTSRC_DIR" ] ; then
echo "error: '${UBOOTSRC_DIR}' specified directory not found (UBOOTSRC_DIR)!"
exit 1
fi
Unknown
Raspberry Userland...
r332 # Check if specified VIDEOCORESRC_DIR directory exists
if [ -n "$VIDEOCORESRC_DIR" ] && [ ! -d "$VIDEOCORESRC_DIR" ] ; then
echo "error: '${VIDEOCORESRC_DIR}' specified directory not found (VIDEOCORESRC_DIR)!"
exit 1
fi
drtyhlpr
Updated: Dropping privileges, chroot compiler install, dropbear sshd config
r142 # Check if specified FBTURBOSRC_DIR directory exists
if [ -n "$FBTURBOSRC_DIR" ] && [ ! -d "$FBTURBOSRC_DIR" ] ; then
echo "error: '${FBTURBOSRC_DIR}' specified directory not found (FBTURBOSRC_DIR)!"
exit 1
fi
Unknown
kernel features + nexmon monitor mode wlan patch(kali-kernel) with RPI3,RPI3B+ firmware patch...
r502 # Check if specified NEXMONSRC_DIR directory exists
if [ -n "$NEXMONSRC_DIR" ] && [ ! -d "$NEXMONSRC_DIR" ] ; then
echo "error: '${NEXMONSRC_DIR}' specified directory not found (NEXMONSRC_DIR)!"
exit 1
fi
Jan Wagner
Added: KERNEL_REDUCE - less than 128MB used space, Added: REDUCE_ parameters
r76 # Check if specified CHROOT_SCRIPTS directory exists
if [ -n "$CHROOT_SCRIPTS" ] && [ ! -d "$CHROOT_SCRIPTS" ] ; then
echo "error: ${CHROOT_SCRIPTS} specified directory not found (CHROOT_SCRIPTS)!"
exit 1
fi
Jan Wagner
Added: ENABLE_CRYPTFS - encrypted rootfs, use-latest-bootloader, cp-cleanup
r77 # Check if specified device mapping already exists (will be used by cryptsetup)
if [ -r "/dev/mapping/${CRYPTFS_MAPPING}" ] ; then
echo "error: mapping /dev/mapping/${CRYPTFS_MAPPING} already exists, not proceeding"
exit 1
fi
Jan Wagner
first public release
r2 # Don't clobber an old build
Jan Wagner
Added: KERNEL_SRCDIR, path-checks, code-cleanup
r72 if [ -e "$BUILDDIR" ] ; then
echo "error: directory ${BUILDDIR} already exists, not proceeding"
exit 1
fi
Jan Wagner
Added: KERNELSRC_PREBUILT, KERNELSRC_ rename, fix-quotes
r75 # Setup chroot directory
Jan Wagner
fix: ENABLE_CRYPTFS -> UBOOT, SPLITFS, EXPANDROOT - cleanup
r82 mkdir -p "${R}"
Jan Wagner
Added: KERNELSRC_PREBUILT, KERNELSRC_ rename, fix-quotes
r75
Jan Wagner
Added: KERNEL_SRCDIR, path-checks, code-cleanup
r72 # Check if build directory has enough of free disk space >512MB
Unknown
https://www.shellcheck.net/...
r336 if [ "$(df --output=avail "${BUILDDIR}" | sed "1d")" -le "524288" ] ; then
Jan Wagner
Added: KERNEL_REDUCE - less than 128MB used space, Added: REDUCE_ parameters
r76 echo "error: ${BUILDDIR} not enough space left to generate the output image!"
Jan Wagner
first public release
r2 exit 1
fi
set -x
# Call "cleanup" function on various signals and errors
trap cleanup 0 1 2 3 6
Jan Wagner
Added: ENABLE_MINBASE, Fix: Use systemd-networkd
r16 # Add required packages for the minbase installation
drtyhlpr
Fixed: DEFLOCAL/MINBASE better fix
r89 if [ "$ENABLE_MINBASE" = true ] ; then
Jan Wagner
Added: ENABLE_CRYPTFS - encrypted rootfs, use-latest-bootloader, cp-cleanup
r77 APT_INCLUDES="${APT_INCLUDES},vim-tiny,netbase,net-tools,ifupdown"
drtyhlpr
Fixed: DEFLOCAL/MINBASE better fix
r89 fi
Filip Pytloun
Option to expand partition and rootfs on first boot...
r46 # Add parted package, required to get partprobe utility
if [ "$EXPANDROOT" = true ] ; then
APT_INCLUDES="${APT_INCLUDES},parted"
fi
Yannick Schinko
Added ENABLE_SWAP...
r520 # Add dphys-swapfile package, required to enable swap
Yannick Schinko
Rename ENANLE_SWAP to ENABLE_DPHYSSWAP
r528 if [ "$ENABLE_DPHYSSWAP" = true ] ; then
Yannick Schinko
Added ENABLE_SWAP...
r520 APT_INCLUDES="${APT_INCLUDES},dphys-swapfile"
fi
Jan Wagner
first public release
r2 # Add dbus package, recommended if using systemd
if [ "$ENABLE_DBUS" = true ] ; then
APT_INCLUDES="${APT_INCLUDES},dbus"
fi
Jan Wagner
fix: ENABLE_IPTABLES
r17 # Add iptables IPv4/IPv6 package
if [ "$ENABLE_IPTABLES" = true ] ; then
Unknown
fix: iptables needs iptables-persistent package...
r286 APT_INCLUDES="${APT_INCLUDES},iptables,iptables-persistent"
Jan Wagner
fix: ENABLE_IPTABLES
r17 fi
Unknown
kernel features + nexmon monitor mode wlan patch(kali-kernel) with RPI3,RPI3B+ firmware patch...
r502 # Add apparmor for KERNEL_SECURITY
if [ "$KERNEL_SECURITY" = true ] ; then
APT_INCLUDES="${APT_INCLUDES},apparmor,apparmor-utils,apparmor-profiles,apparmor-profiles-extra,libapparmor-perl"
fi
Jan Wagner
fix: ENABLE_IPTABLES
r17
Jan Wagner
first public release
r2 # Add openssh server package
Unknown
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
r732 if [ "$SSH_ENABLE" = true ] ; then
Jan Wagner
first public release
r2 APT_INCLUDES="${APT_INCLUDES},openssh-server"
fi
Jan Wagner
fix: ENABLE_SOUND
r21 # Add alsa-utils package
if [ "$ENABLE_SOUND" = true ] ; then
APT_INCLUDES="${APT_INCLUDES},alsa-utils"
fi
Jan Wagner
first public release
r2 # Add rng-tools package
if [ "$ENABLE_HWRANDOM" = true ] ; then
APT_INCLUDES="${APT_INCLUDES},rng-tools"
fi
Jan Wagner
Added: ENABLE_FBTURBO
r20 # Add fbturbo video driver
if [ "$ENABLE_FBTURBO" = true ] ; then
# Enable xorg package dependencies
ENABLE_XORG=true
fi
Jan Wagner
Replaced: ENABLE_FLUXBOX -\> ENABLE_WM
r22 # Add user defined window manager package
if [ -n "$ENABLE_WM" ] ; then
APT_INCLUDES="${APT_INCLUDES},${ENABLE_WM}"
Jan Wagner
fix: ENABLE_IPTABLES
r17
Jan Wagner
Added: ENABLE_FBTURBO
r20 # Enable xorg package dependencies
Jan Wagner
fix: ENABLE_IPTABLES
r17 ENABLE_XORG=true
fi
# Add xorg package
if [ "$ENABLE_XORG" = true ] ; then
drtyhlpr
Fix: Package dbus-session-bus is not installed...
r232 APT_INCLUDES="${APT_INCLUDES},xorg,dbus-x11"
Jan Wagner
first public release
r2 fi
Jan Wagner
Added: KERNEL_REDUCE - less than 128MB used space, Added: REDUCE_ parameters
r76 # Replace selected packages with smaller clones
if [ "$ENABLE_REDUCE" = true ] ; then
# Add levee package instead of vim-tiny
if [ "$REDUCE_VIM" = true ] ; then
APT_INCLUDES="$(echo ${APT_INCLUDES} | sed "s/vim-tiny/levee/")"
fi
# Add dropbear package instead of openssh-server
if [ "$REDUCE_SSHD" = true ] ; then
Unknown
https://www.shellcheck.net/...
r336 APT_INCLUDES="$(echo "${APT_INCLUDES}" | sed "s/openssh-server/dropbear/")"
Jan Wagner
Added: KERNEL_REDUCE - less than 128MB used space, Added: REDUCE_ parameters
r76 fi
fi
drtyhlpr
fix: various fixes
r398 # Configure systemd-sysv exclude to make halt/reboot/shutdown scripts available
if [ "$ENABLE_SYSVINIT" = false ] ; then
APT_EXCLUDES="--exclude=${APT_EXCLUDES},init,systemd-sysv"
fi
Jan Wagner
Added: KERNEL_REDUCE - less than 128MB used space, Added: REDUCE_ parameters
r76 # Configure kernel sources if no KERNELSRC_DIR
Jan Wagner
Added: KERNELSRC_PREBUILT, KERNELSRC_ rename, fix-quotes
r75 if [ "$BUILD_KERNEL" = true ] && [ -z "$KERNELSRC_DIR" ] ; then
KERNELSRC_CONFIG=true
Jan Wagner
Added: KERNEL_SRCDIR, path-checks, code-cleanup
r72 fi
Jan Wagner
Added: KERNEL_REDUCE - less than 128MB used space, Added: REDUCE_ parameters
r76 # Configure reduced kernel
if [ "$KERNEL_REDUCE" = true ] ; then
KERNELSRC_CONFIG=false
fi
drtyhlpr
Added: Initial QEMU emulation support
r259 # Configure qemu compatible kernel
if [ "$ENABLE_QEMU" = true ] ; then
drtyhlpr
fix: QEMU uboot (still problems)
r267 DTB_FILE=vexpress-v2p-ca15_a7.dtb
UBOOT_CONFIG=vexpress_ca15_tc2_defconfig
drtyhlpr
Added: Initial QEMU emulation support
r259 KERNEL_DEFCONFIG="vexpress_defconfig"
drtyhlpr
fix: QEMU with cryptfs
r263 if [ "$KERNEL_MENUCONFIG" = false ] ; then
KERNEL_OLDDEFCONFIG=true
fi
drtyhlpr
Added: Initial QEMU emulation support
r259 fi
Jan Wagner
Added: KERNEL_REDUCE - less than 128MB used space, Added: REDUCE_ parameters
r76 # Execute bootstrap scripts
Jan Wagner
Added: KERNEL_SRCDIR, path-checks, code-cleanup
r72 for SCRIPT in bootstrap.d/*.sh; do
Jan Wagner
Added: KERNELSRC_PREBUILT, KERNELSRC_ rename, fix-quotes
r75 head -n 3 "$SCRIPT"
. "$SCRIPT"
Filip Pytloun
Refactor: split bootstrap actions and allow custom
r56 done
Jan Wagner
Added ENABLE_UBOOT support
r3
Jan Wagner
Added: KERNEL_REDUCE - less than 128MB used space, Added: REDUCE_ parameters
r76 ## Execute custom bootstrap scripts
Jan Wagner
Added: KERNEL_SRCDIR, path-checks, code-cleanup
r72 if [ -d "custom.d" ] ; then
for SCRIPT in custom.d/*.sh; do
Jan Wagner
Added: KERNELSRC_PREBUILT, KERNELSRC_ rename, fix-quotes
r75 . "$SCRIPT"
Jan Wagner
fix: custom.d directory error
r63 done
fi
Jan Wagner
Added ENABLE_UBOOT support
r3
Jan Wagner
Added: KERNEL_REDUCE - less than 128MB used space, Added: REDUCE_ parameters
r76 # Execute custom scripts inside the chroot
Jan Wagner
Added: KERNEL_SRCDIR, path-checks, code-cleanup
r72 if [ -n "$CHROOT_SCRIPTS" ] && [ -d "$CHROOT_SCRIPTS" ] ; then
Chris Landa
Added functionality to run custom scripts after base bootstrap
r40 cp -r "${CHROOT_SCRIPTS}" "${R}/chroot_scripts"
Jan Wagner
Added: KERNEL_SRCDIR, path-checks, code-cleanup
r72 chroot_exec /bin/bash -x <<'EOF'
for SCRIPT in /chroot_scripts/* ; do
if [ -f $SCRIPT -a -x $SCRIPT ] ; then
$SCRIPT
fi
done
EOF
Jan Wagner
fix: ENABLE_CRYPTFS -> UBOOT, SPLITFS, EXPANDROOT - cleanup
r82 rm -rf "${R}/chroot_scripts"
Chris Landa
Added functionality to run custom scripts after base bootstrap
r40 fi
drtyhlpr
Updated: Dropping privileges, chroot compiler install, dropbear sshd config
r142 # Remove c/c++ build environment from the chroot
chroot_remove_cc
Jan Wagner
Added: ENABLE_CRYPTFS - encrypted rootfs, use-latest-bootloader, cp-cleanup
r77 # Generate required machine-id
MACHINE_ID=$(dbus-uuidgen)
Jan Wagner
fix: ENABLE_CRYPTFS -> UBOOT, SPLITFS, EXPANDROOT - cleanup
r82 echo -n "${MACHINE_ID}" > "${R}/var/lib/dbus/machine-id"
drtyhlpr
Added Raspberry Pi 3 model support
r94 echo -n "${MACHINE_ID}" > "${ETC_DIR}/machine-id"
Jan Wagner
Added: ENABLE_CRYPTFS - encrypted rootfs, use-latest-bootloader, cp-cleanup
r77
Jan Wagner
Added: ENABLE_REDUCE - down to 160MB used space,fix-resolve,fix-machineid
r73 # APT Cleanup
Filip Pytloun
Refactor: split bootstrap actions and allow custom
r56 chroot_exec apt-get -y clean
chroot_exec apt-get -y autoclean
chroot_exec apt-get -y autoremove
Jan Wagner
first public release
r2 # Unmount mounted filesystems
Jan Wagner
fix: ENABLE_CRYPTFS -> UBOOT, SPLITFS, EXPANDROOT - cleanup
r82 umount -l "${R}/proc"
umount -l "${R}/sys"
Jan Wagner
first public release
r2
Jan Wagner
Added: ENABLE_REDUCE - down to 160MB used space,fix-resolve,fix-machineid
r73 # Clean up directories
Jan Wagner
fix: ENABLE_CRYPTFS -> UBOOT, SPLITFS, EXPANDROOT - cleanup
r82 rm -rf "${R}/run/*"
rm -rf "${R}/tmp/*"
Jan Wagner
Added: ENABLE_REDUCE - down to 160MB used space,fix-resolve,fix-machineid
r73
drtyhlpr
Added: KEEP_APT_PROXY
r538 # Clean up APT proxy settings
if [ "$KEEP_APT_PROXY" = false ] ; then
rm -f "${ETC_DIR}/apt/apt.conf.d/10proxy"
fi
Jan Wagner
first public release
r2 # Clean up files
drtyhlpr
Added Raspberry Pi 3 model support
r94 rm -f "${ETC_DIR}/ssh/ssh_host_*"
rm -f "${ETC_DIR}/dropbear/dropbear_*"
rm -f "${ETC_DIR}/apt/sources.list.save"
rm -f "${ETC_DIR}/resolvconf/resolv.conf.d/original"
rm -f "${ETC_DIR}/*-"
rm -f "${ETC_DIR}/resolv.conf"
Jan Wagner
fix: ENABLE_CRYPTFS -> UBOOT, SPLITFS, EXPANDROOT - cleanup
r82 rm -f "${R}/root/.bash_history"
rm -f "${R}/var/lib/urandom/random-seed"
rm -f "${R}/initrd.img"
rm -f "${R}/vmlinuz"
Jan Wagner
Added: ENABLE_REDUCE - down to 160MB used space,fix-resolve,fix-machineid
r73 rm -f "${R}${QEMU_BINARY}"
Jan Wagner
first public release
r2
drtyhlpr
Added: Initial QEMU emulation support
r259 if [ "$ENABLE_QEMU" = true ] ; then
# Setup QEMU directory
mkdir "${BASEDIR}/qemu"
# Copy kernel image to QEMU directory
install_readonly "${BOOT_DIR}/${KERNEL_IMAGE}" "${BASEDIR}/qemu/${KERNEL_IMAGE}"
# Copy kernel config to QEMU directory
install_readonly "${R}/boot/config-${KERNEL_VERSION}" "${BASEDIR}/qemu/config-${KERNEL_VERSION}"
# Copy kernel dtbs to QEMU directory
for dtb in "${BOOT_DIR}/"*.dtb ; do
if [ -f "${dtb}" ] ; then
install_readonly "${dtb}" "${BASEDIR}/qemu/"
fi
done
# Copy kernel overlays to QEMU directory
if [ -d "${BOOT_DIR}/overlays" ] ; then
# Setup overlays dtbs directory
mkdir "${BASEDIR}/qemu/overlays"
Unknown
Device Tree Overlay fix...
r567 for dtb in "${BOOT_DIR}/overlays/"*.dtbo ; do
drtyhlpr
Added: Initial QEMU emulation support
r259 if [ -f "${dtb}" ] ; then
install_readonly "${dtb}" "${BASEDIR}/qemu/overlays/"
fi
done
fi
drtyhlpr
Added: QEMU initramfs output
r260
drtyhlpr
fix: QEMU uboot (still problems)
r267 # Copy u-boot files to QEMU directory
if [ "$ENABLE_UBOOT" = true ] ; then
if [ -f "${BOOT_DIR}/u-boot.bin" ] ; then
install_readonly "${BOOT_DIR}/u-boot.bin" "${BASEDIR}/qemu/u-boot.bin"
fi
if [ -f "${BOOT_DIR}/uboot.mkimage" ] ; then
install_readonly "${BOOT_DIR}/uboot.mkimage" "${BASEDIR}/qemu/uboot.mkimage"
fi
if [ -f "${BOOT_DIR}/boot.scr" ] ; then
install_readonly "${BOOT_DIR}/boot.scr" "${BASEDIR}/qemu/boot.scr"
fi
fi
drtyhlpr
Added: QEMU initramfs output
r260 # Copy initramfs to QEMU directory
if [ -f "${BOOT_DIR}/initramfs-${KERNEL_VERSION}" ] ; then
install_readonly "${BOOT_DIR}/initramfs-${KERNEL_VERSION}" "${BASEDIR}/qemu/initramfs-${KERNEL_VERSION}"
fi
drtyhlpr
Added: Initial QEMU emulation support
r259 fi
Chris Landa
Make the rootfs partition 20% bigger than the used size of the chroot directory
r41 # Calculate size of the chroot directory in KB
Unknown
https://www.shellcheck.net/...
r336 CHROOT_SIZE=$(expr "$(du -s "${R}" | awk '{ print $1 }')")
Jan Wagner
first public release
r2
Chris Landa
Make the rootfs partition 20% bigger than the used size of the chroot directory
r41 # Calculate the amount of needed 512 Byte sectors
TABLE_SECTORS=$(expr 1 \* 1024 \* 1024 \/ 512)
Vincent Knecht
Added ENABLE_SPLITFS option to create distinct images for firmware and root partitions
r65 FRMW_SECTORS=$(expr 64 \* 1024 \* 1024 \/ 512)
Unknown
https://www.shellcheck.net/...
r336 ROOT_OFFSET=$(expr "${TABLE_SECTORS}" + "${FRMW_SECTORS}")
Jan Wagner
first public release
r2
Chris Landa
Make the rootfs partition 20% bigger than the used size of the chroot directory
r41 # The root partition is EXT4
# This means more space than the actual used space of the chroot is used.
drtyhlpr
increased fs overhead from 25% to 35%...
r242 # As overhead for journaling and reserved blocks 35% are added.
Unknown
https://www.shellcheck.net/...
r336 ROOT_SECTORS=$(expr "$(expr "${CHROOT_SIZE}" + "${CHROOT_SIZE}" \/ 100 \* 35)" \* 1024 \/ 512)
Chris Landa
Make the rootfs partition 20% bigger than the used size of the chroot directory
r41
# Calculate required image size in 512 Byte sectors
Unknown
https://www.shellcheck.net/...
r336 IMAGE_SECTORS=$(expr "${TABLE_SECTORS}" + "${FRMW_SECTORS}" + "${ROOT_SECTORS}")
Jan Wagner
first public release
r2
# Prepare image file
Vincent Knecht
Added ENABLE_SPLITFS option to create distinct images for firmware and root partitions
r65 if [ "$ENABLE_SPLITFS" = true ] ; then
Unknown
https://www.shellcheck.net/...
r336 dd if=/dev/zero of="$IMAGE_NAME-frmw.img" bs=512 count="${TABLE_SECTORS}"
dd if=/dev/zero of="$IMAGE_NAME-frmw.img" bs=512 count=0 seek="${FRMW_SECTORS}"
dd if=/dev/zero of="$IMAGE_NAME-root.img" bs=512 count="${TABLE_SECTORS}"
dd if=/dev/zero of="$IMAGE_NAME-root.img" bs=512 count=0 seek="${ROOT_SECTORS}"
Jan Wagner
Added: ENABLE_CRYPTFS - encrypted rootfs, use-latest-bootloader, cp-cleanup
r77
# Write firmware/boot partition tables
Denis Mosolov
Add IMAGE_NAME
r138 sfdisk -q -L -uS -f "$IMAGE_NAME-frmw.img" 2> /dev/null <<EOM
Jan Wagner
Added: ENABLE_CRYPTFS - encrypted rootfs, use-latest-bootloader, cp-cleanup
r77 ${TABLE_SECTORS},${FRMW_SECTORS},c,*
Vincent Knecht
Added ENABLE_SPLITFS option to create distinct images for firmware and root partitions
r65 EOM
Jan Wagner
first public release
r2
Jan Wagner
Added: ENABLE_CRYPTFS - encrypted rootfs, use-latest-bootloader, cp-cleanup
r77 # Write root partition table
Denis Mosolov
Add IMAGE_NAME
r138 sfdisk -q -L -uS -f "$IMAGE_NAME-root.img" 2> /dev/null <<EOM
Jan Wagner
Added: ENABLE_CRYPTFS - encrypted rootfs, use-latest-bootloader, cp-cleanup
r77 ${TABLE_SECTORS},${ROOT_SECTORS},83
Vincent Knecht
Added ENABLE_SPLITFS option to create distinct images for firmware and root partitions
r65 EOM
Jan Wagner
Added: ENABLE_CRYPTFS - encrypted rootfs, use-latest-bootloader, cp-cleanup
r77
Jan Wagner
comment-cleanup, net-cleanup, size-calc-fix, split-more, menuconfig
r71 # Setup temporary loop devices
Unknown
bugfixes...
r337 FRMW_LOOP="$(losetup -o 1M --sizelimit 64M -f --show "$IMAGE_NAME"-frmw.img)"
ROOT_LOOP="$(losetup -o 1M -f --show "$IMAGE_NAME"-root.img)"
Jan Wagner
Added: ENABLE_CRYPTFS - encrypted rootfs, use-latest-bootloader, cp-cleanup
r77 else # ENABLE_SPLITFS=false
Unknown
https://www.shellcheck.net/...
r336 dd if=/dev/zero of="$IMAGE_NAME.img" bs=512 count="${TABLE_SECTORS}"
dd if=/dev/zero of="$IMAGE_NAME.img" bs=512 count=0 seek="${IMAGE_SECTORS}"
Jan Wagner
first public release
r2
Jan Wagner
Added: ENABLE_CRYPTFS - encrypted rootfs, use-latest-bootloader, cp-cleanup
r77 # Write partition table
Denis Mosolov
Add IMAGE_NAME
r138 sfdisk -q -L -uS -f "$IMAGE_NAME.img" 2> /dev/null <<EOM
Jan Wagner
Added: ENABLE_CRYPTFS - encrypted rootfs, use-latest-bootloader, cp-cleanup
r77 ${TABLE_SECTORS},${FRMW_SECTORS},c,*
${ROOT_OFFSET},${ROOT_SECTORS},83
Jan Wagner
first public release
r2 EOM
Jan Wagner
Added: ENABLE_CRYPTFS - encrypted rootfs, use-latest-bootloader, cp-cleanup
r77
Jan Wagner
comment-cleanup, net-cleanup, size-calc-fix, split-more, menuconfig
r71 # Setup temporary loop devices
Unknown
bugfixes...
r337 FRMW_LOOP="$(losetup -o 1M --sizelimit 64M -f --show "$IMAGE_NAME".img)"
ROOT_LOOP="$(losetup -o 65M -f --show "$IMAGE_NAME".img)"
Vincent Knecht
Added ENABLE_SPLITFS option to create distinct images for firmware and root partitions
r65 fi
Jan Wagner
first public release
r2
Jan Wagner
Added: ENABLE_CRYPTFS - encrypted rootfs, use-latest-bootloader, cp-cleanup
r77 if [ "$ENABLE_CRYPTFS" = true ] ; then
# Create dummy ext4 fs
mkfs.ext4 "$ROOT_LOOP"
# Setup password keyfile
drtyhlpr
Updated: Dropping privileges, chroot compiler install, dropbear sshd config
r142 touch .password
Jan Wagner
shred-fix
r78 chmod 600 .password
drtyhlpr
Updated: Dropping privileges, chroot compiler install, dropbear sshd config
r142 echo -n ${CRYPTFS_PASSWORD} > .password
Jan Wagner
Added: ENABLE_CRYPTFS - encrypted rootfs, use-latest-bootloader, cp-cleanup
r77
# Initialize encrypted partition
Unknown
-using --verbose and debug while creating cryptfs to give a hint by default...
r696 cryptsetup --verbose --debug -q luksFormat "${ROOT_LOOP}" -c "${CRYPTFS_CIPHER}" -h "${CRYPTFS_HASH}" -s "${CRYPTFS_XTSKEYSIZE}" .password
Jan Wagner
Added: ENABLE_CRYPTFS - encrypted rootfs, use-latest-bootloader, cp-cleanup
r77
# Open encrypted partition and setup mapping
cryptsetup luksOpen "${ROOT_LOOP}" -d .password "${CRYPTFS_MAPPING}"
# Secure delete password keyfile
shred -zu .password
# Update temporary loop device
ROOT_LOOP="/dev/mapper/${CRYPTFS_MAPPING}"
# Wipe encrypted partition (encryption cipher is used for randomness)
Unknown
https://www.shellcheck.net/...
r336 dd if=/dev/zero of="${ROOT_LOOP}" bs=512 count="$(blockdev --getsz "${ROOT_LOOP}")"
Jan Wagner
Added: ENABLE_CRYPTFS - encrypted rootfs, use-latest-bootloader, cp-cleanup
r77 fi
Vincent Knecht
Added ENABLE_SPLITFS option to produce distinct /boot/firmware and root images
r66 # Build filesystems
Vincent Knecht
Added ENABLE_SPLITFS option to create distinct images for firmware and root partitions
r65 mkfs.vfat "$FRMW_LOOP"
mkfs.ext4 "$ROOT_LOOP"
Jan Wagner
first public release
r2
# Mount the temporary loop devices
mkdir -p "$BUILDDIR/mount"
Vincent Knecht
Added ENABLE_SPLITFS option to create distinct images for firmware and root partitions
r65 mount "$ROOT_LOOP" "$BUILDDIR/mount"
Jan Wagner
first public release
r2
mkdir -p "$BUILDDIR/mount/boot/firmware"
Vincent Knecht
Added ENABLE_SPLITFS option to create distinct images for firmware and root partitions
r65 mount "$FRMW_LOOP" "$BUILDDIR/mount/boot/firmware"
Jan Wagner
first public release
r2
# Copy all files from the chroot to the loop device mount point directory
Jan Wagner
fix: ENABLE_CRYPTFS -> UBOOT, SPLITFS, EXPANDROOT - cleanup
r82 rsync -a "${R}/" "$BUILDDIR/mount/"
Jan Wagner
first public release
r2
# Unmount all temporary loop devices and mount points
cleanup
Jan Wagner
vknecht-master-merge
r68 # Create block map file(s) of image(s)
Vincent Knecht
Added ENABLE_SPLITFS option to create distinct images for firmware and root partitions
r65 if [ "$ENABLE_SPLITFS" = true ] ; then
Jan Wagner
vknecht-master-merge
r68 # Create block map files for "bmaptool"
Denis Mosolov
Add IMAGE_NAME
r138 bmaptool create -o "$IMAGE_NAME-frmw.bmap" "$IMAGE_NAME-frmw.img"
bmaptool create -o "$IMAGE_NAME-root.bmap" "$IMAGE_NAME-root.img"
Jan Wagner
first public release
r2
Vincent Knecht
Added ENABLE_SPLITFS option to create distinct images for firmware and root partitions
r65 # Image was successfully created
Unknown
https://www.shellcheck.net/...
r336 echo "$IMAGE_NAME-frmw.img ($(expr \( "${TABLE_SECTORS}" + "${FRMW_SECTORS}" \) \* 512 \/ 1024 \/ 1024)M)" ": successfully created"
echo "$IMAGE_NAME-root.img ($(expr \( "${TABLE_SECTORS}" + "${ROOT_SECTORS}" \) \* 512 \/ 1024 \/ 1024)M)" ": successfully created"
Vincent Knecht
Added ENABLE_SPLITFS option to create distinct images for firmware and root partitions
r65 else
Jan Wagner
vknecht-master-merge
r68 # Create block map file for "bmaptool"
Denis Mosolov
Add IMAGE_NAME
r138 bmaptool create -o "$IMAGE_NAME.bmap" "$IMAGE_NAME.img"
Jan Wagner
first public release
r2
Vincent Knecht
Added ENABLE_SPLITFS option to create distinct images for firmware and root partitions
r65 # Image was successfully created
Unknown
https://www.shellcheck.net/...
r336 echo "$IMAGE_NAME.img ($(expr \( "${TABLE_SECTORS}" + "${FRMW_SECTORS}" + "${ROOT_SECTORS}" \) \* 512 \/ 1024 \/ 1024)M)" ": successfully created"
drtyhlpr
Added: Initial QEMU emulation support
r259
# Create qemu qcow2 image
if [ "$ENABLE_QEMU" = true ] ; then
QEMU_IMAGE=${QEMU_IMAGE:=${BASEDIR}/qemu/${DATE}-${KERNEL_ARCH}-CURRENT-rpi${RPI_MODEL}-${RELEASE}-${RELEASE_ARCH}}
QEMU_SIZE=16G
Unknown
https://www.shellcheck.net/...
r336 qemu-img convert -f raw -O qcow2 "$IMAGE_NAME".img "$QEMU_IMAGE".qcow2
qemu-img resize "$QEMU_IMAGE".qcow2 $QEMU_SIZE
drtyhlpr
Added: Initial QEMU emulation support
r259
echo "$QEMU_IMAGE.qcow2 ($QEMU_SIZE)" ": successfully created"
fi
Vincent Knecht
Added ENABLE_SPLITFS option to create distinct images for firmware and root partitions
r65 fi