diff --git a/README.md b/README.md index 879ae03562bf4a8d112792c15fce84aacd9dffe7..9f55ede7e7950df9ef1153eca3b63de31286ee93 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # Phytium Pi OS -飞腾派OS(Phytium Pi OS)是运行在飞腾派开发板上的深度定制的Linux系统(基于Debian11)。它针对飞腾派开发板的硬件定制了内核配置,不同的软件包,可以更好的适应不同的场景。 +飞腾派OS(Phytium Pi OS)是运行在飞腾派开发板上的深度定制的Linux系统(基于Debian11)。它针对飞腾派开发板的硬件定制了内核配置,不同的软件包,可以更好的适应不同的场景。 它可以烧录在SD卡中,作为飞腾派开发板的启动系统。 飞腾派OS由Buildroot生成,获取更多Buildroot的信息,可参考用户手册docs/manual/manual.pdf。 # 开发环境 ## 系统要求 -Buildroot被设计为在x86 Linux系统上运行,结合其他因素,本仓库只支持在ubuntu20.04、ubuntu22.04、debian11这三种x86系统上进行开发,不支持其他系统。 +Buildroot被设计为在x86 Linux系统上运行,结合其他因素,本仓库只支持在ubuntu20.04、ubuntu22.04、debian11这三种x86系统上进行开发,不支持其他系统。 首先,Buildroot需要主机系统上安装如下Linux程序,请检查是否已安装: ``` • Build tools: @@ -67,11 +67,11 @@ phytiumpi_desktop_defconfig 生成的根文件系统、内核、sdcard.img 镜像位于output/images目录。 #### phytiumpi img 镜像 -支持编译phytiumpi img 镜像(sdcard.img),生成的phytiumpi img 镜像位于output/images目录。sdcard.img 镜像包含了根文件系统、内核、设备树。 +支持编译phytiumpi img 镜像(sdcard.img),生成的phytiumpi img 镜像位于output/images目录。sdcard.img 镜像包含了根文件系统、内核、设备树。 使用sdcard.img 镜像安装系统,不需要将存储设备手动分区再拷贝文件,只需要将sdcard.img文件写入存储设备即可。 ### 更换文件系统的linux内核版本 -defconfig中的内核版本默认是linux 5.10。我们支持在编译文件系统时将内核版本更换为linux 4.19,linux 4.19 rt,linux 5.10 rt。 +defconfig中的内核版本默认是linux 5.10。我们支持在编译文件系统时将内核版本更换为linux 4.19,linux 4.19 rt,linux 5.10 rt。 关于phytiumpi linux内核的信息请参考:`https://gitee.com/phytium_embedded/phytium-linux-kernel` 更换内核版本的操作步骤为: (1)使用phytiumpi_xxx_defconfig作为基础配置项,合并支持其他内核版本的配置: @@ -89,7 +89,7 @@ configs/phytiumpi_linux_5.10_rt.config 生成的根文件系统、内核、sdcard.img 镜像位于output/images目录。 ### 支持Phytium-optee -本项目还支持编译Phytium-optee,关于Phytium-optee的信息请参考:`https://gitee.com/phytium_embedded/phytium-optee` +本项目还支持编译Phytium-optee,关于Phytium-optee的信息请参考:`https://gitee.com/phytium_embedded/phytium-optee` defconfig默认不编译Phytium-optee,如果需要编译Phytium-optee请执行: (1)使用phytiumpi_xxx_defconfig作为基础配置项,合并支持optee的配置: `$ ./support/kconfig/merge_config.sh configs/phytiumpi_xxx_defconfig configs/phytiumpi_optee.config` @@ -201,7 +201,7 @@ LINUX_OVERRIDE_SRCDIR = /home/xxx/linux-kernel/linux-xxx 将local.mk文件和.config文件放在同一目录下。这个目录对于树内构建是源码根目录,对于树外构建是树外构建的输出目录。 LINUX_OVERRIDE_SRCDIR指定了一个本地的内核源码目录,这样就不会去下载、解压、打补丁内核源码了,而是使用LINUX_OVERRIDE_SRCDIR 指定的内核源码目录。需要注意内核源码实际存放的目录要与LINUX_OVERRIDE_SRCDIR的值相对应。 -这样开发人员首先在LINUX_OVERRIDE_SRCDIR指定的目录对内核进行修改,然后运行`make linux-rebuild`或者 `make linux-reconfigure`即可。 +这样开发人员首先在LINUX_OVERRIDE_SRCDIR指定的目录对内核进行修改,然后运行`make linux-rebuild`或者 `make linux-reconfigure`即可。 该命令首先将LINUX_OVERRIDE_SRCDIR中的内核源码同步到`output/build/linux-custom`目录,然后进行配置、编译、安装。 如果想要编译、安装内核,并重新生成系统镜像,请运行`make linux-rebuild phyuboot-rebuild all`。 @@ -262,7 +262,7 @@ modules `source "package//Config.in"` (2)`.mk`文件看起来不像普通的Makefile文件,而是一连串的变量定义,而且必须以大写的包名作为变量的前缀。最后以调用软件包的基础结构(package infrastructure)结束。变量告诉软件包的基础结构要做什么。 -对于使用手写Makefile来编译的软件源码,在`.mk`中调用generic-package基础结构。generic-package基础结构实现了包的下载、提取、打补丁。 +对于使用手写Makefile来编译的软件源码,在`.mk`中调用generic-package基础结构。generic-package基础结构实现了包的下载、提取、打补丁。 而配置、编译和安装由`.mk`文件描述。`.mk`文件中可以设置的变量及其含义,请参考用户手册docs/manual/manual.pdf。 ## 编译软件包 (1)单独编译软件包 diff --git a/board/phytium/common/debian-additional_packages_list b/board/phytium/common/debian-additional_packages_list index 16e8024ddaa9950d95c6ce2b3bb4b81bff5f36d6..12fe295bb5aad69f96be29048cbce906f3a3371f 100644 --- a/board/phytium/common/debian-additional_packages_list +++ b/board/phytium/common/debian-additional_packages_list @@ -2,7 +2,7 @@ additional_full_packages_list=" python3-pygame python3-tk thonny python3-pgzero python3-serial debian-reference-en dillo python3-pip python3-numpy pypy alacarte rc-gui sense-hat tree libgl1-mesa-dri libgles1 libgles2-mesa xcompmgr geany python3-spidev python3-twython python3-smbus python3-flask pprompt piwiz" -additional_desktop_packages_list="tigervnc-standalone-server vlc bluez rfkill pulseaudio-module-bluetooth blueman bluetooth gstreamer1.0-tools fbset" +additional_desktop_packages_list="tigervnc-standalone-server vlc rfkill blueman bluetooth gstreamer1.0-tools fbset audacity" # for Lite userland gathered from main repo additional_base_packages_list="systemd-timesyncd ssh sudo psmisc strace ncdu parted build-essential bash-completion gdb pkg-config python-is-python3 v4l-utils python3-gpiozero avahi-daemon lua5.1 luajit hardlink curl fake-hwclock nfs-common usbutils dphys-swapfile apt-listchanges usb-modeswitch libmtp-runtime rsync htop man-db rng-tools ssh-import-id ethtool ntfs-3g pciutils udisks2 zip p7zip-full file cifs-utils mkvtoolnix wpasupplicant wireless-tools dhcpcd5 net-tools vim locales git" diff --git a/board/phytium/common/debian-package-installer b/board/phytium/common/debian-package-installer index fec18b3777b3705b0e979c56dd47da14795d7b7b..29fe601f69cfc7bb0a7ab51f7dfcc71caac23dc2 100755 --- a/board/phytium/common/debian-package-installer +++ b/board/phytium/common/debian-package-installer @@ -82,7 +82,13 @@ do_distrorfs_second_stage() { echo 'root' >> /etc/deniedusers chmod 600 /etc/deniedusers echo 'auth required pam_listfile.so onerr=succeed item=user sense=deny file=/etc/deniedusers' >> /etc/pam.d/lightdm - + + # set the name of the sound output devices + echo 'update-sink-proplist 1 device.description=Headphone' >> /etc/pulse/default.pa + echo 'update-sink-proplist 0 device.description=HDMI' >> /etc/pulse/default.pa + echo 'set-default-sink 1' >> /etc/pulse/default.pa + echo 'load-module module-switch-on-connect' >> /etc/pulse/default.pa + echo remove packages. DEBIAN_FRONTEND=noninteractive apt-get -y remove --purge parole || exit 1 fi diff --git a/board/phytium/common/post-build.sh b/board/phytium/common/post-build.sh index ea4687989c4716de4251b8681c32104337a1d673..3360c509d9825bc1bfb43cc56a8b5d047bd702d1 100755 --- a/board/phytium/common/post-build.sh +++ b/board/phytium/common/post-build.sh @@ -121,6 +121,12 @@ main() sudo chown -R $USER:$GROUPS $1/var/cache/ldconfig/aux-cache fi + # alsa UCM + if grep -Eq "^BR2_PACKAGE_PHYTIUM_DESKTOP_TOOLS=y$" ${BR2_CONFIG}; then + ln -sf ../../Phytium/es8336/es8336.conf $1/usr/share/alsa/ucm2/conf.d/simple-card/phytium,pe220x-i2s-audio.conf + ln -sf ../../Phytium/PMDK-I2S/PMDK-I2S.conf $1/usr/share/alsa/ucm2/conf.d/PMDK-I2S/PMDK-I2S.conf + fi + exit $? } diff --git a/configs/phytiumpi_defconfig b/configs/phytiumpi_defconfig index 797e8cd2831a757fd4a10e2da2b3e8b7b548a176..9b9738821fef5edd21478bf8176d64b31af35525 100644 --- a/configs/phytiumpi_defconfig +++ b/configs/phytiumpi_defconfig @@ -36,7 +36,7 @@ BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_GIT=y BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://gitee.com/phytium_embedded/phytium-linux-kernel.git" # kernel 5.10 -BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel-5.10_v2.1" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="bd23240ca8e0e54f9979185740aa49226b9a248b" BR2_LINUX_KERNEL_INTREE_DTS_NAME="phytium/phytiumpi_firefly" BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_DEFCONFIG="phytium" diff --git a/configs/phytiumpi_desktop_defconfig b/configs/phytiumpi_desktop_defconfig index 95c55a28307fff461f3f58879835d326e09bcc98..9e98d8d77d0d5b868bb0a83ddd3651136dfea28c 100644 --- a/configs/phytiumpi_desktop_defconfig +++ b/configs/phytiumpi_desktop_defconfig @@ -36,7 +36,7 @@ BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_GIT=y BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://gitee.com/phytium_embedded/phytium-linux-kernel.git" # kernel 5.10 -BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel-5.10_v2.1" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="bd23240ca8e0e54f9979185740aa49226b9a248b" BR2_LINUX_KERNEL_INTREE_DTS_NAME="phytium/phytiumpi_firefly" BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_DEFCONFIG="phytium" @@ -59,8 +59,9 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_ROOTFS_CHOWN=y -# Bluetooth config tools +# Phytium_tools BR2_PACKAGE_PHYTIUM_TOOLS=y +BR2_PACKAGE_PHYTIUM_DESKTOP_TOOLS=y BR2_PACKAGE_ROOTFS_DESKTOP=y BR2_PACKAGE_BUSYBOX=n diff --git a/configs/phytiumpi_linux_4.19.config b/configs/phytiumpi_linux_4.19.config index 745dda7ae134af2806991f77da851c6fc79dedbd..39f7ad0ac84e3ea724c187be95363aaf414f4f16 100644 --- a/configs/phytiumpi_linux_4.19.config +++ b/configs/phytiumpi_linux_4.19.config @@ -1,2 +1,2 @@ # kernel 4.19 -BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel-4.19_v2.1" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="5ef2cf5c936567b97a1001936accfcc2ef1b0fcc" diff --git a/configs/phytiumpi_optee.config b/configs/phytiumpi_optee.config index b652ca81ff5df6d8119a6a865cbdc946da86ae4d..b4ec28e401037a633d5fb31ec1507af4e908f356 100644 --- a/configs/phytiumpi_optee.config +++ b/configs/phytiumpi_optee.config @@ -3,5 +3,5 @@ BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm64/configs/phytium_ BR2_PACKAGE_PHYTIUM_OPTEE=y BR2_PACKAGE_PHYTIUM_OPTEE_CUSTOM_REPO_URL="https://gitee.com/phytium_embedded/phytium-optee.git" -BR2_PACKAGE_PHYTIUM_OPTEE_CUSTOM_REPO_VERSION="v3.1" +BR2_PACKAGE_PHYTIUM_OPTEE_CUSTOM_REPO_VERSION="v3.2" BR2_PACKAGE_PHYTIUM_OPTEE_BOARD="phytiumpi" diff --git a/package/Config.in b/package/Config.in index cae039cbe181d52ee80522d037901d8b99a1f633..0f0f74a0172c2f98b470a870030177eef26b5bc9 100644 --- a/package/Config.in +++ b/package/Config.in @@ -239,8 +239,9 @@ menu "Filesystem and flash utilities" source "package/unionfs/Config.in" source "package/xfsprogs/Config.in" source "package/zfs/Config.in" - source "package/rootfs-chown/Config.in" - source "package/phytium-tools/Config.in" + source "package/rootfs-chown/Config.in" + source "package/phytium-tools/Config.in" + source "package/phytium-desktop-tools/Config.in" endmenu menu "Fonts, cursors, icons, sounds and themes" diff --git a/package/phytium-desktop-tools/Config.in b/package/phytium-desktop-tools/Config.in new file mode 100644 index 0000000000000000000000000000000000000000..e297235a36261b7ec7094f5bfeb340b1e3d5e845 --- /dev/null +++ b/package/phytium-desktop-tools/Config.in @@ -0,0 +1,2 @@ +config BR2_PACKAGE_PHYTIUM_DESKTOP_TOOLS + bool "phytium_desktop_tools" diff --git a/package/phytium-desktop-tools/phytium-desktop-tools.mk b/package/phytium-desktop-tools/phytium-desktop-tools.mk new file mode 100644 index 0000000000000000000000000000000000000000..b1293231b145c431710e93f2646d32a3d91dc31d --- /dev/null +++ b/package/phytium-desktop-tools/phytium-desktop-tools.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# phytium-desktop-tools +# +################################################################################ + +PHYTIUM_DESKTOP_TOOLS_VERSION = 0.1 +PHYTIUM_DESKTOP_TOOLS_SITE = package/phytium-desktop-tools/src +PHYTIUM_DESKTOP_TOOLS_SITE_METHOD = local +PHYTIUM_DESKTOP_TOOLS_INSTALL_TARGET_CMDS = YES + +define PHYTIUM_DESKTOP_TOOLS_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/usr/bin + mkdir -p $(TARGET_DIR)/usr/share/images/desktop-base/ + mkdir -p $(TARGET_DIR)/usr/share/lightdm/lightdm-gtk-greeter.conf.d/ + mkdir -p $(TARGET_DIR)/usr/share/desktop-base/profiles/xdg-config/xfce4/xfconf/xfce-perchannel-xml/ + mkdir -p $(TARGET_DIR)/var/lib/alsa/ + mkdir -p $(TARGET_DIR)/usr/share/alsa/ucm2/ + mkdir -p $(TARGET_DIR)/usr/share/alsa/ucm2/conf.d/simple-card/ + mkdir -p $(TARGET_DIR)/usr/share/alsa/ucm2/conf.d/PMDK-I2S/ + mkdir -p $(TARGET_DIR)/home/user/.config/autostart/ + $(INSTALL) -m 777 -D $(@D)/dark.jpg $(TARGET_DIR)/usr/share/images/desktop-base/ + $(INSTALL) -m 755 -D $(@D)/01_debian.conf $(TARGET_DIR)/usr/share/lightdm/lightdm-gtk-greeter.conf.d/ + $(INSTALL) -m 755 -D $(@D)/xfce4-desktop.xml $(TARGET_DIR)/usr/share/desktop-base/profiles/xdg-config/xfce4/xfconf/xfce-perchannel-xml/ + $(INSTALL) -m 644 -D $(@D)/asound.state $(TARGET_DIR)/var/lib/alsa/ + cp -rf $(@D)/Phytium/ $(TARGET_DIR)/usr/share/alsa/ucm2/ + $(INSTALL) -m 755 -D $(@D)/switch_to_headphone.sh $(TARGET_DIR)/usr/bin/ + $(INSTALL) -m 644 -D $(@D)/sound_output_device_switching.desktop $(TARGET_DIR)/home/user/.config/autostart/ +endef + +$(eval $(generic-package)) diff --git a/package/phytium-tools/src/01_debian.conf b/package/phytium-desktop-tools/src/01_debian.conf similarity index 100% rename from package/phytium-tools/src/01_debian.conf rename to package/phytium-desktop-tools/src/01_debian.conf diff --git a/package/phytium-desktop-tools/src/Phytium/PMDK-I2S/HiFi.conf b/package/phytium-desktop-tools/src/Phytium/PMDK-I2S/HiFi.conf new file mode 100644 index 0000000000000000000000000000000000000000..1845c10c311a17b3fdcf20b0def5955c829b0c01 --- /dev/null +++ b/package/phytium-desktop-tools/src/Phytium/PMDK-I2S/HiFi.conf @@ -0,0 +1,16 @@ +SectionDevice."HDMI Audio" { + Comment "HDMI Audio" + + EnableSequence [ + ] + + DisableSequence [ + ] + + Value { + PlaybackPriority 200 + PlaybackPCM "hw:${CardId},0" + JackControl "HDMI/DP,pcm=0 Jack" + } +} + diff --git a/package/phytium-desktop-tools/src/Phytium/PMDK-I2S/PMDK-I2S.conf b/package/phytium-desktop-tools/src/Phytium/PMDK-I2S/PMDK-I2S.conf new file mode 100644 index 0000000000000000000000000000000000000000..14a3a45ed4dd0ce931e83a3fcb4a599f0b1b0e23 --- /dev/null +++ b/package/phytium-desktop-tools/src/Phytium/PMDK-I2S/PMDK-I2S.conf @@ -0,0 +1,6 @@ +Syntax 3 + +SectionUseCase."HiFi" { + File "HiFi.conf" + Comment "Play HiFi quality voice." +} diff --git a/package/phytium-desktop-tools/src/Phytium/es8336/HiFi.conf b/package/phytium-desktop-tools/src/Phytium/es8336/HiFi.conf new file mode 100644 index 0000000000000000000000000000000000000000..e5295f0cb36bcd9d9b8197f833974e7ca2e4c1a4 --- /dev/null +++ b/package/phytium-desktop-tools/src/Phytium/es8336/HiFi.conf @@ -0,0 +1,31 @@ +SectionDevice."Headphones" { + Comment "Headphones" + + EnableSequence [ + ] + + DisableSequence [ + ] + + Value { + PlaybackPriority 200 + PlaybackPCM "hw:${CardId},0" + JackControl "Headphones Jack" + } +} + +SectionDevice."Microphone" { + Comment "Microphone" + + EnableSequence [ + cset "name='Differential Mux' lin2-rin2" + ] + + DisableSequence [ + ] + + Value { + CapturePriority 200 + CapturePCM "hw:${CardId},0" + } +} diff --git a/package/phytium-desktop-tools/src/Phytium/es8336/es8336.conf b/package/phytium-desktop-tools/src/Phytium/es8336/es8336.conf new file mode 100644 index 0000000000000000000000000000000000000000..14a3a45ed4dd0ce931e83a3fcb4a599f0b1b0e23 --- /dev/null +++ b/package/phytium-desktop-tools/src/Phytium/es8336/es8336.conf @@ -0,0 +1,6 @@ +Syntax 3 + +SectionUseCase."HiFi" { + File "HiFi.conf" + Comment "Play HiFi quality voice." +} diff --git a/package/phytium-desktop-tools/src/asound.state b/package/phytium-desktop-tools/src/asound.state new file mode 100644 index 0000000000000000000000000000000000000000..47742d8c92aeb8523b9fd2cd5caa545d425ecc81 --- /dev/null +++ b/package/phytium-desktop-tools/src/asound.state @@ -0,0 +1,333 @@ +state.phytiumpe220xi2 { + control.1 { + iface MIXER + name 'HP Playback Volume' + value.0 3 + value.1 3 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 4' + dbmin -4800 + dbmax -1200 + dbvalue.0 -1200 + dbvalue.1 -1200 + } + } + control.2 { + iface MIXER + name 'HPMixer Gain' + value.0 0 + value.1 0 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 7' + dbmin -1200 + dbmax -150 + dbvalue.0 -1200 + dbvalue.1 -1200 + } + } + control.3 { + iface MIXER + name 'DAC Playback Volume' + value.0 152 + value.1 152 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 192' + dbmin -9999999 + dbmax 0 + dbvalue.0 -2000 + dbvalue.1 -2000 + } + } + control.4 { + iface MIXER + name 'Enable DAC Soft Ramp' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.5 { + iface MIXER + name 'DAC Soft Ramp Rate' + value 4 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 4' + } + } + control.6 { + iface MIXER + name 'Playback Polarity' + value Normal + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 Normal + item.1 'R Invert' + item.2 'L Invert' + item.3 'L + R Invert' + } + } + control.7 { + iface MIXER + name 'DAC Notch Filter' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.8 { + iface MIXER + name 'DAC Double Fs Mode' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.9 { + iface MIXER + name 'DAC Volume Control-LeR' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.10 { + iface MIXER + name 'DAC Stereo Enhancement' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + } + } + control.11 { + iface MIXER + name 'MIC Boost' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.12 { + iface MIXER + name 'Input PGA' + value 6 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 8' + dbmin 0 + dbmax 2400 + dbvalue.0 1800 + } + } + control.13 { + iface MIXER + name 'mic-in Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.14 { + iface MIXER + name 'Differential Mux' + value 'lin2-rin2 with 15db Boost' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 lin1-rin1 + item.1 lin2-rin2 + item.2 'lin1-rin1 with 15db Boost' + item.3 'lin2-rin2 with 15db Boost' + } + } + control.15 { + iface MIXER + name 'Digital Mic Mux' + value 'dmic disable' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 'dmic disable' + item.1 'dmic data at high level' + item.2 'dmic data at low level' + } + } + control.16 { + iface MIXER + name 'DAC SRC Mux' + value 'LDATA TO LDAC, RDATA TO RDAC' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 'LDATA TO LDAC, RDATA TO RDAC' + item.1 'LDATA TO LDAC, LDATA TO RDAC' + item.2 'RDATA TO LDAC, RDATA TO RDAC' + item.3 'RDATA TO LDAC, LDATA TO RDAC' + } + } + control.17 { + iface MIXER + name 'Left Hp mux' + value lin1-rin1 + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 lin1-rin1 + item.1 lin2-rin2 + item.2 'lin-rin with Boost' + item.3 'lin-rin with Boost and PGA' + } + } + control.18 { + iface MIXER + name 'Right Hp mux' + value lin1-rin1 + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 lin1-rin1 + item.1 lin2-rin2 + item.2 'lin-rin with Boost' + item.3 'lin-rin with Boost and PGA' + } + } + control.19 { + iface MIXER + name 'Left Hp mixer LLIN Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.20 { + iface MIXER + name 'Left Hp mixer Left DAC Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.21 { + iface MIXER + name 'Right Hp mixer RLIN Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.22 { + iface MIXER + name 'Right Hp mixer Right DAC Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } +} +state.PMDKI2S { + control.1 { + iface CARD + name 'HDMI/DP,pcm=0 Jack' + value true + comment { + access read + type BOOLEAN + count 1 + } + } + control.2 { + iface PCM + name 'Playback Channel Map' + value.0 0 + value.1 0 + comment { + access read + type INTEGER + count 2 + range '0 - 36' + } + } + control.3 { + iface PCM + name 'IEC958 Playback Mask' + value ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + comment { + access read + type IEC958 + count 1 + } + } + control.4 { + iface PCM + name 'IEC958 Playback Default' + value '0400000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' + comment { + access 'read write' + type IEC958 + count 1 + } + } + control.5 { + iface PCM + name ELD + value '1000070066140001000000000000000005e30124323450315731090707000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' + comment { + access 'read volatile' + type BYTES + count 128 + } + } + control.6 { + iface MIXER + name 'DP Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } +} diff --git a/package/phytium-tools/src/dark.jpg b/package/phytium-desktop-tools/src/dark.jpg similarity index 100% rename from package/phytium-tools/src/dark.jpg rename to package/phytium-desktop-tools/src/dark.jpg diff --git a/package/phytium-desktop-tools/src/sound_output_device_switching.desktop b/package/phytium-desktop-tools/src/sound_output_device_switching.desktop new file mode 100644 index 0000000000000000000000000000000000000000..412b500d4556ae26a2ce87cfd23d270bbd5a3234 --- /dev/null +++ b/package/phytium-desktop-tools/src/sound_output_device_switching.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Exec=/usr/bin/switch_to_headphone.sh +Hidden=false +NoDisplay=false +X-GNOME-Autostart-enabled=true +Name=Switch to headphone Script +Comment=Starts switch to headphone script on login diff --git a/package/phytium-desktop-tools/src/switch_to_headphone.sh b/package/phytium-desktop-tools/src/switch_to_headphone.sh new file mode 100755 index 0000000000000000000000000000000000000000..387915652b909170aa03f6807a97eb24ba570b02 --- /dev/null +++ b/package/phytium-desktop-tools/src/switch_to_headphone.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# Phytium phytiumpi script for automatically switching the sound output device. +# +# Copyright (c) 2024 Phytium Technology Co., Ltd. + + +while true; do + + FLAG="$(pactl list sinks | grep -oP '\[Out\] Headphones:.*?\bnot available\b' | grep -o 'not available')" + + if [ -z "$FLAG" ]; then + pacmd set-default-sink 1 + fi + + sleep 2 + +done diff --git a/package/phytium-tools/src/xfce4-desktop.xml b/package/phytium-desktop-tools/src/xfce4-desktop.xml similarity index 100% rename from package/phytium-tools/src/xfce4-desktop.xml rename to package/phytium-desktop-tools/src/xfce4-desktop.xml diff --git a/package/phytium-tools/phytium-tools.mk b/package/phytium-tools/phytium-tools.mk index ce506f2128ecdacc2f6ae75a1aa2deecc1e2a17d..d69b247f16d78585219f8d5a6ff5e4d261b0566b 100644 --- a/package/phytium-tools/phytium-tools.mk +++ b/package/phytium-tools/phytium-tools.mk @@ -13,13 +13,9 @@ define PHYTIUM_TOOLS_INSTALL_TARGET_CMDS mkdir -p $(TARGET_DIR)/usr/bin mkdir -p $(TARGET_DIR)/lib/firmware/rtlbt mkdir -p $(TARGET_DIR)/lib/systemd/system/ - mkdir -p $(TARGET_DIR)/usr/share/images/desktop-base/ - mkdir -p $(TARGET_DIR)/usr/share/lightdm/lightdm-gtk-greeter.conf.d/ - mkdir -p $(TARGET_DIR)/usr/share/desktop-base/profiles/xdg-config/xfce4/xfconf/xfce-perchannel-xml/ mkdir -p $(TARGET_DIR)/lib/firmware/rtw88/ - $(INSTALL) -m 777 -D $(@D)/dark.jpg $(TARGET_DIR)/usr/share/images/desktop-base/ - $(INSTALL) -m 755 -D $(@D)/01_debian.conf $(TARGET_DIR)/usr/share/lightdm/lightdm-gtk-greeter.conf.d/ - $(INSTALL) -m 755 -D $(@D)/xfce4-desktop.xml $(TARGET_DIR)/usr/share/desktop-base/profiles/xdg-config/xfce4/xfconf/xfce-perchannel-xml/ + mkdir -p $(TARGET_DIR)/lib/firmware/rtl_bt/ + mkdir -p $(TARGET_DIR)/etc/modprobe.d/ $(INSTALL) -m 755 -D $(@D)/rtlbt/* $(TARGET_DIR)/lib/firmware/rtlbt/ $(INSTALL) -m 755 -D $(@D)/rtk_hciattach $(TARGET_DIR)/usr/bin/ $(INSTALL) -m 755 -D $(@D)/resize.sh $(TARGET_DIR)/usr/bin/ @@ -27,6 +23,9 @@ define PHYTIUM_TOOLS_INSTALL_TARGET_CMDS $(INSTALL) -m 755 -D $(@D)/runtime_replace_bootloader.sh $(TARGET_DIR)/usr/bin/ $(INSTALL) -m 444 -D $(@D)/rtw8821c_fw.bin $(TARGET_DIR)/lib/firmware/rtw88/ $(INSTALL) -m 755 -D $(@D)/rc.local $(TARGET_DIR)/etc/ + $(INSTALL) -m 755 -D $(@D)/rtlbt/rtl8821c_config $(TARGET_DIR)/lib/firmware/rtl_bt/rtl8821c_config.bin + $(INSTALL) -m 755 -D $(@D)/rtlbt/rtl8821c_fw $(TARGET_DIR)/lib/firmware/rtl_bt/rtl8821c_fw.bin + $(INSTALL) -m 755 -D $(@D)/rtw88.conf $(TARGET_DIR)/etc/modprobe.d/ endef $(eval $(generic-package)) diff --git a/package/phytium-tools/src/rtw88.conf b/package/phytium-tools/src/rtw88.conf new file mode 100644 index 0000000000000000000000000000000000000000..7ea328ed8d4f6e776677602effda68a821ff7ffe --- /dev/null +++ b/package/phytium-tools/src/rtw88.conf @@ -0,0 +1 @@ +options rtw88_core disable_lps_deep=y diff --git a/package/phyuboot/phyuboot.mk b/package/phyuboot/phyuboot.mk index 51dc69bf7134410f91dc8fb9707f10639c2692a7..e38219c6551203703ccef13a402f4d8daa2c2c12 100644 --- a/package/phyuboot/phyuboot.mk +++ b/package/phyuboot/phyuboot.mk @@ -4,9 +4,10 @@ # ################################################################################ -PHYUBOOT_VERSION = 1.32-v2.1 -PHYUBOOT_SITE = package/phyuboot/src -PHYUBOOT_SITE_METHOD = local +PHYUBOOT_VERSION = 450cf1800670422e9a39b1589f2d1257ccb6ad24 +PHYUBOOT_SITE = https://gitee.com/phytium_embedded/phytium-rogue-umlibs.git +PHYUBOOT_SITE_METHOD = git + PHYUBOOT_DEPENDENCIES = linux host-dtc MKIMAGE_PI = $(HOST_DIR)/bin/mkimage_phypi # The only available license files are in PDF and RTF formats, and we @@ -16,10 +17,10 @@ PHYUBOOT_INSTALL_IMAGES = YES PHYUBOOT_RAMSIZE = $(BR2_PACKAGE_PHYUBOOT_RAMSIZE) define PHYUBOOT_INSTALL_IMAGES_CMDS - $(INSTALL) -D -m 0777 $(@D)/fip-all-optee-$(BR2_PACKAGE_PHYUBOOT_RAMSIZE).bin $(BINARIES_DIR)/fip-all.bin - $(INSTALL) -D -m 0777 $(@D)/kernel.its $(BINARIES_DIR)/kernel.its - $(INSTALL) -D -m 755 $(@D)/mkimage $(HOST_DIR)/bin/mkimage_phypi - PATH=$(BR_PATH) $(MKIMAGE_PI) -f $(BINARIES_DIR)/kernel.its $(BINARIES_DIR)/fitImage + $(INSTALL) -D -m 0777 $(@D)/phyuboot/fip-all-optee-$(BR2_PACKAGE_PHYUBOOT_RAMSIZE).bin $(BINARIES_DIR)/fip-all.bin + $(INSTALL) -D -m 0777 $(PHYUBOOT_PKGDIR)/src/kernel.its $(BINARIES_DIR)/kernel.its + $(INSTALL) -D -m 755 $(PHYUBOOT_PKGDIR)/src/mkimage $(HOST_DIR)/bin/mkimage_phypi + PATH=$(BR_PATH) $(MKIMAGE_PI) -f $(BINARIES_DIR)/kernel.its $(BINARIES_DIR)/fitImage endef $(eval $(generic-package)) diff --git a/package/phyuboot/src/fip-all-optee-2GB.bin b/package/phyuboot/src/fip-all-optee-2GB.bin deleted file mode 100644 index fd0e4b09ecec027cb0a5d4daad01755892a0fdc7..0000000000000000000000000000000000000000 Binary files a/package/phyuboot/src/fip-all-optee-2GB.bin and /dev/null differ diff --git a/package/phyuboot/src/fip-all-optee-4GB.bin b/package/phyuboot/src/fip-all-optee-4GB.bin deleted file mode 100644 index 12f62778a55cdffa8f77744bd37b1e574fff69e7..0000000000000000000000000000000000000000 Binary files a/package/phyuboot/src/fip-all-optee-4GB.bin and /dev/null differ diff --git a/package/util-linux/0001-libuuid-include-c-h-to-cover-restrict-keyword.patch b/package/util-linux/0001-libuuid-include-c-h-to-cover-restrict-keyword.patch deleted file mode 100644 index 3b4f5109202461f57c9efc0da7db5496af619e14..0000000000000000000000000000000000000000 --- a/package/util-linux/0001-libuuid-include-c-h-to-cover-restrict-keyword.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 5f9b88f43ba7f98f81bde3538d5f4e5cd1a6c01c Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 5 Aug 2021 09:46:21 +0200 -Subject: libuuid: include c.h to cover restrict keyword - -References: https://github.com/karelzak/util-linux/issues/1405 -Signed-off-by: Karel Zak - -[Retrieved from: -https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?id=5f9b88f43ba7f98f81bde3538d5f4e5cd1a6c01c] -Signed-off-by: Fabrice Fontaine ---- - libuuid/src/unparse.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/libuuid/src/unparse.c b/libuuid/src/unparse.c -index f9a5e4315..ffeed2ed6 100644 ---- a/libuuid/src/unparse.c -+++ b/libuuid/src/unparse.c -@@ -33,6 +33,7 @@ - */ - - #include -+#include "c.h" - - #include "uuidP.h" - --- -cgit 1.2.3-1.el7 - diff --git a/package/util-linux/0002-libblkid-don-t-mark-cache-as-probed-if-sys-not-available.patch b/package/util-linux/0002-libblkid-don-t-mark-cache-as-probed-if-sys-not-available.patch deleted file mode 100644 index bfc8f60834b3da9d6d0146ce4804bf9860996529..0000000000000000000000000000000000000000 --- a/package/util-linux/0002-libblkid-don-t-mark-cache-as-probed-if-sys-not-available.patch +++ /dev/null @@ -1,141 +0,0 @@ -From 84d38ae3eca523ef990cb848563cc63de25266e6 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Fri, 19 Nov 2021 14:19:03 +0100 -Subject: [PATCH] libblkid: don't mark cache as "probed" if /sys not available - -For "mount --all" we need to read the cache more than once in a short -time. The library checks the delay between probes, and if the delay is -too short, it does not read devices. This is a problem on boot when there -are no /sys, and the cache is empty. In this case, we need to check -for /sys until it's available constantly. - -https://github.com/util-linux/util-linux/issues/1492 -Signed-off-by: Karel Zak - -[Retrieved from: -https://github.com/util-linux/util-linux/commit/84d38ae3eca523ef990cb848563cc63de25266e6] -Signed-off-by: Fabrice Fontaine ---- - libblkid/src/devname.c | 26 +++++++++++++++++--------- - libblkid/src/resolve.c | 2 +- - libblkid/src/tag.c | 8 +++++--- - 3 files changed, 23 insertions(+), 13 deletions(-) - -diff --git a/libblkid/src/devname.c b/libblkid/src/devname.c -index 90a8245fc9..9a173e3489 100644 ---- a/libblkid/src/devname.c -+++ b/libblkid/src/devname.c -@@ -429,6 +429,8 @@ sysfs_probe_all(blkid_cache cache, int only_if_new, int only_removable) - if (!sysfs) - return -BLKID_ERR_SYSFS; - -+ DBG(DEVNAME, ul_debug(" probe /sys/block")); -+ - /* scan /sys/block */ - while ((dev = xreaddir(sysfs))) { - DIR *dir = NULL; -@@ -533,14 +535,18 @@ sysfs_probe_all(blkid_cache cache, int only_if_new, int only_removable) - /* - * Read the device data for all available block devices in the system. - */ --static int probe_all(blkid_cache cache, int only_if_new) -+static int probe_all(blkid_cache cache, int only_if_new, int update_interval) - { -+ int rc; -+ - if (!cache) - return -BLKID_ERR_PARAM; - - if (cache->bic_flags & BLKID_BIC_FL_PROBED && -- time(NULL) - cache->bic_time < BLKID_PROBE_INTERVAL) -+ time(NULL) - cache->bic_time < BLKID_PROBE_INTERVAL) { -+ DBG(PROBE, ul_debug("don't re-probe [delay < %d]", BLKID_PROBE_INTERVAL)); - return 0; -+ } - - blkid_read_cache(cache); - #ifdef VG_DIR -@@ -548,7 +554,13 @@ static int probe_all(blkid_cache cache, int only_if_new) - #endif - ubi_probe_all(cache, only_if_new); - -- sysfs_probe_all(cache, only_if_new, 0); -+ rc = sysfs_probe_all(cache, only_if_new, 0); -+ -+ /* Don't mark the change as "probed" if /sys not avalable */ -+ if (update_interval && rc == 0) { -+ cache->bic_time = time(NULL); -+ cache->bic_flags |= BLKID_BIC_FL_PROBED; -+ } - - blkid_flush_cache(cache); - return 0; -@@ -567,11 +579,7 @@ int blkid_probe_all(blkid_cache cache) - int ret; - - DBG(PROBE, ul_debug("Begin blkid_probe_all()")); -- ret = probe_all(cache, 0); -- if (ret == 0) { -- cache->bic_time = time(NULL); -- cache->bic_flags |= BLKID_BIC_FL_PROBED; -- } -+ ret = probe_all(cache, 0, 1); - DBG(PROBE, ul_debug("End blkid_probe_all() [rc=%d]", ret)); - return ret; - } -@@ -589,7 +597,7 @@ int blkid_probe_all_new(blkid_cache cache) - int ret; - - DBG(PROBE, ul_debug("Begin blkid_probe_all_new()")); -- ret = probe_all(cache, 1); -+ ret = probe_all(cache, 1, 0); - DBG(PROBE, ul_debug("End blkid_probe_all_new() [rc=%d]", ret)); - return ret; - } -diff --git a/libblkid/src/resolve.c b/libblkid/src/resolve.c -index 641b022860..16653fa8e1 100644 ---- a/libblkid/src/resolve.c -+++ b/libblkid/src/resolve.c -@@ -32,7 +32,7 @@ char *blkid_get_tag_value(blkid_cache cache, const char *tagname, - blkid_cache c = cache; - char *ret = NULL; - -- DBG(TAG, ul_debug("looking for %s on %s", tagname, devname)); -+ DBG(TAG, ul_debug("looking for tag %s on %s device", tagname, devname)); - - if (!devname) - return NULL; -diff --git a/libblkid/src/tag.c b/libblkid/src/tag.c -index 390a648648..178336505f 100644 ---- a/libblkid/src/tag.c -+++ b/libblkid/src/tag.c -@@ -326,14 +326,14 @@ blkid_dev blkid_find_dev_with_tag(blkid_cache cache, - blkid_dev dev; - int pri; - struct list_head *p; -- int probe_new = 0; -+ int probe_new = 0, probe_all = 0; - - if (!cache || !type || !value) - return NULL; - - blkid_read_cache(cache); - -- DBG(TAG, ul_debug("looking for %s=%s in cache", type, value)); -+ DBG(TAG, ul_debug("looking for tag %s=%s in cache", type, value)); - - try_again: - pri = -1; -@@ -366,9 +366,11 @@ blkid_dev blkid_find_dev_with_tag(blkid_cache cache, - goto try_again; - } - -- if (!dev && !(cache->bic_flags & BLKID_BIC_FL_PROBED)) { -+ if (!dev && !probe_all -+ && !(cache->bic_flags & BLKID_BIC_FL_PROBED)) { - if (blkid_probe_all(cache) < 0) - return NULL; -+ probe_all++; - goto try_again; - } - return dev; diff --git a/package/util-linux/Config.in b/package/util-linux/Config.in index 9e9b8933e50be4099448b7111eb552d6853af0d9..1f5dacec2fedd2ef4104d54e29087eb872ec082c 100644 --- a/package/util-linux/Config.in +++ b/package/util-linux/Config.in @@ -88,13 +88,15 @@ config BR2_PACKAGE_UTIL_LINUX_CHFN_CHSH depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR) # linux-pam depends on !BR2_STATIC_LIBS depends on BR2_USE_MMU # linux-pam + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # linux-pam select BR2_PACKAGE_LINUX_PAM help Change login shell, real user name and information -comment "chfn/chsh needs a toolchain w/ wchar, locale, dynamic library" +comment "chfn/chsh needs a toolchain w/ wchar, locale, dynamic library, gcc >= 4.9" depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \ - || BR2_STATIC_LIBS + || BR2_STATIC_LIBS \ + || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 config BR2_PACKAGE_UTIL_LINUX_CHMEM bool "chmem" @@ -146,6 +148,11 @@ config BR2_PACKAGE_UTIL_LINUX_HWCLOCK help Query or set the hardware clock (RTC) +config BR2_PACKAGE_UTIL_LINUX_IPCMK + bool "ipcmk" + help + Make various IPC resources + config BR2_PACKAGE_UTIL_LINUX_IPCRM bool "ipcrm" help @@ -156,6 +163,14 @@ config BR2_PACKAGE_UTIL_LINUX_IPCS help Show information on IPC facilities +config BR2_PACKAGE_UTIL_LINUX_IRQTOP + bool "irqtop" + depends on BR2_USE_MMU # libsmartcols + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS + help + Show information on IRQs + config BR2_PACKAGE_UTIL_LINUX_KILL bool "kill" help @@ -183,13 +198,16 @@ config BR2_PACKAGE_UTIL_LINUX_LOGIN depends on !BR2_STATIC_LIBS # linux-pam depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam depends on BR2_USE_MMU # fork(), linux-pam + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # linux-pam select BR2_PACKAGE_LINUX_PAM help Begin a session on the system -comment "login needs a uClibc or glibc toolchain w/ wchar, locale, dynamic library" +comment "login needs a uClibc or glibc toolchain w/ wchar, locale, dynamic library, gcc >= 4.9" depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \ - || BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_MUSL + || BR2_STATIC_LIBS \ + || BR2_TOOLCHAIN_USES_MUSL \ + || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 config BR2_PACKAGE_UTIL_LINUX_LOSETUP bool "losetup" @@ -198,6 +216,18 @@ config BR2_PACKAGE_UTIL_LINUX_LOSETUP help Set up and control loop devices +config BR2_PACKAGE_UTIL_LINUX_LSFD + bool "lsfd" + depends on BR2_USE_MMU # libsmartcols + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19 + select BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS + help + List file descriptors (modern replacement for lsof) + +comment "lsfd needs a toolchain w/ headers >= 3.19" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19 + config BR2_PACKAGE_UTIL_LINUX_LSLOGINS bool "lslogins" depends on BR2_USE_MMU # libsmartcols @@ -250,6 +280,7 @@ config BR2_PACKAGE_UTIL_LINUX_MOUNTPOINT config BR2_PACKAGE_UTIL_LINUX_NEWGRP bool "newgrp" + select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC help Log in to a new group @@ -318,15 +349,18 @@ config BR2_PACKAGE_UTIL_LINUX_RUNUSER depends on !BR2_STATIC_LIBS depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam depends on BR2_USE_MMU # fork(), linux-pam + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # linux-pam select BR2_PACKAGE_LINUX_PAM help Run a command with substitute user and group ID (does not need to ask for a password, because it may be executed by the root user only) -comment "runuser needs a uClibc or glibc toolchain w/ wchar, locale, dynamic library" +comment "runuser needs a uClibc or glibc toolchain w/ wchar, locale, dynamic library, gcc >= 4.9" depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \ - || BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_MUSL + || BR2_STATIC_LIBS \ + || BR2_TOOLCHAIN_USES_MUSL \ + || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 config BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS bool "scheduling utilities" @@ -355,17 +389,21 @@ config BR2_PACKAGE_UTIL_LINUX_SU depends on !BR2_STATIC_LIBS depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam depends on BR2_USE_MMU # fork(), linux-pam + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # linux-pam select BR2_PACKAGE_LINUX_PAM help Run a command with substitute user and group ID -comment "su needs a uClibc or glibc toolchain w/ wchar, locale, dynamic library" +comment "su needs a uClibc or glibc toolchain w/ wchar, locale, dynamic library, gcc >= 4.9" depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \ - || BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_MUSL + || BR2_STATIC_LIBS \ + || BR2_TOOLCHAIN_USES_MUSL \ + || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 config BR2_PACKAGE_UTIL_LINUX_SULOGIN bool "sulogin" depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC help Single-user login @@ -411,6 +449,17 @@ config BR2_PACKAGE_UTIL_LINUX_VIPW help Edit the password, group, shadow-password or shadow-group file +config BR2_PACKAGE_UTIL_LINUX_WAITPID + bool "waitpid" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_3 # pidfd_open + help + Utility to wait for arbitrary processes + +comment "waitpid needs a toolchain w/ headers >= 5.3" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_3 + config BR2_PACKAGE_UTIL_LINUX_WALL bool "wall" depends on BR2_USE_MMU # fork() diff --git a/package/util-linux/util-linux-libs/0001-libuuid-include-c-h-to-cover-restrict-keyword.patch b/package/util-linux/util-linux-libs/0001-libuuid-include-c-h-to-cover-restrict-keyword.patch deleted file mode 120000 index beecc3a48f16d4ecff9956032b5cf67679d6b6f9..0000000000000000000000000000000000000000 --- a/package/util-linux/util-linux-libs/0001-libuuid-include-c-h-to-cover-restrict-keyword.patch +++ /dev/null @@ -1 +0,0 @@ -../0001-libuuid-include-c-h-to-cover-restrict-keyword.patch \ No newline at end of file diff --git a/package/util-linux/util-linux-libs/0002-libblkid-don-t-mark-cache-as-probed-if-sys-not-available.patch b/package/util-linux/util-linux-libs/0002-libblkid-don-t-mark-cache-as-probed-if-sys-not-available.patch deleted file mode 120000 index 2f3c4821445608267f48e3764cf55412afcbeeb0..0000000000000000000000000000000000000000 --- a/package/util-linux/util-linux-libs/0002-libblkid-don-t-mark-cache-as-probed-if-sys-not-available.patch +++ /dev/null @@ -1 +0,0 @@ -../0002-libblkid-don-t-mark-cache-as-probed-if-sys-not-available.patch \ No newline at end of file diff --git a/package/util-linux/util-linux-libs/util-linux-libs.mk b/package/util-linux/util-linux-libs/util-linux-libs.mk index 20566345c63d59d752f5fb50ea2ea757a652fcf2..0337e7e13a247d2f44c3f2bddb70ecb7985443d5 100644 --- a/package/util-linux/util-linux-libs/util-linux-libs.mk +++ b/package/util-linux/util-linux-libs/util-linux-libs.mk @@ -24,6 +24,7 @@ UTIL_LINUX_LIBS_LICENSE_FILES = README.licensing \ UTIL_LINUX_LIBS_INSTALL_STAGING = YES UTIL_LINUX_LIBS_DEPENDENCIES = \ host-pkgconf \ + $(if $(BR2_PACKAGE_LIBXCRYPT),libxcrypt) \ $(TARGET_NLS_DEPENDENCIES) UTIL_LINUX_LIBS_CONF_OPTS += \ --disable-rpath \ @@ -52,6 +53,9 @@ UTIL_LINUX_LIBS_CONF_OPTS += --disable-widechar # No libs use ncurses UTIL_LINUX_LIBS_CONF_OPTS += --without-ncursesw --without-ncurses +# workaround for static_assert on uclibc-ng < 1.0.42 +UTIL_LINUX_LIBS_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -Dstatic_assert=_Static_assert" + # Unfortunately, the util-linux does LIBS="" at the end of its # configure script. So we have to pass the proper LIBS value when # calling the configure script to make configure tests pass properly, diff --git a/package/util-linux/util-linux.hash b/package/util-linux/util-linux.hash index 748a36e0be3f63b11e568c08fda9450198f11595..d47f47fdbae58cf9110e504bd713e8a0c7ab5674 100644 --- a/package/util-linux/util-linux.hash +++ b/package/util-linux/util-linux.hash @@ -1,7 +1,7 @@ -# From https://www.kernel.org/pub/linux/utils/util-linux/v2.37/sha256sums.asc -sha256 634e6916ad913366c3536b6468e7844769549b99a7b2bf80314de78ab5655b83 util-linux-2.37.4.tar.xz +# From https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.39/sha256sums.asc +sha256 7b6605e48d1a49f43cc4b4cfc59f313d0dd5402fa40b96810bd572e167dfed0f util-linux-2.39.3.tar.xz # License files, locally calculated -sha256 869660b5269f4f40a8a679da7f403ea3a6e71d46087aab5e14871b09bcb55955 README.licensing +sha256 13f0ea46d12d798c095a6ad39d7ddc988e2e4d274c6494115f6b463f7bc4f702 README.licensing sha256 9b718a9460fed5952466421235bc79eb49d4e9eacc920d7a9dd6285ab8fd6c6d Documentation/licenses/COPYING.BSD-3-Clause sha256 ba7640f00d93e72e92b94b9d71f25ec53bac2f1682f5c4adcccb0018359f60f8 Documentation/licenses/COPYING.BSD-4-Clause-UC sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 Documentation/licenses/COPYING.GPL-2.0-or-later diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk index 358403e4b596ad9cda3ad880fcba00cc9444a419..d45b96e43301a002aced5bb97dcaaae72c2bc58e 100644 --- a/package/util-linux/util-linux.mk +++ b/package/util-linux/util-linux.mk @@ -7,15 +7,21 @@ # When making changes to this file, please check if # util-linux-libs/util-linux-libs.mk needs to be updated accordingly as well. -UTIL_LINUX_VERSION_MAJOR = 2.37 -UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).4 +UTIL_LINUX_VERSION_MAJOR = 2.39 +UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).3 UTIL_LINUX_SOURCE = util-linux-$(UTIL_LINUX_VERSION).tar.xz UTIL_LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/util-linux/v$(UTIL_LINUX_VERSION_MAJOR) # README.licensing claims that some files are GPL-2.0 only, but this is not # true. Some files are GPL-3.0+ but only in tests and optionally in hwclock # (but we disable that option). rfkill uses an ISC-style license. -UTIL_LINUX_LICENSE = GPL-2.0+, BSD-4-Clause, LGPL-2.1+ (libblkid, libfdisk, libmount), BSD-3-Clause (libuuid), ISC (rfkill) +UTIL_LINUX_LICENSE = \ + GPL-2.0+, \ + BSD-4-Clause, \ + LGPL-2.1+ (libblkid, libfdisk, libmount), \ + BSD-3-Clause (libuuid), \ + BSD-2-Clause (xxhash), \ + ISC (rfkill) UTIL_LINUX_LICENSE_FILES = README.licensing \ Documentation/licenses/COPYING.BSD-3-Clause \ Documentation/licenses/COPYING.BSD-4-Clause-UC \ @@ -24,9 +30,14 @@ UTIL_LINUX_LICENSE_FILES = README.licensing \ Documentation/licenses/COPYING.LGPL-2.1-or-later UTIL_LINUX_CPE_ID_VENDOR = kernel + +# 0001-libmount-ifdef-statx-call.patch +UTIL_LINUX_AUTORECONF = YES + UTIL_LINUX_INSTALL_STAGING = YES UTIL_LINUX_DEPENDENCIES = \ host-pkgconf \ + $(if $(BR2_PACKAGE_LIBXCRYPT),libxcrypt) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LIBS),util-linux-libs) \ $(TARGET_NLS_DEPENDENCIES) UTIL_LINUX_CONF_OPTS += \ @@ -35,13 +46,6 @@ UTIL_LINUX_CONF_OPTS += \ UTIL_LINUX_LINK_LIBS = $(TARGET_NLS_LIBS) -# workaround missing disk-utils/raw.8 file in util-linux-2.37.3 -# release download package -define UTIL_LINUX_FIX_DISK_UTILS_COMPILE - touch $(@D)/disk-utils/raw.8 -endef -UTIL_LINUX_POST_PATCH_HOOKS += UTIL_LINUX_FIX_DISK_UTILS_COMPILE - HOST_UTIL_LINUX_DEPENDENCIES = host-pkgconf # We also don't want the host-python dependency @@ -93,6 +97,9 @@ endif UTIL_LINUX_CONF_OPTS += --without-ncursesw --without-ncurses endif +# workaround for static_assert on uclibc-ng < 1.0.42 +UTIL_LINUX_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -Dstatic_assert=_Static_assert" + # Unfortunately, the util-linux does LIBS="" at the end of its # configure script. So we have to pass the proper LIBS value when # calling the configure script to make configure tests pass properly, @@ -140,8 +147,10 @@ UTIL_LINUX_CONF_OPTS += \ $(if $(BR2_PACKAGE_UTIL_LINUX_FSCK),--enable-fsck,--disable-fsck) \ $(if $(BR2_PACKAGE_UTIL_LINUX_HARDLINK),--enable-hardlink,--disable-hardlink) \ $(if $(BR2_PACKAGE_UTIL_LINUX_HWCLOCK),--enable-hwclock --disable-hwclock-gplv3,--disable-hwclock) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_IPCMK),--enable-ipcmk,--disable-ipcmk) \ $(if $(BR2_PACKAGE_UTIL_LINUX_IPCRM),--enable-ipcrm,--disable-ipcrm) \ $(if $(BR2_PACKAGE_UTIL_LINUX_IPCS),--enable-ipcs,--disable-ipcs) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_IRQTOP),--enable-irqtop,--disable-irqtop) \ $(if $(BR2_PACKAGE_UTIL_LINUX_KILL),--enable-kill,--disable-kill) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LAST),--enable-last,--disable-last) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LIBBLKID),--enable-libblkid,--disable-libblkid) \ @@ -153,6 +162,7 @@ UTIL_LINUX_CONF_OPTS += \ $(if $(BR2_PACKAGE_UTIL_LINUX_LOGGER),--enable-logger,--disable-logger) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LOGIN),--enable-login,--disable-login) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LOSETUP),--enable-losetup,--disable-losetup) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LSFD),--enable-lsfd,--disable-lsfd) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LSLOGINS),--enable-lslogins,--disable-lslogins) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LSMEM),--enable-lsmem,--disable-lsmem) \ $(if $(BR2_PACKAGE_UTIL_LINUX_MESG),--enable-mesg,--disable-mesg) \ @@ -182,6 +192,7 @@ UTIL_LINUX_CONF_OPTS += \ $(if $(BR2_PACKAGE_UTIL_LINUX_UTMPDUMP),--enable-utmpdump,--disable-utmpdump) \ $(if $(BR2_PACKAGE_UTIL_LINUX_UUIDD),--enable-uuidd,--disable-uuidd) \ $(if $(BR2_PACKAGE_UTIL_LINUX_VIPW),--enable-vipw,--disable-vipw) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_WAITPID),--enable-waitpid,--disable-waitpid) \ $(if $(BR2_PACKAGE_UTIL_LINUX_WALL),--enable-wall,--disable-wall) \ $(if $(BR2_PACKAGE_UTIL_LINUX_WDCTL),--enable-wdctl,--disable-wdctl) \ $(if $(BR2_PACKAGE_UTIL_LINUX_WIPEFS),--enable-wipefs,--disable-wipefs) \ @@ -214,7 +225,9 @@ HOST_UTIL_LINUX_CONF_OPTS += \ --disable-agetty \ --disable-chfn-chsh \ --disable-chmem \ + --disable-ipcmk \ --disable-login \ + --disable-lsfd \ --disable-lslogins \ --disable-mesg \ --disable-more \