Update for Orange Pi 5 Ubuntu22.04 Gnome v1.1.2

This commit is contained in:
orangepi-xunlong 2023-02-24 19:31:49 +08:00
parent c00b8513ea
commit 6a1ff9f481
12 changed files with 226 additions and 14 deletions

2
.gitignore vendored
View File

@ -26,6 +26,8 @@ mkimage.sh
!external/patch/u-boot
!external/patch/kernel
!external/config/kernel
!external/packages/bsp/common/etc/kernel
!external/packages/bsp/rk3588/etc/kernel
external/cache/.gpg
external/cache/hash

View File

@ -1,2 +1,3 @@
verbosity=1
bootlogo=false
extraargs=cma=64M

View File

@ -1,4 +1,3 @@
bleachbit
fbi
gparted
system-monitoring-center

View File

@ -1,6 +1,8 @@
# overwrite stock lightdm greeter configuration
if [ -d /etc/armbian/lightdm ]; then cp -R /etc/armbian/lightdm /etc/; fi
#if [ -f /etc/lightdm/slick-greeter.conf ]; then sed -i 's/armbian03-Dre0x-Minum-dark-blurred-3840x2160.jpg/armbian-4k-black-psycho-gauss.jpg/g' /etc/lightdm/slick-greeter.conf; fi
if [ -d /etc/orangepi/lightdm ]; then cp -R /etc/orangepi/lightdm /etc/; fi
if [ -f /etc/lightdm/slick-greeter.conf ]; then sed -i 's/orangepi-lightdm\/orangepi-default.png/warty-final-ubuntu.png/g' /etc/lightdm/slick-greeter.conf; fi
if [ -f /etc/lightdm/lightdm.conf.d/11-orangepi.conf ]; then sed -i "s/user-session.*/user-session=ubuntu-wayland/" /etc/lightdm/lightdm.conf.d/11-orangepi.conf; fi
# Disable Pulseaudio timer scheduling which does not work with sndhdmi driver
if [ -f /etc/pulse/default.pa ]; then sed "s/load-module module-udev-detect$/& tsched=0/g" -i /etc/pulse/default.pa; fi
@ -18,13 +20,13 @@ echo "
favorite-apps = ['terminator.desktop', 'org.gnome.Nautilus.desktop', 'google-chrome.desktop', 'thunderbird.desktop', 'code.desktop', 'Zoom.desktop']
[org/gnome/desktop/background]
picture-uri='file:///usr/share/backgrounds/armbian/armbian03-Dre0x-Minum-dark-3840x2160.jpg'
picture-uri='file:///usr/share/backgrounds/warty-final-ubuntu.png'
picture-options='zoom'
primary-color='#456789'
secondary-color='#FFFFFF'
[org/gnome/desktop/screensaver]
picture-uri='file:///usr/share/backgrounds/armbian/armbian03-Dre0x-Minum-dark-3840x2160.jpg'
picture-uri='file:///usr/share/backgrounds/warty-final-ubuntu.png'
picture-options='zoom'
primary-color='#456789'
secondary-color='#FFFFFF'" >> $keys

View File

@ -7506,12 +7506,13 @@ CONFIG_UDF_FS=y
# DOS/FAT/EXFAT/NT Filesystems
#
CONFIG_FAT_FS=y
# CONFIG_MSDOS_FS is not set
CONFIG_MSDOS_FS=m
CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT_CODEPAGE=936
CONFIG_FAT_DEFAULT_IOCHARSET="utf8"
# CONFIG_FAT_DEFAULT_UTF8 is not set
# CONFIG_EXFAT_FS is not set
CONFIG_FAT_DEFAULT_UTF8=y
CONFIG_EXFAT_FS=y
CONFIG_EXFAT_DEFAULT_IOCHARSET="utf8"
CONFIG_NTFS_FS=y
# CONFIG_NTFS_DEBUG is not set
CONFIG_NTFS_RW=y

View File

