mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
Ubuntu 19.04 support (#1351)
* ubuntu 19.04 support * ubuntu 19.04 support 2 * ubuntu 19.04 support 3 * add netplan config
This commit is contained in:
@@ -15,7 +15,7 @@ FORCEDRELEASE=$RELEASE
|
|||||||
|
|
||||||
rm -rf /run/armbian
|
rm -rf /run/armbian
|
||||||
mkdir -p /run/armbian
|
mkdir -p /run/armbian
|
||||||
RELEASE_LIST=("xenial" "jessie" "stretch" "bionic" "buster" )
|
RELEASE_LIST=("xenial" "jessie" "stretch" "bionic" "buster" "disco" )
|
||||||
BRANCH_LIST=("default" "next" "dev")
|
BRANCH_LIST=("default" "next" "dev")
|
||||||
|
|
||||||
pack_upload ()
|
pack_upload ()
|
||||||
|
|||||||
@@ -29,11 +29,13 @@ create_chroot()
|
|||||||
apt_mirror['buster']="$DEBIAN_MIRROR"
|
apt_mirror['buster']="$DEBIAN_MIRROR"
|
||||||
apt_mirror['xenial']="$UBUNTU_MIRROR"
|
apt_mirror['xenial']="$UBUNTU_MIRROR"
|
||||||
apt_mirror['bionic']="$UBUNTU_MIRROR"
|
apt_mirror['bionic']="$UBUNTU_MIRROR"
|
||||||
|
apt_mirror['disco']="$UBUNTU_MIRROR"
|
||||||
components['jessie']='main,contrib'
|
components['jessie']='main,contrib'
|
||||||
components['stretch']='main,contrib'
|
components['stretch']='main,contrib'
|
||||||
components['buster']='main,contrib'
|
components['buster']='main,contrib'
|
||||||
components['xenial']='main,universe,multiverse'
|
components['xenial']='main,universe,multiverse'
|
||||||
components['bionic']='main,universe,multiverse'
|
components['bionic']='main,universe,multiverse'
|
||||||
|
components['disco']='main,universe,multiverse'
|
||||||
display_alert "Creating build chroot" "$release/$arch" "info"
|
display_alert "Creating build chroot" "$release/$arch" "info"
|
||||||
local includes="ccache,locales,git,ca-certificates,devscripts,libfile-fcntllock-perl,debhelper,rsync,python3,distcc"
|
local includes="ccache,locales,git,ca-certificates,devscripts,libfile-fcntllock-perl,debhelper,rsync,python3,distcc"
|
||||||
if [[ $NO_APT_CACHER != yes ]]; then
|
if [[ $NO_APT_CACHER != yes ]]; then
|
||||||
@@ -88,6 +90,7 @@ chroot_prepare_distccd()
|
|||||||
gcc_version['buster']='8.3'
|
gcc_version['buster']='8.3'
|
||||||
gcc_version['xenial']='5.4'
|
gcc_version['xenial']='5.4'
|
||||||
gcc_version['bionic']='5.4'
|
gcc_version['bionic']='5.4'
|
||||||
|
gcc_version['disco']='8.3'
|
||||||
gcc_type['armhf']='arm-linux-gnueabihf-'
|
gcc_type['armhf']='arm-linux-gnueabihf-'
|
||||||
gcc_type['arm64']='aarch64-linux-gnu-'
|
gcc_type['arm64']='aarch64-linux-gnu-'
|
||||||
rm -f $dest/cmdlist
|
rm -f $dest/cmdlist
|
||||||
@@ -113,7 +116,7 @@ chroot_build_packages()
|
|||||||
{
|
{
|
||||||
local built_ok=()
|
local built_ok=()
|
||||||
local failed=()
|
local failed=()
|
||||||
for release in jessie xenial stretch bionic buster; do
|
for release in jessie xenial stretch bionic buster disco; do
|
||||||
for arch in armhf arm64; do
|
for arch in armhf arm64; do
|
||||||
display_alert "Starting package building process" "$release/$arch" "info"
|
display_alert "Starting package building process" "$release/$arch" "info"
|
||||||
|
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ BOOTCONFIG_VAR_NAME=BOOTCONFIG_${BRANCH^^}
|
|||||||
[[ -z $BOOTPATCHDIR ]] && BOOTPATCHDIR="u-boot-$LINUXFAMILY"
|
[[ -z $BOOTPATCHDIR ]] && BOOTPATCHDIR="u-boot-$LINUXFAMILY"
|
||||||
[[ -z $KERNELPATCHDIR ]] && KERNELPATCHDIR="$LINUXFAMILY-$BRANCH"
|
[[ -z $KERNELPATCHDIR ]] && KERNELPATCHDIR="$LINUXFAMILY-$BRANCH"
|
||||||
|
|
||||||
if [[ $RELEASE == xenial || $RELEASE == bionic ]]; then DISTRIBUTION="Ubuntu"; else DISTRIBUTION="Debian"; fi
|
if [[ $RELEASE == xenial || $RELEASE == bionic || $RELEASE == disco ]]; then DISTRIBUTION="Ubuntu"; else DISTRIBUTION="Debian"; fi
|
||||||
|
|
||||||
# Base system dependencies
|
# Base system dependencies
|
||||||
DEBOOTSTRAP_LIST="locales,gnupg,ifupdown,apt-transport-https,ca-certificates"
|
DEBOOTSTRAP_LIST="locales,gnupg,ifupdown,apt-transport-https,ca-certificates"
|
||||||
@@ -215,6 +215,23 @@ case $RELEASE in
|
|||||||
PACKAGE_LIST_ADDITIONAL="${PACKAGE_LIST_ADDITIONAL/sysbench /}"
|
PACKAGE_LIST_ADDITIONAL="${PACKAGE_LIST_ADDITIONAL/sysbench /}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
disco)
|
||||||
|
DEBOOTSTRAP_COMPONENTS="main,universe"
|
||||||
|
PACKAGE_LIST_RELEASE="man-db less kbd net-tools netcat-openbsd gnupg2 dirmngr nano wget"
|
||||||
|
PACKAGE_LIST_DESKTOP+=" xserver-xorg-input-all paprefs dbus-x11"
|
||||||
|
PACKAGE_LIST_DESKTOP+=" pulseaudio-module-gsettings"
|
||||||
|
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 /}"
|
||||||
|
PACKAGE_LIST_ADDITIONAL="${PACKAGE_LIST_ADDITIONAL/sysbench /}"
|
||||||
|
|
||||||
|
# not in disco repo
|
||||||
|
PACKAGE_LIST_DESKTOP="${PACKAGE_LIST_DESKTOP/pulseaudio-module-gconf /}"
|
||||||
|
PACKAGE_LIST_DESKTOP="${PACKAGE_LIST_DESKTOP/libgnome2-perl /}"
|
||||||
|
PACKAGE_LIST_DESKTOP_RECOMMENDS="${PACKAGE_LIST_DESKTOP/leafpad /}"
|
||||||
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ create_desktop_package ()
|
|||||||
|
|
||||||
|
|
||||||
# using different icon pack. Workaround due to this bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=867779
|
# using different icon pack. Workaround due to this bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=867779
|
||||||
if [[ ${RELEASE} == bionic || ${RELEASE} == stretch || ${RELEASE} == buster ]]; then
|
if [[ ${RELEASE} == bionic || ${RELEASE} == stretch || ${RELEASE} == buster || ${RELEASE} == disco ]]; then
|
||||||
sed -i 's/<property name="IconThemeName" type="string" value=".*$/<property name="IconThemeName" type="string" value="Humanity-Dark">/g' \
|
sed -i 's/<property name="IconThemeName" type="string" value=".*$/<property name="IconThemeName" type="string" value="Humanity-Dark">/g' \
|
||||||
$destination/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
|
$destination/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -391,6 +391,43 @@ install_distribution_specific()
|
|||||||
EOF
|
EOF
|
||||||
chmod +x $SDCARD/etc/rc.local
|
chmod +x $SDCARD/etc/rc.local
|
||||||
;;
|
;;
|
||||||
|
disco)
|
||||||
|
# remove motd news from motd.ubuntu.com
|
||||||
|
[[ -f $SDCARD/etc/default/motd-news ]] && sed -i "s/^ENABLED=.*/ENABLED=0/" $SDCARD/etc/default/motd-news
|
||||||
|
# rc.local is not existing in disco but we might need it
|
||||||
|
cat <<-EOF > $SDCARD/etc/rc.local
|
||||||
|
#!/bin/sh -e
|
||||||
|
#
|
||||||
|
# rc.local
|
||||||
|
#
|
||||||
|
# This script is executed at the end of each multiuser runlevel.
|
||||||
|
# Make sure that the script will "exit 0" on success or any other
|
||||||
|
# value on error.
|
||||||
|
#
|
||||||
|
# In order to enable or disable this script just change the execution
|
||||||
|
# bits.
|
||||||
|
#
|
||||||
|
# By default this script does nothing.
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
EOF
|
||||||
|
chmod +x $SDCARD/etc/rc.local
|
||||||
|
# Basic Netplan config. Let NetworkManager manage all devices on this system
|
||||||
|
cat <<-EOF > $SDCARD/etc/netplan/armbian-default.yaml
|
||||||
|
network:
|
||||||
|
version: 2
|
||||||
|
renderer: NetworkManager
|
||||||
|
EOF
|
||||||
|
# DNS fix
|
||||||
|
sed -i "s/#DNS=.*/DNS=$NAMESERVER/g" $SDCARD/etc/systemd/resolved.conf
|
||||||
|
# Journal service adjustements
|
||||||
|
sed -i "s/#Storage=.*/Storage=volatile/g" $SDCARD/etc/systemd/journald.conf
|
||||||
|
sed -i "s/#Compress=.*/Compress=yes/g" $SDCARD/etc/systemd/journald.conf
|
||||||
|
sed -i "s/#RateLimitIntervalSec=.*/RateLimitIntervalSec=30s/g" $SDCARD/etc/systemd/journald.conf
|
||||||
|
sed -i "s/#RateLimitBurst=.*/RateLimitBurst=10000/g" $SDCARD/etc/systemd/journald.conf
|
||||||
|
# disable conflicting services
|
||||||
|
chroot $SDCARD /bin/bash -c "systemctl --no-reload mask ondemand.service >/dev/null 2>&1"
|
||||||
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ create_sources_list()
|
|||||||
EOF
|
EOF
|
||||||
;;
|
;;
|
||||||
|
|
||||||
xenial|bionic)
|
xenial|bionic|disco)
|
||||||
cat <<-EOF > $basedir/etc/apt/sources.list
|
cat <<-EOF > $basedir/etc/apt/sources.list
|
||||||
deb http://${UBUNTU_MIRROR} $release main restricted universe multiverse
|
deb http://${UBUNTU_MIRROR} $release main restricted universe multiverse
|
||||||
#deb-src http://${UBUNTU_MIRROR} $release main restricted universe multiverse
|
#deb-src http://${UBUNTU_MIRROR} $release main restricted universe multiverse
|
||||||
@@ -357,7 +357,7 @@ addtorepo()
|
|||||||
# parameter "delete" remove incoming directory if publishing is succesful
|
# parameter "delete" remove incoming directory if publishing is succesful
|
||||||
# function: cycle trough distributions
|
# function: cycle trough distributions
|
||||||
|
|
||||||
local distributions=("jessie" "xenial" "stretch" "bionic" "buster")
|
local distributions=("jessie" "xenial" "stretch" "bionic" "buster" "disco")
|
||||||
local errors=0
|
local errors=0
|
||||||
|
|
||||||
for release in "${distributions[@]}"; do
|
for release in "${distributions[@]}"; do
|
||||||
@@ -555,7 +555,7 @@ prepare_host()
|
|||||||
#
|
#
|
||||||
# NO_HOST_RELEASE_CHECK overrides the check for a supported host system
|
# NO_HOST_RELEASE_CHECK overrides the check for a supported host system
|
||||||
# Disable host OS check at your own risk, any issues reported with unsupported releases will be closed without a discussion
|
# Disable host OS check at your own risk, any issues reported with unsupported releases will be closed without a discussion
|
||||||
if [[ -z $codename || "xenial bionic" != *"$codename"* ]]; then
|
if [[ -z $codename || "xenial bionic disco" != *"$codename"* ]]; then
|
||||||
if [[ $NO_HOST_RELEASE_CHECK == yes ]]; then
|
if [[ $NO_HOST_RELEASE_CHECK == yes ]]; then
|
||||||
display_alert "You are running on an unsupported system" "${codename:-(unknown)}" "wrn"
|
display_alert "You are running on an unsupported system" "${codename:-(unknown)}" "wrn"
|
||||||
display_alert "Do not report any errors, warnings or other issues encountered beyond this point" "" "wrn"
|
display_alert "Do not report any errors, warnings or other issues encountered beyond this point" "" "wrn"
|
||||||
@@ -568,6 +568,10 @@ prepare_host()
|
|||||||
exit_with_error "Windows subsystem for Linux is not a supported build environment"
|
exit_with_error "Windows subsystem for Linux is not a supported build environment"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -z $codename || "disco" == "$codename" ]]; then
|
||||||
|
hostdeps="${hostdeps/lib32ncurses5 lib32tinfo5/lib32ncurses6 lib32tinfo6}"
|
||||||
|
fi
|
||||||
|
|
||||||
grep -q i386 <(dpkg --print-foreign-architectures) || dpkg --add-architecture i386
|
grep -q i386 <(dpkg --print-foreign-architectures) || dpkg --add-architecture i386
|
||||||
if systemd-detect-virt -q -c; then
|
if systemd-detect-virt -q -c; then
|
||||||
display_alert "Running in container" "$(systemd-detect-virt)" "info"
|
display_alert "Running in container" "$(systemd-detect-virt)" "info"
|
||||||
|
|||||||
@@ -205,6 +205,7 @@ if [[ $KERNEL_ONLY != yes && -z $RELEASE ]]; then
|
|||||||
[[ $EXPERT = yes ]] && options+=("buster" "Debian 10 Buster / unsupported")
|
[[ $EXPERT = yes ]] && options+=("buster" "Debian 10 Buster / unsupported")
|
||||||
options+=("xenial" "Ubuntu Xenial 16.04 LTS")
|
options+=("xenial" "Ubuntu Xenial 16.04 LTS")
|
||||||
options+=("bionic" "Ubuntu Bionic 18.04 LTS")
|
options+=("bionic" "Ubuntu Bionic 18.04 LTS")
|
||||||
|
[[ $EXPERT = yes ]] && options+=("disco" "Ubuntu Disco 19.04 / unsupported")
|
||||||
|
|
||||||
RELEASE=$(dialog --stdout --title "Choose a release" --backtitle "$backtitle" --menu "Select the target OS release" \
|
RELEASE=$(dialog --stdout --title "Choose a release" --backtitle "$backtitle" --menu "Select the target OS release" \
|
||||||
$TTY_Y $TTY_X $(($TTY_Y - 8)) "${options[@]}")
|
$TTY_Y $TTY_X $(($TTY_Y - 8)) "${options[@]}")
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ create_board_package()
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
# this is required for NFS boot to prevent deconfiguring the network on shutdown
|
# this is required for NFS boot to prevent deconfiguring the network on shutdown
|
||||||
[[ $RELEASE == xenial || $RELEASE == stretch || $RELEASE == bionic || $RELEASE == buster ]] && sed -i 's/#no-auto-down/no-auto-down/g' $destination/etc/network/interfaces.default
|
[[ $RELEASE == xenial || $RELEASE == stretch || $RELEASE == bionic || $RELEASE == buster || $RELEASE == disco ]] && sed -i 's/#no-auto-down/no-auto-down/g' $destination/etc/network/interfaces.default
|
||||||
|
|
||||||
if [[ ( $LINUXFAMILY == sun*i || $LINUXFAMILY == pine64 ) && $BRANCH == default ]]; then
|
if [[ ( $LINUXFAMILY == sun*i || $LINUXFAMILY == pine64 ) && $BRANCH == default ]]; then
|
||||||
# add mpv config for vdpau_sunxi
|
# add mpv config for vdpau_sunxi
|
||||||
@@ -340,12 +340,17 @@ create_board_package()
|
|||||||
cp $SRC/packages/bsp/10-override-random-mac.conf $destination/usr/lib/NetworkManager/conf.d/
|
cp $SRC/packages/bsp/10-override-random-mac.conf $destination/usr/lib/NetworkManager/conf.d/
|
||||||
;;
|
;;
|
||||||
|
|
||||||
buster)
|
buster)
|
||||||
mkdir -p $destination/usr/lib/NetworkManager/conf.d/
|
mkdir -p $destination/usr/lib/NetworkManager/conf.d/
|
||||||
cp $SRC/packages/bsp/zz-override-wifi-powersave-off.conf $destination/usr/lib/NetworkManager/conf.d/
|
cp $SRC/packages/bsp/zz-override-wifi-powersave-off.conf $destination/usr/lib/NetworkManager/conf.d/
|
||||||
cp $SRC/packages/bsp/10-override-random-mac.conf $destination/usr/lib/NetworkManager/conf.d/
|
cp $SRC/packages/bsp/10-override-random-mac.conf $destination/usr/lib/NetworkManager/conf.d/
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
bionic)
|
||||||
|
mkdir -p $destination/usr/lib/NetworkManager/conf.d/
|
||||||
|
cp $SRC/packages/bsp/zz-override-wifi-powersave-off.conf $destination/usr/lib/NetworkManager/conf.d/
|
||||||
|
cp $SRC/packages/bsp/10-override-random-mac.conf $destination/usr/lib/NetworkManager/conf.d/
|
||||||
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ POT="${SCRIPTPATH}/output/debs/"
|
|||||||
# load functions
|
# load functions
|
||||||
source ${SCRIPTPATH}lib/general.sh
|
source ${SCRIPTPATH}lib/general.sh
|
||||||
|
|
||||||
DISTROS=("jessie" "xenial" "stretch" "bionic" "buster")
|
DISTROS=("jessie" "xenial" "stretch" "bionic" "buster" "disco")
|
||||||
|
|
||||||
ParseOptions() {
|
ParseOptions() {
|
||||||
case $@ in
|
case $@ in
|
||||||
|
|||||||
Reference in New Issue
Block a user