2019-06-04 11:04:54 +02:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
2015-12-02 20:33:32 +01:00
|
|
|
# Copyright (c) 2015 Igor Pecovnik, igor.pecovnik@gma**.com
|
|
|
|
#
|
|
|
|
# This file is licensed under the terms of the GNU General Public
|
|
|
|
# License version 2. This program is licensed "as is" without any
|
|
|
|
# warranty of any kind, whether express or implied.
|
2017-08-01 12:51:10 +03:00
|
|
|
|
|
|
|
# This file is a part of the Armbian build script
|
|
|
|
# https://github.com/armbian/build/
|
2016-02-26 17:49:02 +03:00
|
|
|
|
|
|
|
# common options
|
2017-07-09 21:25:52 +03:00
|
|
|
# daily beta build contains date in subrevision
|
2017-08-02 23:51:43 +02:00
|
|
|
if [[ $BETA == yes && -z $SUBREVISION ]]; then SUBREVISION="."$(date --date="tomorrow" +"%y%m%d"); fi
|
2019-06-11 00:20:13 +02:00
|
|
|
REVISION="5.89$SUBREVISION" # all boards have same revision
|
2016-02-26 17:49:02 +03:00
|
|
|
ROOTPWD="1234" # Must be changed @first login
|
2018-11-13 23:01:30 +01:00
|
|
|
[[ -z $MAINTAINER ]] && MAINTAINER="Igor Pecovnik" # deb signature
|
|
|
|
[[ -z $MAINTAINERMAIL ]] && MAINTAINERMAIL="igor.pecovnik@****l.com" # deb signature
|
2019-06-04 11:04:54 +02:00
|
|
|
TZDATA=$(cat /etc/timezone) # Timezone for target is taken from host or defined here.
|
2016-08-30 19:25:32 +03:00
|
|
|
USEALLCORES=yes # Use all CPU cores for compiling
|
2016-02-26 17:49:02 +03:00
|
|
|
EXIT_PATCHING_ERROR="" # exit patching if failed
|
2017-04-11 14:05:46 +02:00
|
|
|
HOST="$(echo "$BOARD" | cut -f1 -d-)" # set hostname to the board
|
2018-06-05 19:13:31 +03:00
|
|
|
ROOTFSCACHE_VERSION=4
|
2017-10-13 20:49:50 +03:00
|
|
|
CHROOT_CACHE_VERSION=6
|
2019-06-11 00:24:46 +02:00
|
|
|
BUILD_REPOSITORY_URL=$(git remote get-url $(git remote 2>/dev/null) 2>/dev/null)
|
|
|
|
BUILD_REPOSITORY_COMMIT=$(git describe --match=d_e_a_d_b_e_e_f --always --dirty 2>/dev/null)
|
2017-11-17 18:49:10 +01:00
|
|
|
ROOTFS_CACHE_MAX=16 # max number of rootfs cache, older ones will be cleaned up
|
2016-10-11 20:01:03 +03:00
|
|
|
|
2018-07-31 16:02:26 -05:00
|
|
|
# TODO: fixed name can't be used for parallel image building
|
|
|
|
ROOT_MAPPER="armbian-root"
|
|
|
|
|
2016-08-30 19:25:32 +03:00
|
|
|
[[ -z $ROOTFS_TYPE ]] && ROOTFS_TYPE=ext4 # default rootfs type is ext4
|
2016-10-11 20:01:03 +03:00
|
|
|
[[ "ext4 f2fs btrfs nfs fel" != *$ROOTFS_TYPE* ]] && exit_with_error "Unknown rootfs type" "$ROOTFS_TYPE"
|
|
|
|
|
|
|
|
# Fixed image size is in 1M dd blocks (MiB)
|
|
|
|
# to get size of block device /dev/sdX execute as root:
|
|
|
|
# echo $(( $(blockdev --getsize64 /dev/sdX) / 1024 / 1024 ))
|
2017-08-28 09:19:57 -07:00
|
|
|
[[ "f2fs" == *$ROOTFS_TYPE* && -z $FIXED_IMAGE_SIZE ]] && exit_with_error "Please define FIXED_IMAGE_SIZE"
|
2016-10-11 20:01:03 +03:00
|
|
|
|
2018-07-31 16:02:26 -05:00
|
|
|
# a passphrase is mandatory if rootfs encryption is enabled
|
|
|
|
if [[ $CRYPTROOT_ENABLE == yes && -z $CRYPTROOT_PASSPHRASE ]]; then
|
|
|
|
exit_with_error "Root encryption is enabled but CRYPTROOT_PASSPHRASE is not set"
|
|
|
|
fi
|
|
|
|
|
2016-10-15 00:34:27 +03:00
|
|
|
# small SD card with kernel, boot script and .dtb/.bin files
|
2016-10-11 20:01:03 +03:00
|
|
|
[[ $ROOTFS_TYPE == nfs ]] && FIXED_IMAGE_SIZE=64
|
2016-02-26 17:49:02 +03:00
|
|
|
|
2016-05-02 16:33:37 +03:00
|
|
|
# used by multiple sources - reduce code duplication
|
2019-05-10 05:11:52 +08:00
|
|
|
[[ $USE_MAINLINE_GOOGLE_MIRROR == yes ]] && MAINLINE_MIRROR=google
|
|
|
|
case $MAINLINE_MIRROR in
|
|
|
|
google) MAINLINE_KERNEL_SOURCE='https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable' ;;
|
|
|
|
tuna) MAINLINE_KERNEL_SOURCE='https://mirrors.tuna.tsinghua.edu.cn/git/linux-stable.git' ;;
|
|
|
|
*) MAINLINE_KERNEL_SOURCE='git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git' ;;
|
|
|
|
esac
|
2017-07-27 19:02:46 +03:00
|
|
|
MAINLINE_KERNEL_DIR='linux-mainline'
|
2016-03-17 20:16:26 +01:00
|
|
|
|
2016-11-24 18:44:30 +01:00
|
|
|
if [[ $USE_GITHUB_UBOOT_MIRROR == yes ]]; then
|
|
|
|
MAINLINE_UBOOT_SOURCE='https://github.com/RobertCNelson/u-boot'
|
2016-12-08 18:44:41 +03:00
|
|
|
else
|
2016-11-24 18:44:30 +01:00
|
|
|
MAINLINE_UBOOT_SOURCE='git://git.denx.de/u-boot.git'
|
|
|
|
fi
|
2016-08-11 17:52:37 +03:00
|
|
|
MAINLINE_UBOOT_DIR='u-boot'
|
2016-03-17 20:16:26 +01:00
|
|
|
|
2016-09-17 18:40:04 +02:00
|
|
|
# Let's set default data if not defined in board configuration above
|
2017-10-24 20:12:19 +02:00
|
|
|
[[ -z $OFFSET ]] && OFFSET=4 # offset to 1st partition (we use 4MiB boundaries by default)
|
2016-08-21 16:58:17 +03:00
|
|
|
ARCH=armhf
|
|
|
|
KERNEL_IMAGE_TYPE=zImage
|
|
|
|
SERIALCON=ttyS0
|
2017-11-17 17:41:37 +03:00
|
|
|
CAN_BUILD_STRETCH=yes
|
2018-07-31 16:02:26 -05:00
|
|
|
[[ -z $CRYPTROOT_SSH_UNLOCK ]] && CRYPTROOT_SSH_UNLOCK=yes
|
|
|
|
[[ -z $CRYPTROOT_SSH_UNLOCK_PORT ]] && CRYPTROOT_SSH_UNLOCK_PORT=2022
|
2019-03-27 06:33:39 +01:00
|
|
|
[[ -z $WIREGUARD ]] && WIREGUARD="no"
|
2019-02-07 15:24:06 +01:00
|
|
|
[[ -z $RTL8812AU ]] && RTL8812AU="yes"
|
2016-10-14 22:04:32 +03:00
|
|
|
|
2017-04-23 16:56:19 +03:00
|
|
|
# single ext4 partition is the default and preferred configuration
|
2017-04-26 17:42:35 +03:00
|
|
|
#BOOTFS_TYPE=''
|
2016-08-21 16:58:17 +03:00
|
|
|
|
2016-11-23 20:05:43 +01:00
|
|
|
# set unique mounting directory
|
2019-06-04 11:04:54 +02:00
|
|
|
SDCARD="${SRC}/.tmp/rootfs-${BRANCH}-${BOARD}-${RELEASE}-${BUILD_DESKTOP}"
|
|
|
|
MOUNT="${SRC}/.tmp/mount-${BRANCH}-${BOARD}-${RELEASE}-${BUILD_DESKTOP}"
|
|
|
|
DESTIMG="${SRC}/.tmp/image-${BRANCH}-${BOARD}-${RELEASE}-${BUILD_DESKTOP}"
|
2016-11-23 20:05:43 +01:00
|
|
|
|
2019-06-04 11:04:54 +02:00
|
|
|
[[ ! -f ${SRC}/config/sources/$LINUXFAMILY.conf ]] && \
|
2016-08-21 16:58:17 +03:00
|
|
|
exit_with_error "Sources configuration not found" "$LINUXFAMILY"
|
2017-02-11 18:46:25 +03:00
|
|
|
|
2019-06-04 11:04:54 +02:00
|
|
|
source "${SRC}/config/sources/${LINUXFAMILY}.conf"
|
2016-04-16 18:06:21 +03:00
|
|
|
|
2019-06-04 11:04:54 +02:00
|
|
|
if [[ -f ${SRC}/userpatches/sources/$LINUXFAMILY.conf ]]; then
|
2016-10-26 18:01:41 +03:00
|
|
|
display_alert "Adding user provided $LINUXFAMILY overrides"
|
2019-06-04 11:04:54 +02:00
|
|
|
source "${SRC}/userpatches/sources/${LINUXFAMILY}.conf"
|
2016-10-26 18:01:41 +03:00
|
|
|
fi
|
|
|
|
|
2018-08-31 22:17:35 +02:00
|
|
|
# dropbear needs to be configured differently
|
|
|
|
[[ $CRYPTROOT_ENABLE == yes && ($RELEASE == jessie || $RELEASE == xenial) ]] && exit_with_error "Encrypted rootfs is not supported in Jessie or Xenial"
|
|
|
|
|
2017-11-17 17:41:37 +03:00
|
|
|
[[ $RELEASE == stretch && $CAN_BUILD_STRETCH != yes ]] && exit_with_error "Building Debian Stretch images with selected kernel is not supported"
|
2018-02-12 13:20:58 +01:00
|
|
|
[[ $RELEASE == bionic && $CAN_BUILD_STRETCH != yes ]] && exit_with_error "Building Ubuntu Bionic images with selected kernel is not supported"
|
2018-04-29 15:35:29 +03:00
|
|
|
[[ $RELEASE == bionic && $(lsb_release -sc) == xenial ]] && exit_with_error "Building Ubuntu Bionic images requires a Bionic build host. Please upgrade your host or select a different target OS"
|
2017-11-17 17:41:37 +03:00
|
|
|
|
2018-01-05 15:02:41 +03:00
|
|
|
[[ -n $ATFSOURCE && -z $ATF_USE_GCC ]] && exit_with_error "Error in configuration: ATF_USE_GCC is unset"
|
|
|
|
[[ -z $UBOOT_USE_GCC ]] && exit_with_error "Error in configuration: UBOOT_USE_GCC is unset"
|
|
|
|
[[ -z $KERNEL_USE_GCC ]] && exit_with_error "Error in configuration: KERNEL_USE_GCC is unset"
|
|
|
|
|
2016-04-16 18:06:21 +03:00
|
|
|
case $ARCH in
|
|
|
|
arm64)
|
2016-08-21 16:58:17 +03:00
|
|
|
[[ -z $KERNEL_COMPILER ]] && KERNEL_COMPILER="aarch64-linux-gnu-"
|
|
|
|
[[ -z $UBOOT_COMPILER ]] && UBOOT_COMPILER="aarch64-linux-gnu-"
|
2017-08-06 16:52:24 +03:00
|
|
|
ATF_COMPILER="aarch64-linux-gnu-"
|
2016-08-21 16:58:17 +03:00
|
|
|
[[ -z $INITRD_ARCH ]] && INITRD_ARCH=arm64
|
2016-04-18 19:20:15 +03:00
|
|
|
QEMU_BINARY="qemu-aarch64-static"
|
2016-08-21 16:58:17 +03:00
|
|
|
ARCHITECTURE=arm64
|
2016-04-16 18:06:21 +03:00
|
|
|
;;
|
|
|
|
|
|
|
|
armhf)
|
2016-08-21 16:58:17 +03:00
|
|
|
[[ -z $KERNEL_COMPILER ]] && KERNEL_COMPILER="arm-linux-gnueabihf-"
|
|
|
|
[[ -z $UBOOT_COMPILER ]] && UBOOT_COMPILER="arm-linux-gnueabihf-"
|
|
|
|
[[ -z $INITRD_ARCH ]] && INITRD_ARCH=arm
|
2016-04-18 19:20:15 +03:00
|
|
|
QEMU_BINARY="qemu-arm-static"
|
2016-08-21 16:58:17 +03:00
|
|
|
ARCHITECTURE=arm
|
2016-04-16 18:06:21 +03:00
|
|
|
;;
|
|
|
|
esac
|
2016-02-26 19:25:49 +03:00
|
|
|
|
2017-08-30 20:49:41 +03:00
|
|
|
BOOTCONFIG_VAR_NAME=BOOTCONFIG_${BRANCH^^}
|
|
|
|
[[ -n ${!BOOTCONFIG_VAR_NAME} ]] && BOOTCONFIG=${!BOOTCONFIG_VAR_NAME}
|
2016-08-21 01:39:21 +03:00
|
|
|
[[ -z $LINUXCONFIG ]] && LINUXCONFIG="linux-${LINUXFAMILY}-${BRANCH}"
|
2017-05-02 12:47:47 +03:00
|
|
|
[[ -z $BOOTPATCHDIR ]] && BOOTPATCHDIR="u-boot-$LINUXFAMILY"
|
2017-05-02 12:50:35 +03:00
|
|
|
[[ -z $KERNELPATCHDIR ]] && KERNELPATCHDIR="$LINUXFAMILY-$BRANCH"
|
2017-05-02 12:47:47 +03:00
|
|
|
|
2019-04-19 08:14:57 -07:00
|
|
|
if [[ $RELEASE == xenial || $RELEASE == bionic || $RELEASE == disco ]]; then DISTRIBUTION="Ubuntu"; else DISTRIBUTION="Debian"; fi
|
2018-05-24 21:01:02 +02:00
|
|
|
|
2018-07-22 14:22:36 +02:00
|
|
|
# Base system dependencies
|
2018-11-29 07:57:02 +01:00
|
|
|
DEBOOTSTRAP_LIST="locales,gnupg,ifupdown,apt-transport-https,ca-certificates"
|
2018-11-28 18:42:13 +01:00
|
|
|
[[ $BUILD_DESKTOP == yes ]] && DEBOOTSTRAP_LIST+=",libgtk2.0-bin"
|
2016-08-21 01:39:21 +03:00
|
|
|
|
2016-02-26 19:25:49 +03:00
|
|
|
# Essential packages
|
2016-12-08 18:44:41 +03:00
|
|
|
PACKAGE_LIST="bc bridge-utils build-essential cpufrequtils device-tree-compiler figlet fbset fping \
|
|
|
|
iw fake-hwclock wpasupplicant psmisc ntp parted rsync sudo curl linux-base dialog crda \
|
|
|
|
wireless-regdb ncurses-term python3-apt sysfsutils toilet u-boot-tools unattended-upgrades \
|
2017-08-03 20:41:39 +03:00
|
|
|
usbutils wireless-tools console-setup unicode-data openssh-server initramfs-tools \
|
2019-06-11 00:24:46 +02:00
|
|
|
ca-certificates resolvconf expect iptables automake nocache debconf-utils html2text \
|
2018-05-24 21:01:02 +02:00
|
|
|
bison flex libwrap0-dev libssl-dev libnl-3-dev libnl-genl-3-dev"
|
2016-06-19 11:46:07 +03:00
|
|
|
|
2016-02-26 19:25:49 +03:00
|
|
|
|
|
|
|
# Non-essential packages
|
2019-04-20 12:19:12 +02:00
|
|
|
PACKAGE_LIST_ADDITIONAL="armbian-firmware alsa-utils btrfs-tools dosfstools iotop iozone3 stress screen \
|
2018-11-28 18:42:13 +01:00
|
|
|
ntfs-3g vim pciutils evtest htop pv lsof libfuse2 libdigest-sha-perl \
|
2018-05-24 21:01:02 +02:00
|
|
|
libproc-processtable-perl aptitude dnsutils f3 haveged hdparm rfkill vlan sysstat bash-completion \
|
|
|
|
hostapd git ethtool network-manager unzip ifenslave command-not-found libpam-systemd iperf3 \
|
2019-06-11 00:24:46 +02:00
|
|
|
software-properties-common libnss-myhostname f2fs-tools avahi-autoipd iputils-arping qrencode mmc-utils sunxi-tools"
|
2018-05-24 21:01:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
# Dependent desktop packages
|
|
|
|
PACKAGE_LIST_DESKTOP="xserver-xorg xserver-xorg-video-fbdev gvfs-backends gvfs-fuse xfonts-base xinit \
|
|
|
|
x11-xserver-utils xfce4 lxtask xfce4-terminal thunar-volman gtk2-engines gtk2-engines-murrine gtk2-engines-pixbuf \
|
2019-04-20 12:19:12 +02:00
|
|
|
libgtk2.0-bin network-manager-gnome xfce4-notifyd gnome-keyring gcr libgck-1-0 p11-kit pasystray pavucontrol \
|
|
|
|
pulseaudio pavumeter bluez bluez-tools pulseaudio-module-bluetooth blueman libpam-gnome-keyring \
|
2019-06-11 00:24:46 +02:00
|
|
|
libgl1-mesa-dri policykit-1 profile-sync-daemon gnome-orca numix-gtk-theme synaptic onboard lightdm lightdm-gtk-greeter"
|
2018-05-24 21:01:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
# Recommended desktop packages
|
|
|
|
PACKAGE_LIST_DESKTOP_RECOMMENDS="mirage galculator hexchat xfce4-screenshooter network-manager-openvpn-gnome mpv fbi cups-pk-helper \
|
2019-04-20 12:19:12 +02:00
|
|
|
cups geany atril xarchiver"
|
2016-02-26 19:25:49 +03:00
|
|
|
|
|
|
|
# Release specific packages
|
|
|
|
case $RELEASE in
|
2018-05-24 21:01:02 +02:00
|
|
|
|
2016-02-26 19:25:49 +03:00
|
|
|
jessie)
|
2018-11-29 09:08:13 +01:00
|
|
|
DEBOOTSTRAP_COMPONENTS="main"
|
2019-04-20 12:19:12 +02:00
|
|
|
PACKAGE_LIST_RELEASE="less kbd gnupg2 dirmngr sysbench"
|
|
|
|
PACKAGE_LIST_DESKTOP+=" paman libgcr-3-common gcj-jre-headless policykit-1-gnome eject numix-icon-theme libgnome2-perl pulseaudio-module-gconf"
|
|
|
|
PACKAGE_LIST_DESKTOP_RECOMMENDS+=" iceweasel pluma system-config-printer leafpad"
|
2016-02-26 19:25:49 +03:00
|
|
|
;;
|
2018-05-24 21:01:02 +02:00
|
|
|
|
2016-03-08 21:22:35 +03:00
|
|
|
xenial)
|
2018-11-29 09:08:13 +01:00
|
|
|
DEBOOTSTRAP_COMPONENTS="main"
|
2019-04-20 12:19:12 +02:00
|
|
|
PACKAGE_LIST_RELEASE="man-db wget nano sysbench"
|
|
|
|
PACKAGE_LIST_DESKTOP+=" paman libgcr-3-common gcj-jre-headless paprefs numix-icon-theme libgnome2-perl pulseaudio-module-gconf"
|
|
|
|
PACKAGE_LIST_DESKTOP_RECOMMENDS+=" chromium-browser language-selector-gnome system-config-printer-common system-config-printer-gnome leafpad"
|
2016-02-26 19:25:49 +03:00
|
|
|
;;
|
2018-05-24 21:01:02 +02:00
|
|
|
|
2017-02-05 19:05:18 +03:00
|
|
|
stretch)
|
2018-11-29 09:08:13 +01:00
|
|
|
DEBOOTSTRAP_COMPONENTS="main"
|
2019-04-20 12:19:12 +02:00
|
|
|
PACKAGE_LIST_RELEASE="man-db less kbd net-tools netcat-openbsd gnupg2 dirmngr sysbench"
|
|
|
|
PACKAGE_LIST_DESKTOP+=" paman libgcr-3-common gcj-jre-headless paprefs dbus-x11 libgnome2-perl pulseaudio-module-gconf"
|
|
|
|
PACKAGE_LIST_DESKTOP_RECOMMENDS+=" chromium system-config-printer-common system-config-printer leafpad"
|
2017-02-05 19:05:18 +03:00
|
|
|
;;
|
2018-05-24 21:01:02 +02:00
|
|
|
|
|
|
|
bionic)
|
2018-11-29 09:08:13 +01:00
|
|
|
DEBOOTSTRAP_COMPONENTS="main,universe"
|
2018-06-16 19:41:16 +02:00
|
|
|
PACKAGE_LIST_RELEASE="man-db less kbd net-tools netcat-openbsd gnupg2 dirmngr nano wget"
|
2019-04-20 12:19:12 +02:00
|
|
|
PACKAGE_LIST_DESKTOP+=" xserver-xorg-input-all paprefs dbus-x11 libgnome2-perl pulseaudio-module-gconf"
|
|
|
|
PACKAGE_LIST_DESKTOP_RECOMMENDS+=" chromium-browser system-config-printer-common system-config-printer language-selector-gnome leafpad"
|
2018-05-24 21:01:02 +02:00
|
|
|
;;
|
|
|
|
|
2019-04-17 21:39:54 +02:00
|
|
|
buster)
|
2019-04-20 12:19:12 +02:00
|
|
|
DEBOOTSTRAP_COMPONENTS="main"
|
|
|
|
PACKAGE_LIST_RELEASE="man-db less kbd net-tools netcat-openbsd gnupg2 dirmngr wget"
|
2019-06-14 21:22:03 +02:00
|
|
|
PACKAGE_LIST_DESKTOP+=" paprefs dbus-x11 numix-icon-theme"
|
2019-04-20 12:19:12 +02:00
|
|
|
PACKAGE_LIST_DESKTOP_RECOMMENDS+=" chromium system-config-printer-common system-config-printer"
|
|
|
|
;;
|
2019-04-17 21:39:54 +02:00
|
|
|
|
2019-04-19 08:14:57 -07:00
|
|
|
disco)
|
|
|
|
DEBOOTSTRAP_COMPONENTS="main,universe"
|
|
|
|
PACKAGE_LIST_RELEASE="man-db less kbd net-tools netcat-openbsd gnupg2 dirmngr nano wget"
|
2019-04-20 12:19:12 +02:00
|
|
|
PACKAGE_LIST_DESKTOP+=" xserver-xorg-input-all paprefs dbus-x11 pulseaudio-module-gsettings"
|
2019-04-19 08:14:57 -07:00
|
|
|
PACKAGE_LIST_DESKTOP_RECOMMENDS+=" chromium-browser system-config-printer-common system-config-printer language-selector-gnome"
|
|
|
|
# temp disable
|
|
|
|
PACKAGE_LIST_ADDITIONAL="${PACKAGE_LIST_ADDITIONAL/armbian-firmware /}"
|
|
|
|
;;
|
|
|
|
|
2016-02-26 19:25:49 +03:00
|
|
|
esac
|
|
|
|
|
2018-05-24 21:01:02 +02:00
|
|
|
|
2016-05-04 17:16:39 +03:00
|
|
|
DEBIAN_MIRROR='httpredir.debian.org/debian'
|
|
|
|
UBUNTU_MIRROR='ports.ubuntu.com/'
|
|
|
|
|
2019-05-10 04:32:01 +08:00
|
|
|
if [[ $DOWNLOAD_MIRROR == china ]] ; then
|
|
|
|
DEBIAN_MIRROR='mirrors.tuna.tsinghua.edu.cn/debian'
|
|
|
|
UBUNTU_MIRROR='mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/'
|
|
|
|
fi
|
|
|
|
|
2016-03-17 20:16:26 +01:00
|
|
|
# For user override
|
2019-06-04 11:04:54 +02:00
|
|
|
if [[ -f ${SRC}/userpatches/lib.config ]]; then
|
2016-02-26 17:49:02 +03:00
|
|
|
display_alert "Using user configuration override" "userpatches/lib.config" "info"
|
2019-06-04 11:04:54 +02:00
|
|
|
source "${SRC}"/userpatches/lib.config
|
2016-02-26 17:49:02 +03:00
|
|
|
fi
|
2016-02-26 19:25:49 +03:00
|
|
|
|
2016-05-04 17:16:39 +03:00
|
|
|
# apt-cacher-ng mirror configurarion
|
2016-05-06 23:59:36 +03:00
|
|
|
if [[ $DISTRIBUTION == Ubuntu ]]; then
|
2016-05-04 17:16:39 +03:00
|
|
|
APT_MIRROR=$UBUNTU_MIRROR
|
|
|
|
else
|
|
|
|
APT_MIRROR=$DEBIAN_MIRROR
|
|
|
|
fi
|
|
|
|
|
|
|
|
[[ -n $APT_PROXY_ADDR ]] && display_alert "Using custom apt-cacher-ng address" "$APT_PROXY_ADDR" "info"
|
|
|
|
|
2016-02-26 19:25:49 +03:00
|
|
|
# Build final package list after possible override
|
2016-05-02 16:33:37 +03:00
|
|
|
PACKAGE_LIST="$PACKAGE_LIST $PACKAGE_LIST_RELEASE $PACKAGE_LIST_ADDITIONAL"
|
2017-12-12 08:44:09 +01:00
|
|
|
#if [[ $ARCH == arm64 ]]; then
|
|
|
|
#PACKAGE_LIST_DESKTOP="${PACKAGE_LIST_DESKTOP/iceweasel/iceweasel:armhf}"
|
|
|
|
#PACKAGE_LIST_DESKTOP="${PACKAGE_LIST_DESKTOP/thunderbird/thunderbird:armhf}"
|
|
|
|
#fi
|
2018-05-24 21:01:02 +02:00
|
|
|
[[ $BUILD_DESKTOP == yes ]] && PACKAGE_LIST="$PACKAGE_LIST $PACKAGE_LIST_DESKTOP $PACKAGE_LIST_DESKTOP_RECOMMENDS"
|
2017-02-11 18:46:25 +03:00
|
|
|
|
2017-09-09 00:30:08 +03:00
|
|
|
# remove any packages defined in PACKAGE_LIST_RM in lib.config
|
|
|
|
if [[ -n $PACKAGE_LIST_RM ]]; then
|
2019-06-04 11:04:54 +02:00
|
|
|
PACKAGE_LIST=$(sed -r "s/\b($(tr ' ' '|' <<< ${PACKAGE_LIST_RM}))\b//g" <<< "${PACKAGE_LIST}")
|
2017-09-09 00:30:08 +03:00
|
|
|
fi
|
|
|
|
|
2019-01-03 14:03:08 +01:00
|
|
|
# Give the option to configure DNS server used in the chroot during the build process
|
|
|
|
[[ -z $NAMESERVER ]] && NAMESERVER="1.0.0.1" # default is cloudflare alternate
|
|
|
|
|
2015-12-07 14:30:29 +01:00
|
|
|
# debug
|
2019-06-04 11:04:54 +02:00
|
|
|
cat <<-EOF >> "${DEST}"/debug/output.log
|
2018-01-27 17:43:18 +03:00
|
|
|
|
2016-09-12 21:22:32 +03:00
|
|
|
## BUILD SCRIPT ENVIRONMENT
|
|
|
|
|
2019-06-11 00:24:46 +02:00
|
|
|
Repository: $REPOSITORY_URL
|
|
|
|
Version: $REPOSITORY_COMMIT
|
2018-01-27 13:21:38 +03:00
|
|
|
|
2018-01-05 12:56:32 +03:00
|
|
|
Host OS: $(lsb_release -sc)
|
|
|
|
Host arch: $(dpkg --print-architecture)
|
2018-01-27 13:21:38 +03:00
|
|
|
Host system: $(uname -a)
|
2018-01-27 20:41:03 +03:00
|
|
|
Virtualization type: $(systemd-detect-virt)
|
2016-09-12 21:22:32 +03:00
|
|
|
|
2018-01-27 17:43:18 +03:00
|
|
|
## Build script directories
|
2018-01-27 20:41:03 +03:00
|
|
|
Build directory is located on:
|
2019-06-04 11:04:54 +02:00
|
|
|
$(findmnt -o TARGET,SOURCE,FSTYPE,AVAIL -T "${SRC}")
|
2018-01-27 20:41:03 +03:00
|
|
|
|
2018-01-27 17:43:18 +03:00
|
|
|
Build directory permissions:
|
2019-06-04 11:04:54 +02:00
|
|
|
$(getfacl -p "${SRC}")
|
2018-01-27 17:43:18 +03:00
|
|
|
|
2018-01-27 20:41:03 +03:00
|
|
|
Temp directory permissions:
|
2019-06-04 11:04:54 +02:00
|
|
|
$(getfacl -p "${SRC}"/.tmp)
|
2018-01-27 17:43:18 +03:00
|
|
|
|
2016-06-27 14:13:27 +03:00
|
|
|
## BUILD CONFIGURATION
|
2016-09-12 21:22:32 +03:00
|
|
|
|
|
|
|
Build target:
|
|
|
|
Board: $BOARD
|
|
|
|
Branch: $BRANCH
|
2017-04-23 16:56:19 +03:00
|
|
|
Desktop: $BUILD_DESKTOP
|
2016-09-12 21:22:32 +03:00
|
|
|
|
2016-08-11 17:52:37 +03:00
|
|
|
Kernel configuration:
|
|
|
|
Repository: $KERNELSOURCE
|
2016-06-27 14:13:27 +03:00
|
|
|
Branch: $KERNELBRANCH
|
2016-08-11 17:52:37 +03:00
|
|
|
Config file: $LINUXCONFIG
|
|
|
|
|
|
|
|
U-boot configuration:
|
|
|
|
Repository: $BOOTSOURCE
|
|
|
|
Branch: $BOOTBRANCH
|
2017-04-23 16:56:19 +03:00
|
|
|
Config file: $BOOTCONFIG
|
|
|
|
|
|
|
|
Partitioning configuration:
|
|
|
|
Root partition type: $ROOTFS_TYPE
|
|
|
|
Boot partition type: ${BOOTFS_TYPE:-(none)}
|
|
|
|
User provided boot partition size: ${BOOTSIZE:-0}
|
2016-06-27 14:13:27 +03:00
|
|
|
Offset: $OFFSET
|
2016-08-11 17:52:37 +03:00
|
|
|
|
|
|
|
CPU configuration:
|
|
|
|
$CPUMIN - $CPUMAX with $GOVERNOR
|
2016-06-27 14:13:27 +03:00
|
|
|
EOF
|