@ -1,6 +1,6 @@
rk3588_gpu_vpu_tweaks()
{
if [[ ${BOARD} =~ orangepi5|orangepi5b && ${SELECTED_CONFIGURATION} == desktop && ${RELEASE} == bullseye ]]; then
if [[ ${BOARD} =~ orangepi5|orangepi5b && ${SELECTED_CONFIGURATION} == desktop && ${DESKTOP_ENVIRONMENT} == xfce && ${RELEASE} == bullseye ]]; then
chroot $SDCARD /bin/bash -c "chmod o+x /usr/lib/dbus-1.0/dbus-daemon-launch-helper"
@ -125,7 +125,7 @@ rk3588_gpu_vpu_tweaks()
fi
if [[ ${BOARD} =~ orangepi5|orangepi5b && ${SELECTED_CONFIGURATION} == desktop && ${RELEASE} == jammy ]]; then
if [[ ${BOARD} =~ orangepi5|orangepi5b && ${SELECTED_CONFIGURATION} == desktop && ${DESKTOP_ENVIRONMENT} == xfce && ${RELEASE} == jammy ]]; then
chroot $SDCARD /bin/bash -c "chmod o+x /usr/lib/dbus-1.0/dbus-daemon-launch-helper"
@ -250,7 +250,7 @@ rk3588_gpu_vpu_tweaks()
fi
if [[ ${BOARD} =~ orangepi5|orangepi5b && ${SELECTED_CONFIGURATION} == desktop && ${RELEASE} == focal ]]; then
if [[ ${BOARD} =~ orangepi5|orangepi5b && ${SELECTED_CONFIGURATION} == desktop && ${DESKTOP_ENVIRONMENT} == xfce && ${RELEASE} == focal ]]; then
chroot $SDCARD /bin/bash -c "chmod o+x /usr/lib/dbus-1.0/dbus-daemon-launch-helper"
@ -365,5 +365,126 @@ rk3588_gpu_vpu_tweaks()
chroot $SDCARD /bin/bash -c "rm /usr/lib/aarch64-linux-gnu/dri/*.so;mv /*.so /usr/lib/aarch64-linux-gnu/dri/"
fi
}
if [[ ${BOARD} =~ orangepi5|orangepi5b && ${SELECTED_CONFIGURATION} == desktop && ${DESKTOP_ENVIRONMENT} == gnome && ${RELEASE} == jammy ]]; then
if [[ 0 == 1 ]] ; then
chroot $SDCARD /bin/bash -c "chmod o+x /usr/lib/dbus-1.0/dbus-daemon-launch-helper"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/gstreamer/gir1.2-gstreamer-1.0_1.20.3-0ubuntu1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/gstreamer/gstreamer1.0-tools_1.20.3-0ubuntu1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/gstreamer/libgstreamer1.0-0_1.20.3-0ubuntu1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/gstreamer/libgstreamer1.0-dev_1.20.3-0ubuntu1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/gst-plugins-base1.0/gir1.2-gst-plugins-base-1.0_1.20.3-1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/gst-plugins-base1.0/gstreamer1.0-alsa_1.20.3-1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/gst-plugins-base1.0/gstreamer1.0-gl_1.20.3-1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/gst-plugins-base1.0/gstreamer1.0-plugins-base_1.20.3-1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/gst-plugins-base1.0/gstreamer1.0-plugins-base-apps_1.20.3-1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/gst-plugins-base1.0/gstreamer1.0-x_1.20.3-1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/gst-plugins-base1.0/libgstreamer-gl1.0-0_1.20.3-1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/gst-plugins-base1.0/libgstreamer-plugins-base1.0-0_1.20.3-1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/gst-plugins-base1.0/libgstreamer-plugins-base1.0-dev_1.20.3-1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/gst-plugins-bad1.0/libgstreamer-plugins-bad1.0-0_1.20.3-0ubuntu1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/gst-plugins-bad1.0/gir1.2-gst-plugins-bad-1.0_1.20.3-0ubuntu1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/gst-plugins-bad1.0/libgstreamer-opencv1.0-0_1.20.3-0ubuntu1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/gst-plugins-bad1.0/gstreamer1.0-opencv_1.20.3-0ubuntu1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/gst-plugins-bad1.0/gstreamer1.0-plugins-bad_1.20.3-0ubuntu1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/gst-plugins-bad1.0/gstreamer1.0-plugins-bad-apps_1.20.3-0ubuntu1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/gst-plugins-bad1.0/gstreamer1.0-wpe_1.20.3-0ubuntu1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/gst-plugins-bad1.0/libgstreamer-plugins-bad1.0-dev_1.20.3-0ubuntu1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/gst-plugins-good1.0/gstreamer1.0-gtk3_1.20.3-0ubuntu1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/gst-plugins-good1.0/gstreamer1.0-plugins-good_1.20.3-0ubuntu1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/gst-plugins-good1.0/gstreamer1.0-pulseaudio_1.20.3-0ubuntu1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/gst-plugins-good1.0/gstreamer1.0-qt5_1.20.3-0ubuntu1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/gst-plugins-good1.0/libgstreamer-plugins-good1.0-0_1.20.3-0ubuntu1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/gst-plugins-good1.0/libgstreamer-plugins-good1.0-dev_1.20.3-0ubuntu1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/libdrm/libkms1_2.4.110-1ubuntu1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/libdrm-cursor/libdrm-cursor_1.4.0-1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/libdrm-cursor/libdrm-cursor-dev_1.4.0-1_arm64.deb"
else
chroot $SDCARD /bin/bash -c "apt-get update" > /dev/null
chroot $SDCARD /bin/bash -c "apt-get upgrade -y" > /dev/null
chroot $SDCARD /bin/bash -c "apt-get install -y libgraphene-1.0-0 libqt5waylandclient5" > /dev/null
chroot $SDCARD /bin/bash -c "apt-get install -y glmark2 glmark2-es2 mesa-utils libqt5core5a libqt5gui5 libqt5opengl5 libqt5widgets5 libchromaprint1 libchromaprint1 libcec6 libcrossguid0 libfmt8 libfstrcmp0 libimagequant0 libiso9660-11 libkissfft-float131 liblirc-client0 libmicrohttpd12 libmysqlclient21 libp8-platform2 libraqm0 libraspberrypi0 libshairplay0 libtinyxml2.6.2v5 libwayland-client++0 libwayland-cursor++0 libwayland-egl++0 mailcap mime-support mysql-common python3-pil python3-pycryptodome libjs-iscroll gnome-bluetooth onboard mpv gnome-screenshot"
[[ -f $SDCARD/etc/profile.d/x11.sh ]] && rm $SDCARD/etc/profile.d/x11.sh
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/rkaiq/camera-engine-rkaiq_rk3588_arm64.deb"
cp "$EXTER/cache/sources/rk3588_packages_${RELEASE}/rkaiq/rkaiq_3A_server" $SDCARD/usr/bin/ -f
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/rga2/librga2_2.2.0-1+git220920.c1d5c71~jammy_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/rga2/librga-dev_2.2.0-1+git220920.c1d5c71~jammy_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/mpp/librockchip-mpp1_1.5.0-1+git230210.c145c84~jammy1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/mpp/librockchip-mpp-dev_1.5.0-1+git230210.c145c84~jammy1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/mpp/librockchip-vpu0_1.5.0-1+git230210.c145c84~jammy1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/mpp/rockchip-mpp-demos_1.5.0-1+git230210.c145c84~jammy1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/libv4l/libdvbv5-0_1.22.1-2build1+rkmpp20221209_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/libv4l/dvb-tools_1.22.1-2build1+rkmpp20221209_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/libv4l/ir-keytable_1.22.1-2build1+rkmpp20221209_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/libv4l/libdvbv5-dev_1.22.1-2build1+rkmpp20221209_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/libv4l/libdvbv5-doc_1.22.1-2build1+rkmpp20221209_all.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/libv4l/libv4lconvert0_1.22.1-2build1+rkmpp20221209_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/libv4l/libv4l-0_1.22.1-2build1+rkmpp20221209_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/libv4l/libv4l2rds0_1.22.1-2build1+rkmpp20221209_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/libv4l/libv4l-dev_1.22.1-2build1+rkmpp20221209_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/libv4l/v4l-utils_1.22.1-2build1+rkmpp20221209_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/libv4l/qv4l2_1.22.1-2build1+rkmpp20221209_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/libv4l/libv4l-rkmpp_1.5.1-1.1+git230130.b004755~jammy1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/libv4l/rockchip-multimedia-config_1.0.0-2+jammy_all.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/chromium/chromium-codecs-ffmpeg-extra_110.0.5481.4-0ubuntu1~jammy~rkmpp20230130_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/chromium/chromium-browser_110.0.5481.4-0ubuntu1~jammy~rkmpp20230130_arm64.deb"
#dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/chromium/chromium-browser-l10n_110.0.5481.4-0ubuntu1~jammy~rkmpp20230130_all.deb"
#dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/chromium/chromium-chromedriver_110.0.5481.4-0ubuntu1~jammy~rkmpp20230130_arm64.deb"
cp $EXTER/cache/sources/rk3588_packages_jammy/chromium/default $SDCARD/etc/chromium-browser/
## for panfork
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/mesa/libgbm1_23.0~panfork~csf~git221210.120202c6757~j_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/mesa/libglapi-mesa_23.0~panfork~csf~git221210.120202c6757~j_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/mesa/libgl1-mesa-dri_23.0~panfork~csf~git221210.120202c6757~j_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/mesa/libegl-mesa0_23.0~panfork~csf~git221210.120202c6757~j_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/mesa/libglx-mesa0_23.0~panfork~csf~git221210.120202c6757~j_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/mesa/mali-g610-firmware_1.0.0-1_all.deb"
## for ffmpeg
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/ffmpeg/libavutil56_4.4.2-0ubuntu0.22.04.1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/ffmpeg/libavutil-dev_4.4.2-0ubuntu0.22.04.1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/ffmpeg/libpostproc55_4.4.2-0ubuntu0.22.04.1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/ffmpeg/libpostproc-dev_4.4.2-0ubuntu0.22.04.1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/ffmpeg/libswresample3_4.4.2-0ubuntu0.22.04.1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/ffmpeg/libswresample-dev_4.4.2-0ubuntu0.22.04.1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/ffmpeg/libswscale5_4.4.2-0ubuntu0.22.04.1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/ffmpeg/libswscale-dev_4.4.2-0ubuntu0.22.04.1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/ffmpeg/libavcodec58_4.4.2-0ubuntu0.22.04.1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/ffmpeg/libavcodec-dev_4.4.2-0ubuntu0.22.04.1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/ffmpeg/libavformat58_4.4.2-0ubuntu0.22.04.1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/ffmpeg/libavformat-dev_4.4.2-0ubuntu0.22.04.1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/ffmpeg/libavfilter7_4.4.2-0ubuntu0.22.04.1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/ffmpeg/libavfilter-dev_4.4.2-0ubuntu0.22.04.1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/ffmpeg/libavdevice58_4.4.2-0ubuntu0.22.04.1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/ffmpeg/libavdevice-dev_4.4.2-0ubuntu0.22.04.1_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/ffmpeg/ffmpeg_4.4.2-0ubuntu0.22.04.1_arm64.deb"
## for kodi
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/kodi/kodi-bin_19.4+dfsg1-2+gles2_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/kodi/kodi-data_19.4+dfsg1-2+gles2_all.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/kodi/kodi_19.4+dfsg1-2+gles2_arm64.deb"
dpkg_install_deb_chroot "$EXTER/cache/sources/rk3588_packages_jammy/rktoolkit/rktoolkit_1.0.0-1_arm64.deb"
fi
fi
}

