citadel/meta-citadel/recipes-citadel/images/citadel-installer-image.bb
Bruce Leidl f4f1f3b153 Upgrade GNOME to 42.1
* citadel-kernel 5.15.8 -> 5.18
 * adwaita-icon-theme 42.0
 * ell 0.44 -> 0.50
 * libnma 1.8.30 -> 1.8.38
 * iwd 1.17 -> 1.27
 * modemmanager 1.16.8 -> 1.18.6
 * networkmanager 1.32.10 -> 1.36.2
 * networkmanager-openvpn 1.8.14 -> 1.8.18
 * accountsservice 0.6.55 -> 22.08.8
 * colord-gtk 0.1.26 -> 0.3.0
 * polkit 0.118 -> 0.119
 * gexiv2 0.12.1 -> 0.14.0
 * gjs 1.70.0 -> 1.72.0
 * gnome-autoar 0.4.1 -> 0.4.3
 * gnome-backgrounds 0.41.0 -> 0.42.0
 * gnome-bluetooth 0.34.3 -> 42.0
 * gnome-control-center 41.1 -> 42.1
 * gnome-desktop 41.1 -> 42.1
 * gnome-disk-utility 41.0 -> 42.0
 * gnome-screenshot 40.0 -> 41.0
 * gnome-session 40.1.1 -> 42.0
 * gnome-settings-daemon 41.0 -> 42.1
 * gnome-shell 41.1 -> 42.1
 * gnome-system-monitor 41.0 -> 42.0
 * gnome-terminal 3.42.1 -> 3.42.2
 * gtk4 4.4.1 -> 4.6.4
 * gvfs 1.48.1 -> 1.50.0
 * libgweather 40.0 -> libgweather4 4.0.0
 * mutter 41.1 -> 42.1
 * network-manager-applet 1.18.0 -> 1.26.0
 * yelp 3.36 -> 42.1
 * yelp-xsl 3.36 -> 42.0
 * yelp-tools 3.32.2 -> 42.0
 * zenity 3.30.0 -> 3.42.1
2022-05-29 14:18:27 -04:00

188 lines
5.7 KiB
BlitzBasic

