Merge branch 'ubuntu/master' of git+ssh://git.launchpad.net/livecd-rootfs into canary-build

canary-build
Łukasz 'sil2100' Zemczak 2 years ago
commit 4e49b4df60

33
debian/changelog vendored

@ -1,3 +1,36 @@
livecd-rootfs (2.819) lunar; 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 <lukasz.zemczak@ubuntu.com> Wed, 05 Apr 2023 18:01:07 +0200
livecd-rootfs (2.818) lunar; 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
* 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
[ William 'jawn-smith' Wilson ]
* Skip oem-config setup in hooks if the oem user already exists.
-- Dave Jones <dave.jones@canonical.com> Tue, 28 Mar 2023 14:38:55 +0100
livecd-rootfs (2.817) lunar; urgency=medium
[ John Chittum ]
* revert ipc change. kernel 6.2 will have the correct setting
-- Steve Langasek <steve.langasek@ubuntu.com> Mon, 27 Mar 2023 12:11:06 -0700
livecd-rootfs (2.816) lunar; urgency=medium
[ Chad Smith ]

@ -0,0 +1 @@
create read write open delete setattr getattr

@ -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/
@ -359,7 +359,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"

@ -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 <<EOF > chroot/etc/netplan/01-network-manager-all.yaml

@ -132,6 +132,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
@ -377,8 +394,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/
@ -412,7 +453,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

@ -11,18 +11,22 @@ 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
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; }
@ -51,35 +55,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

Loading…
Cancel
Save