View File

@ -51,7 +51,7 @@ family_tweaks_s() {
rsync -a --chown=root:root "${EXTER}"/packages/bsp/rk3588/* ${SDCARD}/
[[ ${RELEASE} == jammy ]] && rm ${SDCARD}/etc/profile.d/orangepi-ssh-title.sh # for adbd
if [[ -f "${SDCARD}"/etc/profile.d/im-config_wayland.sh ]]; then
if [[ -f "${SDCARD}"/etc/profile.d/im-config_wayland.sh && ${DESKTOP_ENVIRONMENT} != gnome ]]; then
chroot $SDCARD /bin/bash -c "rm /etc/profile.d/im-config_wayland.sh" # for adbd
fi

View File

@ -0,0 +1,27 @@
#!/bin/sh
# echo "DEBUG: postinst: initramfs-clean: cmd: $@" >&2
# avoid running multiple times
# This script should be run after the initramfs-tools script
# and under the same conditions.
if [ -n "$DEB_MAINT_PARAMS" ]; then
eval set -- "$DEB_MAINT_PARAMS"
if [ -z "$1" ] || [ "$1" != "configure" ]; then
exit 0
fi
fi
files="$(find /boot -maxdepth 1 -name 'initrd.img-*' -o -name 'uInitrd-*')"
for f in $files; do
if [ ! -d /lib/modules/"${f#*-}" ]; then
echo "Remove unused generated file: $f"; rm $f
fi
done
check_boot_dev (){
available_size_boot_device=$(findmnt --noheadings --output AVAIL --target /boot)
echo "Free space after deleting the package $DPKG_MAINTSCRIPT_PACKAGE in /boot: $available_size_boot_device" >&2
}
mountpoint -q /boot && check_boot_dev
exit 0

View File

@ -0,0 +1,27 @@
#!/bin/sh
# echo "DEBUG: POSTRM: initramfs-clean: cmd: $@" >&2
# avoid running multiple times
# This script should be run after the initramfs-tools script
# and under the same conditions.
if [ -n "$DEB_MAINT_PARAMS" ]; then
eval set -- "$DEB_MAINT_PARAMS"
if [ -z "$1" ] || [ "$1" != "remove" ]; then
exit 0
fi
fi
files="$(find /boot -maxdepth 1 -name 'initrd.img-*' -o -name 'uInitrd-*')"
for f in $files; do
if [ ! -d /lib/modules/"${f#*-}" ]; then
echo "Remove unused generated file: $f"; rm $f
fi
done
check_boot_dev (){
available_size_boot_device=$(findmnt --noheadings --output AVAIL --target /boot)
echo "Free space after deleting the package $DPKG_MAINTSCRIPT_PACKAGE in /boot: $available_size_boot_device" >&2
}
mountpoint -q /boot && check_boot_dev
exit 0

View File

@ -0,0 +1,30 @@
#!/bin/bash
set -e
# installkernel script calls postinst.d without any DEB_MAINT_PARAMS set
# linux-image-* postinst calls postinst.d with DEB_MAINT_PARAMS set
# do nothing in case linux-image-* calls this, as it already calls `linux-update-symlinks`
[ -z "$DEB_MAINT_PARAMS" ] || exit 0
# installkernel must call postinst.d with two args, version & image_path
version="$1"
image_path="$2"
[ -n "$version" ] || exit 0
[ -n "$image_path" ] || exit 0
# call linux-update-symlinks in install mode, which will correctly
# update vmlinuz & initrd.img symlinks. Even if initrd.img does not
# exist yet, or has already been created by the initramfs-update
# postinst.d hook. It will also honor kernel_img.conf settings to
# link_in_boot yes/no. Thus matching behaviour of linux-image-*
# postinst call to linux-update-symlinks.
tmp=$(lsblk -f | grep "boot" | grep "vfat")
if [[ $tmp == *vfat* ]]; then
echo "Cpoy $image_path to /boot/Image"
cp $image_path /boot/Image
else
linux-update-symlinks install $version $image_path
fi
exit 0

View File

@ -422,7 +422,7 @@ prepare_partitions() {
# mountopts[nfs] is empty
# default BOOTSIZE to use if not specified
DEFAULT_BOOTSIZE=256 # MiB
DEFAULT_BOOTSIZE=1024 # MiB
# size of UEFI partition. 0 for no UEFI. Don't mix UEFISIZE>0 and BOOTSIZE>0
UEFISIZE=${UEFISIZE:-0}
BIOSSIZE=${BIOSSIZE:-0}

View File

@ -451,6 +451,8 @@ POST_INSTALL_KERNEL_DEBS
# copy watchdog test programm
cp "${EXTER}"/packages/blobs/watchdog/watchdog_test_${ARCH} "${SDCARD}"/usr/local/bin/watchdog_test
[[ -f "${SDCARD}"/usr/bin/gnome-session ]] && sed -i "s/user-session.*/user-session=ubuntu-wayland/" ${SDCARD}/etc/lightdm/lightdm.conf.d/22-orangepi-autologin.conf
# execute $LINUXFAMILY-specific tweaks
[[ $(type -t family_tweaks) == function ]] && family_tweaks