From 1555f5f46bdbafb134a78b6623f22328faebb2bc Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Thu, 13 Oct 2022 04:06:46 +0200 Subject: [PATCH 1/3] riscv: remove invalid redirections Remove redirections of type command &1>2 Executing the command in the background and creating and empty file '2' was never intended. As the messages are information only redirecting to stderr would not make sense either. Signed-off-by: Heinrich Schuchardt --- live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 3a38300d..6d9a832b 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 @@ -242,7 +242,7 @@ install_grub() { # Per-device images case "${SUBARCH}" in "icicle") - echo "Installing GRUB for ${SUBARCH} board" &1>2 + echo "Installing GRUB for ${SUBARCH} board" # 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. @@ -271,7 +271,7 @@ install_grub() { chroot mountpoint rm -f /boot/boot.scr ;; "nezha"|"licheerv") - echo "Installing U-Boot for ${SUBARCH} board" &1>2 + echo "Installing U-Boot for ${SUBARCH} board" # 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. @@ -316,7 +316,7 @@ install_grub() { chroot mountpoint rm -f /boot/boot.scr ;; "visionfive") - echo "Installing GRUB for VisionFive board" &1>2 + echo "Installing GRUB for VisionFive board" # 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. From b39824539cd8f82548ea18c2b08ed3a952e7d7c4 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Thu, 13 Oct 2022 04:13:11 +0200 Subject: [PATCH 2/3] riscv: reduce initrd size for Nezha and LicheeRV boards The Nezha and the LicheeRV boards do not have enough memory for an initrd with most modules. Therefore the number of included modules has to be reduced. Create file /etc/initramfs-tools/conf.d/modules_list.conf to set MODULES=list. Signed-off-by: Heinrich Schuchardt --- live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary | 5 +++++ .../hooks.d/base/initramfs-tools/modules_list.conf | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 live-build/ubuntu-cpc/hooks.d/base/initramfs-tools/modules_list.conf 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 6d9a832b..469992ba 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 @@ -271,6 +271,11 @@ install_grub() { chroot mountpoint rm -f /boot/boot.scr ;; "nezha"|"licheerv") + local my_d=$(dirname $(readlink -f ${0})) + echo "Reducing initramfs size for ${SUBARCH} board" + mkdir -p mountpoint/etc/initramfs-tools/conf.d/ + cp ${my_d}/initramfs-tools/modules_list.conf mountpoint/etc/initramfs-tools/conf.d/ + chroot mountpoint update-initramfs -c -v -k all echo "Installing U-Boot for ${SUBARCH} board" # 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, diff --git a/live-build/ubuntu-cpc/hooks.d/base/initramfs-tools/modules_list.conf b/live-build/ubuntu-cpc/hooks.d/base/initramfs-tools/modules_list.conf new file mode 100644 index 00000000..99cb474f --- /dev/null +++ b/live-build/ubuntu-cpc/hooks.d/base/initramfs-tools/modules_list.conf @@ -0,0 +1,6 @@ +# The Nezha and the LicheeRV boards do not have enough memory for an initrd with +# most modules. Therefore the number of included modules has to be reduced. +# +# If further modules are needed, add them to /etc/initramfs-tools/modules. + +MODULES=list From 2869890eafd021e3dfc83b778581f936a3e64ad1 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Thu, 13 Oct 2022 05:41:06 +0200 Subject: [PATCH 3/3] Update changelog for release 2.789 Signed-off-by: Heinrich Schuchardt --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index c49e9879..795b93f7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +livecd-rootfs (2.789) kinetic; urgency=medium + + * riscv: reduce the size of the intird for Nezha and LicheeRV + * fix invalid redirects + + -- Heinrich Schuchardt Thu, 13 Oct 2022 05:38:01 +0200 + livecd-rootfs (2.788) kinetic; urgency=medium * riscv: Remove the default installation of the Wifi driver for the LicheeRV