From 14f00d8d39d1734597507cd041a82e5b70663d98 Mon Sep 17 00:00:00 2001 From: advapp Date: Tue, 26 Apr 2022 16:51:03 -0700 Subject: [PATCH 1/3] Alter to support build of 22.04 LTS 22.04 LTS jammy was released 04/21/22 --- utils/bootstrap.sh | 3 ++- utils/distros/ubuntu.sh | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/utils/bootstrap.sh b/utils/bootstrap.sh index e5b7987c..06aa58bf 100644 --- a/utils/bootstrap.sh +++ b/utils/bootstrap.sh @@ -39,7 +39,8 @@ fi ubuntu) # Split up the distro version # Argument 3 / DISTRO_VERSION should be something like focal-20.04 - [[ -n $DISTRO_VERSION ]] || { printerr "No Ubuntu version specified, using hirsute-21.04"; export DISTRO_VERSION=hirsute-21.04; } + DEFAULT_VERSION="jammy-22.04" + [[ -n $DISTRO_VERSION ]] || { printerr "No Ubuntu version specified, using ${DEFAULT_VERSION}"; export DISTRO_VERSION=$DEFAULT_VERSION; } export DISTRO_CODENAME=$(echo "$DISTRO_VERSION" | cut -d- -f1) # e.g. hirsute export DISTRO_RELEASE=$(echo "$DISTRO_VERSION" | cut -d- -f2) # e.g. 21.04 diff --git a/utils/distros/ubuntu.sh b/utils/distros/ubuntu.sh index c95e6402..a1c8fbea 100644 --- a/utils/distros/ubuntu.sh +++ b/utils/distros/ubuntu.sh @@ -56,7 +56,7 @@ EOT gnome) export DESKTOP_PACKAGE="apt install -y ubuntu-desktop" ;; - + deepin) export DESKTOP_PACKAGE="add-apt-repository ppa:ubuntudde-dev/stable; apt update; apt install -y ubuntudde-dde" ;; @@ -115,7 +115,13 @@ EOT # Fix for GDM3 # https://askubuntu.com/questions/1239503/ubuntu-20-04-and-20-10-etc-securetty-no-such-file-or-directory - sudo cp ${MNT}/usr/share/doc/util-linux/examples/securetty ${MNT}/etc/securetty + SURETTY=${MNT}/usr/share/doc/util-linux/examples/securetty + if [ -f "$SURETTY" ]; then + printq "Copying securetty" + sudo cp ${SURETTY} ${MNT}/etc/securetty + else + printq "Did not find securetty" + fi # Only create a new user and add it to the sudo group if the user doesn't already exist if runChrootCommand "id $BREATH_USER"; then From 34d08aaa9f5b46407bbe3af88908485766df2059 Mon Sep 17 00:00:00 2001 From: advapp Date: Tue, 26 Apr 2022 18:35:11 -0700 Subject: [PATCH 2/3] Add restricted repository firmware-sof-signed was moved from [multiverse] to [restricted] --- bin/apl-sof-setup-audio | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/apl-sof-setup-audio b/bin/apl-sof-setup-audio index 57c9d50b..90c7c565 100755 --- a/bin/apl-sof-setup-audio +++ b/bin/apl-sof-setup-audio @@ -5,6 +5,7 @@ set -e [[ -n "$1" ]] && { export DIR=$1; } +sudo add-apt-repository restricted sudo apt install vboot-kernel-utils cgpt gzip -y sudo apt install -y firmware-sof-signed || sudo apt-get -o Dpkg::Options::="--force-overwrite" install firmware-sof-signed From 393ef4ae4172d7a2b0f02769380ed668e6fba493 Mon Sep 17 00:00:00 2001 From: advapp Date: Wed, 27 Apr 2022 14:37:41 -0700 Subject: [PATCH 3/3] Enhanced determination of default release Instead of hard-coding a default, relying upon Canonical provided list of Ubuntu releases found on all Ubuntu builds. --- utils/bootstrap.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/utils/bootstrap.sh b/utils/bootstrap.sh index 06aa58bf..533fe31b 100644 --- a/utils/bootstrap.sh +++ b/utils/bootstrap.sh @@ -39,10 +39,17 @@ fi ubuntu) # Split up the distro version # Argument 3 / DISTRO_VERSION should be something like focal-20.04 - DEFAULT_VERSION="jammy-22.04" - [[ -n $DISTRO_VERSION ]] || { printerr "No Ubuntu version specified, using ${DEFAULT_VERSION}"; export DISTRO_VERSION=$DEFAULT_VERSION; } - export DISTRO_CODENAME=$(echo "$DISTRO_VERSION" | cut -d- -f1) # e.g. hirsute - export DISTRO_RELEASE=$(echo "$DISTRO_VERSION" | cut -d- -f2) # e.g. 21.04 + if [[ -n $DISTRO_VERSION ]]; then + export DISTRO_CODENAME=$(echo "$DISTRO_VERSION" | cut -d- -f1) # e.g. hirsute + export DISTRO_RELEASE=$(echo "$DISTRO_VERSION" | cut -d- -f2) # e.g. 21.04 + printq "Using ${DISTRO_CODENAME}-${DISTRO_RELEASE}" + else + # This assumes the build system is also Ubuntu + LATEST=$(tail -n 1 /usr/share/distro-info/ubuntu.csv) + export DISTRO_RELEASE=$(echo $LATEST | cut -d, -f1 | cut -d' ' -f1) + export DISTRO_CODENAME=$(echo $LATEST | cut -d, -f3) + printerr "No Ubuntu version specified, using ${DISTRO_CODENAME}-${DISTRO_RELEASE}" + fi # Download the Ubuntu rootfs if it doesn't exist DISTRO_ROOTFS="ubuntu-rootfs.tar.xz"