Imported 2.819

No reason for CPC update specified.
This commit is contained in:
CloudBuilder 2023-04-05 22:48:28 +00:00
parent 3eaf5fa5e0
commit d3fa5efeea
3 changed files with 65 additions and 3 deletions

10
debian/changelog vendored
View File

@ -1,3 +1,13 @@
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 ]

View File

@ -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/
@ -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"

View File

@ -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