DESCRIPTION = ""
HOMEPAGE = ""
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
SECTION = ""
DEPENDS = "mtools-native syslinux syslinux-native dosfstools-native coreutils-native parted-native"
PACKAGE_ARCH = "${MACHINE_ARCH}"
inherit deploy
require citadel-image.inc
KERNEL_CMDLINE = "root=/dev/mapper/rootfs citadel.verbose intel_iommu=off fstab=no luks=no splash"
do_rootfs() {
install_efi_files
install_syslinux_files
install_image_files
}
do_rootfs[dirs] = "${TOPDIR}"
do_rootfs[cleandirs] = "${S} ${IMAGE_ROOTFS}"
do_rootfs[umask] = "022"
do_rootfs[depends] += "\
citadel-rootfs-image:do_image_complete \
citadel-extra-image:do_image_complete \
citadel-kernel-image:do_image_complete \
base-realmfs-image:do_deploy \
citadel-kernel:do_deploy \
systemd-boot:do_deploy \
"
addtask rootfs after do_configure before do_build
install_efi_files() {
install -d ${IMAGE_ROOTFS}/EFI/BOOT
install ${DEPLOY_DIR_IMAGE}/systemd-bootx64.efi -T ${IMAGE_ROOTFS}/EFI/BOOT/bootx64.efi
install ${DEPLOY_DIR_IMAGE}/bzImage ${IMAGE_ROOTFS}/bzImage-${CITADEL_KERNEL_VERSION}
install -d ${IMAGE_ROOTFS}/loader/entries
make_loader_conf > ${IMAGE_ROOTFS}/loader/loader.conf
make_install_conf > ${IMAGE_ROOTFS}/loader/entries/install.conf
}
SYSLINUX_MODULES = "ldlinux.c32 menu.c32 libutil.c32 gptmbr.bin"
install_syslinux_files() {
install -d ${IMAGE_ROOTFS}/syslinux
make_syslinux_conf > ${IMAGE_ROOTFS}/syslinux/syslinux.cfg
for m in ${SYSLINUX_MODULES}; do
install ${RECIPE_SYSROOT}/usr/share/syslinux/$m ${IMAGE_ROOTFS}/syslinux
done
}
install_image_files() {
install -d ${IMAGE_ROOTFS}/images
install_resource_image "rootfs" ${CITADEL_IMAGE_VERSION_rootfs}
install_resource_image "extra" ${CITADEL_IMAGE_VERSION_extra}
install_resource_image "kernel" ${CITADEL_IMAGE_VERSION_kernel}
install ${DEPLOY_DIR_IMAGE}/base-realmfs.img ${IMAGE_ROOTFS}/images/
}
make_loader_conf() {
echo "default install"
echo "timeout 5"
}
make_install_conf() {
echo "title Install Subgraph OS (Citadel)"
echo "linux /bzImage-${CITADEL_KERNEL_VERSION}"
echo "options ${KERNEL_CMDLINE} citadel.install"
}
make_live_conf() {
echo "title Run Live Subgraph OS (Citadel)"
echo "linux /bzImage-${CITADEL_KERNEL_VERSION}"
echo "options ${KERNEL_CMDLINE} citadel.live"
}
CITADEL_KERNEL_CMDLINE = "add_efi_memmap intel_iommu=off cryptomgr.notests rcupdate.rcu_expedited=1 rcu_nocbs=0-64 tsc=reliable no_timer_check noreplace-smp i915.fastboot=1 quiet splash"
make_syslinux_conf() {
cat << EOF
UI menu.c32
PROMPT 0
MENU TITLE Boot Subgraph OS Installer (Citadel)
TIMEOUT 50
DEFAULT subgraph
LABEL subgraph
MENU LABEL Subgraph OS
LINUX ../bzImage-${CITADEL_KERNEL_VERSION}
APPEND ${KERNEL_CMDLINE} citadel.install
EOF
}
install_resource_image() {
version=$(printf "%03d" ${2})
if [ "${1}" = "kernel" ]; then
src_fname="citadel-kernel-${CITADEL_KERNEL_VERSION}-${CITADEL_IMAGE_CHANNEL}-${version}.img"
dst_fname="citadel-kernel-${CITADEL_KERNEL_VERSION}.img"
else
src_fname="citadel-${1}-${CITADEL_IMAGE_CHANNEL}-${version}.img"
dst_fname="citadel-${1}.img"
fi
install ${DEPLOY_DIR_IMAGE}/${src_fname} -T ${IMAGE_ROOTFS}/images/${dst_fname}
}
CITADEL_BOOT_IMAGE = "${B}/boot.img"
CITADEL_INSTALLER_IMAGE = "${B}/citadel-installer.img"
do_image() {
write_boot_image ${CITADEL_BOOT_IMAGE}
write_installer_image ${CITADEL_INSTALLER_IMAGE} ${CITADEL_BOOT_IMAGE}
}
do_image[umask] = "022"
do_image[dirs] = "${TOPDIR}"
addtask do_image after do_rootfs before do_build
do_deploy() {
install -m 644 ${CITADEL_INSTALLER_IMAGE} ${DEPLOYDIR}
}
addtask do_deploy after do_image before do_build
#
# write_boot_image [image path]
#
write_boot_image() {
IMAGE_PATH=${1}
BLOCKS_ROOTFS=$(du -bks ${IMAGE_ROOTFS} | cut -f1)
BLOCKS_EXTRA=65536
IMAGE_SIZE=$(expr ${BLOCKS_ROOTFS} + ${BLOCKS_EXTRA})
if [ -e ${IMAGE_PATH} ]; then
rm ${IMAGE_PATH}
fi
bbdebug 1 Creating ${IMAGE_SIZE} block msdos image at ${IMAGE_PATH}
mkdosfs -n boot -C ${IMAGE_PATH} ${IMAGE_SIZE}
mcopy -i ${IMAGE_PATH} -s ${IMAGE_ROOTFS}/* ::/
syslinux --directory syslinux --install ${IMAGE_PATH}
}
write_installer_image() {
INSTALLER_IMAGE=${1}
BOOT_IMAGE=${2}
BOOT_IMAGE_SIZE=$(stat -c "%s" ${BOOT_IMAGE})
BOOT_IMAGE_SECTORS=$(expr ${BOOT_IMAGE_SIZE} / 512)
TOTAL_SECTORS=$(expr ${BOOT_IMAGE_SECTORS} + 32)
TOTAL_IMAGE_BLOCKS=$(expr ${TOTAL_SECTORS} / 2)
if [ -e ${INSTALLER_IMAGE} ]; then
rm ${INSTALLER_IMAGE}
fi
bbdebug 1 Creating ${TOTAL_IMAGE_BLOCKS} block empty image file at ${INSTALLER_IMAGE}
truncate -s ${TOTAL_IMAGE_BLOCKS}K ${INSTALLER_IMAGE}
parted -s ${INSTALLER_IMAGE} mklabel msdos
offset=32
end=$(expr ${offset} + ${BOOT_IMAGE_SECTORS} - 1)
bbdebug 1 parted -s ${INSTALLER_IMAGE} unit s mkpart fat32 ${offset} ${end}
parted -s ${INSTALLER_IMAGE} unit s mkpart primary fat32 ${offset} ${end}
parted -s ${INSTALLER_IMAGE} set 1 boot on
bbdebug 1 dd if=${BOOT_IMAGE} of=${INSTALLER_IMAGE} seek=${offset} count=${BOOT_IMAGE_SECTORS} conv=sparse,nocreat,notrunc
dd if=${BOOT_IMAGE} of=${INSTALLER_IMAGE} seek=${offset} count=${BOOT_IMAGE_SECTORS} conv=sparse,nocreat,notrunc
dd bs=440 count=1 conv=notrunc if=${RECIPE_SYSROOT}/usr/share/syslinux/mbr.bin of=${INSTALLER_IMAGE}
parted -s ${INSTALLER_IMAGE} unit s print
}
do_fetch[noexec] = "1"
do_unpack[noexec] = "1"
do_patch[noexec] = "1"
do_configure[noexec] = "1"
do_compile[noexec] = "1"
do_install[noexec] = "1"
deltask do_populate_sysroot
do_package[noexec] = "1"
deltask do_package_qa
do_packagedata[noexec] = "1"
do_package_write_deb[noexec] = "1"