From 20bb504bb355a4dc53d754006643533e293b6f63 Mon Sep 17 00:00:00 2001 From: John Chittum Date: Tue, 21 Mar 2023 14:03:24 -0500 Subject: [PATCH 01/16] Revert "fix: remove ipc from apparmor features in 6.1" This reverts commit 075e7a0eb4d59625f265f05dc44ceb7d9f52fdb4. --- live-build/apparmor/generic/ipc/posix_mqueue | 1 + 1 file changed, 1 insertion(+) create mode 100644 live-build/apparmor/generic/ipc/posix_mqueue diff --git a/live-build/apparmor/generic/ipc/posix_mqueue b/live-build/apparmor/generic/ipc/posix_mqueue new file mode 100644 index 00000000..c20f9f93 --- /dev/null +++ b/live-build/apparmor/generic/ipc/posix_mqueue @@ -0,0 +1 @@ +create read write open delete setattr getattr From 0be258fa8db0184aecd41ec3f3a956fef72e0824 Mon Sep 17 00:00:00 2001 From: John Chittum Date: Tue, 21 Mar 2023 14:06:28 -0500 Subject: [PATCH 02/16] open 2.815 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 1fce58fd..c95a6f00 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (2.815) UNRELEASED; urgency=medium + + * revert ipc change. kernel 6.2 will have the correct setting + + -- jchittum Tue, 21 Mar 2023 14:05:16 -0500 + livecd-rootfs (2.814) lunar; urgency=medium * Adjust journald settings for live-server for compatibility with Subiquity. From 6d1b422a3f2b00bfc7d8aa0492b6490346c800bb Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Mon, 27 Mar 2023 12:11:21 -0700 Subject: [PATCH 03/16] releasing package livecd-rootfs version 2.817 --- debian/changelog | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4013b8a4..84236db8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ -livecd-rootfs (2.817) UNRELEASED; urgency=medium +livecd-rootfs (2.817) lunar; urgency=medium + [ John Chittum ] * revert ipc change. kernel 6.2 will have the correct setting - -- jchittum Tue, 21 Mar 2023 14:05:16 -0500 + -- Steve Langasek Mon, 27 Mar 2023 12:11:06 -0700 livecd-rootfs (2.816) lunar; urgency=medium From a312ab11a749eab6afdb013649e777a735683503 Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Tue, 31 Jan 2023 22:05:19 +0000 Subject: [PATCH 04/16] Remove the mkswap and swapfile units These will be provided by the ubuntu-raspi-settings-desktop in future --- .../099-ubuntu-image-customization.chroot | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/live-build/ubuntu/hooks/099-ubuntu-image-customization.chroot b/live-build/ubuntu/hooks/099-ubuntu-image-customization.chroot index 6dd49d8f..6e54e2c2 100644 --- a/live-build/ubuntu/hooks/099-ubuntu-image-customization.chroot +++ b/live-build/ubuntu/hooks/099-ubuntu-image-customization.chroot @@ -51,35 +51,5 @@ if [ "$IMAGEFORMAT" == "none" ]; then } ' /etc/fstab > /etc/fstab.new mv /etc/fstab.new /etc/fstab - - # Add units for a 1GiB swapfile, generated on first boot - cat << EOF > /lib/systemd/system/mkswap.service -[Unit] -Description=Create the default swapfile -DefaultDependencies=no -Requires=local-fs.target -After=local-fs.target -Before=swapfile.swap -ConditionPathExists=!/swapfile - -[Service] -Type=oneshot -ExecStartPre=fallocate -l 1GiB /swapfile -ExecStartPre=chmod 600 /swapfile -ExecStart=mkswap /swapfile - -[Install] -WantedBy=swap.target -EOF - cat << EOF > /lib/systemd/system/swapfile.swap -[Unit] -Description=The default swapfile - -[Swap] -What=/swapfile -EOF - mkdir -p /lib/systemd/system/swap.target.wants - ln -s ../mkswap.service /lib/systemd/system/swap.target.wants/ - ln -s ../swapfile.swap /lib/systemd/system/swap.target.wants/ fi fi From da4481d013bf90025b54f3befd7502c8f636954a Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Tue, 31 Jan 2023 22:09:54 +0000 Subject: [PATCH 05/16] changelog --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index 84236db8..2c36d024 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +livecd-rootfs (2.818) UNRELEASED; urgency=medium + + * raspi: drop mkswap.service and swapfile.swap units in + 099-ubuntu-image-customization.chroot in favour of units provided by + ubuntu-raspi-settings-desktop + + -- Dave Jones Tue, 28 Mar 2023 14:38:55 +0100 + livecd-rootfs (2.817) lunar; urgency=medium [ John Chittum ] From 6a804b7b2cb5ea6113cf92e185b7c9a55fc23d96 Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Tue, 28 Mar 2023 14:51:13 +0100 Subject: [PATCH 06/16] Don't add 01-network-manager-all.yaml to preinstalled desktop images --- live-build/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/live-build/functions b/live-build/functions index 1e81de9b..a3cbadfd 100644 --- a/live-build/functions +++ b/live-build/functions @@ -999,7 +999,7 @@ configure_network_manager() { # default. Installing NM on an existing system only manages wifi and wwan via # /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf. When setting # the global backend to NM, netplan overrides that file. - if [ -e chroot/usr/sbin/NetworkManager -a ! -f chroot/etc/netplan/01-network-manager-all.yaml ]; then + if [ -e chroot/usr/sbin/NetworkManager -a ! -f chroot/etc/netplan/01-network-manager-all.yaml -a "$SUBPROJECT" != "desktop-preinstalled" ]; then echo "===== Enabling all devices in NetworkManager ====" mkdir -p chroot/etc/netplan cat < chroot/etc/netplan/01-network-manager-all.yaml From 021960a5ab7bc22273e090f5c164f2a86a87d2cf Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Tue, 28 Mar 2023 14:52:10 +0100 Subject: [PATCH 07/16] changelog --- debian/changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/changelog b/debian/changelog index 2c36d024..412bac3d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ livecd-rootfs (2.818) UNRELEASED; urgency=medium * raspi: drop mkswap.service and swapfile.swap units in 099-ubuntu-image-customization.chroot in favour of units provided by ubuntu-raspi-settings-desktop + * raspi: drop 01-network-manager-all.yaml in favour of configuration + provided by ubuntu-raspi-settings-desktop -- Dave Jones Tue, 28 Mar 2023 14:38:55 +0100 From 1f497fe04f2b8fdf5596d7b9d209a82818871458 Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Tue, 28 Mar 2023 16:00:38 +0100 Subject: [PATCH 08/16] Get rid of growfs option in fstab --- .../ubuntu/hooks/099-ubuntu-image-customization.chroot | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/live-build/ubuntu/hooks/099-ubuntu-image-customization.chroot b/live-build/ubuntu/hooks/099-ubuntu-image-customization.chroot index 6e54e2c2..5fa3f713 100644 --- a/live-build/ubuntu/hooks/099-ubuntu-image-customization.chroot +++ b/live-build/ubuntu/hooks/099-ubuntu-image-customization.chroot @@ -17,12 +17,10 @@ if [ "$IMAGEFORMAT" == "none" ]; then /usr/sbin/oem-config-prepare --quiet touch "/var/lib/oem-config/run" - # Update the fstab to include the "discard" option, and - # "x-systemd.growfs" to ensure the root partition is expanded on first - # boot + # Update the fstab to include the "discard" option awk \ -v root_fs_label="writable" \ - -v root_fs_options="discard,x-systemd.growfs" \ + -v root_fs_options="discard" \ ' BEGIN { OFS="\t"; count=0; } From b3641074f1ee5e208a1ca4089f94d80f4f1f9471 Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Tue, 28 Mar 2023 16:01:16 +0100 Subject: [PATCH 09/16] changelog --- debian/changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/changelog b/debian/changelog index 412bac3d..aa6055e6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ livecd-rootfs (2.818) UNRELEASED; urgency=medium ubuntu-raspi-settings-desktop * raspi: drop 01-network-manager-all.yaml in favour of configuration provided by ubuntu-raspi-settings-desktop + * raspi: drop growfs option from fstab in favour of growroot-almost + service provided by ubuntu-raspi-settings-desktop -- Dave Jones Tue, 28 Mar 2023 14:38:55 +0100 From a52543341c6250e4dd7ba57ac6a03397c184209f Mon Sep 17 00:00:00 2001 From: William Wilson Date: Thu, 30 Mar 2023 09:14:46 -0400 Subject: [PATCH 10/16] Only set up oem-config if the user doesn't already exist --- debian/changelog | 4 ++++ .../ubuntu/hooks/099-ubuntu-image-customization.chroot | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index aa6055e6..61e683d1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ livecd-rootfs (2.818) UNRELEASED; urgency=medium + [ Dave Jones ] * raspi: drop mkswap.service and swapfile.swap units in 099-ubuntu-image-customization.chroot in favour of units provided by ubuntu-raspi-settings-desktop @@ -8,6 +9,9 @@ livecd-rootfs (2.818) UNRELEASED; urgency=medium * raspi: drop growfs option from fstab in favour of growroot-almost service provided by ubuntu-raspi-settings-desktop + [ William 'jawn-smith' Wilson ] + * Skip oem-config setup in hooks if the oem user already exists. + -- Dave Jones Tue, 28 Mar 2023 14:38:55 +0100 livecd-rootfs (2.817) lunar; urgency=medium diff --git a/live-build/ubuntu/hooks/099-ubuntu-image-customization.chroot b/live-build/ubuntu/hooks/099-ubuntu-image-customization.chroot index 5fa3f713..91449b61 100644 --- a/live-build/ubuntu/hooks/099-ubuntu-image-customization.chroot +++ b/live-build/ubuntu/hooks/099-ubuntu-image-customization.chroot @@ -11,7 +11,13 @@ if [ "$IMAGEFORMAT" == "none" ]; then touch /var/log/syslog chown syslog:adm /var/log/syslog - # Create the oem user account + # Create the oem user account only if it doesn't already exist + if ! id "oem" &>/dev/null; then + /usr/sbin/useradd -d /home/oem -G adm,sudo -m -N -u 29999 oem + /usr/sbin/oem-config-prepare --quiet + touch "/var/lib/oem-config/run" + fi + /usr/sbin/useradd -d /home/oem -G adm,sudo -m -N -u 29999 oem /usr/sbin/oem-config-prepare --quiet From e1090424bb69fdc16d0173eb1127ee529fabdf35 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Mon, 3 Apr 2023 08:49:26 -0700 Subject: [PATCH 11/16] Update URL to point to ubuntu-archive-team.ubuntu.com. --- debian/changelog | 3 +++ live-build/auto/config | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 61e683d1..ba019c77 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,9 @@ livecd-rootfs (2.818) UNRELEASED; urgency=medium [ William 'jawn-smith' Wilson ] * Skip oem-config setup in hooks if the oem user already exists. + [ Steve Langasek ] + * Update URL to point to ubuntu-archive-team.ubuntu.com. + -- Dave Jones Tue, 28 Mar 2023 14:38:55 +0100 livecd-rootfs (2.817) lunar; urgency=medium diff --git a/live-build/auto/config b/live-build/auto/config index 1f812180..628f4d16 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -12,7 +12,7 @@ fi echo "Building on $(hostname --fqdn)" -SEEDMIRROR=http://people.canonical.com/~ubuntu-archive/seeds/ +SEEDMIRROR=https://ubuntu-archive-team.ubuntu.com/seeds/ if [ -z "$MIRROR" ]; then case $(hostname --fqdn) in *.ubuntu.com) MIRROR=http://ftpmaster.internal/ubuntu/ From d42c7c5989644dff7e431bc3d966207210c733aa Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Thu, 23 Feb 2023 09:52:37 +0100 Subject: [PATCH 12/16] Add image for StarFive VisionFive 2 SUBARCH=visionfive2 is used to build images for the StarFive VisionFive 2 boards. For the device-tree we assume board revision 1.3B. Signed-off-by: Heinrich Schuchardt --- live-build/auto/config | 9 +++- .../hooks.d/base/disk-image-uefi.binary | 47 ++++++++++++++++++- 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/live-build/auto/config b/live-build/auto/config index 628f4d16..db1da0d8 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -352,7 +352,14 @@ fi # one also must request disk1-img-xz image format if [ "$IMAGEFORMAT" = "ext4" ] && [ "$PROJECT" = "ubuntu-cpc" ]; then case $ARCH:$SUBARCH in - armhf:raspi2|riscv64:sifive_*|riscv64:nezha|riscv64:visionfive|riscv64:licheerv|riscv64:icicle|*:generic) + armhf:raspi2 | \ + riscv64:icicle | \ + riscv64:nezha | \ + riscv64:licheerv | \ + riscv64:sifive_* | \ + riscv64:visionfive | \ + riscv64:visionfive2 | \ + *:generic) IMAGE_HAS_HARDCODED_PASSWORD=1 if [ -z "${IMAGE_TARGETS:-}" ]; then export IMAGE_TARGETS="disk1-img-xz" diff --git a/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary b/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary index bbe271ad..c77305a2 100755 --- a/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary +++ b/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary @@ -128,6 +128,23 @@ create_partitions() { --change-name=3:uEnv \ --new=1:: \ --attributes=1:set:2 + elif [ "${SUBARCH:-}" = "visionfive2" ]; then + # VisionFive 2 + sgdisk "${disk_image}" \ + --set-alignment=4096 \ + --new=13:4096:8191 \ + --typecode=13:2E54B353-1271-4842-806F-E436D6AF6985 \ + --change-name=13:loader1 \ + --new=2:8192:16383 \ + --typecode=2:7a097280-70d2-44bc-886c-ff5ffbb7b098 \ + --change-name=2:loader2 \ + --new=12:16384:24575 \ + --change-name=12:CIDATA \ + --new=15:24576:229375 \ + --typecode=15:ef00 \ + --change-name=15:ESP \ + --new=1:229376: \ + --attributes=1:set:2 else # preinstalled server, currently FU540 # FU740 too in the future @@ -373,8 +390,32 @@ EOF # without a cloud datasource. setup_cinocloud mountpoint ;; + "visionfive2") + echo "Installing GRUB for ${SUBARCH} board" + cp ${my_d}/riscv64/grub/90_watchdog-thresh.cfg mountpoint/etc/default/grub.d/ + # flash-kernel is needed to install the dtb for update-grub: it uses the + # /proc/device-tree/model value to pick the correct dtb and as we are in a chroot, + # the model value is wrong and we need to use /etc/flash-kernel/machine instead. + # This explains why we install flash-kernel here. + chroot mountpoint mkdir -p /etc/flash-kernel/ + chroot mountpoint bash -c "echo 'StarFive VisionFive 2 v1.3B' > /etc/flash-kernel/machine" + chroot mountpoint bash -c 'FK_FORCE=yes apt-get install -qqy grub-efi-riscv64 flash-kernel' + efi_target=riscv64-efi + # Provide end-user modifyable CIDATA + cidata_dev="/dev/mapper${loop_device///dev/}p12" + setup_cidata "${cidata_dev}" + # Provide stock nocloud datasource + # Allow interactive login on baremetal board, + # without a cloud datasource. + setup_cinocloud mountpoint + # Flash-kernel creates boot.scr if it believes we did + # not boot in UEFi mode. Remove it so that we can boot + # via GRUB. + chroot mountpoint rm -f /boot/boot.scr + ;; *) cp ${my_d}/riscv64/grub/90_watchdog-thresh.cfg mountpoint/etc/default/grub.d/ + echo "Installing u-boot-menu for ${SUBARCH} board" chroot mountpoint apt-get install -qqy u-boot-menu #grub-efi-riscv64 mkdir -p mountpoint/etc/u-boot-menu/conf.d/ cp ${my_d}/riscv64/u-boot-menu/*.conf mountpoint/etc/u-boot-menu/conf.d/ @@ -408,7 +449,11 @@ EOF chroot mountpoint u-boot-update fi - if [ "${SUBARCH:-}" != "visionfive" ] && [ "${SUBARCH:-}" != "nezha" ] && [ "${SUBARCH:-}" != "licheerv" ] && [ "${SUBARCH:-}" != "icicle" ]; then + if [ "${SUBARCH:-}" != "nezha" ] && \ + [ "${SUBARCH:-}" != "licheerv" ] && \ + [ "${SUBARCH:-}" != "icicle" ] \ + [ "${SUBARCH:-}" != "visionfive" ] && \ + [ "${SUBARCH:-}" != "visionfive2" ]; then ## TODO remove below once we have grub-efi-riscv64 for the platforms rm mountpoint/tmp/device.map umount mountpoint/boot/efi From b713f7c622993e3258808e9d63259e19a67c43bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Wed, 5 Apr 2023 17:23:17 +0200 Subject: [PATCH 13/16] Add changelog entry. --- debian/changelog | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index ba019c77..a4256660 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,7 +15,10 @@ livecd-rootfs (2.818) UNRELEASED; urgency=medium [ Steve Langasek ] * Update URL to point to ubuntu-archive-team.ubuntu.com. - -- Dave Jones Tue, 28 Mar 2023 14:38:55 +0100 + [ Heinrich Schuchardt ] + * Add image for StarFive VisionFive 2. + + -- Łukasz 'sil2100' Zemczak Wed, 05 Apr 2023 17:21:21 +0200 livecd-rootfs (2.817) lunar; urgency=medium From 8824af2ad854d71568e3060d373b8c386f73ab45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Wed, 5 Apr 2023 17:37:10 +0200 Subject: [PATCH 14/16] releasing package livecd-rootfs version 2.818 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index a4256660..01cbf9ea 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -livecd-rootfs (2.818) UNRELEASED; urgency=medium +livecd-rootfs (2.818) lunar; urgency=medium [ Dave Jones ] * raspi: drop mkswap.service and swapfile.swap units in From 6ba7d53be56a16e492549c419995dafb4df5511c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Wed, 5 Apr 2023 20:15:10 +0200 Subject: [PATCH 15/16] Sync the uncommitted direct upload to lunar. --- debian/changelog | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index 01cbf9ea..5ccb188c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +livecd-rootfs (2.819) UNRELEASED; urgency=medium + + [ Heinrich Schuchardt ] + * Add image for StarFive VisionFive 2. + + [ Steve Langasek ] + * Update URL to point to ubuntu-archive-team.ubuntu.com. + + -- Łukasz 'sil2100' Zemczak Wed, 05 Apr 2023 18:01:07 +0200 + livecd-rootfs (2.818) lunar; urgency=medium [ Dave Jones ] @@ -12,13 +22,7 @@ livecd-rootfs (2.818) lunar; urgency=medium [ William 'jawn-smith' Wilson ] * Skip oem-config setup in hooks if the oem user already exists. - [ Steve Langasek ] - * Update URL to point to ubuntu-archive-team.ubuntu.com. - - [ Heinrich Schuchardt ] - * Add image for StarFive VisionFive 2. - - -- Łukasz 'sil2100' Zemczak Wed, 05 Apr 2023 17:21:21 +0200 + -- Dave Jones Tue, 28 Mar 2023 14:38:55 +0100 livecd-rootfs (2.817) lunar; urgency=medium From 3e2b71fafaf426b1d077e1fdf2e9c4caf05edcd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Wed, 5 Apr 2023 20:15:27 +0200 Subject: [PATCH 16/16] releasing package livecd-rootfs version 2.819 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 5ccb188c..ef831f37 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -livecd-rootfs (2.819) UNRELEASED; urgency=medium +livecd-rootfs (2.819) lunar; urgency=medium [ Heinrich Schuchardt ] * Add image for StarFive VisionFive 2.