diff --git a/.build/images/VisionFive2/visionfive2_defconfig b/.build/images/VisionFive2/visionfive2_defconfig new file mode 100644 index 0000000000..04f2814efc --- /dev/null +++ b/.build/images/VisionFive2/visionfive2_defconfig @@ -0,0 +1,410 @@ +CONFIG_AIC8800_WLAN_SUPPORT=m +CONFIG_AIC_LOADFW_SUPPORT=m +CONFIG_AIC_WLAN_SUPPORT=y +CONFIG_AMBA_PL08X=y +CONFIG_ATA=y +CONFIG_AUTOFS_FS=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BINFMT_MISC=y +CONFIG_BLK_DEV_DM=m +CONFIG_BLK_DEV_INITRD=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_NVME=y +CONFIG_BLK_DEV_SD=y +CONFIG_BLK_DEV_SR=y +CONFIG_BPF_JIT=y +CONFIG_BPF_SYSCALL=y +CONFIG_BT=m +CONFIG_BTRFS_FS=y +CONFIG_BTRFS_FS_POSIX_ACL=y +CONFIG_BT_BNEP=y +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HCIUART=y +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_RFCOMM=y +CONFIG_BT_RFCOMM_TTY=y +CONFIG_CAN=y +CONFIG_CFG80211=m +CONFIG_CFS_BANDWIDTH=y +CONFIG_CGROUPS=y +CONFIG_CGROUP_BPF=y +CONFIG_CGROUP_SCHED=y +CONFIG_CHECKPOINT_RESTORE=y +CONFIG_CIFS=m +CONFIG_CIFS_DFS_UPCALL=y +CONFIG_CIFS_FSCACHE=y +CONFIG_CIFS_POSIX=y +CONFIG_CIFS_UPCALL=y +CONFIG_CIFS_XATTR=y +CONFIG_CLK_STARFIVE_JH7110_AON=y +CONFIG_CLK_STARFIVE_JH7110_ISP=y +CONFIG_CLK_STARFIVE_JH7110_STG=y +CONFIG_CLK_STARFIVE_JH7110_VOUT=y +CONFIG_CMA=y +CONFIG_COMPILE_TEST=y +CONFIG_CPUFREQ_DT=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_STAT=y +CONFIG_CPU_IDLE=y +CONFIG_CPU_THERMAL=y +CONFIG_CRYPTO_DEV_JH7110=y +CONFIG_CRYPTO_DEV_VIRTIO=n +CONFIG_CRYPTO_SHA1=y +CONFIG_CRYPTO_TEST=m +CONFIG_CRYPTO_USER=y +CONFIG_CRYPTO_USER_API_AEAD=y +CONFIG_CRYPTO_USER_API_HASH=y +CONFIG_CRYPTO_USER_API_RNG=y +CONFIG_CRYPTO_USER_API_SKCIPHER=y +CONFIG_CUSE=y +CONFIG_DEBUG_FS=y +CONFIG_DEBUG_LIST=y +CONFIG_DEBUG_PLIST=y +CONFIG_DEBUG_RT_MUTEXES=y +CONFIG_DEBUG_RWSEMS=y +CONFIG_DEBUG_SG=y +CONFIG_DEBUG_SPINLOCK=y +CONFIG_DEBUG_TIMEKEEPING=y +CONFIG_DEFAULT_HOSTNAME="DietPi" +CONFIG_DEVFREQ_THERMAL=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_DMADEVICES=y +CONFIG_DMATEST=y +CONFIG_DMA_CMA=y +CONFIG_DM_CRYPT=m +CONFIG_DRM_IMG_ROGUE=y +CONFIG_DRM_LEGACY=y +CONFIG_DRM_PANEL_SIMPLE=y +CONFIG_DRM_PANEL_STARFIVE_JADARD=y +CONFIG_DRM_TOSHIBA_TC358762=y +CONFIG_DRM_VERISILICON=y +CONFIG_DWMAC_DWC_QOS_ETH=y +CONFIG_DWMAC_STARFIVE=y +CONFIG_DW_AXI_DMAC=y +CONFIG_EEPROM_AT24=y +CONFIG_ENERGY_MODEL=y +CONFIG_EXFAT_FS=m +CONFIG_EXPERT=y +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +CONFIG_F2FS_FS=y +CONFIG_FAT_DEFAULT_UTF8=y +CONFIG_FB=y +CONFIG_FSCACHE=y +CONFIG_FSCACHE_STATS=y +CONFIG_FUSE_FS=y +CONFIG_GOLDFISH=y +CONFIG_GPIO_SYSFS=y +CONFIG_HIBERNATION=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_HOSTAP=y +CONFIG_HUGETLBFS=y +CONFIG_HVC_RISCV_SBI=n +CONFIG_HW_RANDOM=y +CONFIG_HW_RANDOM_JH7110=y +CONFIG_HZ_100=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_DESIGNWARE_PLATFORM=y +CONFIG_IIO=y +CONFIG_IIO_ST_ACCEL_3AXIS=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_INIT_STACK_NONE=y +CONFIG_INPUT_EVDEV=y +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_IPMS_CAN=y +CONFIG_IPV6=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_IPTABLES=y +CONFIG_IP_NF_NAT=y +CONFIG_IP_NF_TARGET_MASQUERADE=y +CONFIG_IP_NF_TARGET_NETMAP=y +CONFIG_IP_NF_TARGET_REDIRECT=y +CONFIG_IP_NF_TARGET_REJECT=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_RARP=y +CONFIG_IWLDVM=y +CONFIG_IWLMVM=y +CONFIG_IWLWIFI=y +CONFIG_JFFS2_FS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEGACY_PTYS=n +CONFIG_MAC80211=m +CONFIG_MAILBOX=y +CONFIG_MARVELL_PHY=y +CONFIG_MD=y +CONFIG_MEDIA_SUPPORT=m +CONFIG_MEDIA_USB_SUPPORT=y +CONFIG_MEMTEST=y +CONFIG_MFD_AXP20X_I2C=y +CONFIG_MICREL_PHY=y +CONFIG_MICROCHIP_PHY=y +CONFIG_MMC=y +CONFIG_MMC_DEBUG=y +CONFIG_MMC_DW=y +CONFIG_MMC_DW_STARFIVE=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_OF_DWCMSHC=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHI=y +CONFIG_MMC_SPI=y +CONFIG_MODULES=y +CONFIG_MODULE_COMPRESS_XZ=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MOTORCOMM_PHY=y +CONFIG_MSDOS_FS=y +CONFIG_MTD=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_CFI=y +CONFIG_MTD_CFI_ADV_OPTIONS=y +CONFIG_MTD_SPI_NOR=y +CONFIG_NAMESPACES=y +CONFIG_NET=y +CONFIG_NETDEVICES=y +CONFIG_NETFILTER=y +CONFIG_NETFILTER_NETLINK_ACCT=y +CONFIG_NETFILTER_NETLINK_QUEUE=y +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y +CONFIG_NETFILTER_XT_MATCH_IPCOMP=y +CONFIG_NETFILTER_XT_MATCH_IPRANGE=y +CONFIG_NETFILTER_XT_MATCH_MAC=y +CONFIG_NETFILTER_XT_MATCH_MARK=y +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y +CONFIG_NETFILTER_XT_MATCH_SOCKET=y +CONFIG_NETFILTER_XT_MATCH_STATE=y +CONFIG_NETFILTER_XT_MATCH_STRING=y +CONFIG_NETFILTER_XT_MATCH_U32=y +CONFIG_NETLINK_DIAG=y +CONFIG_NET_9P=m +CONFIG_NET_9P_VIRTIO=n +CONFIG_NET_CLS_ACT=y +CONFIG_NET_CLS_BPF=m +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_INGRESS=m +CONFIG_NEW_LEDS=y +CONFIG_NFSD=m +CONFIG_NFSD_V4=y +CONFIG_NFS_FS=m +CONFIG_NFS_V4=y +CONFIG_NFS_V4_1=y +CONFIG_NFS_V4_2=y +CONFIG_NFT_COMPAT=y +CONFIG_NFT_CT=y +CONFIG_NFT_DUP_IPV4=m +CONFIG_NFT_DUP_IPV6=m +CONFIG_NFT_FIB_IPV4=m +CONFIG_NFT_FIB_IPV6=m +CONFIG_NF_CONNTRACK=y +CONFIG_NF_TABLES=y +CONFIG_NF_TABLES_IPV4=y +CONFIG_NF_TABLES_IPV6=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NONPORTABLE=y +CONFIG_NO_HZ_IDLE=y +CONFIG_NTFS_FS=m +CONFIG_NTFS_RW=y +CONFIG_OF_CONFIGFS=y +CONFIG_OVERLAY_FS=m +CONFIG_OVERLAY_FS_INDEX=y +CONFIG_OVERLAY_FS_METACOPY=y +CONFIG_OVERLAY_FS_XINO_AUTO=y +CONFIG_PACKET=y +CONFIG_PAGE_REPORTING=y +CONFIG_PCI=y +CONFIG_PCIE_STARFIVE_HOST=y +CONFIG_PERF_EVENTS=y +CONFIG_PHY_M31_DPHY_RX0=y +CONFIG_PHY_STARFIVE_JH7110_PCIE=y +CONFIG_PHY_STARFIVE_JH7110_USB=y +CONFIG_PM_ADVANCED_DEBUG=y +CONFIG_PM_DEBUG=y +CONFIG_PM_DEVFREQ=y +CONFIG_PM_STD_PARTITION="PARTLABEL=hibernation" +CONFIG_PM_TEST_SUSPEND=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_GPIO_RESTART=y +CONFIG_POWER_RESET_SYSCON=y +CONFIG_POWER_RESET_SYSCON_POWEROFF=y +CONFIG_PRINTK_TIME=y +CONFIG_PWM=y +CONFIG_PWM_OCORES=y +CONFIG_R8169=y +CONFIG_RAS=y +CONFIG_RCU_EQS_DEBUG=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_AXP20X=y +CONFIG_REGULATOR_GPIO=y +CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY=y +CONFIG_RISCV_SBI_CPUIDLE=y +CONFIG_ROOT_NFS=y +CONFIG_RPMSG_CHAR=y +CONFIG_RPMSG_VIRTIO=n +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_GOLDFISH=y +CONFIG_RTC_DRV_STARFIVE=y +CONFIG_SATA_AHCI=y +CONFIG_SCHEDSTATS=y +CONFIG_SCSI_VIRTIO=y +CONFIG_SENSORS_SFCTEMP=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_DW=y +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_MANY_PORTS=y +CONFIG_SERIAL_8250_NR_UARTS=6 +CONFIG_SERIAL_8250_RUNTIME_UARTS=6 +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_SERIO_LIBPS2=y +CONFIG_SIFIVE_CCACHE=y +CONFIG_SMB_SERVER=m +CONFIG_SMP=y +CONFIG_SND=y +CONFIG_SND_DESIGNWARE_I2S=y +CONFIG_SND_SIMPLE_CARD=y +CONFIG_SND_SOC=y +CONFIG_SND_SOC_AC108=y +CONFIG_SND_SOC_JH7110_PWMDAC=y +CONFIG_SND_SOC_JH7110_TDM=y +CONFIG_SND_SOC_RZ=m +CONFIG_SND_SOC_STARFIVE=y +CONFIG_SND_SOC_WM8960=y +CONFIG_SND_USB_AUDIO=y +CONFIG_SOC_STARFIVE=y +CONFIG_SOFTLOCKUP_DETECTOR=y +CONFIG_SOUND=y +CONFIG_SPI=y +CONFIG_SPI_CADENCE_QUADSPI=y +CONFIG_SPI_PL022=y +CONFIG_SPI_SIFIVE=y +CONFIG_SPI_SPIDEV=y +CONFIG_STARFIVE_DSI=y +CONFIG_STARFIVE_INNO_HDMI=y +CONFIG_STARFIVE_MBOX=m +CONFIG_STARFIVE_MBOX_TEST=n +CONFIG_STMMAC_ETH=y +CONFIG_STMMAC_SELFTESTS=y +CONFIG_SYSVIPC=y +CONFIG_THERMAL=y +CONFIG_THERMAL_EMULATION=y +CONFIG_THERMAL_WRITABLE_TRIPS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_TOUCHSCREEN_GOODIX=m +CONFIG_TOUCHSCREEN_TINKER_FT5406=m +CONFIG_TTY_PRINTK=y +CONFIG_TUN=m +CONFIG_UHID=m +CONFIG_UNIX=y +CONFIG_USB=y +CONFIG_USB_CDNS3=y +CONFIG_USB_CDNS3_GADGET=y +CONFIG_USB_CDNS3_HOST=y +CONFIG_USB_CDNS3_STARFIVE=y +CONFIG_USB_CDNS_SUPPORT=y +CONFIG_USB_CONFIGFS=y +CONFIG_USB_CONFIGFS_ACM=y +CONFIG_USB_CONFIGFS_ECM=y +CONFIG_USB_CONFIGFS_ECM_SUBSET=y +CONFIG_USB_CONFIGFS_EEM=y +CONFIG_USB_CONFIGFS_F_FS=y +CONFIG_USB_CONFIGFS_MASS_STORAGE=y +CONFIG_USB_CONFIGFS_NCM=y +CONFIG_USB_CONFIGFS_OBEX=y +CONFIG_USB_CONFIGFS_RNDIS=y +CONFIG_USB_CONFIGFS_SERIAL=y +CONFIG_USB_GADGET=y +CONFIG_USB_OTG=y +CONFIG_USB_RENESAS_USBHS=y +CONFIG_USB_RENESAS_USBHS_UDC=m +CONFIG_USB_SERIAL=m +CONFIG_USB_SERIAL_AIRCABLE=m +CONFIG_USB_SERIAL_ARK3116=m +CONFIG_USB_SERIAL_BELKIN=m +CONFIG_USB_SERIAL_CH341=m +CONFIG_USB_SERIAL_CP210X=m +CONFIG_USB_SERIAL_CYBERJACK=m +CONFIG_USB_SERIAL_CYPRESS_M8=m +CONFIG_USB_SERIAL_DEBUG=m +CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +CONFIG_USB_SERIAL_EDGEPORT=m +CONFIG_USB_SERIAL_EDGEPORT_TI=m +CONFIG_USB_SERIAL_EMPEG=m +CONFIG_USB_SERIAL_F81232=m +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_IPAQ=m +CONFIG_USB_SERIAL_IPW=m +CONFIG_USB_SERIAL_IR=m +CONFIG_USB_SERIAL_IUU=m +CONFIG_USB_SERIAL_KEYSPAN=m +CONFIG_USB_SERIAL_KEYSPAN_PDA=m +CONFIG_USB_SERIAL_KLSI=m +CONFIG_USB_SERIAL_KOBIL_SCT=m +CONFIG_USB_SERIAL_MCT_U232=m +CONFIG_USB_SERIAL_METRO=m +CONFIG_USB_SERIAL_MOS7720=m +CONFIG_USB_SERIAL_MOS7840=m +CONFIG_USB_SERIAL_NAVMAN=m +CONFIG_USB_SERIAL_OMNINET=m +CONFIG_USB_SERIAL_OPTICON=m +CONFIG_USB_SERIAL_OTI6858=m +CONFIG_USB_SERIAL_PL2303=m +CONFIG_USB_SERIAL_QCAUX=m +CONFIG_USB_SERIAL_QUALCOMM=m +CONFIG_USB_SERIAL_SAFE=m +CONFIG_USB_SERIAL_SIERRAWIRELESS=m +CONFIG_USB_SERIAL_SPCP8X5=m +CONFIG_USB_SERIAL_SSU100=m +CONFIG_USB_SERIAL_SYMBOL=m +CONFIG_USB_SERIAL_TI=m +CONFIG_USB_SERIAL_VISOR=m +CONFIG_USB_SERIAL_WHITEHEAT=m +CONFIG_USB_SERIAL_WISHBONE=m +CONFIG_USB_SERIAL_XSENS_MT=m +CONFIG_USB_STORAGE=y +CONFIG_USB_UAS=y +CONFIG_USB_VIDEO_CLASS=y +CONFIG_USB_WIFI_ECR6600U=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USELIB=y +CONFIG_USER_NS=y +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_VFAT_FS=y +CONFIG_VIDEO_CADENCE_CSI2RX=y +CONFIG_VIDEO_IMX219=y +CONFIG_VIDEO_IMX708=m +CONFIG_VIDEO_STF_VIN=y +CONFIG_VIDEO_WAVE_VPU=m +CONFIG_VIN_SENSOR_IMX219=m +CONFIG_VIN_SENSOR_OV4689=m +CONFIG_VIRTIO_BLK=n +CONFIG_VIRTIO_CONSOLE=n +CONFIG_VIRTIO_FS=n +CONFIG_VIRTIO_NET=n +CONFIG_WATCHDOG=y +CONFIG_WATCHDOG_SYSFS=y +CONFIG_WERROR=n +CONFIG_WIREGUARD=m +CONFIG_WQ_WATCHDOG=y +CONFIG_ZRAM=m +CONFIG_ZRAM_DEF_COMP_ZSTD=y +CONFIG_ZSMALLOC=y +CONFIG_ZSWAP=y +CONFIG_ZSWAP_COMPRESSOR_DEFAULT_ZSTD=y \ No newline at end of file diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 1490dc7f6a..fb08611d90 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -4,11 +4,12 @@ ########################################## # Load DietPi-Globals ########################################## +Error_Exit(){ G_DIETPI-NOTIFY 1 "$1, aborting ..."; exit 1; } if [[ -f '/boot/dietpi/func/dietpi-globals' ]] then . /boot/dietpi/func/dietpi-globals else - curl -sSf "https://raw.githubusercontent.com/${G_GITOWNER:=MichaIng}/DietPi/${G_GITBRANCH:=master}/dietpi/func/dietpi-globals" -o /tmp/dietpi-globals || exit 1 + curl -sSf "https://raw.githubusercontent.com/${G_GITOWNER:=MichaIng}/DietPi/${G_GITBRANCH:=master}/dietpi/func/dietpi-globals" -o /tmp/dietpi-globals || Error_Exit 'Failed to download DietPi-Globals' # shellcheck disable=SC1091 . /tmp/dietpi-globals G_EXEC rm /tmp/dietpi-globals @@ -612,7 +613,8 @@ _EOF_ G_CONFIG_INJECT 'AUTO_SETUP_AUTOSTART_TARGET_INDEX=' 'AUTO_SETUP_AUTOSTART_TARGET_INDEX=0' rootfs/boot/dietpi.txt # Force ARMv6 arch on Raspbian - (( $HW_ARCH == 1 )) && echo 'sed --follow-symlinks -i -e '\''/^G_HW_ARCH=/c\G_HW_ARCH=1'\'' -e '\''/^G_HW_ARCH_NAME=/c\G_HW_ARCH_NAME=armv6l'\'' /boot/dietpi/.hw_model' > rootfs/boot/Automation_Custom_PreScript.sh + # shellcheck disable=SC2015 + (( $HW_ARCH > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Skip filesystem expansion G_EXEC rm rootfs/etc/systemd/system/local-fs.target.wants/dietpi-fs_partition_resize.service @@ -672,8 +674,6 @@ G_EXEC rm /etc/bashrc.d/00-dietpi-build.sh /boot/Automation_Custom_Script.sh poweroff } _EOF_ - (( $HW_ARCH == 1 )) && G_EXEC sed --follow-symlinks -i 's/Custom_Script/Custom_{Pre,}Script/' rootfs/boot/Automation_Custom_Script.sh - # Start container # - Bind mounts required to allow container reading its own drive info, /dev/disk for GRUB and probably other tools to detect UUIDs # - Skip for container images @@ -688,6 +688,9 @@ _EOF_ # Reset IPv4 network connectivity check setting G_CONFIG_INJECT 'CONFIG_CHECK_CONNECTION_IP=' 'CONFIG_CHECK_CONNECTION_IP=9.9.9.9' rootfs/boot/dietpi.txt + # Revert ARMv6 Workaround + (( $HW_ARCH == 1 )) && G_EXEC rm rootfs/usr/local/bin/uname + # Revert workaround for skipped autologin in emulated Trixie/Sid containers: https://gitlab.com/qemu-project/qemu/-/issues/1962 (( $DISTRO == 8 )) && G_EXEC rm rootfs/etc/systemd/system/{multi-user.target.wants/,}dietpi-automation.service diff --git a/.build/images/dietpi-imager b/.build/images/dietpi-imager index e4369281e0..7c5f21817e 100755 --- a/.build/images/dietpi-imager +++ b/.build/images/dietpi-imager @@ -387,7 +387,7 @@ Run_fsck # Shrink last filesystem to minimum - local last_part_dev=$(lsblk -rnpo NAME "$FP_SOURCE"?* | tail -1) + local last_part_dev=$(lsblk -rnpo NAME "$FP_SOURCE" | tail -1) local last_fs_type=$(lsblk -no FSTYPE "$last_part_dev") if [[ $last_fs_type == 'ext4' ]] then @@ -753,7 +753,7 @@ _EOF_ # Move GPT backup partition table to end of drive if [[ $CLONING_TOOL != 'Clonezilla' && $PART_TABLE_TYPE == 'gpt' ]] then - G_EXEC_DESC='Moving GPT backup partition table to end of drive' G_EXEC_OUTPUT=1 G_EXEC sgdisk -e "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT" + G_EXEC_DESC='Re-creating GPT backup partition table and header at end of image' G_EXEC_OUTPUT=1 G_EXEC sgdisk -e "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT" G_EXEC sync fi diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index ff082f29a8..f60c82ddf2 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -588,10 +588,11 @@ _EOF_ #------------------------------------------------------------------------------------------------ G_EXEC_DESC='Downloading source code' G_EXEC curl -sSfLO "https://github.com/$G_GITOWNER/DietPi/archive/$G_GITBRANCH.tar.gz" - [[ -d DietPi-$G_GITBRANCH ]] && G_EXEC_DESC='Removing old source code' G_EXEC rm -R "DietPi-$G_GITBRANCH" - G_EXEC_DESC='Unpacking source code' G_EXEC tar xf "$G_GITBRANCH.tar.gz" - G_EXEC_DESC='Removing unused files' G_EXEC rm -f "$G_GITBRANCH.tar.gz" "DietPi-$G_GITBRANCH/dietpi/"{pre-patch_file,patch_file,server_version-6} - G_EXEC_DESC='Hardening source code mode' G_EXEC chmod -R g-w "DietPi-$G_GITBRANCH" + local dir="DietPi-${G_GITBRANCH//\//-}" # GitHub translates forward slashes into dashes + [[ -d $dir ]] && G_EXEC_DESC='Removing old source code' G_EXEC rm -R "$dir" + G_EXEC_DESC='Unpacking source code' G_EXEC tar xf "${G_GITBRANCH##*/}.tar.gz" # Support for Git branch names with forward slashes + G_EXEC_DESC='Removing unused files' G_EXEC rm -f "${G_GITBRANCH##*/}.tar.gz" "$dir/"{pre-patch_file,patch_file,server_version-6} + G_EXEC_DESC='Hardening update archive mode' G_EXEC chmod -R g-w "$dir" [[ -d '/boot' ]] || G_EXEC mkdir /boot @@ -605,9 +606,9 @@ _EOF_ then G_EXEC ln -sf firmware/cmdline.txt /boot/cmdline.txt G_EXEC ln -sf firmware/config.txt /boot/config.txt - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/RPi/config.txt" /boot/firmware/ + G_EXEC mv "$dir/.build/images/RPi/config.txt" /boot/firmware/ else - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/RPi/config.txt" /boot/ + G_EXEC mv "$dir/.build/images/RPi/config.txt" /boot/ fi echo "root=PARTUUID=$(findmnt -Ufnro PARTUUID -M /) rootfstype=$(findmnt -Ufnro FSTYPE -M /) rootwait net.ifnames=0 logo.nologo console=serial0,115200 console=tty1" > /boot/cmdline.txt # Boot in 64-bit mode if this is a 64-bit image @@ -618,26 +619,26 @@ _EOF_ armbian_packages=1 local model='OdroidC1' (( $G_HW_MODEL == 11 )) && model='OdroidXU4' - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/$model/boot.ini" /boot/boot.ini + G_EXEC mv "$dir/.build/images/$model/boot.ini" /boot/boot.ini G_EXEC sed --follow-symlinks -i "s/root=[^[:blank:]]*/root=UUID=$(findmnt -Ufnro UUID -M /)/" /boot/boot.ini G_EXEC sed --follow-symlinks -i "s/rootfstype=[^[:blank:]]*/rootfstype=$(findmnt -Ufnro FSTYPE -M /)/" /boot/boot.ini G_EXEC mkdir -p /etc/kernel/post{inst,rm}.d /etc/initramfs/post-update.d - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/dietpi-initramfs_cleanup" /etc/kernel/postinst.d/dietpi-initramfs_cleanup + G_EXEC mv "$dir/.build/images/U-Boot/dietpi-initramfs_cleanup" /etc/kernel/postinst.d/dietpi-initramfs_cleanup G_EXEC ln -sf /etc/kernel/post{inst,rm}.d/dietpi-initramfs_cleanup - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot + G_EXEC mv "$dir/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot G_EXEC sed --follow-symlinks -i 's/arm64/arm/' /etc/initramfs/post-update.d/99-dietpi-uboot elif [[ $G_HW_MODEL =~ ^(12|15|16|40|42|43|44|45|46|47|48|52|54|55|56|57|58|59|60|62|63|64|65|66|67|68|72|73|74|76|77|78|79|80|82|83|85|86|87|88|89|90)$ ]] then armbian_packages=1 - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/boot.cmd" /boot/boot.cmd - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/dietpiEnv.txt" /boot/dietpiEnv.txt + G_EXEC mv "$dir/.build/images/U-Boot/boot.cmd" /boot/boot.cmd + G_EXEC mv "$dir/.build/images/U-Boot/dietpiEnv.txt" /boot/dietpiEnv.txt G_CONFIG_INJECT 'rootdev=' "rootdev=UUID=$(findmnt -Ufnro UUID -M /)" /boot/dietpiEnv.txt G_CONFIG_INJECT 'rootfstype=' "rootfstype=$(findmnt -Ufnro FSTYPE -M /)" /boot/dietpiEnv.txt G_EXEC mkdir -p /etc/kernel/post{inst,rm}.d /etc/initramfs/post-update.d - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/dietpi-initramfs_cleanup" /etc/kernel/postinst.d/dietpi-initramfs_cleanup + G_EXEC mv "$dir/.build/images/U-Boot/dietpi-initramfs_cleanup" /etc/kernel/postinst.d/dietpi-initramfs_cleanup G_EXEC ln -sf /etc/kernel/post{inst,rm}.d/dietpi-initramfs_cleanup - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot + G_EXEC mv "$dir/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot # Odroid C2: Fix USB device detection: https://github.com/MichaIng/DietPi/issues/5963 if (( $G_HW_MODEL == 12 )) then @@ -688,7 +689,13 @@ setenv rootuuid "true"' /boot/boot.cmd 73) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3308-rock-pi-s.dtb' /boot/dietpiEnv.txt;; # U-Boot does not pass any ${fdtfile} 77) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3568-rock-3a.dtb' /boot/dietpiEnv.txt;; 78) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588-rock-5b.dtb' /boot/dietpiEnv.txt;; - 79) (( $HW_VARIANT == 2 )) && G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-nanopi-r6c.dtb' /boot/dietpiEnv.txt;; + 79) + case $HW_VARIANT in + 1) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-nanopi-r6s.dtb' /boot/dietpiEnv.txt;; + 2) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-nanopi-r6c.dtb' /boot/dietpiEnv.txt;; + *) :;; + esac + ;; 85) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-rock-5a.dtb' /boot/dietpiEnv.txt;; 87) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3566-orangepi-3b.dtb' /boot/dietpiEnv.txt;; *) :;; @@ -781,7 +788,7 @@ setenv rootuuid "true"' /boot/boot.cmd # NanoPi M3/T3/Fire3 (64-bit) elif (( $G_HW_MODEL == 62 )) then - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/NanoPiM3/boot.cmd" /boot/boot.cmd + G_EXEC mv "$dir/.build/images/NanoPiM3/boot.cmd" /boot/boot.cmd G_EXEC sed --follow-symlinks -i '/overlay/d' /boot/dietpiEnv.txt G_EXEC sed --follow-symlinks -i 's/ttyAML0/ttySAC0/' /boot/dietpiEnv.txt fi @@ -790,20 +797,20 @@ setenv rootuuid "true"' /boot/boot.cmd # shellcheck disable=SC2016 [[ -f '/etc/initramfs/post-update.d/99-dietpi-uboot' && $(findmnt -t vfat -M /boot) ]] && G_EXEC sed --follow-symlinks -i '/^ln -s/c\mv -v "/boot/uInitrd-$1" /boot/uInitrd' /etc/initramfs/post-update.d/99-dietpi-uboot # FAT does not support symlinks - G_EXEC mv "DietPi-$G_GITBRANCH/dietpi.txt" /boot/ - G_EXEC mv "DietPi-$G_GITBRANCH/README.md" /boot/dietpi-README.md - G_EXEC mv "DietPi-$G_GITBRANCH/LICENSE" /boot/dietpi-LICENSE.txt + G_EXEC mv "$dir/dietpi.txt" /boot/ + G_EXEC mv "$dir/README.md" /boot/dietpi-README.md + G_EXEC mv "$dir/LICENSE" /boot/dietpi-LICENSE.txt # Reading version string for later use # shellcheck source=.update/version source=/boot/dietpi/.version - . "DietPi-$G_GITBRANCH/.update/version" + . "$dir/.update/version" G_DIETPI_VERSION_CORE=$G_REMOTE_VERSION_CORE G_DIETPI_VERSION_SUB=$G_REMOTE_VERSION_SUB G_DIETPI_VERSION_RC=$G_REMOTE_VERSION_RC - G_EXEC_DESC='Copy DietPi scripts to /boot/dietpi' G_EXEC cp -a "DietPi-$G_GITBRANCH/dietpi" /boot/ - G_EXEC_DESC='Copy DietPi system files in place' G_EXEC cp -a "DietPi-$G_GITBRANCH/rootfs/." / - G_EXEC_DESC='Clean download location' G_EXEC rm -R "DietPi-$G_GITBRANCH" + G_EXEC_DESC='Copy DietPi scripts to /boot/dietpi' G_EXEC cp -a "$dir/dietpi" /boot/ + G_EXEC_DESC='Copy DietPi system files in place' G_EXEC cp -a "$dir/rootfs/." / + G_EXEC_DESC='Clean download location' G_EXEC rm -R "$dir" G_DIETPI-NOTIFY 2 'Storing DietPi version info:' G_CONFIG_INJECT 'DEV_GITBRANCH=' "DEV_GITBRANCH=$G_GITBRANCH" /boot/dietpi.txt @@ -1043,42 +1050,23 @@ setenv rootuuid "true"' /boot/boot.cmd [[ -f '/etc/apt/trusted.gpg~' ]] && G_EXEC rm '/etc/apt/trusted.gpg~' # Remove obsolete lists - find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -Rf {} + + find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -Rv {} + - if [[ $G_GITBRANCH == 'master' ]] + if dpkg --compare-versions "$(dpkg-query -Wf '${Version}' base-files)" gt 20 then - # Prevent any unintended packages from being installed from Armbian's APT repository, like base-files: https://github.com/MichaIng/DietPi/issues/6227#issuecomment-1713688577 - cat << '_EOF_' > /etc/apt/preferences.d/dietpi-armbian -Package: * -Pin: origin apt.armbian.com -Pin-Priority: -1 - -Package: armbian-firmware* linux-* -Pin: origin apt.armbian.com -Pin-Priority: 500 -_EOF_ - if dpkg --compare-versions "$(dpkg-query -Wf '${Version}' base-files)" gt 20 - then - G_DIETPI-NOTIFY 2 'Enforcing downgrade of Armbian'\''s base-files package to Debian'\''s' - cat << '_EOF_' > /etc/apt/preferences.d/dietpi-armbian-tmp + G_DIETPI-NOTIFY 2 'Enforcing downgrade of Armbian'\''s base-files package to Debian'\''s' + cat << '_EOF_' > /etc/apt/preferences.d/dietpi-armbian-tmp Package: base-files Pin: release o=Debian Pin-Priority: 1000 _EOF_ - G_EXEC eval 'echo '\''APT::Get::Allow-Downgrades "1";'\'' > /etc/apt/apt.conf.d/dietpi-armbian' - fi - - # Bootstrap Armbian repository - G_EXEC_RETRIES=2 G_EXEC eval 'curl -sSfL '\''https://apt.armbian.com/armbian.key'\'' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-armbian.gpg --yes' - - # Add Armbian repository - G_EXEC eval "echo 'deb https://apt.armbian.com ${DISTRO_TARGET_NAME/bullseye/bookworm} main' > /etc/apt/sources.list.d/dietpi-armbian.list" + G_EXEC eval 'echo '\''APT::Get::Allow-Downgrades "1";'\'' > /etc/apt/apt.conf.d/dietpi-armbian' fi # Select kernel, device tree and U-Boot packages local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() case $G_HW_MODEL in - 10) model='odroidc1' kernel='meson' arch='arm';; + 10) model='odroidc1' kernel='meson' arch='arm' branch='edge';; 11) model='odroidxu4' kernel='odroidxu4' arch='arm';; 12) model='odroidc2';; 16) model='odroidc4';; @@ -1132,17 +1120,17 @@ _EOF_ *) model='nanopi-r5s';; esac;; 77) model='rock-3a' kernel='rockchip64';; - 78) model='rock-5b' kernel='rk35xx' branch='legacy';; - 79) kernel='rk35xx' branch='legacy' + 78) model='rock-5b' kernel='rk35xx' branch='vendor';; + 79) kernel='rk35xx' branch='vendor' case $HW_VARIANT in 2) model='nanopi-r6c';; 3) model='nanopct6';; *) model='nanopi-r6s';; esac;; - 80) model='orangepi5' kernel='rk35xx' branch='legacy';; - 82) model='orangepi5-plus' kernel='rk35xx' branch='legacy';; + 80) model='orangepi5' kernel='rk35xx' branch='vendor';; + 82) model='orangepi5-plus' kernel='rk35xx' branch='vendor';; 83) model='orangepizero3' kernel='sunxi64';; - 85) model='rock-5a' kernel='rk35xx' branch='legacy';; + 85) model='rock-5a' kernel='rk35xx' branch='vendor';; 86) model='tinkerboard-2' kernel='rockchip64';; 87) model='orangepi3b' kernel='rockchip64' branch='edge';; 88) model='orangepizero2w' kernel='sunxi64';; @@ -1422,7 +1410,7 @@ _EOF_ [[ -f '/etc/apt/trusted.gpg~' ]] && G_EXEC rm '/etc/apt/trusted.gpg~' # Remove obsolete components from Armbian list and connect via HTTPS - find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -Rf {} + + find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -Rv {} + G_EXEC eval "echo 'deb https://apt.armbian.com ${DISTRO_TARGET_NAME/bullseye/bookworm} main' > /etc/apt/sources.list.d/dietpi-armbian.list" # Skip creating kernel symlinks and remove existing ones @@ -1792,7 +1780,10 @@ _EOF_' G_AGP rfkill [[ -d '/var/lib/systemd/rfkill' ]] && G_EXEC rm -R /var/lib/systemd/rfkill - G_DIETPI-NOTIFY 2 'Configuring wlan/eth naming to be preferred for networked devices:' + G_DIETPI-NOTIFY 2 'Removing all systemd-networkd configs, since DietPi uses ifupdown by default' # https://github.com/MichaIng/DietPi/issues/5871 + G_EXEC rm -Rf /etc/systemd/network/{,.??,.[^.]}* + + G_DIETPI-NOTIFY 2 'Avoid "predictable" network interface names' G_EXEC ln -sf /dev/null /etc/systemd/network/99-default.link G_EXEC ln -sf /dev/null /etc/udev/rules.d/80-net-setup-link.rules diff --git a/.build/software/Amiberry/container_build.bash b/.build/software/Amiberry/container_build.bash index c2c8cd7d8e..92d7f0e222 100755 --- a/.build/software/Amiberry/container_build.bash +++ b/.build/software/Amiberry/container_build.bash @@ -114,7 +114,8 @@ G_EXEC mkdir rootfs G_EXEC mount "${FP_LOOP}p1" rootfs # Enforce ARMv6 arch on Raspbian -(( $arch > 1 )) || echo 'sed --follow-symlinks -i -e '\''/^G_HW_ARCH=/c\G_HW_ARCH=1'\'' -e '\''/^G_HW_ARCH_NAME=/c\G_HW_ARCH_NAME=armv6l'\'' /boot/dietpi/.hw_model' > rootfs/boot/Automation_Custom_PreScript.sh || Error_Exit 'Failed to generate Automation_Custom_PreScript.sh' +# shellcheck disable=SC2015 +(( $arch > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Enable automated setup G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt diff --git a/.build/software/dietpi-software-build.bash b/.build/software/dietpi-software-build.bash index 554c274e1f..906e79a3da 100644 --- a/.build/software/dietpi-software-build.bash +++ b/.build/software/dietpi-software-build.bash @@ -118,7 +118,8 @@ G_EXEC mkdir rootfs G_EXEC mount "${FP_LOOP}p1" rootfs # Enforce ARMv6 arch on Raspbian -(( $arch > 1 )) || echo 'sed --follow-symlinks -i -e '\''/^G_HW_ARCH=/c\G_HW_ARCH=1'\'' -e '\''/^G_HW_ARCH_NAME=/c\G_HW_ARCH_NAME=armv6l'\'' /boot/dietpi/.hw_model' > rootfs/boot/Automation_Custom_PreScript.sh || Error_Exit 'Failed to generate Automation_Custom_PreScript.sh' +# shellcheck disable=SC2015 +(( $arch > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Enable automated setup G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index e654a48838..e4fef8ee6d 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -72,13 +72,13 @@ jobs: read -r version < VERSION case '${{ github.event.inputs.asset }}' in firmware) package='armbian-firmware';; - uboot) package='linux-uboot-${{ github.event.inputs.board }}-${{ github.event.inputs.branch }}';; + uboot) package='linux-u-boot-${{ github.event.inputs.board }}-${{ github.event.inputs.branch }}';; kernel) family=$(. 'config/boards/${{ github.event.inputs.board }}.'* &> /dev/null; echo "$BOARDFAMILY") echo "Board family is: $family" family=$(BRANCH='${{ github.event.inputs.branch }}'; . "config/sources/families/$family.conf" &> /dev/null; echo "$LINUXFAMILY") echo "Linux family is: $family" - package="linux-image-${{ github.event.inputs.branch }}-$family" + package="linux-dtb-${{ github.event.inputs.branch }}-$family" ;; *) echo 'ERROR: Invalid asset "${{ github.event.inputs.asset }}"'; exit 1;; esac diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 28882c83ad..96d5b46c79 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -4,11 +4,12 @@ ########################################## # Load DietPi-Globals ########################################## +Error_Exit(){ G_DIETPI-NOTIFY 1 "$1, aborting ..."; exit 1; } if [[ -f '/boot/dietpi/func/dietpi-globals' ]] then . /boot/dietpi/func/dietpi-globals else - curl -sSf "https://raw.githubusercontent.com/${G_GITOWNER:=MichaIng}/DietPi/${G_GITBRANCH:=master}/dietpi/func/dietpi-globals" -o /tmp/dietpi-globals || exit 1 + curl -sSf "https://raw.githubusercontent.com/${G_GITOWNER:=MichaIng}/DietPi/${G_GITBRANCH:=master}/dietpi/func/dietpi-globals" -o /tmp/dietpi-globals || Error_Exit 'Failed to download DietPi-Globals' # shellcheck disable=SC1091 . /tmp/dietpi-globals G_EXEC rm /tmp/dietpi-globals @@ -179,7 +180,7 @@ Process_Software() 139) aSERVICES[i]='sabnzbd' aTCP[i]='8080'; (( $arch == 10 )) || aDELAY[i]=30;; # ToDo: Solve conflict with Airsonic 140) aSERVICES[i]='domoticz' aTCP[i]='8124 8424';; #142) aSERVICES[i]='snapd';; "system does not fully support snapd: cannot mount squashfs image using "squashfs": mount: /tmp/syscheck-mountpoint-2075108377: mount failed: Operation not permitted." - 143) aSERVICES[i]='koel' aTCP[i]='8003';; + 143) aSERVICES[i]='koel' aTCP[i]='8003'; (( $arch == 10 )) || aDELAY[i]=30;; 144) aSERVICES[i]='sonarr' aTCP[i]='8989'; (( $arch < 10 )) && aDELAY[i]=90;; 145) aSERVICES[i]='radarr' aTCP[i]='7878'; (( $arch < 10 )) && aDELAY[i]=90;; 146) aSERVICES[i]='tautulli' aTCP[i]='8181'; (( $arch == 10 )) || aDELAY[i]=60;; @@ -318,7 +319,8 @@ G_EXEC mkdir rootfs G_EXEC mount "${FP_LOOP}p1" rootfs # Force ARMv6 arch on Raspbian -(( $arch == 1 )) && G_EXEC sed --follow-symlinks -i '/# Start DietPi-Software/iG_EXEC sed -i -e '\''/^G_HW_ARCH=/cG_HW_ARCH=1'\'' -e '\''/^G_HW_ARCH_NAME=/cG_HW_ARCH_NAME=armv6l'\'' /boot/dietpi/.hw_model' rootfs/boot/dietpi/dietpi-login +# shellcheck disable=SC2015 +(( $arch > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Force RPi on ARM systems if requested if [[ $RPI == 'true' ]] && (( $arch < 10 )) diff --git a/.github/workflows/visionfive2.yml b/.github/workflows/visionfive2.yml new file mode 100644 index 0000000000..d8cc16ae64 --- /dev/null +++ b/.github/workflows/visionfive2.yml @@ -0,0 +1,84 @@ +name: visionfive2 +on: workflow_dispatch +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +permissions: {} +jobs: + build: + # https://github.com/actions/runner-images + runs-on: ubuntu-24.04 + env: + CROSS_COMPILE: 'aarch64-linux-gnu-' + ARCH: 'arm64' + steps: + - uses: actions/setup-python@v5 + with: + python-version: '3.x' + check-latest: true + - name: Build init + run: | + { sudo apt-get -q update; sudo DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -qq install make gcc libc6-dev flex bison gcc-riscv64-linux-gnu bc libssl-dev; } & + { curl -fO 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/snapshot/linux-6.11-rc2.tar.gz'; tar xf linux-6.11-rc2.tar.gz; rm llinux-6.11-rc2.tar.gz; } & + wait + curl -sSfo linux-6.11-rc2/arch/riscv64/configs/visionfive2_defconfig "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/$GITHUB_REF_NAME/.build/images/VisionFive2/visionfive2_defconfig" & + rm -Rf linux-image-visionfive2 + mkdir -p linux-image-visionfive2/DEBIAN linux-image-visionfive2/boot/extlinux + wait + - name: Build Linux + run: | + cd linux-6.11-rc2 + make visionfive2_defconfig + make -j$(nproc) + cp arch/riscv64/boot/Image.gz ../linux-image-visionfive2/boot/vmlinuz + mv arch/riscv64/boot/dts/rockchip/rk3566-quartz64-a.dtb ../linux-image-visionfive2/boot/ + make modules_install INSTALL_MOD_PATH='../linux-image-visionfive2' + cd .. + rm linux-image-visionfive2/lib/modules/*/build + - name: Build package + run: | + version=$(mawk '/^VERSION =/{a=$3};/^PATCHLEVEL =/{b=$3};/^SUBLEVEL/{c=$3};END{print a"."b"."c}' linux-6.11-rc2/Makefile) + rm -R linux-6.11-rc2 + curl -sSfO 'https://dietpi.com/downloads/binaries/linux-image-visionfive2.deb' & + curl -sSfo linux-image-visionfive2/lib/firmware/brcm/brcmfmac43455-sdio.txt 'https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/brcm/brcmfmac43455-sdio.AW-CM256SM.txt' & + wait + cur_version=$(dpkg-deb -f linux-image-visionfive2.deb Version) + rm linux-image-visionfive2.deb + cur_suffix=${cur_version#*-dietpi} + echo "Current package version is: $cur_version" + echo "New kernel version is: $version" + [ "$version-dietpi$cur_suffix" = "$cur_version" ] && version="$version-dietpi$((cur_suffix+1))" || version="$version-dietpi1" + echo "New package version will be: $version" + cat << '_EOF_' > linux-image-visionfive2/boot/extlinux/extlinux.conf + label DietPi + linux /boot/vmlinuz + fdt /boot/rk3566-quartz64-a.dtb + append root=/dev/mmcblk0p1 rootfstype=ext4 rootwait earlycon=uart8250,mmio32,0xfe660000 console=ttyS2,1500000n8 console=tty1 consoleblank=0 net.ifnames=0 + _EOF_ + echo '/boot/extlinux/extlinux.conf' > linux-image-visionfive2/DEBIAN/conffiles + find linux-image-visionfive2 ! \( -path linux-image-visionfive2/DEBIAN -prune \) -type f -exec md5sum {} + | sed 's|linux-image-visionfive2/||' > linux-image-visionfive2/DEBIAN/md5sums + cat << _EOF_ > linux-image-visionfive2/DEBIAN/control + Package: linux-image-visionfive2 + Version: $version + Architecture: arm64 + Maintainer: MichaIng + Date: $(date -u '+%a, %d %b %Y %T %z') + Standards-Version: 4.6.2.0 + Installed-Size: $(du -sk 'linux-image-visionfive2' | mawk '{print $1}') + Section: kernel + Priority: optional + Description: Linux kernel and U-Boot bootloader for Quartz64 Model A + _EOF_ + sed --follow-symlinks -i "/^Installed-Size:/c\Installed-Size: $(du -sk 'linux-image-visionfive2' | mawk '{print $1}')" linux-image-visionfive2/DEBIAN/control + sudo chown -R root:root linux-image-visionfive2 + dpkg-deb -b -Zxz -z9 -Sextreme linux-image-visionfive2 + sudo rm -R linux-image-visionfive2 + - name: Upload + run: | + [ -d ~/.ssh ] || mkdir ~/.ssh + umask 377 + echo '${{ secrets.KNOWN_HOSTS }}' > ~/.ssh/known_hosts + echo '${{ secrets.SSH_KEY }}' > ~/.ssh/id_ed25519 + curl -T "flinux-image-visionfive2.deb" --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}all/' + curl 'https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE }}/purge_cache' -H 'Authorization: Bearer ${{ secrets.CF_TOKEN }}' -H 'Content-Type: application/json' \ + --data '{"files":["https://dietpi.com/downloads/binaries/testing/","https://dietpi.com/downloads/binaries/testing/linux-image-visionfive2.deb"]}' diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index c13944aa27..0c4e7c5a02 100755 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -728,8 +728,14 @@ shopt -s extglob done aSOFTWARE_NAME9_6[213]='soju' + aSOFTWARE_NAME9_7=() + for i in "${!aSOFTWARE_NAME9_6[@]}" + do + aSOFTWARE_NAME9_7[i]=${aSOFTWARE_NAME9_6[i]} + done + # Pre-create software counter array so that we can see also software (available in newest version) with 0 installs - for i in "${aSOFTWARE_NAME9_6[@]}" + for i in "${aSOFTWARE_NAME9_7[@]}" do aSOFTWARE[$i]=0 done diff --git a/.update/patches b/.update/patches index 58d384991b..5cc61dc3ab 100755 --- a/.update/patches +++ b/.update/patches @@ -1690,7 +1690,7 @@ Patch_9_6() then HW_VARIANT=2 /boot/dietpi/func/dietpi-set_software apt-mirror dietpi G_AGUP - G_AGI linux-u-boot-nanopi-r6c-legacy + G_AGI linux-u-boot-nanopi-r6c-vendor # Odroid XU4/Meson: Install zstd for better compressed initramfs images elif dpkg-query -s 'linux-image-current-odroidxu4' &> /dev/null || dpkg-query -s 'linux-image-edge-odroidxu4' &> /dev/null || dpkg-query -s 'linux-image-current-meson' &> /dev/null || dpkg-query -s 'linux-image-edge-meson' &> /dev/null @@ -1739,6 +1739,229 @@ _EOF_ fi } +Patch_9_7() +{ + # Odroid C1: Migrate to edge kernel, which fixes USB: https://github.com/MichaIng/DietPi/issues/7089 + if (( $G_HW_MODEL == 10 )) && dpkg-query -s 'linux-image-current-meson' &> /dev/null && ! dpkg-query -s 'linux-image-edge-meson' &> /dev/null && ! dpkg-query -s 'linux-image-legacy-meson' &> /dev/null + then + G_DIETPI-NOTIFY 2 'Migrating to edge kernel to fix USB support' + G_AGI linux-{image,dtb}-edge-meson linux-u-boot-odroidc1-edge + dpkg-query -s 'linux-headers-edge-meson' &> /dev/null && G_AGI linux-headers-edge-meson + dpkg-query -s 'linux-libc-dev-edge-meson' &> /dev/null && G_AGI linux-libc-dev-edge-meson + G_AGP linux-{image,dtb,headers,libc-dev}-edge-meson + # The /boot/dtb symlink has been found to be missing after kernel removed, despite a newer kernel being installed already. Assure it is present and correct. + [[ $(realpath '/boot/dtb') == '/boot/dtb-6.'* ]] || G_EXEC ln -sf /boot/dtb-6.* /boot/dtb + + # RK3588 migration to vendor kernel + elif (( $G_HW_CPUID == 11 )) && dpkg-query -s 'linux-image-legacy-rk35xx' &> /dev/null && ! dpkg-query -s 'linux-image-vendor-rk35xx' &> /dev/null + then + if G_WHIP_DEFAULT_ITEM='yes' G_WHIP_YESNO '[ INFO ] Major kernel upgrade to Linux 6.1 available +\nFor RK3588 SoC SBCs, we offer a major kernel upgrade to Linux 6.1, base on a new Rockchip kernel source which should provide not only new kernel features, but higher quality as well, compared to the old Rockchip Linux 5.10 legacy kernel. +\nHowever, while we are not aware of any left issues, it is still good to have a backup in place, and we do not enforce the upgrade. You can do it any time later. +\nDo you want to migrate to the new Linux 6.1 kernel now?' + then + G_AGI linux-{image,dtb}-vendor-rk35xx + dpkg-query -s 'linux-headers-legacy-rk35xx' &> /dev/null && G_AGI linux-headers-vendor-rk35xx + dpkg-query -s 'linux-libc-dev-legacy-rk35xx' &> /dev/null && G_AGI linux-libc-dev-vendor-rk35xx + G_AGP linux-{image,dtb,headers,libc-dev}-legacy-rk35xx + # The /boot/dtb symlink has been found to be missing after kernel removed, despite a newer kernel being installed already. Assure it is present and correct. + [[ $(realpath '/boot/dtb') == '/boot/dtb-6.1.'* ]] || G_EXEC ln -sf /boot/dtb-6.1.* /boot/dtb + # Migrate U-Boot as well + case $G_HW_MODEL in + 78) G_AGI linux-u-boot-rock-5b-vendor;; + 79) + if dpkg-query -s 'linux-u-boot-nanopi-r6s-legacy' &> /dev/null + then + G_AGI linux-u-boot-nanopi-r6s-vendor + + elif dpkg-query -s 'linux-u-boot-nanopi-r6c-legacy' &> /dev/null + then + G_AGI linux-u-boot-nanopi-r6c-vendor + + elif dpkg-query -s 'linux-u-boot-nanopct6-legacy' &> /dev/null + then + G_AGI linux-u-boot-nanopct6-vendor + fi + ;; + 80) G_AGI linux-u-boot-orangepi5-vendor;; + 82) G_AGI linux-u-boot-orangepi5-plus-vendor;; + 85) G_AGI linux-u-boot-rock-5a-vendor;; + *) :;; + esac + fi + + # NanoPi R5S/R6S migration from legacy image with 8 partitions to Armbian-based kernel and bootloader + elif [[ $G_HW_MODEL == 76 ]] && dpkg-query -s 'firmware-nanopi5' &> /dev/null + then + local rmodel + read -r rmodel < /proc/device-tree/model + case $rmodel in + *R5S*) HW_VARIANT=1 /boot/dietpi/func/dietpi-set_software apt-mirror dietpi; local model='nanopi-r5s';; + *R5C*) HW_VARIANT=2 /boot/dietpi/func/dietpi-set_software apt-mirror dietpi; local model='nanopi-r5c';; + *) G_DIETPI-NOTIFY 1 'No known SBC model detected'; exit 1;; + esac + G_AGUP + if G_WHIP_DEFAULT_ITEM='yes' G_WHIP_YESNO '[ INFO ] Major kernel and bootloader upgrade available +\nFor the NanoPi R5S/R5C, we offer a major kernel upgrade to Linux 6.6, based on a new Rockchip kernel source which should provide not only new kernel features, but higher quality as well, compared to the old Rockchip Linux 5.10 legacy kernel. +\nAdditionally, compared to the previously hidden kernel image and boot config on the first 7 partitions, the new image and configs will stored and available within the /boot partition, so that kernel command-line parameters can be adjusted. Also kernel headers are available to compile new kernel modules. +\nThis implies flashing a new bootloader image, which reads boot scripts from the root partition. +\nHowever, while we are not aware of any left issues, it is still good to have a backup in place, and we do not enforce the upgrade. You can do it any time later. +\nDo you want to migrate to the new Linux 6.6 kernel now?' + then + # Safety checks + if [[ $G_ROOTFS_DEV != *'8' ]] + then + G_DIETPI-NOTIFY 1 "Root filesystem is not located on partition 8 as intended, but \"$G_ROOTFS_DEV\" instead. Aborting, please report at: https://github.com/MichaIng/DietPi/issues" + exit 1 + + elif [[ $(partx -rgo START "$G_ROOTFS_DEV") != 286720 ]] + then + G_DIETPI-NOTIFY 1 "Root partition does not start at sector 286720 as intended, but \"$(lsblk -no START "$G_ROOTFS_DEV")\" instead. Aborting, please report at: https://github.com/MichaIng/DietPi/issues" + exit 1 + fi + # Install boot scripts and configs + local dir="../DietPi-Update/DietPi-${G_GITBRANCH//\//-}" # GitHub translates forward slashes into dashes + G_EXEC mv "$dir/.build/images/U-Boot/boot.cmd" /boot/boot.cmd + G_EXEC mv "$dir/.build/images/U-Boot/dietpiEnv.txt" /boot/dietpiEnv.txt + G_CONFIG_INJECT 'rootdev=' "rootdev=UUID=$(findmnt -Ufnro UUID -M /)" /boot/dietpiEnv.txt + G_CONFIG_INJECT 'rootfstype=' "rootfstype=$(findmnt -Ufnro FSTYPE -M /)" /boot/dietpiEnv.txt + G_EXEC mkdir -p /etc/kernel/post{inst,rm}.d /etc/initramfs/post-update.d + G_EXEC mv "$dir/.build/images/U-Boot/dietpi-initramfs_cleanup" /etc/kernel/postinst.d/dietpi-initramfs_cleanup + G_EXEC ln -sf /etc/kernel/post{inst,rm}.d/dietpi-initramfs_cleanup + G_EXEC mv "$dir/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot + G_EXEC sed --follow-symlinks -Ei '/^setenv (kernel|fdt)_addr_r/d' /boot/boot.cmd + G_CONFIG_INJECT 'setenv scriptaddr ' 'setenv scriptaddr "0x9000000"' /boot/boot.cmd + G_CONFIG_INJECT 'overlay_path=' 'overlay_path=rockchip' /boot/dietpiEnv.txt + # Overlay prefix + G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rockchip' /boot/dietpiEnv.txt + # Console args + G_EXEC sed --follow-symlinks -i 's/ttyAML0,115200/ttyS2,1500000/' /boot/dietpiEnv.txt + # Packages + G_EXEC eval 'echo '\''do_symlinks=0'\'' > /etc/kernel-img.conf' + G_AGP firmware-atheros firmware-iwlwifi # missing conflict in armbian-firmware package + G_AGI armbian-firmware initramfs-tools u-boot-tools zstd + G_AGI linux-{image,dtb}-current-rockchip64 "linux-u-boot-$model-current" + # Build boot script + G_EXEC_OUTPUT=1 G_EXEC mkimage -C none -A arm64 -T script -d /boot/boot.cmd /boot/boot.scr + # Flash bootloader + /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc + G_EXEC apt-mark auto firmware-nanopi5 + # Redo partitioning + G_DIETPI-NOTIFY 2 'Rewriting partition table to have root filesystem in partition 1' + local rootdrive=$(lsblk -npo PKNAME "$G_ROOTFS_DEV") + G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread --delete "$rootdrive" 1 2 3 4 5 6 7 8 + G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread -N1 "$rootdrive" <<< '286720' + G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread -N1 "$rootdrive" <<< ',+' # Needed, since above command and '286720,+' somehow create the partition 2015 sectors smaller, resulting in too large filesystem size. Only a subsequent ',+' expands it to the true end of the drive. + # LAN interface migration + G_DIETPI-NOTIFY 2 'Migrating LAN interface configs' + case $rmodel in + *R5S*) local eth0='ethto2' eth1='ethto0' eth2='ethto1';; + *R5C*) local eth0='ethto1' eth1='ethto0' eth2='';; + *) :;; + esac + for i in /etc/network/interfaces{,.d/*} + do + [[ -f $i ]] || continue + G_EXEC sed --follow-symlinks -i -e "s/eth0/$eth0/g" -e "s/eth1/$eth1/g" "$i" + [[ $eth2 ]] && G_EXEC sed --follow-symlinks -i "s/eth2/$eth2/g" "$i" + G_EXEC sed --follow-symlinks -i 's/ethto/eth/g' "$i" + done + fi + + elif [[ $G_HW_MODEL == 79 ]] && dpkg-query -s 'firmware-nanopi6' &> /dev/null + then + local rmodel + read -r rmodel < /proc/device-tree/model + case $rmodel in + *R6S*) HW_VARIANT=1 /boot/dietpi/func/dietpi-set_software apt-mirror dietpi; local model='nanopi-r6s';; + *R6C*) HW_VARIANT=2 /boot/dietpi/func/dietpi-set_software apt-mirror dietpi; local model='nanopi-r6c';; + *T6*) HW_VARIANT=3 /boot/dietpi/func/dietpi-set_software apt-mirror dietpi; local model='nanopct6';; + *) G_DIETPI-NOTIFY 1 'No known SBC model detected'; exit 1;; + esac + G_AGUP + if G_WHIP_DEFAULT_ITEM='yes' G_WHIP_YESNO '[ INFO ] Major kernel and bootloader upgrade available +\nFor the NanoPi 6 series, we offer a major kernel upgrade to Linux 6.1, based on mainline kernel sources which should provide not only new kernel features, but higher quality as well, compared to the old Rockchip Linux 5.10 legacy kernel. +\nAdditionally, compared to the previously hidden kernel image and boot config on the first 7 partitions, the new image and configs will stored and available within the /boot partition, so that kernel command-line parameters can be adjusted. Also kernel headers are available to compile new kernel modules. +\nThis implies flashing a new bootloader image, which reads boot scripts from the root partition. +\nHowever, while we are not aware of any left issues, it is still good to have a backup in place, and we do not enforce the upgrade. You can do it any time later. +\nDo you want to migrate to the new Linux 6.1 kernel now?' + then + # Safety checks + if [[ $G_ROOTFS_DEV != *'8' ]] + then + G_DIETPI-NOTIFY 1 "Root filesystem is not located on partition 8 as intended, but \"$G_ROOTFS_DEV\" instead. Aborting, please report at: https://github.com/MichaIng/DietPi/issues" + exit 1 + + elif [[ $(partx -rgo START "$G_ROOTFS_DEV") != 286720 ]] + then + G_DIETPI-NOTIFY 1 "Root partition does not start at sector 286720 as intended, but \"$(lsblk -no START "$G_ROOTFS_DEV")\" instead. Aborting, please report at: https://github.com/MichaIng/DietPi/issues" + exit 1 + fi + # Install boot scripts and configs + local dir="../DietPi-Update/DietPi-${G_GITBRANCH//\//-}" # GitHub translates forward slashes into dashes + G_EXEC mv "$dir/.build/images/U-Boot/boot.cmd" /boot/boot.cmd + G_EXEC mv "$dir/.build/images/U-Boot/dietpiEnv.txt" /boot/dietpiEnv.txt + G_CONFIG_INJECT 'rootdev=' "rootdev=UUID=$(findmnt -Ufnro UUID -M /)" /boot/dietpiEnv.txt + G_CONFIG_INJECT 'rootfstype=' "rootfstype=$(findmnt -Ufnro FSTYPE -M /)" /boot/dietpiEnv.txt + G_EXEC mkdir -p /etc/kernel/post{inst,rm}.d /etc/initramfs/post-update.d + G_EXEC mv "$dir/.build/images/U-Boot/dietpi-initramfs_cleanup" /etc/kernel/postinst.d/dietpi-initramfs_cleanup + G_EXEC ln -sf /etc/kernel/post{inst,rm}.d/dietpi-initramfs_cleanup + G_EXEC mv "$dir/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot + G_EXEC sed --follow-symlinks -Ei '/^setenv (kernel|fdt)_addr_r/d' /boot/boot.cmd + G_CONFIG_INJECT 'setenv scriptaddr ' 'setenv scriptaddr "0x9000000"' /boot/boot.cmd + G_CONFIG_INJECT 'overlay_path=' 'overlay_path=rockchip' /boot/dietpiEnv.txt + # Device tree + case $model in + 'nanopi-r6s') G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-nanopi-r6s.dtb' /boot/dietpiEnv.txt;; + 'nanopi-r6c') G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-nanopi-r6c.dtb' /boot/dietpiEnv.txt;; + *) :;; + esac + # Overlay prefix + G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rk3588' /boot/dietpiEnv.txt + # Console args + G_EXEC sed --follow-symlinks -i 's/ttyAML0,115200/ttyFIQ0,1500000/' /boot/dietpiEnv.txt + # Packages + G_EXEC eval 'echo '\''do_symlinks=0'\'' > /etc/kernel-img.conf' + G_AGP firmware-atheros firmware-iwlwifi # missing conflict in armbian-firmware package + G_AGI armbian-firmware initramfs-tools u-boot-tools zstd + G_AGI linux-{image,dtb}-vendor-rk35xx "linux-u-boot-$model-vendor" + # Build boot script + G_EXEC_OUTPUT=1 G_EXEC mkimage -C none -A arm64 -T script -d /boot/boot.cmd /boot/boot.scr + # Flash bootloader + /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc + G_EXEC apt-mark auto firmware-nanopi6 + # Redo partitioning + G_DIETPI-NOTIFY 2 'Rewriting partition table to have root filesystem in partition 1' + local rootdrive=$(lsblk -npo PKNAME "$G_ROOTFS_DEV") + G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread --delete "$rootdrive" 1 2 3 4 5 6 7 8 + G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread -N1 "$rootdrive" <<< '286720' + G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread -N1 "$rootdrive" <<< ',+' # Needed, since above command and '286720,+' somehow create the partition 2015 sectors smaller, resulting in too large filesystem size. Only a subsequent ',+' expands it to the true end of the drive. + # LAN interface migration + G_DIETPI-NOTIFY 2 'Migrating LAN interface configs' + case $rmodel in + *R6S*) local eth1='ethto2' eth2='ethto1';; + *) local eth0='skip';; + esac + [[ $eth0 == 'skip' ]] || for i in /etc/network/interfaces{,.d/*} + do + [[ -f $i ]] || continue + G_EXEC sed --follow-symlinks -i -e "s/eth1/$eth1/g" -e "s/eth2/$eth2/g" "$i" + G_EXEC sed --follow-symlinks -i 's/ethto/eth/g' "$i" + done + fi + fi + + # Software updates, migrations and patches + if [[ -f '/boot/dietpi/.installed' ]] + then + # Bazarr + if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[180\]=2' /boot/dietpi/.installed && [[ -f '/etc/systemd/system/bazarr.service' ]] + then + G_CONFIG_INJECT 'KillSignal=' 'KillSignal=SIGINT' /etc/systemd/system/bazarr.service '\[Service\]' + fi + fi +} + # v6.35 => v7 migration if (( $G_DIETPI_VERSION_CORE == 6 && $G_DIETPI_VERSION_SUB > 34 )) then diff --git a/.update/version b/.update/version index 5f21a93cd2..a8977da8a1 100644 --- a/.update/version +++ b/.update/version @@ -2,7 +2,7 @@ # shellcheck disable=SC2034 # Available DietPi version G_REMOTE_VERSION_CORE=9 -G_REMOTE_VERSION_SUB=6 +G_REMOTE_VERSION_SUB=7 G_REMOTE_VERSION_RC=1 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f0f604f972..18d6657709 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,21 @@ +v9.7 +(2024-08-23) + +Enhancements: +- Odroid N2 | Added an option to update (flash) the SPI bootloader to the dietpi-config "Advanced Options" menu. +- Odroid C1 | This DietPi update performs a migration of all Odroid C1 systems which run in "current" branch Linux 6.6 to edge branch kernel with Linux 6.9 or later. This solves non-functional USB ports: https://github.com/MichaIng/DietPi/issues/7089 +- NanoPi R5S/R5C/R6S/R6C/T6, Orange Pi 5/5 Plus, ROCK 5 | New RK3588 images will be shipped with Linux 6.1 from now on. This DietPi update offers a migration from the legacy Linux 5.10 kernel to this "vendor" Linux 6.1 kernel, from newer and cleaner Rockchip kernel sources. Old NanoPi R5S/R5C images with 8 partitions setup will be migrated to mainline Linux 6.6. Aside of new kernel features, it provides cleaner higher quality code, so we generally recommend the upgrade. However, we do not enforce it, and it makes sense to have a backup in place, and you can do the migration any time later. Next DietPi update, unless there were serious issue reported with the migration, we will enforce it for everyone, to get all RK3588 and NanoPi R5S/R5C systems up to a further supported and updated kernel source. +- DietPi-Banner | An option has been added to show the CPU load as common 1/5/15 minutes averages. Many thanks to @rkok for implementing this feature: https://github.com/MichaIng/DietPi/pull/7186 + +Bug fixes: +- DietPi-Software | Box86/Box64: Resolved an issue where the installation failed because of a false directory removal attempt. Many thanks to @lukaszsobala for fixing this issue: https://github.com/MichaIng/DietPi/pull/7149 +- DietPi-Software | Bazarr: Resolved an issue where service stops and restarts were hanging until timeout, leading also to hanging system shutdowns and restarts. Many thanks to @clarky000 and @blablazzz for reporting this issue, and @gregordinary for pointing us to the solution: https://dietpi.com/forum/t/19610 +- DietPi-Software | WiFi Hotspot: Resolved an issue where the hotspot failed because of an unintended character in the interface configuration. Many thanks to @wimduk for reporting this issue: https://dietpi.com/forum/t/20744 + +As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/7193 + +----------------------------------------------------------------------------------------------------------- + v9.6 (2024-07-07) @@ -5,7 +23,7 @@ New software: - soju | This IRC bouncer has been added to our software catalogue. Many thanks to @subnut for implementing it: https://github.com/MichaIng/DietPi/pull/7124 Enhancements: -- General | Since we provide all kernel, bootloader and firmware packages from our own APT repository now, the Armbian APT repository is removed form all systems. In case you use an SBC which is not officially supported by DietPi, as generic device, it is however preserved. +- General | Since we provide all kernel, bootloader and firmware packages from our own APT repository now, the Armbian APT repository is removed from all systems. In case you use an SBC which is not officially supported by DietPi, as generic device, it is however preserved. - Quartz64/Star64/VisionFive 2 | The extended attribute handler for ext4 security labels "CONFIG_EXT4_FS_SECURITY" has been enabled for these SBCs, required for some Docker containers. Many thanks to @gxsw for reporting this missing feature: https://github.com/MichaIng/DietPi/issues/7102 - Quartz64/Star64/VisionFive 2 | eBPF functionality for firewall and network monitoring software like Cilium has been added to our kernel builds for these SBCs. Many thanks to @kbrighton for reporting these missing features: https://github.com/MichaIng/DietPi/issues/6834 - Orange Pi 5 | Older U-Boot builds caused the Ethernet MAC address to be random and change on every boot. Recent U-Boot builds solve this, but they are not flashed automatically on package upgrades. We hence inform users and offer to flash the latest U-Boot image during the DietPi update. Many thanks to @thuehlinger for reporting and testing the case: https://github.com/MichaIng/DietPi/issues/6663 diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 97b81a64c4..4cd93f9d2e 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -932,15 +932,15 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the G_WHIP_MENU_ARRAY+=('Update RPi EEPROM firmware' ': Install rpi-eeprom APT package') fi - # ROCK 4, ROCK 5B, Orange Pi 5 (Plus) and Orange Pi 3B: https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457 - elif [[ $G_HW_MODEL =~ ^(72|78|80|82|87)$ ]] + # Odroid N2, ROCK 4, ROCK 5B, Orange Pi 5 (Plus) and Orange Pi 3B: https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457 + elif [[ $G_HW_MODEL =~ ^(15|72|78|80|82|87)$ ]] then - # ROCK 4: Device tree overlay required + # Odroid N2/ROCK 4: Device tree overlay required local spidev='/dev/mtdblock0' - (( $G_HW_MODEL == 72 )) || { + (( $G_HW_MODEL == 15 || $G_HW_MODEL == 72 )) || { [[ -f '/usr/lib/u-boot/platform_install.sh' ]] && { { [[ -e '/dev/mtd0' ]] && grep -q '/dev/mtd0' /usr/lib/u-boot/platform_install.sh && spidev='/dev/mtd0'; } || - { [[ -b '/dev/mtdblock0' ]] && grep -q 'rksd_loader.img' /usr/lib/u-boot/platform_install.sh; } + { [[ -b '/dev/mtdblock0' ]] && grep -q '/dev/mtdblock0' /usr/lib/u-boot/platform_install.sh; } } } && G_WHIP_MENU_ARRAY+=('Update SPI bootloader' ": Flash current U-Boot to $spidev") @@ -1084,25 +1084,47 @@ Further information: https://www.raspberrypi.org/documentation/hardware/raspberr elif [[ $G_WHIP_RETURNED_VALUE == 'Update SPI bootloader' ]]; then - if [[ $G_HW_MODEL == 72 && ! -b '/dev/mtdblock0' ]] + if [[ $G_HW_MODEL == 15 && ! -b '/dev/mtdblock0' ]] + then + local overlays=() i= + read -ra overlays < <(mawk -F= '$1=="overlays"{$1="";print}' /boot/dietpiEnv.txt) + for i in "${overlays[@]}"; do [[ $i == 'g12b-odroid-n2-spi' ]] && break; done + if [[ $i == 'g12b-odroid-n2-spi' ]] + then + G_WHIP_MSG '[FAILED] No SPI device found +\nThe expected SPI device /dev/mtdblock0 was not found on your Odroid N2 system, despite the fact that the related device tree overlay has been applied already. You may need to reboot for the change to take effect. +\nIn case, reboot the system before selecting this menu option again. If you did so, please report this issue on our forum or GitHub page.' + return 1 + else + G_WHIP_YESNO '[ INFO ] Device tree overlay required +\nA kernel device tree overlay is required to access the SPI device on the Odroid N2. +\nShall we add the overlay for you? A reboot will be required for the change to take effect, after which you can reselect this menu option.' || return 0 + overlays+=('g12b-odroid-n2-spi') + G_CONFIG_INJECT 'overlays=' "overlays=${overlays[*]}" /boot/dietpiEnv.txt + REBOOT_REQUIRED=1 + return 0 + fi + + elif [[ $G_HW_MODEL == 72 && ! -b '/dev/mtdblock0' ]] then local overlays=() i= read -ra overlays < <(mawk -F= '$1=="overlays"{$1="";print}' /boot/dietpiEnv.txt) for i in "${overlays[@]}"; do [[ $i == 'spi-jedec-nor' ]] && break; done if [[ $i == 'spi-jedec-nor' ]] then - G_WHIP_MSG '[FAILED] No MTD device found -\nThe expected MTD device /dev/mtdblock0 was not found on your ROCK 4 system, despite the fact that the related device tree overlay has been applied already. You may either have a model which has no onboard SPI storage, or you did not reboot yet for the change to take effect. -\nIn case reboot the system before selecting this menu option again, otherwise check back whether your ROCK 4 variant is really supposed to have an SPI storge.' + G_WHIP_MSG '[FAILED] No SPI device found +\nThe expected SPI device /dev/mtdblock0 was not found on your ROCK 4 system, despite the fact that the related device tree overlay has been applied already. You may either have a model which has no onboard SPI storage, or you did not reboot yet for the change to take effect. +\nIn case, reboot the system before selecting this menu option again, otherwise check back whether your ROCK 4 variant is really supposed to have an SPI storge.' return 1 else - G_WHIP_YESNO '[ INFO ] No MTD device found -\nThe expected MTD device /dev/mtdblock0 was not found on your ROCK 4 system. You may either have a model which has no onboard SPI storage, or a device tree overlay may be required to make the MTD device available. + G_WHIP_YESNO '[ INFO ] No SPI device found +\nThe expected SPI device /dev/mtdblock0 was not found on your ROCK 4 system. You may either have a model which has no onboard SPI storage, or a device tree overlay may be required to make the SPI device available. \nShall we add the overlay for you? A reboot will be required for the change to take effect, after which you can reselect this menu option.' || return 0 overlays+=('spi-jedec-nor') G_CONFIG_INJECT 'overlays=' "overlays=${overlays[*]}" /boot/dietpiEnv.txt G_CONFIG_INJECT 'param_spinor_spi_bus=' 'param_spinor_spi_bus=1' /boot/dietpiEnv.txt REBOOT_REQUIRED=1 + return 0 fi elif [[ $spidev == '/dev/mtd0' ]] @@ -1111,21 +1133,18 @@ Further information: https://www.raspberrypi.org/documentation/hardware/raspberr \nThis will flash the U-Boot image of the installed linux-u-boot-* package to the SPI device /dev/mtd0. \nDo you want to continue?' || return 0 G_AG_CHECK_INSTALL_PREREQ mtd-utils - # shellcheck disable=SC1091 - . /usr/lib/u-boot/platform_install.sh - write_uboot_platform_mtd else G_WHIP_YESNO '[ INFO ] SPI bootloader update \nThis will flash the U-Boot image of the installed linux-u-boot-* package to the SPI device /dev/mtdblock0. \nDo you want to continue?' || return 0 - # shellcheck disable=SC1091 - . /usr/lib/u-boot/platform_install.sh - # shellcheck disable=SC2154 - [[ -f $DIR/rkspi_loader.img ]] || { G_WHIP_MSG "[FAILED] SPI U-Boot image missing\n\nThe expected U-Boot image at $DIR/rkspi_loader.img could not be found. Please report this to our GitHub or forum, so we can check back and in case update this dietpi-config option."; return 1; } - # shellcheck disable=SC2154 - G_EXEC_OUTPUT=1 G_EXEC dd if="$DIR/rkspi_loader.img" of=/dev/mtdblock0 oflag=direct conv=notrunc status=progress fi + # shellcheck disable=SC1091 + . /usr/lib/u-boot/platform_install.sh + eval "$(declare -f write_uboot_platform_mtd | sed -e 's| > /dev/null 2>&1||g' -e 's|status=none|status=progress|g' -e 's/^[[:blank:]]*dd /dd oflag=direct conv=notrunc status=progress /')" + # shellcheck disable=SC2154 + write_uboot_platform_mtd "$DIR" + elif [[ $G_WHIP_RETURNED_VALUE == 'Update bootloader' ]]; then G_WHIP_YESNO '[ INFO ] SPI bootloader update diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 102d2b42ed..099d46dd4b 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3009,8 +3009,8 @@ unix_socket_directories = '/run/postgresql'" > "$i/00dietpi.conf" if To_Install 9 # Node.js then - # Deps: https://github.com/MichaIng/DietPi/issues/3614 - aDEPS=('libatomic1') + # ARMv6/7/RISC-V deps (verified 2024-07-11): https://github.com/MichaIng/DietPi/issues/3614 + (( $G_HW_ARCH < 3 || $G_HW_ARCH == 11 )) && aDEPS=('libatomic1') # Download installer Download_Install 'https://raw.githubusercontent.com/MichaIng/nodejs-linux-installer/master/node-install.sh' @@ -3345,7 +3345,7 @@ _EOF_ esac # Download binary - local fallback_url="https://github.com/prometheus/node_exporter/releases/download/v1.8.1/node_exporter-1.8.1.linux-$arch.tar.gz" + local fallback_url="https://github.com/prometheus/node_exporter/releases/download/v1.8.2/node_exporter-1.8.2.linux-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/prometheus/node_exporter/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/node_exporter-.*\.linux-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC mkdir -p /opt/node_exporter G_EXEC cp --preserve=mode node_exporter*/node_exporter /opt/node_exporter/ @@ -6522,7 +6522,7 @@ _EOF_ esac # Download - local fallback_url="https://github.com/fatedier/frp/releases/download/v0.58.1/frp_0.58.1_linux_$arch.tar.gz" + local fallback_url="https://github.com/fatedier/frp/releases/download/v0.60.0/frp_0.60.0_linux_$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/fatedier/frp/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/frp_[0-9.]*_linux_$arch\.tar\.gz\"/{print \$4}")" G_EXEC cd frp_* @@ -6914,7 +6914,7 @@ _EOF_ if To_Install 98 haproxy # HAProxy then - local version='2.9.7' # https://www.haproxy.org/download/ + local version='3.0.2' # https://www.haproxy.org/download/ aDEPS=('make' 'gcc' 'libpcre3-dev' 'libssl-dev' 'zlib1g-dev' 'libsystemd-dev') Download_Install "https://www.haproxy.org/download/${version%.*}/src/haproxy-$version.tar.gz" @@ -7057,7 +7057,7 @@ _EOF_ aDEPS=() else local version=$(curl -sSfL 'https://api.github.com/repos/FreshRSS/FreshRSS/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') - [[ $version ]] || { version='1.24.1'; G_DIETPI-NOTIFY 1 "Automatic latest FreshRSS version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version ]] || { version='1.24.2'; G_DIETPI-NOTIFY 1 "Automatic latest FreshRSS version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://github.com/FreshRSS/FreshRSS/archive/$version.tar.gz" G_EXEC mv "FreshRSS-$version" /opt/FreshRSS fi @@ -7472,7 +7472,7 @@ _EOF_ then Download_Install 'https://github.com/gotson/komga/releases/download/v0.165.0/komga-0.165.0.jar' /mnt/dietpi_userdata/komga/komga.jar else - local fallback_url='https://github.com/gotson/komga/releases/download/1.11.1/komga-1.11.1.jar' + local fallback_url='https://github.com/gotson/komga/releases/download/1.11.2/komga-1.11.2.jar' Download_Install "$(curl -sSfL 'https://api.github.com/repos/gotson/komga/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/komga-[^"\/]*\.jar"$/{print $4}')" /mnt/dietpi_userdata/komga/komga.jar fi @@ -7568,7 +7568,7 @@ _EOF_ local json=() [[ $PHP_VERSION == 8* ]] || aDEPS+=("php$PHP_VERSION-json") json=('json') - local fallback_url="https://github.com/ampache/ampache/releases/download/6.5.0/ampache-6.5.0_all_php$PHP_VERSION.zip" + local fallback_url="https://github.com/ampache/ampache/releases/download/6.6.0/ampache-6.6.0_all_php$PHP_VERSION.zip" Download_Install "$(curl -sSfL 'https://api.github.com/repos/ampache/ampache/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/ampache-[0-9\.]*_all_php$PHP_VERSION.zip\"$/{print \$4}")" ampache # Reinstall: Preserve configs from old and new paths @@ -7906,7 +7906,7 @@ netmask 255.255.255.0 #gateway 192.168.0.1 #dns-nameservers 9.9.9.9 149.112.112.112 pre-up iw dev $wifi_iface set power_save off -post-down iw dev "$wifi_iface set power_save on +post-down iw dev $wifi_iface set power_save on # iptables NAT rules up iptables-restore < /etc/iptables.ipv4.nat @@ -7953,7 +7953,7 @@ _EOF_ cat << _EOF_ > /etc/hostapd/hostapd.conf interface=$wifi_iface driver=nl80211 -ssid=${ssid:-DietPi-HotSpot} +ssid=${ssid:-DietPi-Hotspot} country_code=00 hw_mode=$mode channel=$channel @@ -8561,7 +8561,7 @@ _EOF_ # Install ruTorrent: Web UI for rTorrent # - Grab current version local version=$(curl -sSfL 'https://api.github.com/repos/Novik/ruTorrent/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') - [[ $version ]] || { version='v4.3.5'; G_DIETPI-NOTIFY 1 "Automatic latest ruTorrent version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version ]] || { version='v4.3.6'; G_DIETPI-NOTIFY 1 "Automatic latest ruTorrent version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://github.com/Novik/ruTorrent/archive/$version.tar.gz" # - Reinstall freshly with preserved configs and 3rd party plugins @@ -8952,7 +8952,7 @@ _EOF_ *) local arch='arm';; esac - local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.27.9/syncthing-linux-$arch-v1.27.9.tar.gz" + local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.27.10/syncthing-linux-$arch-v1.27.10.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/syncthing/syncthing/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/syncthing-linux-$arch-[^\"\/]*\.tar\.gz\"/{print \$4}")" G_EXEC mv syncthing-* /opt/syncthing fi @@ -9355,7 +9355,7 @@ _EOF_ if To_Install 143 koel # Koel then - # APT dependencies: https://docs.koel.dev/#server > https://laravel.com/docs/9.x/deployment#server-requirements / https://laravel.com/docs/8.x/deployment#server-requirements + # APT dependencies: https://docs.koel.dev/guide/getting-started > https://laravel.com/docs/10.x/deployment#server-requirements / https://laravel.com/docs/8.x/deployment#server-requirements # - Skip JSON module from PHP 8.0 on, where it is embedded into core # - pdo_sqlite module required for "artisan koel:init" < "artisan db:seed", despite MySQL database engine used aDEPS=("php$PHP_VERSION-bcmath" "php$PHP_VERSION-mbstring" "php$PHP_VERSION-sqlite3" "php$PHP_VERSION-xml") @@ -9364,7 +9364,7 @@ _EOF_ if (( ${PHP_VERSION::1} > 7 )) then aDEPS+=("php$PHP_VERSION-curl") - local fallback_url='https://github.com/koel/koel/releases/download/v6.12.1/koel-v6.12.1.tar.gz' aphp_deps=('curl' 'dom') + local fallback_url='https://github.com/koel/koel/releases/download/v7.0.10/koel-v7.0.10.tar.gz' aphp_deps=('curl' 'dom') Download_Install "$(curl -sSfL 'https://api.github.com/repos/koel/koel/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/koel-[^"\/]*\.tar\.gz"$/{print $4}')" else aDEPS+=("php$PHP_VERSION-json") @@ -9546,7 +9546,7 @@ _EOF_ esac url=$(curl -sSfL 'https://api.github.com/repos/Radarr/Radarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}") - local fallback_url="https://github.com/Radarr/Radarr/releases/download/v5.7.0.8882/Radarr.master.5.7.0.8882.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Radarr/Radarr/releases/download/v5.9.1.9070/Radarr.master.5.9.1.9070.linux-core-$arch.tar.gz" fi Download_Install "$url" @@ -9642,7 +9642,7 @@ _EOF_ esac url=$(curl -sSfL 'https://api.github.com/repos/Lidarr/Lidarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}") - local fallback_url="https://github.com/Lidarr/Lidarr/releases/download/v2.3.3.4204/Lidarr.master.2.3.3.4204.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Lidarr/Lidarr/releases/download/v2.4.3.4248/Lidarr.master.2.4.3.4248.linux-core-$arch.tar.gz" fi Download_Install "$url" @@ -9700,9 +9700,10 @@ _EOF_ if To_Install 180 bazarr # Bazarr: https://wiki.bazarr.media/Getting-Started/Installation/Linux/linux/ then # APT deps + aDEPS=('unzip') if (( $G_HW_ARCH < 3 )) then - aDEPS=('libopenblas0-pthread') # libopenblas0-pthread runtime library for piwheels wheel: https://piwheels.org/project/numpy/ + aDEPS+=('libopenblas0-pthread') # libopenblas0-pthread runtime library for piwheels wheel: https://piwheels.org/project/numpy/ (( $G_HW_ARCH == 1 )) && aDEPS+=('unar') # ARMv6 does not support unrar-nonfree and Bazarr does not support unrar-free, so we need to use "unar": https://github.com/morpheus65535/bazarr/issues/2172 fi @@ -9742,6 +9743,7 @@ User=bazarr UMask=002 LogsDirectory=bazarr ExecStart=/usr/bin/python3 /opt/bazarr/bazarr.py -c /mnt/dietpi_userdata/bazarr +KillSignal=SIGINT # Hardening ProtectSystem=strict @@ -9986,7 +9988,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.20.1.4603/Prowlarr.master.1.20.1.4603.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.22.0.4670/Prowlarr.master.1.22.0.4670.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Prowlarr/Prowlarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC mv Prowlarr /opt/prowlarr fi @@ -10060,7 +10062,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.30.2576/Readarr.develop.0.3.30.2576.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.32.2587/Readarr.develop.0.3.32.2587.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Readarr/Readarr/releases' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}" | head -1)" G_EXEC mv Readarr /opt/readarr fi @@ -11085,7 +11087,7 @@ _EOF_ # Cleanup G_EXEC cd "$G_WORKING_DIR" - G_EXEC rm "box86-${version#v}" + G_EXEC rm -R "box86-${version#v}" # Reload binfmt if kernel module is available to have i386 binaries executed via box86 automatically from now on modprobe binfmt_misc 2> /dev/null && G_EXEC systemctl restart systemd-binfmt @@ -11098,7 +11100,7 @@ _EOF_ # Download local version=$(curl -sSfL 'https://api.github.com/repos/ptitSeb/box64/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') - [[ $version ]] || { version='v0.2.8'; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version ]] || { version='v0.3.0'; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://github.com/ptitSeb/box64/archive/$version.tar.gz" # Build for targets: https://github.com/ptitSeb/box64/blob/main/CMakeLists.txt @@ -11142,7 +11144,7 @@ _EOF_ # Cleanup G_EXEC cd "$G_WORKING_DIR" - G_EXEC rm "box64-${version#v}" + G_EXEC rm -R "box64-${version#v}" # Reload binfmt if kernel module is available to have x86_64 binaries executed via box64 automatically from now on modprobe binfmt_misc 2> /dev/null && G_EXEC systemctl restart systemd-binfmt @@ -11212,7 +11214,7 @@ _EOF_ # v3 drops PHP 7.4 support: https://github.com/TasmoAdmin/TasmoAdmin/releases/tag/v3.0.0 if (( $G_DISTRO > 6 )) then - local fallback_url='https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v4.1.1/tasmoadmin_v4.1.1.tar.gz' + local fallback_url='https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v4.1.2/tasmoadmin_v4.1.2.tar.gz' Download_Install "$(curl -sSfL 'https://api.github.com/repos/TasmoAdmin/TasmoAdmin/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/tasmoadmin_v[^"\/]*\.tar\.gz"$/{print $4}')" else Download_Install 'https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v2.4.2/tasmoadmin_v2.4.2.tar.gz' @@ -11584,13 +11586,13 @@ _EOF_ if To_Install 191 snapserver # Snapcast Server then - # RISC-V: Install from Debian repo: https://github.com/badaix/snapcast/releases - if (( $G_HW_ARCH == 11 )) + # RISC-V/Trixie: Install from Debian repo: https://github.com/badaix/snapcast/releases + if (( $G_DISTRO > 7 )) then G_AGI snapserver # Install and enable snapweb web UI, not included in Debian's snapserver package: https://github.com/MichaIng/DietPi/issues/7073 - local fallback_url='https://github.com/badaix/snapweb/releases/download/v0.7.0/snapweb_0.7.0-1_all.deb' + local fallback_url='https://github.com/badaix/snapweb/releases/download/v0.8.0/snapweb_0.8.0-1_all.deb' Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapweb/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/snapweb_[^"\/]*_all.deb"/{print $4}')" G_CONFIG_INJECT 'doc_root[[:blank:]=]' 'doc_root = /usr/share/snapweb' /etc/snapserver.conf '\[http\]' @@ -11598,11 +11600,9 @@ _EOF_ [[ -d '/var/lib/snapserver' ]] && G_EXEC chown -R '_snapserver:_snapserver' /var/lib/snapserver getent passwd snapserver > /dev/null && G_EXEC userdel snapserver else - local arch=$(dpkg --print-architecture) dist=${G_DISTRO_NAME/trixie/bookworm} - local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.28.0/snapcast_0.28.0_$arch-debian-$dist.zip" - Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapcast_[^\"\/]*_$arch-debian-$dist.zip\"/{print \$4}")" - G_AGI ./snapserver_*_"$arch.deb" - G_EXEC rm snap*.deb + local arch=$(dpkg --print-architecture) + local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.29.0/snapserver_0.29.0-1_${arch}_$G_DISTRO_NAME.deb" + Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapserver_[^\"\/]*_${arch}_$G_DISTRO_NAME.deb\"/{print \$4}")" # Fix /var/lib/snapserver permissions, just in case Debian's package was previously used, which uses the "_snapserver" user, instead of "snapserver" [[ -d '/var/lib/snapserver' ]] && G_EXEC chown -R 'snapserver:snapserver' /var/lib/snapserver @@ -11616,16 +11616,14 @@ _EOF_ if To_Install 192 snapclient # Snapcast Client then - # RISC-V: Install from Debian repo: https://github.com/badaix/snapcast/releases - if (( $G_HW_ARCH == 11 )) + # RISC-V/Trixie: Install from Debian repo: https://github.com/badaix/snapcast/releases + if (( $G_DISTRO > 7 )) then G_AGI snapclient else - local arch=$(dpkg --print-architecture) dist=${G_DISTRO_NAME/trixie/bookworm} - local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.28.0/snapcast_0.28.0_$arch-debian-$dist.zip" - Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapcast_[^\"\/]*_$arch-debian-$dist.zip\"/{print \$4}")" - G_AGI ./snapclient_*_without-pulse_"$arch.deb" - G_EXEC rm snap*.deb + local arch=$(dpkg --print-architecture) + local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.29.0/snapclient_0.29.0-1_${arch}_$G_DISTRO_NAME.deb" + Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapclient_[^\"\/]*_${arch}_$G_DISTRO_NAME.deb\"/{print \$4}")" fi G_EXEC systemctl stop snapclient @@ -11688,7 +11686,7 @@ _EOF_ *) local arch='arm';; esac - local fallback_url="https://github.com/restic/restic/releases/download/v0.16.5/restic_0.16.5_linux_$arch.bz2" + local fallback_url="https://github.com/restic/restic/releases/download/v0.17.0/restic_0.17.0_linux_$arch.bz2" Download_Install "$(curl -sSfL 'https://api.github.com/repos/restic/restic/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/restic_[^\"\/]*_linux_$arch\.bz2\"$/{print \$4}")" /usr/local/bin/restic G_EXEC chmod +x /usr/local/bin/restic fi diff --git a/dietpi/func/dietpi-banner b/dietpi/func/dietpi-banner index c6b04d3b98..2fda70472d 100755 --- a/dietpi/func/dietpi-banner +++ b/dietpi/func/dietpi-banner @@ -61,14 +61,15 @@ 'Print credits' 'Let'\''s Encrypt cert status' 'RAM usage' + 'Load average' ) # Set defaults: Disable CPU temp by default in VMs if (( $G_HW_MODEL == 20 )) then - aENABLED=(1 0 0 0 0 1 0 1 0 0 0 1 1 0 0 1 0 0) + aENABLED=(1 0 0 0 0 1 0 1 0 0 0 1 1 0 0 1 0 0 0) else - aENABLED=(1 0 1 0 0 1 0 0 0 0 0 1 1 0 0 1 0 0) + aENABLED=(1 0 1 0 0 1 0 0 0 0 0 1 1 0 0 1 0 0 0) fi COLOUR_RESET='\e[0m' @@ -257,6 +258,8 @@ $GREEN_LINE" (( ${aENABLED[2]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[2]} $GREEN_SEPARATOR $(print_full_info=1 G_OBTAIN_CPU_TEMP 2>&1)" # RAM usage (( ${aENABLED[17]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[17]} $GREEN_SEPARATOR $(free -b | mawk 'NR==2 {CONVFMT="%.0f"; print $3/1024^2" of "$2/1024^2" MiB ("$3/$2*100"%)"}')" + # Load average + (( ${aENABLED[18]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[18]} $GREEN_SEPARATOR $(mawk '{print $1 ", " $2 ", " $3}' /proc/loadavg) ($(nproc) cores)" # Hostname (( ${aENABLED[3]} == 1 && ${aENABLED[14]} != 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[3]} $GREEN_SEPARATOR $(